| name | agent-context-files |
| description | 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. Use when this capability is needed. |
| metadata | {"author":"DeanThompson"} |
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:
References
Source: DeanThompson/agent-skills — distributed by TomeVault.