本文へ移動
cccskills
無料GitHub で公開

optimization-suggest

Suggest concrete optimizations for Claude Code usage based on historical session data. Covers cost reduction, speed improvement, error prevention, and workflow efficiency. Use for data-driven optimization planning.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md3.3 KB
  • agents/openai.yaml279 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Optimization Suggest

Generate data-driven optimization recommendations for Claude Code usage.

Input

The user provides: $ARGUMENTS

This may be:

  • "all" or empty (default: comprehensive optimization scan)
  • "cost" for cost reduction focus
  • "speed" for performance/speed focus
  • "quality" for error reduction focus
  • "efficiency" for workflow efficiency focus

Procedure

  1. Gather optimization data from http://localhost:4820:

    • GET /api/sessions?limit=200 — session history
    • GET /api/analytics — tool and token analytics
    • GET /api/pricing/cost — cost data
    • GET /api/pricing — pricing rules for model comparison
    • Sample event streams for behavioral analysis
  2. Analyze optimization opportunities:

    💰 Cost Optimization

    • Model downgrade opportunities: Tasks completed with expensive models that could use cheaper ones
      • Compare success rates per model per task type
      • Calculate savings from model substitution
    • Cache optimization: Sessions with low cache hit rates
      • Identify sessions that could benefit from better prompt caching
    • Early termination: Sessions that ran longer than needed
      • Detect sessions where useful work completed well before session end
    • Compaction reduction: Sessions hitting context limits
      • Suggest breaking large tasks into smaller sessions

    ⚡ Speed Optimization

    • Tool selection: Faster alternatives for commonly-used tool patterns
    • Subagent parallelization: Tasks that could run in parallel
    • Session planning: Better upfront context to reduce back-and-forth
    • Preemptive context loading: Frequently needed files/context

    🛡 Quality Optimization

    • Error prevention: Common error patterns with preventive measures
    • Tool reliability: Tools with high failure rates and alternatives
    • Validation gaps: Sessions lacking verification steps
    • Recovery strategies: Better error handling patterns

    🔄 Workflow Optimization

    • Session sizing: Optimal session scope based on historical success
    • Task decomposition: Complex sessions that should be split
    • Automation candidates: Repetitive workflows to automate
    • Knowledge reuse: Patterns where previous session context could help
  3. Quantify each recommendation:

    • Estimated impact (cost savings $, time savings %, error reduction %)
    • Implementation effort (low/medium/high)
    • Confidence level based on data available
    • Priority score = Impact × Confidence / Effort

Output Format

Present as a prioritized optimization plan:

#RecommendationCategoryImpactEffortPriority
1Specific action💰/⚡/🛡/🔄HighLow★★★★★
2Specific action.........★★★★☆

For the top 5 recommendations, include:

  • Detailed explanation with supporting data
  • Step-by-step implementation guide
  • Expected before/after metrics
  • How to measure success

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Inspect fired CCAM alerts and manage alert rules for token thresholds, event patterns, inactivity, and status duration. Use when acknowledging alerts, creating or editing a rule, checking cooldowns, or connecting alert rules to webhook targets.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0692026年10月12日 更新

Identify anomalous sessions using Agent Monitor data — cost outliers from the pricing engine, token anomalies (cache miss spikes, compaction baseline surges), unusual event type ratios (PreToolUse/PostToolUse gaps, APIError clusters), behavioral deviations from workflow intelligence (complexity score outliers, error propagation anomalies), and sessions with abnormal metadata (extreme turn_count, high thinking_blocks, zero turn_duration).

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0692026年10月12日 更新

Produce a detailed report on APIError events from Agent Monitor data — counts over time, which sessions and models are affected, and the likely root cause (rate limits, overload/529, or context-window pressure) inferred from each event's summary and data payload. Use when API errors spike or when you need to explain why requests are failing.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0692026年10月12日 更新

benchmark

無料

Benchmark one session (or a small recent set) against the rolling average using Agent Monitor data — cost, total tokens, tool count, and workflow complexity score — and report where each metric lands as a percentile of the population. Tells you whether a session was normal, cheap, or an outlier. Use when judging whether a session was typical or out of band.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0692026年10月12日 更新

Define a spend budget for Claude Code and, optionally, create a cost alert rule that fires when usage crosses the limit, via POST /api/alerts/rules on the Agent Monitor dashboard. Reads current spend from /api/pricing/cost to size the budget sensibly and explains every rule field before writing. Use when setting a spend limit or wiring up a budget guardrail.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0692026年10月12日 更新

Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (total_cache_read / (total_cache_read + total_input)), cache_write vs cache_read reuse, cache-read vs cache-write spend, and the sessions with the poorest reuse. Pulls token totals from /api/analytics, per-session detail from /api/sessions, and dollar splits from /api/pricing/cost. Use when diagnosing cache spend or deciding whether prompt caching is paying off.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0692026年10月12日 更新

hoangsonww のスキルをすべて見る

このスキルの問題を報告する