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

When using skrills as an MCP server, token usage is generally low because the server focuses on targeted operations (validation, analysis, sync) rather than returning large 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

Use CLI for Batch Operations

For operations on many skills, the CLI is often more efficient than repeated MCP tool calls:

# Validate all skills (single operation)
skrills validate --format json

# Analyze skills exceeding threshold
skrills analyze --min-tokens 1000 --format json

Filter Output

Use output filtering options to reduce payload size:

# Only show errors
skrills validate --errors-only

# Only show large skills
skrills analyze --min-tokens 2000

Preview Before Sync

Use sync-status to preview changes before running a full sync:

skrills sync-status --from claude

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