directives
Skill1 starsChanged 3 months agoMITView on GitHub
Manage project directive docs in docs/ folders. Use when the user wants to add or update conventions/standards documents, audit the directive system for quality, or find which directives are relevant to a task. Modes: add, update, maintain, context, suggest.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- vercel-labs/json-rendertheir own version, first seen Oct 29, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- vercel-labs/json-render★ 19ksame 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.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- context-refactorSkill
- how-tosSkill
- scriptsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 16 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
All scripts this skill uses (scripts/discover_docs.py, scripts/describe_docs.py) are plain Python 3 (no bash/WSL required — this works the …
- Distinctive: line 39
Precedence: when a project's own doc and a bundled default cover the same topic (e.g.
- Distinctive: line 52
Every directive doc must have YAML frontmatter with exactly these fields:
- Distinctive: line 64
Run the discovery script first to understand the project's docs landscape:
- Distinctive: line 75
Read existing docs in the same folder for tone/format reference
- Very specific: line 76
Create the new directive doc at <path> with correct frontmatter and well-structured content
- Distinctive: line 79
Ensure root AGENTS.md contains the directives instruction (see below).
- Distinctive: line 85
Read the current doc
- Distinctive: line 86
Update content and amend frontmatter as needed (preserve existing fields, update if stale)
- Distinctive: line 99
Frontmatter completeness: all three fields present and non-empty
- Distinctive: line 107
Check the directives instruction is present.
- Very specific: line 115
Run describe_docs.py — frontmatter only, no body
- Distinctive: line 117
Read and return the full content of matched docs
- Distinctive: line 118
If no docs match, say so clearly — do not fabricate conventions
- Very specific: line 126
Run discover_docs.py to see what docs already exist
- Distinctive: line 128
Read AGENTS.md and any existing docs to understand what is already covered
- Distinctive: line 130
Look for undocumented conventions: naming patterns, testing approaches, tooling, deployment steps, data formats, language-specific idioms
- Distinctive: line 162
Before touching the codebase, estimate scope:
- Very specific: line 169
Run describe_docs.py and check for docs with git in their covers tags
- Distinctive: line 170
If found → read that doc and follow its conventions exactly for branch naming and commits
- Distinctive: line 171
If not found → use these defaults:
- Very specific: line 174
Commit messages: imperative mood, subject line under 72 characters, no AI/agent/Claude mentions
≈ “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
You manage a project's directive system — structured markdown files in docs/ and **/docs/ folders that encode conventions, standards, and domain knowledge. A single root AGENTS.md tells agents to use this skill to find relevant directives before doing any work.
All scripts this skill uses (scripts/discover_docs.py, scripts/describe_docs.py) are plain
Python 3 (no bash/WSL required — this works the same on Linux, macOS, and Windows) and live in
this skill's own scripts/ directory, next to this SKILL.md file. Run them with
python3 <path>, resolving <path> against that directory (e.g. if this file is at
/home/alice/.claude/skills/directives/SKILL.md, run
python3 /home/alice/.claude/skills/directives/scripts/discover_docs.py).
Skill-bundled default docs
This skill ships with its own docs/ folder (next to this file) containing a default set of
directive docs — general engineering conventions (hierarchical verification, out-of-tree
artifacts, tools-over-judgment) that apply to any project, not just one that happens to vendor
its own copies.
discover_docs.py/describe_docs.py always include these bundled docs in addition to whatever
a project has in its own docs/ folders — there is nothing to set up per project to benefit from
them. A project that wants to opt out entirely (it disagrees with the defaults wholesale, or
wants a clean slate) creates a .no-bundled-directives marker file (any content — presence is
what matters) at its root; discover_docs.py/describe_docs.py then skip the bundled-docs
section for that project, regardless of whether this skill is installed via symlink or copy (see
docs/install-conventions.md in the agent-context-kit repo for why both an install-time flag and
this per-project marker exist). Short of that, treat them as read-only defaults: add/update
only ever create or modify files in the calling project's own docs/ folder, never in this
skill's bundled docs/. If a bundled default needs to change, edit it here (in the skill), not
by forking a copy into a project.
Precedence: when a project's own doc and a bundled default cover the same topic (e.g. both
describe the git integration/merge strategy), the project doc wins — it is the more specific,
deliberately-authored source. Don't silently follow the bundled default if a project doc contradicts
it; flag the contradiction (see maintain below) so one of them gets fixed or the project doc
explicitly notes it supersedes the default.
A directive with an embedded section of ordered steps (that section belongs in a how-to instead),
a directive with no backing enforcement script, or a directive at the wrong level of the directory
tree are cross-cutting judgment calls spanning how-tos/scripts/the directory hierarchy — see
context-refactor rather than trying to fix them from inside maintain here.
Directive doc frontmatter
Every directive doc must have YAML frontmatter with exactly these fields:
---
description: one-line summary of what this doc covers
scope: root # or a subsystem path, e.g. ledger, obsidian-brain
covers: [tag1, tag2, tag3] # keywords for relevance matching
---Starting every invocation
Run the discovery script first to understand the project's docs landscape:
python3 scripts/discover_docs.pyModes
add <path> "<intent>"
- Run
discover_docs.py - Read existing docs in the same folder for tone/format reference
- Create the new directive doc at
<path>with correct frontmatter and well-structured content- Content should be directive in tone: rules, not descriptions
- Concise — Claude reads this on every relevant task
- Ensure root
AGENTS.mdcontains the directives instruction (see below); add it if missing - Assess impact and apply codebase changes (see Impact Assessment)
update <path> "<intent>"
- Run
discover_docs.py - Read the current doc
- Update content and amend frontmatter as needed (preserve existing fields, update if stale)
- Assess impact and apply codebase changes
maintain
A quality audit of the entire directive system. Run:
python3 scripts/describe_docs.pyAudit each doc by reading it fully:
- Frontmatter completeness: all three fields present and non-empty
- Description quality: specific and accurate? Does it reflect what the doc actually says? Rewrite if vague or stale.
- Covers tags: accurate and complete? Read the body — are there important topics not represented by any tag? Add missing ones. Remove tags that don't match the content.
- Scope accuracy: does the declared scope match where the file lives?
- Body relevance: are there sections that contradict current project state, or are clearly outdated? Do NOT silently delete content — flag for human review with a comment or report.
- Bundled-default conflicts: for each skill-bundled doc, check whether any project doc covers the same topic (matching
coverstags is a good starting signal) and whether their guidance actually agrees. Flag any contradiction for human review — do not silently pick a winner.
For root AGENTS.md:
- Check the directives instruction is present; add it if missing
Report a summary: what was changed, what was flagged for human review.
context "<task description>"
Find and return the directives relevant to a task.
- Run
describe_docs.py— frontmatter only, no body - Match
coverstags anddescriptiontext against the task description — be inclusive, not exclusive; err on the side of returning more - Read and return the full content of matched docs
- If no docs match, say so clearly — do not fabricate conventions
This mode is intended to be called at the start of any task to replace manual discovery.
suggest
Explore the repository and propose new directive docs that would be useful to add.
- Run
discover_docs.pyto see what docs already exist - Explore the repository structure:
- Read
AGENTS.mdand any existing docs to understand what is already covered - Scan top-level directories and their contents (
ls,Glob,Readkey files likeMakefile,pyproject.toml,package.json, CI configs, etc.) - Look for undocumented conventions: naming patterns, testing approaches, tooling, deployment steps, data formats, language-specific idioms
- Read
- For each gap found, produce a proposal — do not create files yet:
- Proposed path (e.g.
investments/docs/scraper.md) - One-line description of what it would cover
- Sample
coverstags - Two or three bullet points of what the directive body would say
- Proposed path (e.g.
- Present all proposals as a numbered list. Ask the user which ones to create (they can say "all", list numbers, or pick interactively).
- For each approved proposal, run
add <path> "<intent>"inline — do not ask for confirmation again.
Focus on gaps where Claude would make wrong decisions without guidance — not on documenting things that are obvious from the code.
AGENTS.md instruction
The root AGENTS.md should contain this block (add it under a ## Directives heading if
missing). Use AGENTS.md, not CLAUDE.md, as the canonical file — if the project's agent is
Claude Code specifically, ensure its CLAUDE.md contains a single-line import instead of a
duplicated copy: @AGENTS.md (Claude Code resolves that as an include). Other agents that
support the emerging AGENTS.md cross-tool convention read it directly, no import needed.
## Directives
Before starting any task, run `/directives context "<task description>"` to load the relevant
conventions for that task. Do not proceed without doing this first.Impact assessment (add / update modes)
Before touching the codebase, estimate scope:
- Small: directive only affects naming conventions, comments, formatting, or a clearly bounded set of files (e.g. one module, one subsystem) → apply changes inline; stage for review
- Large: directive implies structural changes, touches many files, or introduces new patterns across the whole codebase → branch + chunk
Git conventions
- Run
describe_docs.pyand check for docs withgitin theircoverstags - If found → read that doc and follow its conventions exactly for branch naming and commits
- If not found → use these defaults:
- Branch naming:
add/<description>for new conventions,fix/<description>for corrections - Integrate via rebase onto main branch + fast-forward merge; no merge commits
- Commit messages: imperative mood, subject line under 72 characters, no AI/agent/Claude mentions
- Branch naming:
Large refactors
For large changes, apply them incrementally (one coherent chunk per session turn, committing each as it lands) rather than in one pass. This skill only manages directive docs — tracking the work itself (task files, resuming interrupted refactors, etc.) is outside its scope; use whatever task-tracking convention the project has, if any.
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.

