본문으로 건너뛰기
cccskills
무료GitHub에 공개

mk-context-audit

Read-only audit of the project's agent-tree structural overhead vs the context window. NOT for cost tracking (budget skill); NOT for read/compact decisions (mk:context-engineering).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(7)

  • SKILL.md4.9 KB
  • references/.gitkeep0 B
  • references/token-cost-model.md4.2 KB
  • scripts/.gitkeep0 B
  • scripts/estimate-tokens.sh2.4 KB
  • scripts/format-audit-report.sh5.4 KB
  • scripts/inventory-context.sh5.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

the context-audit skill — Context Window Structural Audit

Read-only audit of the project's agent-tree (.cursor/ + .cursor/skills/) structural overhead. Surfaces what is loaded into every host-runtime session and how much of the context window it consumes, then recommends the highest-leverage trims.

Complementary lens: mewkit inventory --substrate shows the same artifact set grouped by the responsibility each serves (covered / partial / missing), so a trim can be checked against responsibility coverage before removing an artifact. The per-phase read budget that bounds what an audit-driven session should load lives in rules/context-budget-rules.md.

When to Use

Three concrete triggers:

  1. Pre-add capacity check — before adding a new agent, skill, or rule file, confirm the project is below the 25% structural-overhead threshold.
  2. Post-degradation diagnostic — when sessions feel slow, off-topic, or over-compacted, audit to see if structural overhead has grown past 10%.
  3. Periodic health audit — quarterly or on model upgrades, confirm the always-on bundle still pays its keep (paired with the dead-weight audit in harness-rules.md Rule 7).

Context vs Cost (Boundary)

ConcernMechanismUnit
Monetary costthe budget skill + ../autobuild/scripts/budget-tracker.shUSD
Window utilization (this skill)the context-audit skill + scripts/inventory-context.shtokens / %

The three concerns are deliberately separate. This skill measures only what is statically loaded into every session — the always-on bundle. Conversation history, tool output, and active edits live elsewhere.

Workflow

The slash command runs the pipeline:

SCAN_ROOT="${1:-$PWD}"
bash .cursor/skills/context-audit/scripts/inventory-context.sh "$SCAN_ROOT" \
  | bash .cursor/skills/context-audit/scripts/estimate-tokens.sh \
  | bash .cursor/skills/context-audit/scripts/format-audit-report.sh

Output is markdown, printed to terminal. The skill does NOT write any files.

Steps:

  1. Inventory — inventory-context.sh walks the agent tree and emits raw byte/line counts per category (AGENTS.md chain, agents, skills, rules, MCP) as JSON.
  2. Estimate — estimate-tokens.sh enriches the inventory with estimated_tokens (chars/4 heuristic, mirrors budget-tracker.cjs) and computes totals including structural_overhead_pct against a 200K window.
  3. Format — format-audit-report.sh emits a 5-section markdown report: header, summary table, top consumers, recommendations, footer.
  4. Banner — the formatter selects a banner based on structural_overhead_pct:
    • < 10% → Healthy
    • 10–25% → Watch
    • ≥ 25% → Action recommended

Output Format

# Context Audit — <scan_root>
*Scanned at <timestamp> · model window 200K tokens · banner: <Healthy|Watch|Action>*

## Summary
| Category | Components | Bytes | Tokens | % of Window |
| ...      | ...        | ...   | ...    | ...          |

## Top Consumers
1. <component> ~<tokens> (<path>)
... (top 10)

## Recommendations
1. <priority finding> — saves ~<tokens>
... (sorted by token impact, descending)

## How to Act
- Cost: see `the budget skill`
- Runtime trim: see `mk:lazy-agent-loader`

The 10% / 25% thresholds are the canonical source of truth for token-overhead banners — see references/token-cost-model.md. They are NOT linked to MEOWKIT_BUDGET_* env vars (those are USD amounts, not token percentages).

Integration Points

  • Reuses, does not duplicate: packages/mewkit/src/token-estimator/index.ts is the canonical chars/4 source. Shell scripts inline the same heuristic with a citation comment, avoiding a Node bridge that would require dist/.
  • Reads, does not write: .meowkit/telemetry/cost-log.json, the project's agent-tree, .mcp.json. No file writes anywhere.
  • No env vars introduced. Window size is hard-coded 200K; override deferred until a real 1M-context use case appears.
  • Discovery: via keywords: frontmatter and a cross-reference from the budget skill. There is no separate routing rule.

Gotchas

(none yet — grow from observed failures)

Related Rules

  • Skill authoring conventions — discovery + Gotchas section requirements
  • AGENTS.md (Data & injection boundary) Rule 11 — Skill Rule of Two; this skill scores 2 of 3 (untrusted SCAN_ROOT input + filename inventory may surface sensitive paths) so paths are canonicalized via realpath and never executed.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use this skill to generate well-branded interfaces and assets for MeowKit (AI Agent Toolkit for Claude Code), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, assets, and UI kit components for prototyping.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ngocsangyem/MeowKit152026년 7월 28일 업데이트

mk-advise

무료

Turn a raw idea into ONE honest recommendation: interview one question at a time until confirmed, then give a verdict with trade-offs and a checklist. Not for options or debate.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ngocsangyem/MeowKit152026년 7월 28일 업데이트

Browser automation CLI for agents: navigate, click/fill, screenshot, extract data, test apps, Electron/Slack, cloud browsers. NOT for the user's real Chrome profile/cookies (mk:chrome-profile).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ngocsangyem/MeowKit152026년 7월 28일 업데이트

Detects the right agent and complexity tier at Phase 0 orient; runs first in every workflow. NOT for runtime agent routing inside a single skill.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ngocsangyem/MeowKit152026년 7월 28일 업데이트

Angular v20+ patterns: components, signals, services, forms, routing, HTTP, testing, SSR. Auto-activates on .ts files in Angular projects (angular.json detected).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ngocsangyem/MeowKit152026년 7월 28일 업데이트

Design and review durable REST, GraphQL, RPC, or event API contracts: shape, compatibility, pagination, error semantics. Discovers existing consumers first. Not implementation, schema, or release.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ngocsangyem/MeowKit152026년 7월 28일 업데이트

ngocsangyem의 스킬 모두 보기

이 스킬의 문제 신고