Agent context files
Portable Agent Skills for coding agents: Git workflows, linked worktrees, GitLab MRs, Cloudflare DNS, and agent context files.
npx -y skills add DeanThompson/agent-skills --skill agent-context-filesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
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.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.6 KB, as published. Nobody here has run it
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 fixtures
Checklist
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.