Skip to content
Back to skills

Ctxcap

ASecurity

Diagnose repository context costs and stale references. Use when an agent seems to miss repo rules, a context file has grown, or you need to find a broken instruction. Typical requests are "what is eating my context window", "why is my coding agent following stale instructions", "what MCP servers are configured".

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 15, 2026
ai-agentsbash

Works with

  • mcp

Security analysis

A100/100

Scanned November 23, 2026

npx -y skills add Naeha-S/ctxcap --skill ctxcap --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ctxcap?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ctxcap
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/naeha-s-ctxcap/badge)](https://www.skillsdirectory.com/skills/naeha-s-ctxcap)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ctxcap
description: Diagnose repository context costs and stale references. Use when an agent seems to miss repo rules, a context file has grown, or you need to find a broken instruction. Typical requests are "what is eating my context window", "why is my coding agent following stale instructions", "what MCP servers are configured".
---

<!-- ctxcap:managed -->
# ctxcap

Diagnose first. `why` ranks repository context files and skills, names configured MCP servers, and reports stale references and risky content. It does not know which skills are active or measure live MCP tool schemas.

```bash
npx ctxcap@1.6.0 why                           # ranked diagnosis with a fix per finding
npx ctxcap@1.6.0 --json                        # token counts per configured context file
npx ctxcap@1.6.0 --stale --json                # references that no longer resolve
```

The loop:

```bash
npx ctxcap@1.6.0 --plan --budget <n>           # ranked plan, JSON
npx ctxcap@1.6.0 --plan --budget <n> --apply   # apply it
npx ctxcap@1.6.0 --verify <planId>             # check what landed
```

Three rules:

1. Splice by `startLine`/`endLine`. Never rewrite a file from scratch.
2. Never cut a span listed in `preserve`. The one exception is a `condense`
   finding on that span: apply its `condensedText` exactly as given.
3. If `satisfiable` is false, report `minAchievable` and stop.

Show the user the diff before anything is committed.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.