agent-instructions
Skill33 starsChanged 22 days agoMITView on GitHub
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and keeping them accurate as the project changes. Trigger on "write a claude.md for this repo", "set up agents.md", "the agent keeps running the wrong test command". Do not use for rules that must hold every time — see the hooks skill; for notes the agent writes itself, see the agent-memory skill.
- Reads credentials
- Installs packages
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Write the project instruction file an agent reads before touching the codebase.
- Very specific: line 52
Do not restate what the code says.
- Distinctive: line 57
Put project-specific conventions in the file and general engineering practice in skills.
- Distinctive: line 97
Every line here is something an agent would otherwise get wrong, and each one costs it a turn.
- Distinctive: line 102
Treat the instruction file as code: review changes to it, and fix it the moment it becomes inaccurate.
- Distinctive: line 103
If the same correction is given to an agent twice in a session, it belongs in the file.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Instructions
Purpose
Write the project instruction file an agent reads before touching the codebase. Its job is to convey what the agent cannot infer and would get wrong — not to restate what it can read from the code.
When to Use
- Setting up a repository for agent-assisted development.
- An agent that repeatedly makes the same wrong assumption about your project.
- Refreshing an instruction file that has drifted from reality.
Capabilities
- Structuring project instructions for an agent audience.
- Identifying what an agent cannot infer.
- Encoding conventions, commands, and constraints.
- Keeping instructions accurate as the project evolves.
Inputs
- The codebase, its conventions, and its build and test commands.
- The mistakes agents actually make in this repository.
- The things a new team member always has to be told.
Outputs
- An instruction file that is short, specific, and correct.
- Commands that work, verified.
- Constraints that prevent the failures you have observed.
Workflow
- Write down what an agent gets wrong — Start from observed failures, not from a template. If the agent keeps running the wrong test command, that is the first line.
- State the commands exactly — Build, test, lint, run. With the flags. An agent that guesses
npm testwhen the project usespnpm test:unitwastes a turn and may run the wrong thing. - Encode the conventions that are not visible — "We use
Resulttypes, not exceptions, in the domain layer." An agent can read the code, but it cannot tell a convention from a coincidence. - State the hard constraints — Never edit generated files. Never commit to main. Never modify the migration history. These prevent real damage.
- Keep it short — This file is loaded on every session. Every line costs context. Ruthlessly cut anything the agent could work out for itself.
- Update it when it is wrong — An inaccurate instruction file is worse than none, because it is trusted.
Best Practices
- Do not restate what the code says. The agent can read
package.json. It cannot know that thetestscript is broken and everyone usestest:ci. - Commands must be verified. An instruction file listing a command that fails is a trap that costs a turn every session.
- Be specific about the boundaries: which directories are generated, which are vendored, which must never be edited by hand.
- Record the non-obvious architectural decision. "The
legacy/module is being strangled; do not add to it, extendorders/instead" saves an agent from a well-intentioned wrong turn. - A long instruction file is diluted. If it exceeds roughly 150 lines, most of it is not earning its place.
- Put project-specific conventions in the file and general engineering practice in skills. The instruction file is about this repository.
Examples
An instruction file that earns its tokens:
# Project instructions
## Commands
- Install: `pnpm install --frozen-lockfile`
- Test: `pnpm test:unit` (fast) / `pnpm test:integration` (needs Docker)
- Lint: `pnpm lint --fix`
- Typecheck:`pnpm typecheck`
- Run: `pnpm dev` (requires `.env.local`; copy from `.env.example`)
Do NOT run `pnpm test` — it is an alias for the full E2E suite and takes 25 minutes.
## Conventions
- Domain errors are returned as `Result<T, DomainError>`, never thrown.
Exceptions are reserved for programmer error. See `src/shared/result.ts`.
- All money is `Money` (integer minor units). Never a float, never a number.
- Features may not import from other features. Shared code goes in `src/shared/`.
This is enforced by ESLint; if you hit that rule, move the code rather than
disabling the rule.
## Boundaries
- `src/generated/` is generated by `pnpm codegen`. Never edit by hand.
- `migrations/` is append-only. Never modify an existing migration, even to fix
a typo — write a new one.
- `legacy/billing/` is being strangled. Do not add to it. New billing code goes
in `src/features/billing/`.
## Gotchas
- The integration tests need Docker running. They will fail with a confusing
connection error if it is not.
- `pnpm dev` binds to port 3000; if it is in use the error is silent and the
server exits with code 0.Every line here is something an agent would otherwise get wrong, and each one costs it a turn.
Notes
- The single most valuable content is the "do not run X" line. Agents will find the obvious command and use it; the trap is when the obvious command is the wrong one.
- Treat the instruction file as code: review changes to it, and fix it the moment it becomes inaccurate. A stale line will be followed confidently.
- If the same correction is given to an agent twice in a session, it belongs in the file.
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- murphytrueman/design-system-ops★ 197same name
- devantler-tech/agent-skills★ 3same name
- LuisUrrutia/skills★ 2same name
- NecturaLabs/AgentSkills★ 1same name
- The-Vibe-Company/companion-skills★ 1same name
- chinthakat/agent-skills★ 0same name
- juancamiloqhz/skills★ 0same name
- krema/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use error-handling, wayfinder and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 3 projects that use this
GoogleSkillwayfinder
Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
Also in 3 projects that use this
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 3 projects that use this
GoogleSkillprototype
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
In this repository137 other files it gives its agents.
- agent-memorySkill
- hooksSkill
- plugin-developmentSkill
- skill-authoringSkill
- skill-reviewSkill
- slash-commandsSkill
- subagentsSkill
- agent-designSkill
- context-engineeringSkill
- fine-tuningSkill
- llm-cost-optimizationSkill
- llm-evaluationSkill
- llm-integrationSkill
- mcp-serverSkill
- ml-pipelineSkill
- model-selectionSkill
- prompt-engineeringSkill
- ragSkill
- structured-outputSkill
- api-designSkill
- background-jobsSkill
- cachingSkill
- djangoSkill
- event-driven-architectureSkill
- fastapiSkill
- graphqlSkill
- microservicesSkill
- nestjsSkill
- realtime-websocketsSkill
- spring-bootSkill
- competitive-analysisSkill
- lead-researchSkill
- product-analysisSkill
- resumeSkill
- user-researchSkill
- database-performanceSkill
- data-modelingSkill
- data-qualitySkill
- pandasSkill
- postgresSkill
- sparkSkill
- brand-guidelinesSkill
- generative-artSkill
- themingSkill
- ui-reviewSkill
- visual-designSkill
- architecture-decisionsSkill
- bug-fix-protocolSkill
- cli-developmentSkill
- code-reviewSkill
- debuggingSkill
- design-patternsSkill
- domain-modelingSkill
- git-workflowSkill
- legacy-modernizationSkill
- refactoringSkill
- repository-explorationSkill
- simple-designSkill
- system-designSkill
- aws-cdkSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

