How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-cortex:context-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Initialize the Context Degradation System prevention framework in a project. This creates the `.context/` directory structure and the appropriate bootloader file(s) for the user's AI tool, then analyzes the codebase to fill in project-specific details.
Initialize the Context Degradation System prevention framework in a project. This creates the .context/ directory structure and the appropriate bootloader file(s) for the user's AI tool, then analyzes the codebase to fill in project-specific details.
When the user runs /context-init:
Detect the current environment — Check your system prompt to determine which AI tool is running this skill. Create the matching bootloader:
| Environment | Bootloader |
|---|---|
| Claude Code | CLAUDE.md |
| GitHub Copilot | .github/copilot-instructions.md |
If you can't determine the environment, ask the user. All bootloaders use the same template content — only the file location differs.
Check if already initialized — Look for existing .context/ directory and bootloader files
.context/CONVENTIONS.md exists with code quality rules (naming conventions, error handling, testing standards, git workflow) AND PROJECT_GUIDELINES.md does not exist, warn the user: "Your current CONVENTIONS.md contains code quality rules that will be removed during reinitialization. Run /guidelines-init first to migrate them to PROJECT_GUIDELINES.md, or they will be lost."Ask the user which context files to include:
How would you like to set up context?
- All context files — Full framework with status, architecture, conventions, decisions, master plan, and setup
- Pick context files — Choose only the ones you need
Which context files do you want? (list the numbers, e.g. "1, 3, 5")
CURRENT_STATUS.md— Track what's done, in progress, and nextARCHITECTURE.md— Document system design and componentsCONVENTIONS.md— Tooling, environment, and build commandsDECISIONS.md— Architecture Decision RecordsMASTER_PLAN.md— Implementation roadmap and phasesSETUP.md— Dev environment setup instructions
Only create the selected context files in the steps below.
Create the directory structure — Create .context/ and only the selected context files:
.context/
└── [selected files...]
Create files from templates — Copy from templates/context/ to target locations. Create the bootloader for the detected environment (step 1), and only the context files the user selected (step 3):
| Template source | Target location | Always created? |
|---|---|---|
templates/context/CLAUDE.md | CLAUDE.md (project root) | Yes |
templates/context/copilot-instructions.md | .github/copilot-instructions.md | Yes |
templates/context/CURRENT_STATUS.md | .context/CURRENT_STATUS.md | Only if selected |
templates/context/ARCHITECTURE.md | .context/ARCHITECTURE.md | Only if selected |
templates/context/CONVENTIONS.md | .context/CONVENTIONS.md | Only if selected |
templates/context/DECISIONS.md | .context/DECISIONS.md | Only if selected |
templates/context/MASTER_PLAN.md | .context/MASTER_PLAN.md | Only if selected |
templates/context/SETUP.md | .context/SETUP.md | Only if selected |
When using a subset of context files, update the bootloader to only reference the files that were created.
Analyze the codebase to detect:
PROJECT_GUIDELINES.md already exists in the project rootFill in placeholders — Replace [PLACEHOLDER] markers in the created files with detected values. When filling in CONVENTIONS.md, populate only tooling and environment fields (language, runtime, formatter, linter, test framework, build commands). Do not add naming conventions, error handling patterns, testing standards, git workflow, or architecture rules — those belong in PROJECT_GUIDELINES.md.
PROJECT_GUIDELINES.md already exists: the ## Project Guidelines Reference section in CONVENTIONS.md should confirm it as the source of truth for code quality rules.PROJECT_GUIDELINES.md does not exist: the ## Project Guidelines Reference section should note that /guidelines-init can create it.Suggest a commit — Include only the files that were actually created:
git add .context/ [bootloader files created]
git commit -m "Initialize CDS prevention context framework"
Once files are created and placeholders filled:
MASTER_PLAN.md — Define implementation phases (if created)CONVENTIONS.md — Verify detected tooling and environment info (if created)ARCHITECTURE.md — Refine system design (if created)PROJECT_GUIDELINES.md already exists: note that it was detected and CONVENTIONS.md references it as the source of truth for code quality rulesPROJECT_GUIDELINES.md does not exist: recommend running /guidelines-init to create code quality rules (naming, architecture, error handling, testing, security, performance, git workflow) — explain that CONVENTIONS.md covers tooling/environment while PROJECT_GUIDELINES.md covers code quality standards. For new projects, mention that /cortex-init sets up both context and guidelines in one command./context-init againProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub xanderscannell/claude-cortex --plugin claude-cortex