Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP Token Optimization

Overview

The Skrills MCP server minimizes token usage by returning targeted summaries rather than full skill metadata payloads.

MCP Tools Token Impact

ToolToken ImpactDescription
validate-skillsLow-MediumReturns validation results; scales with skill count
analyze-skillsLow-MediumReturns analysis results; scales with skill count
sync-from-claudeLowReturns sync summary
sync-skillsLowReturns sync summary
sync-commandsLowReturns sync summary
sync-mcp-serversLowReturns sync summary
sync-preferencesLowReturns sync summary
sync-allLowReturns combined sync summary
sync-statusLowReturns diff preview

When the subagents feature is enabled:

ToolToken ImpactDescription
list-subagentsLowReturns list of available subagents
run-subagentVariableDepends on subagent output
get-run-statusLowReturns status of running subagent

Best Practices

Prefer CLI for Batch Operations

For operations involving many skills, the CLI is more efficient than repeated MCP tool calls. A single CLI command like skrills validate --format json can replace hundreds of individual tool invocations.

Filter Output

Use filtering options to reduce payload size. For example, skrills validate --errors-only returns only the skills that failed validation, and skrills analyze --min-tokens 2000 limits the output to only the largest skills.

Preview Before Sync

Use skrills sync-status --from claude to preview changes before running a full sync. This shows the scope of changes without the overhead of a full write operation.

Efficient Workflows

Validation Workflow

# 1. Preview validation (errors only)
skrills validate --errors-only

# 2. Fix issues with autofix
skrills validate --target codex --autofix --backup

# 3. Verify fixes
skrills validate --target codex --errors-only

Sync Workflow

# 1. Preview changes
skrills sync-status --from claude

# 2. Sync if changes look correct
skrills sync-all --from claude --skip-existing-commands

See Also