coding-guidelines · tech-leads-club — Claude Code skill: what it does, how to install
Behavioral guidelines to reduce common AI coding mistakes. It forces agents to write minimal code, touch only what is requested, and verify every step.
npx skills add tech-leads-club/agent-skills --skill coding-guidelines -a claude-codeWhat coding-guidelines does
The skill adapts Karpathy guidelines into four operating principles for coding agents. The agent must stop if confused. It requires the model to state assumptions upfront, surface tradeoffs, and push back on questionable ideas. Multi-step work must follow a plan tied to verifiable checks, like writing a failing test before fixing a bug.
Simplicity and surgical edits sit at the center. The agent cannot touch neighboring code, reformat untouched lines, or add single-use abstractions. If 200 lines can be 50, rewrite it.
This rule set targets active coding, bug fixing, and review. Applying it to architecture design or documentation is explicitly forbidden by the author.
What it helps with
- Stop agents from refactoring adjacent code or styling without permission
- Force the agent to write reproducing tests before applying bug fixes
- Prevent speculative abstractions and unnecessary flexibility in one-off logic
- Push back against flawed technical decisions before code gets generated
Example prompts for the agent
- Fix the memory leak in the worker pool using coding-guidelines
- Refactor the session store using coding-guidelines without breaking existing tests
- Review this pull request according to coding-guidelines
How to install coding-guidelines
1Skills CLI (Vercel)
npx skills add tech-leads-club/agent-skills --skill coding-guidelines -a claude-code2Manually: put the files in place
~/.claude/skills/coding-guidelines/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/coding-guidelines/
1Skills CLI (Vercel)
npx skills add tech-leads-club/agent-skills --skill coding-guidelines -a codex2Manually: put the files in place
.agents/skills/coding-guidelines/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add tech-leads-club/agent-skills --skill coding-guidelines -a cursor2Manually: put the files in place
.cursor/skills/coding-guidelines/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install tech-leads-club/agent-skills coding-guidelines2Manually: put the files in place
.github/skills/coding-guidelines/SKILL.md1Skills CLI (Vercel)
npx skills add tech-leads-club/agent-skills --skill coding-guidelines -a gemini-cli2Platform CLI
gemini skills install https://github.com/tech-leads-club/agent-skills --path 'packages/skills-catalog/skills/(development)/coding-guidelines'Manually: put the files in place
.devin/skills/coding-guidelines/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add tech-leads-club/agent-skills --skill coding-guidelines -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about coding-guidelines
How do I install coding-guidelines in Claude Code?
Run npx skills add tech-leads-club/agent-skills --skill coding-guidelines -a claude-code. The file will be placed in ~/.claude/skills/coding-guidelines/SKILL.md.
What does coding-guidelines do?
It enforces strict engineering discipline on the agent: minimal diffs, zero speculative abstractions, and goal-driven loops verified with tests.
When should I not use coding-guidelines?
Do not use it for architecture design, documentation, or tasks unrelated to code.
Source text
SKILL.md · MIT
---
name: coding-guidelines
description: Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, modifying, or reviewing code — implementation tasks, code changes, refactoring, bug fixes, or feature development. Do NOT use for architecture design, documentation, or non-code tasks.
metadata:
author: ale
version: '1.0.0'
source: 'Karpathy Guidelines'
---
# Coding Guidelines
Behavioral guidelines to reduce common LLM coding mistakes. These principles bias toward caution over speed—for trivial tasks, use judgment.
## 1. Think Before Coding
**Don't assume. Don't hide confusion. Surface tradeoffs.**
Before implementing:
- State assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them—don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
- Disagree honestly. If the user's approach seems wrong, say so—don't be sycophantic.
## 2. Simplicity First
**Minimum code that solves the problem. Nothing speculative.**
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
## 3. Surgical Changes
**Touch only what you must. Clean up only your own mess.**
When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it—don't delete it.
When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.
**The test:** Every changed line should trace directly to the user's request.
## 4. Goal-Driven Execution
**Define success criteria. Loop until verified.**
Transform tasks into verifiable goals:
- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"
For multi-step tasks, state a brief plan:
```
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
```
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
© ale · MIT · tech-leads-club/agent-skills
Similar skills
All skills for Agent setup: memory, context, orchestration →coding-guidelines by other authors comes first.