Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/btseee/clean-code-skills/agents-mdgit clone --depth 1 https://github.com/btseee/clean-code-skillsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01603 | $0.01603 |
| Opus 5 | $0.00801 | $0.00801 |
| Sonnet 5 | $0.00321 | $0.00321 |
| Haiku 4.5 | $0.00160 | $0.00160 |
Grade A, and why
clean-code-skills AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
81% identical to clean-code-skills clean-code.instructions.md — 21 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Instructions for AI coding agents (Codex CLI, Jules, opencode, Amp, Gemini CLI when configured for AGENTS.md, and any other harness that reads this file). In a project that installs this package, the managed block below is kept up to date by the installer; content outside the markers is never touched.
Load and apply the clean-code skill before non-trivial code writing, editing, review, testing, or refactoring. Depending on the install target, the skill lives at .claude/skills/clean-code/SKILL.md, .github/skills/clean-code/SKILL.md, skills/clean-code/SKILL.md, or in the agent's global skill registry as clean-code.
Clean Code Rules (clean-code-skills)
These rules govern all code you write, edit, review, test, or refactor in this project, in any language or framework. They are the non-negotiable summary; the full skill has the reasoning, the workflows, and the checklists.
Read the skill before non-trivial work. First existing path wins: .claude/skills/clean-code/SKILL.md, .agents/skills/clean-code/SKILL.md, .github/skills/clean-code/SKILL.md, skills/clean-code/SKILL.md. Its references/ folder holds the depth: architecture.md, principles.md, smell-triage.md, session-protocol.md, new-project.md, project-refactor.md, audit-report.md.
Load project context first. Read .clean/context.json, .clean/architecture.md, .clean/decisions.md, and .clean/ledger.md if they exist, then the project's own instruction files. A recorded decision is settled. A declared architecture outranks your instincts. Project instructions outrank this block.
Work Loop
- Frame: name the behavior change, the assumptions that affect design, the smallest scope, and the check that will prove it.
- Read first: nearby code, naming, tests, error style, framework idioms. Search for an existing implementation before writing anything new.
- Place: decide which unit owns the responsibility and which side of which boundary it sits on.
- Edit surgically: smallest diff that solves the task; targeted edits over whole-file regeneration; remove what your change orphaned; no unrelated changes.
- Verify: run the narrowest meaningful check, then broader checks as risk demands. Never claim success without evidence.
- Review the diff: dead code, duplication, mixed responsibilities, wrong-way dependencies, swallowed errors, wrong-place files, missing tests.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 82 lines · 1,603 tokens per session scan A 00e3753e3652
clean-code-skills AGENTS.md is an instructions file published in the GitHub repository btseee/clean-code-skills (7 stars, last pushed 12d ago), licensed MIT. It adds 1,603 tokens to every session, about $0.0080 per session on Opus 5. A static security scan graded it A with 0 findings. It is 81% identical to clean-code-skills clean-code.instructions.md, differing in 21 lines, and is treated as a copy.
Other instructions, from other repositories
openyida AGENTS.md
Instructions for openyida/openyida, covering openyida — ai agent 开发指引, 项目简介, 项目结构, skill 测评 harness(scripts/eval/) and 关键约定.
lime AGENTS.md
AGENTS.md instructions for limecloud/lime, covering lime 源码仓库指南, 事实源, 工程约束, 协议与质量 and 执行方式.
claude-skills-management CLAUDE.md
Instructions for hardness1020/claude-skills-management, covering claude.md, plugin release, plugin update and python.
scoop-skills AGENTS.md
AGENTS.md instructions for entr0pia/scoop-skills, covering scoop skills 项目概述, 仓库概述, 项目结构, 技能说明 and scoop-skills.
scoop-skills GEMINI.md
Gemini CLI instructions for entr0pia/scoop-skills, covering scoop skills 项目概述, 仓库概述, 项目结构, 技能说明 and scoop-skills.
skills CLAUDE.md
Instructions for Foysal50x/skills, a project described as: Opinionated Laravel engineering skills for AI coding agents.