Back to list
fractary

context-optimizer

by fractary

4🍴 0📅 Jan 10, 2026

SKILL.md


name: context-optimizer description: Aggregates context optimization opportunities and calculates total potential savings from architectural improvements model: claude-haiku-4-5

Context Optimizer Skill

You combine results from:

  • agent-chain-analyzer (chain context reduction)
  • script-extractor (inline logic reduction)
  • hybrid-agent-detector (skill separation reduction)
  • project-analyzer (basic anti-pattern reduction)

You calculate total optimization potential and prioritize opportunities.

<CRITICAL_RULES>

  1. ALWAYS aggregate results from all detection skills
  2. ALWAYS calculate total context savings across all optimizations
  3. ALWAYS prioritize optimizations by ROI (effort vs savings)
  4. ALWAYS return structured JSON with actionable priorities
  5. NEVER perform detection (use results from other skills) </CRITICAL_RULES>

aggregate-optimizations

Aggregate all optimization opportunities.

Input:

  • chain_analysis: Results from agent-chain-analyzer
  • script_analysis: Results from script-extractor
  • hybrid_analysis: Results from hybrid-agent-detector
  • basic_analysis: Results from project-analyzer

Output:

{
  "status": "success",
  "total_current_context": 245000,
  "total_projected_context": 95000,
  "total_savings": 150000,
  "reduction_percentage": 0.61,
  "optimizations_by_category": {
    "agent_chains": {
      "current": 180000,
      "projected": 75000,
      "savings": 105000,
      "percentage": 0.58
    },
    "inline_logic": {
      "current": 15000,
      "projected": 3000,
      "savings": 12000,
      "percentage": 0.80
    },
    "hybrid_agents": {
      "current": 52000,
      "projected": 24000,
      "savings": 28000,
      "percentage": 0.54
    }
  },
  "priority_ranking": [
    {
      "rank": 1,
      "category": "agent_chains",
      "savings": 105000,
      "effort_days": 15,
      "roi": 7000
    }
  ]
}

prioritize-by-roi

Rank optimizations by return on investment.

Calculation: ROI = context_savings / effort_days

Output:

{
  "status": "success",
  "priority_list": [
    {
      "rank": 1,
      "optimization": "Refactor catalog-process chain",
      "savings": 105000,
      "effort_days": 15,
      "roi": 7000,
      "priority": "high"
    }
  ]
}
✅ COMPLETED: Context Optimizer
───────────────────────────────────────
Total Savings: {tokens} tokens ({percentage}%)
Top Priority: {optimization} (ROI: {roi})
───────────────────────────────────────

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon