backend-endpoint
Create REST/GraphQL API endpoint with validation, error handling, and tests. Auto-invoke when user says "add endpoint", "create API", "new route", or "add…
Display session efficiency report showing token savings, cache performance, and optimization recommendations. Use when user asks "show my stats", "how efficient am I?", "show session metrics", or wants to see Navigator's impact.
$ npx -y skills add alekspetrov/navigator --skill nav-stats --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/nav-statsContext preview
The summary Claude sees to decide when to auto-load this skill.
Display session efficiency report showing token savings, cache performance, and optimization recommendations. Use when user asks "show my stats", "how efficient am I?", "show session metrics", or wants to see Navigator's impact.
name: nav-stats description: Display session efficiency report showing token savings, cache performance, and optimization recommendations. Use when user asks "show my stats", "how efficient am I?", "show session metrics", or wants to see Navigator's impact. allowed-tools: Bash, Read version: 1.0.0
Show real-time efficiency reporting with baseline comparisons, making Navigator's value quantifiable and shareable.
Invoke this skill when the user:
**DO NOT invoke** if:
Verify Navigator is set up:
if [ ! -f ".agent/DEVELOPMENT-README.md" ]; then echo "❌ Navigator not initialized in this project" echo "Run 'Initialize Navigator' first" exit 1 fi
Execute the enhanced session statistics script:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
# Check if enhanced script exists
if [ ! -f "$PLUGIN_DIR/scripts/session-stats.sh" ]; then
echo "❌ Session stats script not found"
echo "Reinstall or update Navigator to restore scripts/session-stats.sh"
exit 1
fi
# Run stats script
bash "$PLUGIN_DIR/scripts/session-stats.sh"This script outputs shell-parseable variables:
Use predefined function to calculate score:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
# Extract metrics from session-stats.sh
source <(bash "$PLUGIN_DIR/scripts/session-stats.sh")
# Calculate efficiency score using predefined function
EFFICIENCY_SCORE=$(python3 "$PLUGIN_DIR/skills/nav-stats/functions/efficiency_scorer.py" \
--tokens-saved-percent ${SAVINGS_PERCENT} \
--cache-efficiency ${CACHE_EFFICIENCY} \
--context-usage ${CONTEXT_USAGE_PERCENT})Use predefined function to format visual report:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
# Generate formatted report
python3 "$PLUGIN_DIR/skills/nav-stats/functions/report_formatter.py" \
--baseline ${BASELINE_TOKENS} \
--loaded ${LOADED_TOKENS} \
--saved ${TOKENS_SAVED} \
--savings-percent ${SAVINGS_PERCENT} \
--cache-efficiency ${CACHE_EFFICIENCY} \
--context-usage ${CONTEXT_USAGE_PERCENT} \
--efficiency-score ${EFFICIENCY_SCORE} \
--time-saved ${TIME_SAVED_MINUTES}**Output Format**:
╔══════════════════════════════════════════════════════╗ ║ NAVIGATOR EFFICIENCY REPORT ║ ╚══════════════════════════════════════════════════════╝ 📊 TOKEN USAGE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Documentation loaded: 12,000 tokens Baseline (all docs): 150,000 tokens Tokens saved: 138,000 tokens (92% ↓) 💾 CACHE PERFORMANCE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Cache efficiency: 100.0% (perfect) 📈 SESSION METRICS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Context usage: 35% (excellent) Efficiency score: 94/100 (excellent) ⏱️ TIME SAVED ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Estimated time saved: ~42 minutes 💡 WHAT THIS MEANS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Navigator loaded 92% fewer tokens than loading all docs. Your context window is 65% available for actual work. 🎯 RECOMMENDATIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✅ Excellent efficiency - keep using lazy-loading strategy ✅ Context usage healthy - plenty of room for work Share your efficiency: Take a screenshot! #ContextEfficiency
If `.agent/.nav-runtime-state.json` (schema 2) carries a `tier1` section, append one row to the report:
Tier-1 responder: {hits} zero-token answers | {false_positives} suspected false positivesA false positive = a Tier-1 hit followed by a near-identical re-prompt (the user wanted the model after all). Rising false positives mean the exact-match table is intercepting prompts it should not — suggest disabling the offending rule via `tier1.rules.<id>: false`. Omit the row when the section is absent or tier1 is disabled.
Based on efficiency score, provide actionable advice:
**If efficiency_score < 70**:
⚠️ RECOMMENDATIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚠️ Token savings below target (70%+) → Check: Are you loading more docs than needed? → Tip: Use navigator to find docs, don't load all upfront Read more: .agent/philosophy/CONTEXT-EFFICIENCY.md
**If context_usage > 80%**:
⚠️ RECOMMENDATIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚠️ Context usage high (80%+) → Consider: Create context marker and compact → Tip: Compact after completing sub-ta
Finish What You Start Sessions that last. AI that learns. Features that ship.
Repo: alekspetrov/navigator
Create REST/GraphQL API endpoint with validation, error handling, and tests. Auto-invoke when user says "add endpoint", "create API", "new route", or "add…
Generate backend tests (unit, integration, mocks) for existing code. Auto-invoke when user says "write test for", "add test", "test this", or "create test".
Create database migration with schema changes and rollback. Auto-invoke when user says "create migration", "add table", "modify schema", or "change database".
Create React/Vue component with TypeScript, tests, and styles. Auto-invoke when user says "create component", "add component", "new component", or "build…
Generate frontend component tests (React Testing Library, Vue Test Utils, snapshot) for existing components. Auto-invoke when user says "test this component",…
Render a one-screen intent brief (Goal/Scope/Approach/Limits/Verify/Won't-do/Contradiction) before implementing ambiguous task-shaped prompts, triggered by the…