Context init
Initialize CDS framework in a new projectFrom its SKILL.md
npx -y skills add xanderscannell/claude-cortex --skill context-initAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.5 KB, as published. Nobody here has run it
Initialize CDS Prevention Framework
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.
How to Use
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.mdGitHub Copilot .github/copilot-instructions.mdIf 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- If they exist, ask if the user wants to reinitialize (this will overwrite existing files)
- Important: If reinitializing and
.context/CONVENTIONS.mdexists with code quality rules (naming conventions, error handling, testing standards, git workflow) ANDPROJECT_GUIDELINES.mddoes not exist, warn the user: "Your current CONVENTIONS.md contains code quality rules that will be removed during reinitialization. Run/guidelines-initfirst to migrate them to PROJECT_GUIDELINES.md, or they will be lost." - If they don't exist, proceed with initialization
-
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
- If the user picks 1, proceed with all files (steps 3-4 below use the full file list).
- If the user picks 2, present the available context files and let them choose:
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.mdCLAUDE.md(project root)Yes templates/context/copilot-instructions.md.github/copilot-instructions.mdYes templates/context/CURRENT_STATUS.md.context/CURRENT_STATUS.mdOnly if selected templates/context/ARCHITECTURE.md.context/ARCHITECTURE.mdOnly if selected templates/context/CONVENTIONS.md.context/CONVENTIONS.mdOnly if selected templates/context/DECISIONS.md.context/DECISIONS.mdOnly if selected templates/context/MASTER_PLAN.md.context/MASTER_PLAN.mdOnly if selected templates/context/SETUP.md.context/SETUP.mdOnly 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 name (from package.json, Cargo.toml, pyproject.toml, go.mod, or directory name)
- Description (from README.md if present)
- Tech stack (languages, frameworks, libraries)
- Tooling (formatter, linter, test framework, build commands)
- Architecture (key modules, directory structure)
- Whether
PROJECT_GUIDELINES.mdalready exists in the project root
-
Fill in placeholders — Replace
[PLACEHOLDER]markers in the created files with detected values. When filling inCONVENTIONS.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 inPROJECT_GUIDELINES.md.- If
PROJECT_GUIDELINES.mdalready exists: the## Project Guidelines Referencesection inCONVENTIONS.mdshould confirm it as the source of truth for code quality rules. - If
PROJECT_GUIDELINES.mddoes not exist: the## Project Guidelines Referencesection should note that/guidelines-initcan create it.
- If
-
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"
After Initialization
Once files are created and placeholders filled:
- Tell the user what was created (list only the files that were actually created)
- Summarize detected project details (name, tech stack, etc.)
- Explain which bootloader was created and that it's read automatically by the detected tool
- Suggest they review and customize the created files (only mention files that exist):
- Bootloader — Update the Current Focus section
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)
- Mention PROJECT_GUIDELINES.md:
- If
PROJECT_GUIDELINES.mdalready exists: note that it was detected andCONVENTIONS.mdreferences it as the source of truth for code quality rules - If
PROJECT_GUIDELINES.mddoes not exist: recommend running/guidelines-initto create code quality rules (naming, architecture, error handling, testing, security, performance, git workflow) — explain thatCONVENTIONS.mdcovers tooling/environment whilePROJECT_GUIDELINES.mdcovers code quality standards. For new projects, mention that/cortex-initsets up both context and guidelines in one command.
- If
- If the user chose a subset of context files, mention they can add more later by running
/context-initagain - Suggest the commit command shown above