plugins/claude-code-expert/skills/prompt-budget-preflight/SKILL.md
Pre-flight check to run before any Agent-tool spawn. Prevents the "Prompt is too long" rejection class by enforcing a 5-section minimum-viable-prompt template and estimating forwarded context cost. Use whenever you are about to call the Agent tool with more than a one-paragraph prompt.
npx skillsauth add markus41/claude prompt-budget-preflightInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run this before calling the Agent tool. It takes under 30 seconds and prevents the most common subagent failure mode: rejection with "Prompt is too long".
Subagents inherit a large base context before your prompt is even appended:
~/.claude/CLAUDE.md.claude/CLAUDE.md chain (including any rules files referenced via @)CLAUDE.md in the subagent's cwdMEMORY.md and auto-memory entriessubagent_typeIn our own telemetry from one 9-spawn session:
| Spawn type | Prompt size | Result |
|---|---|---|
| Explore × 2 (generic) | ~900 words each | Both rejected — "Prompt is too long", 0 tokens used, 2.3-2.7s round-trip |
| Named specialists × 7 (architecture / perf / security / dx / ux / researcher / code-reviewer) | ~200-400 words each | All 7 succeeded |
Reject rate: 22%. Every rejection is a wasted ~3 seconds and a wasted decision cycle.
Target ~300 words total. If you exceed 800 words you almost certainly have dead weight.
1. TARGET
- Absolute file paths or directory scope
- Clear in/out-of-scope boundaries
2. TASK
- One sentence: what to produce
- Read-only vs write explicitly stated
3. FORMAT
- Output shape (YAML, table, bullets)
- Word ceiling or row cap
- Any required fields / schema
4. CONSTRAINTS
- What NOT to do
- Paths / patterns / subdirectories to avoid
- Word-limit enforcement hint
5. RULES (optional, only when applicable)
- Plugin-specific guardrails
- "Do not follow interview-first workflow — this is an audit"
- "Do not write files — this is analysis only"
Before each Agent call, answer:
Explore, general-purpose)? Prefer specialists — see skills/agentic-patterns/SKILL.md Part 4.CLAUDE.md is large (>4KB) and unrelated to the task? If yes, include a RULES line telling it to ignore that file's workflow prescriptions.| If agent rejects with… | Do this | |---|---| | "Prompt is too long" | Cut enumerated facts; swap generic subagent for a named specialist; add RULES line telling it to skip directory CLAUDE.md workflows | | Empty or stub output | Prompt was too vague — add concrete file:line references and one worked example of the output shape | | Off-topic ramble | Missing CONSTRAINTS section — add explicit "do NOT explore X / Y / Z" | | Timeout (>5min on simple task) | Missing word ceiling + missing scope boundary — add both |
You are analyzing <SCOPE>.
TARGET: <absolute paths>
TASK: <one sentence; read-only or write>
FORMAT:
<schema / shape>
Keep under <N> words.
CONSTRAINTS:
- Do not <X>
- Do not explore <Y>
RULES (if applicable):
- Ignore the <plugin-name> CLAUDE.md's interview-first workflow;
this is an audit, not a setup run.
Everything else: run the 5-question checklist above. It's cheaper than a rejected spawn.
development
Enhanced plan-authoring skill with Pre-Writing context gathering, task metadata, non-TDD templates, Red Flags, telemetry, and an automated plan linter. Use when you have a spec or requirements for a multi-step task, before touching code.
tools
Documentation intelligence engine with graph-based API docs, algorithm library, and drift detection
tools
Ultraplan cloud planning — kick off a plan in the cloud from your terminal, review and revise in the browser, then execute remotely or send back to CLI
tools
--- name: mcp description: Configure MCP servers for Claude Code — stdio vs HTTP, authentication, Tools/Resources/Prompts distinction, channels (CI webhook, mobile relay, Discord bridge, fakechat), and cost of always-loaded tools. Use this skill whenever adding an MCP server, debugging connection issues, choosing between MCP Tools vs Prompts vs Resources, installing channel servers, or managing .mcp.json. Triggers on: "MCP server", "mcp config", "add Obsidian MCP", "install context7", "channels"