project-context
Generates and maintains a hierarchical .context/ directory with architecture overviews, coding conventions, domain glossaries, and dependency maps that give any LLM working in the project the right background. Use when setting up a new project for AI-assisted development, when the user asks to create or update context docs, when onboarding a new LLM tool to an existing codebase, or when the user says the AI doesn't understand their project.
What this skill does
# Project Context Build and maintain the `.context/` directory — a set of markdown files that give any LLM (Claude, Cursor, Copilot, Windsurf, etc.) the background it needs to work effectively in this codebase. These files are tool-agnostic. Agent-specific files like CLAUDE.md or .cursorrules reference them. ## Current context - Repo: !`basename $(git rev-parse --show-toplevel)` - Root: !`git rev-parse --show-toplevel` - Existing context: !`ls .context/ 2>/dev/null || echo "no .context/ directory"` ## Decision tree - What are you doing? - **Creating context for a new project** (no `.context/` exists) -> follow "Initial setup" below - **Updating existing context** (`.context/` exists) -> follow "Audit and update" below - **Adding context for a specific area** (user asks about one topic) -> follow "Single document" below - **User says the AI doesn't understand their project** -> run "Audit and update" to find gaps, then fill them ## Initial setup ### 1. Analyze the project Run these to understand the codebase: - `ls` the root and major directories to understand structure - Read `package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, or equivalent for dependencies - Read existing docs: README, CONTRIBUTING, CLAUDE.md, .cursorrules - `git log --oneline -20` for recent activity and commit style - Glob for config files: `**/*.config.*`, `**/tsconfig*`, `biome.json`, `.eslintrc*`, etc. ### 2. Recommend a context plan Based on analysis, recommend which documents the project needs. Every project gets `overview.md`. The rest depend on complexity: |Document|When to include|What it covers| |---|---|---| |`overview.md`|Always|Architecture, module boundaries, data flow, key decisions| |`conventions.md`|Projects with >5 files|Coding standards, naming, error handling, file organization| |`glossary.md`|Domain-heavy projects|Business terms, entity definitions, domain relationships| |`dependencies.md`|Projects with >3 external deps|Key deps, why chosen, how configured, what for| |`<dirname>.md`|Major subdirectories (src/, api/, lib/, etc.)|Subdirectory-specific architecture and conventions| Present the plan as a checklist and get user confirmation before generating. ### 3. Generate documents For each document in the plan: 1. Read the relevant code thoroughly — don't guess, read the actual files 2. Write the document following the format in `references/document-formats.md` 3. Write it to `.context/<name>.md` Generate `overview.md` first since other documents reference it. ### 4. Wire up agent files After generating `.context/`, suggest additions to agent-specific files: - **CLAUDE.md**: add `See .context/ for project architecture, conventions, and domain knowledge.` - **.cursorrules**: add equivalent pointer - **AGENTS.md**: add equivalent pointer Don't overwrite existing content — append the pointer or suggest where to add it. ## Audit and update ### 1. Diff analysis Compare the current `.context/` files against the actual codebase: 1. Read each `.context/*.md` file 2. Scan the codebase for changes since the context was written — new directories, changed dependencies, new patterns 3. Identify: **stale** (info contradicts current code), **missing** (new areas with no context), **accurate** (still correct) ### 2. Report Present a table: ```text | File | Status | What changed | |---|---|---| | overview.md | Stale | New api/ module added, auth rewritten | | conventions.md | Accurate | — | | glossary.md | Missing terms | "workspace" and "tenant" used but undefined | ``` ### 3. Update For each stale or missing item: 1. Read the relevant current code 2. Update the `.context/` file with accurate information 3. Show the diff of what changed ## Single document When the user asks for a specific document: 1. Determine which document type from the table in "Initial setup" 2. Analyze the relevant part of the codebase 3. Write the document following `references/document-formats.md` 4. If `.context/` doesn't exist yet, create it and also generate `overview.md` as a baseline ## Writing principles Context documents serve LLMs, not humans. This changes how you write: - **Be explicit about relationships** — "OrderService calls PaymentGateway.charge() which calls Stripe" is better than "OrderService handles payments" - **Name the files** — "authentication logic lives in `src/auth/` with the main entry point at `src/auth/index.ts`" beats "the auth module" - **State the non-obvious** — skip things any LLM can infer from reading the code (function signatures, import paths). Focus on *why* decisions were made and *how* modules interact - **Keep it current or delete it** — wrong context is worse than no context. If something is stale and you can't verify it, remove it rather than leaving potentially wrong information ## Key references |File|What it covers| |---|---| |`references/document-formats.md`|Templates and structure for each document type|
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.