local codegen workflow
Generate production code with a local LLM on the GPU you already own. Spec-driven codegen via LM Studio/Ollama/vLLM, with auto model-loading, a 13-bug review checklist, and a working genfile script — all model-agnostic.
Free
local codegen workflow
Example session with this skill installed
I need a Python module for an LRU cache. It should use the standard library only, support a max_size, and have get/put methods. Save it to lru_cache.py using the local Qwen model.
- Read your context and instructions
- Compiled the local codegen workflow
I have generated the lru_cache.py module using the local qwen2.5-coder-14b-instruct model. The model was pre-loaded at a 32k context window to ensure VRAM stability.
Generated LRU Cache Module
from collections import OrderedDict
class LRUCache:
"""
A simple LRU Cache using OrderedDict.
"""
def __init__(self, max_size: int = 128):
if max_size <= 0:
raise ValueError("max_size must be positive")
self.cache = OrderedDict()
self.max_size = max_size
def get(self, key):
if key not in self.cache:
return None
self.cache.move_to_end(key)
return self.cache[key]
def put(self, key, value):
if key in self.cache:
self.cache.move_to_end(key)
self.cache[key] = value
if len(self.cache) > self.max_size:
self.cache.popitem(last=False)
if __name__ == "__main__":
# Smoke test
lru = LRUCache(2)
lru.put(1, "a")
lru.put(2, "b")
print(lru.get(1)) # a
lru.put(3, "c") # evicts 2
print(lru.get(2)) # None
Next steps
- Run
pyteston the generated module to verify eviction logic. - Review the
OrderedDictimplementation against your performance requirements. - Commit with the message
feat: add lru_cache (AI-gen, reviewed).
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Paying per-token API costs for repetitive boilerplate and large-scale code generation is expensive. Local LLMs often fail during generation due to OOM errors because they are loaded with default context windows that exceed available VRAM.
What it does
- Automates the spec-driven generation of production code using local LLM servers.
- Manages VRAM-safe model loading via LM Studio v1 REST API to prevent OOM "terminated" errors.
- Enforces a senior-level review checklist to catch common local model fumbles like connection leaks and empty-list SQL crashes.
- Implements a 2-strike rule to prevent time-wasting loops on low-quality generations.
- Generates both the implementation module and its corresponding test suite from a single source-of-truth spec.
Frameworks & tools
Python 3.11, httpx, LM Studio, Ollama, vLLM, Qwen2.5-Coder, DeepSeek-Coder.
Why this beats prompting it yourself
Standard prompting often results in code blocks wrapped in conversational prose that break automation scripts. This skill includes a specialized extraction layer and a model-management handshake that ensures the model is actually loaded at a stable context length before the first token is even generated.
Use cases
- Generating large volumes of boilerplate for new microservices without incurring API fees.
- Prototyping internal tools where data privacy prevents sending code to third-party APIs.
- Setting up a repeatable generate-review-test-commit pipeline for junior-level tasks.
Known limitations
Not recommended for surgical edits to existing complex files. Requires a GPU with at least 8GB VRAM for 7B models or 16GB for 14B models.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
4 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 3 months ago
- Free with an Agensi account
- Software
Python
Permissions
What's inside
Frequently Asked Questions
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.