context-md
Skill1 starsChanged 6 months agoMITView on GitHub
Use when initializing, updating, or auditing a per-repo CONTEXT.md glossary, the ubiquitous-language / domain-vocabulary layer for a project. Triggers on "create a CONTEXT.md", "set up the glossary", "what's our vocabulary here", "what do we call X", "add X to the glossary", "audit our CONTEXT.md", "ubiquitous language", "lock down terminology", or naming the file by short ref ("CONTEXT", "the glossary", "the domain doc", "our project language"). Also fires mid-session when 3+ domain terms get resolved in a repo lacking a glossary, when a terminology debate surfaces ("Customer vs User?", "Order vs Purchase?", "should we call this X or Y?"), or when about to bail with "I don't know what we call this here." Skip for one-shot scripts, content-only repos, throwaway prototypes, and repos with fewer than 3 domain terms worth defining.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Zejnilovic/agdtheir own version, first seen Nov 1, 2026
- amajorai/context.mdtheir own version, first seen May 28, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Zejnilovic/agd★ 5same name
- amajorai/context.md★ 1same 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 repository3 other files it gives its agents.
- docs-updateSkill
- klaxonSkill
- open-source-skillSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Scan code for likely domain terms: Look at:
- Distinctive: line 40
Test descriptions ("user can checkout with...")
- Distinctive: line 48
Ask one cluster at a time.
- Distinctive: line 50
Draft v1: Write the file in the canonical format (see the source-of-truth template linked under Cross-refs):
- Distinctive: line 59
Commit on a feature branch: Don't write to main directly on shared repos.
- Distinctive: line 67
Add the entry verbatim in the canonical format.
- Very specific: line 68
If the new term conflicts with existing usage in code, surface it: "your code uses Account here, but CONTEXT.md just resolved this to …
- Distinctive: line 69
Commit as a tiny atomic change (or stash for end-of-session bundle if mid-feature).
≈ “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
context-md
Bootstrap and maintain a per-repo CONTEXT.md glossary. The durable home for a project's ubiquitous language.
The whole point: every session stops re-deriving domain terms from class names and inference. CONTEXT.md is canonical.
When to fire
- User says: "create a CONTEXT.md", "set up the glossary", "what's our vocabulary here", "what do we call X", "add X to the glossary", "audit our CONTEXT.md", "ubiquitous language", "lock down terminology"
- User refers to the artifact by short name: "the glossary", "the domain doc", "our project language", just "CONTEXT"
- Mid-session: 3+ domain terms got resolved in conversation and the repo has no CONTEXT.md (offer to start one)
- Mid-session: terminology debate surfaces ("Customer vs User?", "Order vs Purchase?", "should we call this X or Y?"). The glossary is the resolution surface.
- Failure-mode: about to bail with "I don't know what we call this here", "the project uses both X and Y", or "the code is inconsistent on the term for X"
- Session start: working in a multi-session repo where no CONTEXT.md exists and the work is non-trivial (offer to start one)
- Cross-skill: another skill says "use the project's domain glossary vocabulary" but no glossary exists (offer to start one)
When to skip
- Content-only repos (no domain logic to glossarize)
- One-shot scripts under 50 lines
- Throwaway prototypes (capture the answer elsewhere)
- Repos with fewer than 3 domain terms worth defining
Modes
Mode 1: init (bootstrap a new CONTEXT.md)
- Detect bounded contexts. Walk the repo tree. If it splits cleanly into multiple domains, propose a
CONTEXT-MAP.mdplus per-context files. Otherwise single rootCONTEXT.md. - Scan code for likely domain terms. Look at:
- Class names (especially those that aren't framework primitives)
- Repeated nouns in route names, controller actions, model relationships
- Service-class names and their public methods
- Database table names and column names that aren't generic (id, created_at, etc.)
- Test descriptions ("user can checkout with...")
- String literals in prompts (for LLM-feature repos)
Interview the user on candidates. Present a numbered list of 15 to 25 candidate terms. For each:
- Is this domain-specific or general programming? (Drop general.)
- Is the name correct or should it be renamed? (Capture in
_Avoid_:.) - Are there synonyms used elsewhere that should be aliased away?
Ask one cluster at a time. Don't dump all 25 at once.
- Draft v1. Write the file in the canonical format (see the source-of-truth template linked under Cross-refs):
- One or two sentence preamble
## Languagesection with bolded terms, tight definitions, and_Avoid_:aliases## Relationshipswith cardinality## Flagged ambiguities(start empty if none surfaced)## Example dialoguebetween dev and domain expert (invent if needed; must read naturally)
- Multi-context only: also write
CONTEXT-MAP.mdlisting contexts plus relationships between them. Each per-context file gets its ownCONTEXT.mdwith the same internal structure. - Commit on a feature branch. Don't write to main directly on shared repos.
Mode 2: update (add/sharpen a term mid-session)
Triggered when a domain term gets resolved in conversation. Do this inline, not batched at session end.
- Read current CONTEXT.md.
- Locate the right section (Language for new term, Relationships for new cardinality, Flagged ambiguities for resolved conflict).
- Add the entry verbatim in the canonical format.
- If the new term conflicts with existing usage in code, surface it: "your code uses
Accounthere, but CONTEXT.md just resolved this toCustomer. Want me to flag the conflict in Flagged ambiguities and leave the rename for later, or rename now?" - Commit as a tiny atomic change (or stash for end-of-session bundle if mid-feature).
Mode 3: audit (check existing CONTEXT.md against code)
Triggered by "audit our CONTEXT.md", "is our glossary still accurate", or after a major refactor.
- Read CONTEXT.md.
- For each
**Term**:in## Language, grep the codebase for occurrences. If zero hits, term is dead. Propose removal. - For each
_Avoid_:alias, grep for occurrences of the avoided term. If hits exist, surface them. Code uses banned terminology, candidate for rename or for moving the alias to canonical. - Scan code for nouns NOT in CONTEXT.md that appear 5+ times across 3+ files. Candidates for addition.
- Present a numbered diff: terms to add, terms to remove, aliases to enforce. User approves; apply.
The five discipline rules
- Be opinionated. Pick one canonical term; others become
_Avoid_:. - Inline updates, not batched. Resolved during conversation, updated in the file before the next turn moves on.
- Selectivity. Project-specific terms only. Drop general programming concepts.
- Definitions are tight. One sentence. Define what it IS, not what it does.
- Flag conflicts explicitly. Ambiguous terms get a
## Flagged ambiguitiesentry with resolution.
Cross-skill plumbing
Once CONTEXT.md exists, other skills can reference it as the canonical vocabulary source. Examples: a module-map / "zoom out" skill, a debugging skill's mental-model orientation, a TDD skill (test names and interface vocabulary match CONTEXT.md), and a PRD skill (uses CONTEXT.md vocabulary in the PRD body). The pattern: domain vocab comes from CONTEXT.md; architecture/tooling rules live in a separate house-style doc.
Anti-patterns to avoid
- Don't scaffold an empty CONTEXT.md. Lazy-create when the first term resolves.
- Don't batch terminology updates to end-of-session. Inline is the discipline.
- Don't include general programming terms. "Timeout", "retry", "cache" don't belong unless the project gives them domain meaning.
- Don't lose
_Avoid_:to politeness. Pick a canonical winner; surface losers as aliases. - Don't define what a term does. Define what it IS. Behavior belongs in code.
Cross-refs
- Source / format template: the
grill-with-docsskill in mattpocock/skills. Seeskills/engineering/grill-with-docs/CONTEXT-FORMAT.mdfor the source-of-truth CONTEXT.md format. - Companion: the
docs-updateskill delegates CONTEXT.md edits to this skill during an end-of-session doc catch-up.
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.

