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

context-budget

Audit token consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations. Use when the context window is filling up too fast or before adding new components.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.1 KB

SKILL.md(原文)

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

@agents/PROMPT-DEFENSE.md

Context Budget Audit

Analyze token overhead across every loaded component in a session and surface actionable optimizations to reclaim context space.

When to Use

  • Session performance feels sluggish or output quality is degrading
  • You've recently added many skills, agents, or MCP servers
  • Planning to add more components and need to know if there's room
  • Running /context-budget command (this skill backs it)

Audit Procedure

Phase 1: Inventory

Scan all component directories and estimate token consumption:

Agents (agents/*.md)

  • Count lines and tokens per file (words × 1.3)
  • Extract description frontmatter length
  • Flag: files >200 lines (heavy), description >30 words (bloated frontmatter)

Skills (skills/*/SKILL.md)

  • Count tokens per SKILL.md
  • Flag: files >400 lines
  • Check for duplicate copies — skip identical copies to avoid double-counting

Rules (rules/**/*.md, rules/**/*.mdc)

  • Count tokens per file
  • Flag: files >100 lines
  • Detect content overlap between rule files

MCP Servers (active MCP config)

  • Count configured servers and total tool count
  • Estimate schema overhead at ~500 tokens per tool
  • Flag: servers with >20 tools

CLAUDE.md / System Prompts

  • Count tokens in CLAUDE.md chain
  • Flag: combined total >300 lines

Phase 2: Classify

Sort every component into a bucket:

BucketCriteriaAction
Always neededReferenced in CLAUDE.md, backs active command, matches project typeKeep
Sometimes neededDomain-specific, not referenced in CLAUDE.mdConsider on-demand activation
Rarely neededNo command reference, overlapping content, no project matchRemove or lazy-load

Phase 3: Report

Generate a prioritized savings report:

CONTEXT BUDGET AUDIT
====================
Total estimated tokens: {total}
Context headroom: {headroom}%

TOP SAVINGS OPPORTUNITIES:
1. {component} — {tokens} tokens ({bucket}) → {recommendation}
2. {component} — {tokens} tokens ({bucket}) → {recommendation}
...

ALWAYS NEEDED (keep):
- {component} ({tokens} tokens)

SOMETIMES NEEDED (lazy-load candidates):
- {component} ({tokens} tokens)

RARELY NEEDED (removal candidates):
- {component} ({tokens} tokens)

Token Estimation Formula

  • English text: ~1.3 tokens per word
  • Code: ~1.5 tokens per word (more punctuation/symbols)
  • YAML frontmatter: ~1.2 tokens per word
  • MCP tool schema: ~500 tokens per tool definition

Integration Points

  • Run automatically before /team:ship to verify context headroom
  • Feed results to learning system as optimization instincts
  • Cross-reference with Brain DB decisions about past context issues

レビュー

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

同じリポジトリのスキル

概要と使いどころ

Train and optimize AI agents using Microsoft's Agent Lightning framework with reinforcement learning. Use when setting up agent training, instrumenting agents with tracing, configuring LightningStore, implementing reward functions, or optimizing prompts with RL/APO algorithms.

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

coco-research/coco5362026年10月11日 更新

Post-run self-evaluation system that scores agent output on correctness, clarity, actionability, and conciseness. Use after /team runs, skill executions, or when explicitly asked to evaluate output quality.

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

coco-research/coco5362026年10月11日 更新

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awareness. Triggers: marketing video, ad video, promo video, commercial, brand video, product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video

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

coco-research/coco5362026年10月11日 更新

Use when building AI features into a product: LLM integration, RAG pipelines, guardrails, streaming, AI UX, prompt engineering, or AI cost control. Treats prompts as code and validates every model output.

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

coco-research/coco5362026年10月11日 更新

Your AI research and engineering brain trust. 59 named personas across 8 cells covering frontier labs, applied product, model architecture, reasoning/RL/agents, alignment and interpretability, theory and science of DL, multimodal and…

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

coco-research/coco5362026年10月11日 更新

Use when designing a new REST or GraphQL API, reviewing an API spec before implementation, setting team API standards, or migrating REST to GraphQL. Covers resources, HTTP semantics, pagination, error handling, and pitfalls.

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

coco-research/coco5362026年10月11日 更新

coco-research のスキルをすべて見る

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