Manages JSON templates to load task-specific files, glob patterns, and git preCommands into Claude context. Use for bug-fixes, new-features, refactors to save tokens and time. Commands: list, create, apply, delete.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-context-optimizer:cco-templates [list | create <name> | apply <name> | delete <name>][list | create <name> | apply <name> | delete <name>]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Context templates are pre-defined sets of files to read for common task types, saving time and tokens by loading only what's needed.
Context templates are pre-defined sets of files to read for common task types, saving time and tokens by loading only what's needed.
Templates are stored in ~/.claude-context-optimizer/templates/.
Parse $ARGUMENTS:
list (or no arguments)Show all available templates:
ls ~/.claude-context-optimizer/templates/*.json 2>/dev/null
For each template, show its name, description, and file list.
create <name>Help the user create a new template. Ask them:
Also suggest files based on historical tracking data:
node ${CLAUDE_PLUGIN_ROOT}/src/tracker.js suggest "$(pwd)"
Save the template as ~/.claude-context-optimizer/templates/<name>.json with format:
{
"name": "template-name",
"description": "What this template is for",
"files": ["relative/path/to/file1", "relative/path/to/file2"],
"patterns": ["**/*.config.*", "src/core/**"],
"preCommands": ["git status", "git log --oneline -5"]
}
apply <name>Read the template and execute:
preCommandsThis gives Claude exactly the right context for the task type.
delete <name>Delete the template file and confirm.
npx claudepluginhub egorfedorov/claude-context-optimizerSuggests optimal files to preload based on task description, historical patterns, and templates. Activates on new tasks, file reading mentions, or session setup.
Guides creating slash commands for Claude Code: structure, YAML frontmatter, dynamic arguments, file references, bash execution, user interactions, organization, and best practices.
Guides developers on creating, structuring, and organizing slash commands for Claude Code. Covers YAML frontmatter, dynamic arguments, bash execution, user interactions, and best practices for reusable command workflows.