Display session efficiency report showing token savings, cache performance, and optimization recommendations...
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:
BASELINE_TOKENS - Total size of all .agent/ docsLOADED_TOKENS - Actually loaded in session (estimated)TOKENS_SAVED - DifferenceSAVINGS_PERCENT - Percentage savedEFFICIENCY_SCORE - 0-100 scoreCACHE_EFFICIENCY - From OpenTelemetryCONTEXT_USAGE_PERCENT - Estimated context fillTIME_SAVED_MINUTES - Estimated time savedUse 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 carries a judge section with calls > 0, append one row:
Typed judge ({model}): {calls} calls | {failed} failed | {latency_last_ms} ms last, {latency_max_ms} ms max
axes: {overridden} overridden / {agreed} agreed / {undecided} undecided
Sum the per-axis axes.<axis>.<outcome> counters for the three outcome totals. "Overridden"
means the judge changed a decision the keyword heuristic had made; "undecided" means the
answer fell inside the noul band or below the confidence floor and the heuristic answered.
Many undecided ā the band is too wide for this project; many overrides on an axis that keeps
being wrong ā tighten it or disable. Omit the row when the section is absent or calls is 0.
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 positives
A 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-tasks
Read more: .agent/philosophy/ANTI-PATTERNS.md
If cache_efficiency < 80%:
ā ļø RECOMMENDATIONS
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ļø Cache efficiency low (<80%)
ā Check: CLAUDE.md properly configured?
ā Tip: Ensure prompt caching enabled
Read more: .agent/philosophy/PATTERNS.md (Caching pattern)
efficiency_scorer.pyCalculate Navigator efficiency score (0-100) based on:
Usage:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-stats/functions/efficiency_scorer.py" \
--tokens-saved-percent 92 \
--cache-efficiency 100 \
--context-usage 35
Output: 94 (integer score)
report_formatter.pyFormat efficiency metrics into visual, shareable report.
Usage:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-stats/functions/report_formatter.py" \
--baseline 150000 \
--loaded 12000 \
--saved 138000 \
--savings-percent 92 \
--cache-efficiency 100 \
--context-usage 35 \
--efficiency-score 94 \
--time-saved 42
Output: Formatted ASCII report (see Step 4)
Context Engineering Principle: Measurement validates optimization
From .agent/philosophy/PATTERNS.md:
"Measure to validate. Navigator tracks real metrics, not estimates."
This skill proves:
User says: "Show my stats"
Skill displays:
User can:
User following lazy-loading pattern, cache working perfectly:
Recommendation: Keep it up! Share your efficiency.
User loading too many docs upfront:
Recommendation: Review lazy-loading strategy. Load docs on-demand.
User not using Navigator patterns:
Recommendation: Read philosophy docs. Consider /nav:compact. Review CLAUDE.md.
After using this skill, users should:
Long-term impact:
This skill makes Navigator's value tangible and shareable.