Manages context templates for common tasks like bug-fix, new-feature, refactor. Lists, creates, applies, deletes JSON templates with files, glob patterns, preCommands to optimize Claude context loading.
npx claudepluginhub egorfedorov/claude-context-optimizerThis skill is limited to using the following tools:
Context templates are pre-defined sets of files to read for common task types, saving time and tokens by loading only what's needed.
Suggests optimal files to preload based on task descriptions and historical context patterns. Activates when starting new tasks, mentioning file reads, or setting up sessions.
Guides listing, viewing, executing via /orchestration:template, and customizing workflow templates from project, global, or built-in locations for TDD, debugging, i18n, UI, and agent demos.
Guides creating slash commands for Claude Code: structure, YAML frontmatter, dynamic arguments, file references, bash execution, user interactions, organization, and best practices.
Share bugs, ideas, or general feedback.
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.