From mk
Generates or updates docs/project-context.md, the single source of truth for project conventions, tech stack, and anti-patterns. Loaded by agents as a "constitution" to ensure consistent behavior.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mk:project-context [generate|update|init]When to use
Use when generating or updating docs/project-context.md — single source of truth for project conventions, tech stack, anti-patterns.
[generate|update|init]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Creates `docs/project-context.md` — the agent "constitution" that every agent loads on activation.
Creates docs/project-context.md — the agent "constitution" that every agent loads on activation.
To generate the full documentation suite (README, architecture, code standards, etc.), use
mk:docs-initinstead.mk:project-contextgenerates only the agent constitution.
Eliminate context drift between agents. Without a single authoritative file, agents infer conventions independently and make conflicting decisions. Project context solves this by providing one document all agents read first.
Scan the codebase and create docs/project-context.md from scratch.
Scan targets:
package.json / Cargo.toml / go.mod / pyproject.toml → tech stacktsconfig.json / eslint.* / prettier.* → code conventions**/test/** / **/*.test.* / **/*.spec.* / **/*.cy.* → testing patternsdocs/ → architecture decisions, prior context.env.example → environment variables (names only, not values)Output: docs/project-context.md using templates/project-context-template.md
Re-scan codebase and update existing docs/project-context.md. Preserves manual edits in sections marked <!-- manual -->.
Write a TODO-filled skeleton to docs/project-context.md for greenfield projects
where generate would produce empty sections (no codebase to scan yet).
Behaviour:
docs/project-context.md already exists → refuse with error. Use update instead.templates/skeleton.md to docs/project-context.md.docs/ directory if it does not exist.When to use init vs generate:
| Situation | Action |
|---|---|
| Empty or near-empty project, < 5 source files | init — fill manually |
| Established project with real code | generate — auto-derive |
Existing docs/project-context.md is stale | update — re-scan, preserve manual edits |
mk:bootstrap or mk:docs-initThe template emphasizes facts agents cannot infer from code:
See templates/project-context-template.md for the full structure.
update after major architecture changes<!-- manual --> sections survive update action but NOT generate — backup before regenerating from scratchinit refuses to overwrite an existing docs/project-context.md — this is intentional. Delete the file manually if you truly want to reset to a blank skeleton.All agents load docs/project-context.md in their Required Context section. If the file doesn't exist, agents behave exactly as before (graceful degradation).
SKILL.md — you are heretemplates/project-context-template.md — output template used by generate actiontemplates/skeleton.md — TODO-placeholder constitution template used by init actionnpx claudepluginhub ngocsangyem/meowkit --plugin mkCreates minimal, high-signal CLAUDE.md and AGENTS.md context files for repos using empirical best practices. Triggers on /init, create/update requests, or missing context during brainstorming.
Generates optimized project-context.md files for AI agent consistency. Activates when users mention 'project context' or 'generate context'.
Scans codebase to update CLAUDE.md and AGENTS.md with production-quality docs on stack, structure, models, APIs, services, repositories, auth, and frontend.