rlpatrao/claude_harness_forge/code-gen
Claude Code and agent skill by rlpatrao/claude_harness_forge
- community
Checking that the SKILL.md file is still in the repository.
Story-driven code generation with strict quality principles. Use when implementing user stories, writing production code, creating unit tests, or generating code from specs. Enforces small modules, static typing, 50-line function limit, and 100% meaningful test coverage.
Install
npx vskill@latest install rlpatrao/claude_harness_forge/code-genSKILL.md
The same SKILL.md was published earlier as rlpatrao/claude_harness_forge/code-gen.
Code Generation Skill
Core Principle: Story-Driven, Not Vibe-Driven
Every line of code traces back to a user story. No speculative features.
The Six Quality Principles
Reference: "AI is forcing us to write good code" (Steve Krenzel)
For decades, we've known what good code looks like: thorough tests, clear documentation, small well-scoped modules, static typing, and reproducible dev environments. AI agents need these — they aren't great at making a mess and cleaning it up later. The only guardrails are the ones you set and enforce.
- Small, Well-Scoped Modules — one file = one responsibility. No
utils/helpers.py. - Static Typing Everywhere — type-annotate all functions. Zero
anyin TypeScript. - Functions Under 50 Lines — decompose long functions into named subfunctions.
- Explicit Error Handling — typed error classes, no bare exceptions.
- No Dead Code — every line traces to a story. Delete, don't comment out.
- Self-Documenting — good names > comments. Types as primary documentation.
For detailed patterns and examples, see references/quality-principles.md.
Implementation Workflow
For each story:
- Read the story's acceptance criteria and layer assignment.
- Read architecture:
api-contracts.md,data-models.md,folder-structure.md. - Write implementation code first, following patterns in references/patterns.md.
- Write unit tests for 100% meaningful coverage — see references/testing-rules.md.
- Run verification:
uv run pytest -x -q,uv run ruff check .,uv run mypy src/. - Submit for code review.
Parallel Execution via Agent Teams
For independent stories (same parallel group):
- Read
dependency-graph.mdto identify the parallel group. - Create an agent team with one teammate per story.
- Each teammate owns distinct files — no overlapping edits.
- Require plan approval before teammates write code.
- Teammates communicate via agent team messaging about shared interfaces.
- After all teammates complete, run the full test suite.
For examples, see examples/agent-team-setup.md.
Code Review Gate
After implementation, the code-reviewer agent reviews all changes. See the review skill. All BLOCK findings must be resolved before the story is done.
Gotchas
These are common failure modes — check for them before marking code as done:
- Importing upward in layers. Service importing from API, or Repository importing from Service. Always check:
grep -rn "from src.api" src/service/ src/repository/. - Functions creeping past 50 lines. It happens gradually. Count lines after writing — if over 50, split immediately.
- `any` types sneaking into TypeScript. Especially in API response handling. Use
unknown+ type guards instead. - Bare `except Exception:` in Python. Always catch specific typed errors. If you're unsure which, that means the error types aren't defined yet — define them first.
- Mocking business logic in tests. Only mock external boundaries (DB, APIs, file I/O). If you're mocking a function in
src/service/, something is wrong. - Test data like "test123" or "foo@bar.com". Use realistic data: "Sarah Chen", "sarah.chen@horizonequity.com", "$2,500,000".
- Writing code before reading the story. Every time. Read acceptance criteria first.
- Commented-out code blocks. Git remembers. Delete the code, don't comment it.
- Missing error path tests. If a function can throw, there must be a test that triggers that throw.
- Agent teammates editing the same file. Always verify file ownership in the plan before approving.
Additional Resources
- references/quality-principles.md — detailed rules and examples for each quality principle
- references/patterns.md — Python and TypeScript implementation patterns
- references/testing-rules.md — testing rules, coverage targets, mock boundaries
- examples/agent-team-setup.md — agent team configuration examples
Verification
After every story:
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/code-gen/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rlpatrao/claude_harness_forge/code-gen)