skills
AGENTS.md1 starsChanged 40 days agoMITView on GitHub
These are global instructions for AI coding agents working on company projects. When rules conflict, use this priority: The shared framework should be available at: Before doing specialized work, check whether a relevant skill exists. Common mappings: Shared skills are provider-agnostic. They request execution roles instead of concrete model names. Resolve roles through: Profile selection order is --profile, then AI_PROFILE, then the saved per-provider profile, then medium. Use AI_PROVIDER=codex|claude only as an explicit provider override when automatic runtime detection is…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- advisorSkill
- code-reviewSkill
- debugSkill
- decisionSkill
- modernize-evalSkill
- modernize-planSkill
- new-featureSkill
- nf-avaloniaSkill
- nf-designSkill
- nf-specSkill
- nf-tasksSkill
- parallel-execSkill
- project-takeoverSkill
- repo-initSkill
- session-closeSkill
- tas-01-project-architecture-analyzerSkill
- tas-02-architecture-project-grouperSkill
- tas-03-architecture-normalizerSkill
- tas-04-generatorSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
35 rules. About 0 are common, 23 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈23
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Prefer small, incremental changes over large rewrites.
- Distinctive: line 8
Do not rewrite unrelated code.
- Distinctive: line 10
Prefer dependency injection and clear service boundaries.
- Distinctive: line 11
Use interfaces for business/application services unless project rules say otherwise.
- Distinctive: line 12
Add useful documentation/comments to generated or modified code, especially public APIs, services, business rules, compatibility behavior, …
- Distinctive: line 13
Do not add comments that merely repeat the code.
- Distinctive: line 14
Add or update automated tests for new functionality, bug fixes, and behavior changes unless the user explicitly says not to add tests.
- Distinctive: line 22
When rules conflict, use this priority:
- Distinctive: line 55
Before doing specialized work, check whether a relevant skill exists.
- Very specific: line 95
Do not hard-code provider model names inside shared skills.
- Distinctive: line 97
When native subagents are available, use the framework-generated role agents:
- Distinctive: line 108
When a delegated native role agent fails because its configured model is unavailable, unsupported, inaccessible to the account, or …
- Very specific: line 129
Use NEEDS_RESEARCH when external evidence is required before safe continuation.
- Very specific: line 130
Use BLOCKED when continuation requires missing input/infrastructure.
- Very specific: line 131
Use COMPLETE only when the assigned scope and acceptance checks are satisfied.
- Very specific: line 136
Use the reusable advisor skill for:
- Very specific: line 148
Before switching projects, closing a coding session, or ending meaningful implementation work, run the session-close skill.
- Distinctive: line 158
Do not run it for simple Q&A with no project changes.
- Distinctive: line 162
Use installed repository-intelligence tools instead of invoking their source projects directly.
- Very specific: line 168
prefer project-takeover when the user is inheriting an existing project.
- Distinctive: line 169
do not recursively read every repository file into the primary context.
- Distinctive: line 171
use AiIndex for semantic discovery and Graphify for structural verification.
- Very specific: line 172
read source/config/test files selectively to answer concrete questions or verify conclusions.
- Distinctive: line 173
keep expensive primary-model work focused on synthesis, conflicts, decisions, and final ownership.
- Distinctive: line 178
Use AiIndex when the task is primarily about:
- Very specific: line 195
Do not run AiIndex via dotnet run.
- Very specific: line 196
Do not invoke AiIndex.Cli or AiIndex.Mcp from the AiIndex source tree.
- Distinctive: line 197
Prefer MCP for repository intelligence during agent work.
- Very specific: line 198
Use the installed aiindex CLI only when:
- Distinctive: line 210
Use Graphify when the task is primarily about:
- Very specific: line 221
When graphify-out/graph.json exists, prefer querying the existing graph instead of rebuilding it.
- Distinctive: line 223
Do not use Graphify merely for semantic discovery such as "where is the code that does X?" when AiIndex is the better fit.
- Distinctive: line 229
Use AiIndex first to discover likely symbols, files, or concepts.
- Distinctive: line 230
Use Graphify to expand, verify, or trace the structural relationships between those results.
- Distinctive: line 232
Prefer source code and extracted structural relationships over generated reports when verifying implementation details.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
Global AI Agent Instructions
These are global instructions for AI coding agents working on company projects.
Always apply
- Prefer small, incremental changes over large rewrites.
- Do not rewrite unrelated code.
- Preserve existing behavior unless the current task explicitly asks for behavior changes.
- Prefer dependency injection and clear service boundaries.
- Use interfaces for business/application services unless project rules say otherwise.
- Add useful documentation/comments to generated or modified code, especially public APIs, services, business rules, compatibility behavior, and non-obvious logic.
- Do not add comments that merely repeat the code.
- Add or update automated tests for new functionality, bug fixes, and behavior changes unless the user explicitly says not to add tests.
- For each new or changed functionality, create or update a tester-facing markdown test case file unless the user explicitly says not to.
- Preserve existing project naming conventions. For C#/.NET, use PascalCase for public members and camelCase for local variables and parameters.
- Be explicit about null handling, error handling, and edge cases.
- Explain changed files, risks, tests added/run, and tester-facing test case files created/updated.
Rule priority
When rules conflict, use this priority:
- Current user instruction.
- Project-specific instructions in the repository.
- Project-specific skills.
- Global skills from this framework.
- Global rules from this file and
rules/. - Tool defaults.
Shared framework location
The shared framework should be available at:
%USERPROFILE%\.aior:
~/.aiUse:
rules/team-rules.mdrules/coding-standards.mdrules/security-rules.mdskills/prompts/
Skill usage
Before doing specialized work, check whether a relevant skill exists.
Common mappings:
- New feature:
skills/new-feature - Feature spec:
skills/nf-spec - Feature design:
skills/nf-design - Feature tasks:
skills/nf-tasks - Decision logging:
skills/decision - End-of-session wrap-up:
skills/session-close - Debugging:
skills/debug - Code review:
skills/code-review - Modernization assessment:
skills/modernize-eval - Modernization planning:
skills/modernize-plan - Parallel execution:
skills/parallel-exec - Architecture/TAS workflows:
skills/tas-* - Project takeover / inherited-project understanding:
skills/project-takeover - Repository initialization/onboarding:
skills/repo-init - Independent checkpoint review:
skills/advisor
Provider-aware role routing
Shared skills are provider-agnostic. They request execution roles instead of concrete model names. Resolve roles through:
providers/codex.yml/providers/claude.ymlfor the defaultmediumprofile;providers/<provider>.low.ymlfor lower-usage operation;providers/<provider>.high.ymlfor quality-first difficult work;- optional repository overrides at
<repo>/.ai/providers/<provider>.ymland<repo>/.ai/providers/<provider>.<profile>.yml.
Profile selection order is --profile, then AI_PROFILE, then the saved per-provider profile, then medium. Use AI_PROVIDER=codex|claude only as an explicit provider override when automatic runtime detection is unavailable or intentionally overridden. Generic repository provider values override the selected global profile; profile-specific repository values apply last.
Standard roles:
primary: planning, architecture, material decisions, integration, and final ownership;executor: bounded implementation/edit/test work;researcher: external documentation/API/library research;advisor: independent plan/stuck/completion review;fast: trivial low-risk routing decisions.
Do not hard-code provider model names inside shared skills.
When native subagents are available, use the framework-generated role agents:
ai-executorforexecutor;ai-researcherforresearcher;ai-advisorfor portable advisor fallback/review;ai-fastforfast.
primary is the owning/main thread. Its active model is controlled by the current Codex/Claude host session; framework low/medium/high profiles do not override that user-selected main-session model. Provider primary entries remain routing/fallback metadata only.
Mandatory role fallback protocol
When a delegated native role agent fails because its configured model is unavailable, unsupported, inaccessible to the account, or otherwise cannot start, the parent must retry that same delegated task with the generated fallback agents in numeric order:
ai-<role>ai-<role>-fallback-1ai-<role>-fallback-2(and any later generated fallback)
Do not silently perform the delegated task in the primary thread after a role-model availability failure. The primary thread may take over only when the provider configuration explicitly resolves/falls back to primary, or when every configured native candidate has failed and the workflow reports that escalation/blocker explicitly. A model-availability failure is not a task failure and must not consume the task's normal retry/failure budget. Report when a fallback agent was used when it materially affects cost, quality, or reviewer independence.
The provider helper is the executable source of truth for merged config and native fragments:
python ~/.ai/scripts/ai.py provider --effective
python ~/.ai/scripts/ai.py provider --profile low --effective
python ~/.ai/scripts/ai.py provider --role executor
python ~/.ai/scripts/ai.py provider --validateExecution boundaries
- Worker scope is
bounded: executors may touch directly related files required for the assigned task, but must report meaningful expansion. - Escalate architecture, contract, storage, rollout, or other material choices as
NEEDS_DECISION. - Use
NEEDS_RESEARCHwhen external evidence is required before safe continuation. - Use
BLOCKEDwhen continuation requires missing input/infrastructure; include the blocker, evidence collected, exact prerequisite/input needed, and useful progress already completed. - Use
COMPLETEonly when the assigned scope and acceptance checks are satisfied. - Parallel execution is
plan-only: do not create parallel workers unless the approved plan explicitly marks the work parallel-safe/parallel-eligible and parallel execution has been selected.
Advisor checkpoints
Use the reusable advisor skill for:
plan: before a substantial plan is committed or presented for approval;stuck: when substantially the same failure reaches the provider-configured threshold (default2);complete: before substantial work is declared complete.
Parent workflows explicitly classify work as substantial: true|false; do not use file count as the sole classifier.
See docs/model-routing.md for resolution, fallbacks, overrides, and provider-specific notes.
Session close rule
Before switching projects, closing a coding session, or ending meaningful implementation work, run the session-close skill.
Run it when:
- files changed;
- decisions were made;
- blockers were found;
- task status changed;
- the user says they are done, closing, wrapping up, or switching projects.
Do not run it for simple Q&A with no project changes.
Repository intelligence
Use installed repository-intelligence tools instead of invoking their source projects directly.
Repository discovery and takeover
For broad requests such as "understand this project", "take over this repository", or "learn the codebase":
- prefer
project-takeoverwhen the user is inheriting an existing project; - do not recursively read every repository file into the primary context;
- establish/repair repository intelligence through
repo-initwhen needed; - use AiIndex for semantic discovery and Graphify for structural verification;
- read source/config/test files selectively to answer concrete questions or verify conclusions;
- keep expensive primary-model work focused on synthesis, conflicts, decisions, and final ownership;
- persist concise verified project knowledge under
.ai/so future sessions can resume without another full takeover pass.
AiIndex
Use AiIndex when the task is primarily about:
- semantic or fuzzy code discovery;
- finding implementation details by concept or behavior;
- locating where a feature, rule, retry, validation, guardrail, or business behavior is implemented;
- hybrid lexical/vector search across the repository;
- discovering relevant files when the exact symbol is not known.
For agent-driven repository search and index operations, prefer the AiIndex MCP tools:
init_projectindex_statusindex_projectsearch_code
Rules:
- Do not run AiIndex via
dotnet run. - Do not invoke
AiIndex.CliorAiIndex.Mcpfrom the AiIndex source tree. - Prefer MCP for repository intelligence during agent work.
- Use the installed
aiindexCLI only when:- the user explicitly asks for a CLI command;
- an operation is not available through MCP;
- or MCP is unavailable.
The installed AiIndex runtime is expected under:
- Windows:
%USERPROFILE%\.ai\bin - Linux/macOS:
~/.ai/bin
Graphify
Use Graphify when the task is primarily about:
- callers and callees;
- dependency paths;
- imports and references;
- inheritance or implementation relationships;
- architectural relationships between components;
- impact analysis or blast radius;
- shortest paths between symbols or concepts;
- explaining how known parts of the codebase are structurally connected.
When graphify-out/graph.json exists, prefer querying the existing graph instead of rebuilding it.
Do not use Graphify merely for semantic discovery such as "where is the code that does X?" when AiIndex is the better fit.
Mixed tasks
For questions that need both semantic discovery and structural analysis:
- Use AiIndex first to discover likely symbols, files, or concepts.
- Use Graphify to expand, verify, or trace the structural relationships between those results.
Prefer source code and extracted structural relationships over generated reports when verifying implementation details.
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.

