agent-context-files
Skill1 starsChanged 6 months agoMITView on GitHub
Create, review, and optimize persistent agent context files such as AGENTS.md, CLAUDE.md, .cursorrules, GEMINI.md, or repository-specific AI assistant instructions. Use when the user asks to create or improve agent instructions, project memory, coding-agent onboarding docs, or context files that should be loaded across sessions.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cloudflare-dns-managerSkill
- gitlab-mrSkill
- git-workflowSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Create concise context files that help coding agents understand a repository without flooding every session with stale or low-value …
- Distinctive: line 16
Less is more: keep the always-loaded file short, ideally under 100 lines and usually under 300.
- Distinctive: line 20
Avoid policy duplication: do not restate linter, formatter, or test rules that the tooling already enforces.
- Distinctive: line 34
Read the current context file.
- Distinctive: line 37
Keep or add only instructions that apply across most future agent sessions.
- Distinctive: line 38
Verify the result against the checklist.
- Distinctive: line 42
Use the file the user names.
- Distinctive: line 48
When a repo already has an established context file, update that file instead of creating a competing one.
- Distinctive: line 100
Read references/best-practices.md for detailed context-engineering guidance.
- Distinctive: line 101
Read references/examples.md for good and bad examples.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Context Files
Create concise context files that help coding agents understand a repository without flooding every session with stale or low-value instructions.
Core Principles
- Less is more: keep the always-loaded file short, ideally under 100 lines and usually under 300.
- Answer WHAT, WHY, and HOW: project purpose, structure, stack, and verification commands.
- Use progressive disclosure: link to detailed docs instead of copying them into the context file.
- Prefer pointers over snippets: reference real files and commands that stay maintained by the project.
- Avoid policy duplication: do not restate linter, formatter, or test rules that the tooling already enforces.
Workflow
Create A New Context File
- Identify the target runtime or file name from the user's request.
- Explore the repository structure and existing docs.
- Identify the tech stack, project purpose, key directories, and common commands.
- Draft the context file with only universal, durable information.
- Review against the checklist below.
Improve An Existing Context File
- Read the current context file.
- Identify issues: too long, stale, task-specific, runtime-specific without reason, duplicated tooling rules, or copied code snippets.
- Move detailed material to linked docs when useful.
- Keep or add only instructions that apply across most future agent sessions.
- Verify the result against the checklist.
File Selection
Use the file the user names. If the user does not specify a target:
AGENTS.md: preferred portable default for multi-agent repositories.CLAUDE.md: use when the project is primarily used with Claude Code.GEMINI.md,.cursorrules, or other runtime-specific files: use only when requested or already established in the repo.
When a repo already has an established context file, update that file instead of creating a competing one.
Structure Template
# Project Name
Brief description of what this project does.
## Tech Stack
- Language/runtime
- Key frameworks
- Package manager
## Project Structure
- `src/` - Core application code
- `tests/` - Test suite
- `docs/` - Project documentation
## Development Commands
- `make test` - Run tests
- `make lint` - Run lint checks
- `make build` - Build project
## Key Patterns
- Include only non-obvious, durable conventions.
- Link to source files or docs for details.
## Additional Documentation
- `docs/architecture.md` - System architecture
- `docs/testing.md` - Test patterns and fixturesChecklist
Before finalizing, verify:
- The file is short enough to be loaded every session.
- It covers WHAT, WHY, and HOW.
- It avoids task-specific instructions.
- It avoids copied API docs or long code snippets.
- It points to maintained source files and docs.
- It does not duplicate formatter, linter, or type-checker rules.
- It uses runtime-specific language only where needed.
References
- Read references/best-practices.md for detailed context-engineering guidance.
- Read references/examples.md for good and bad examples.
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.

