Best for
- Use when a spec touches model calls, prompts, retrieval, tool calling, agentic loops, or evals.
agents-inc/skills/src/skills/meta-planning-ai-planning/SKILL.md
AI specification planning frameworks. Use when a spec touches model calls, prompts, retrieval, tool calling, agentic loops, or evals. Covers approach selection, model and provider choice, structured output contracts, loop guards, budgets, failure modes, and eval design.
Decision brief
Quick Guide: Default to the simplest tier that satisfies the requirement — most features are one well-built model call. Pin the model id, define the output contract with a repair-vs-reject policy, budget in tokens and money rather than adjectives, enumerate the failure modes, an…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/agents-inc/skills --skill "src/skills/meta-planning-ai-planning"Inspect the Agent Skill "meta-planning-ai-planning" from https://github.com/agents-inc/skills/blob/81d43a51211aca12c85dcc16085fa99014ec548e/src/skills/meta-planning-ai-planning/SKILL.md at commit 81d43a51211aca12c85dcc16085fa99014ec548e. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
All specifications must be grounded in the codebase's real model clients, prompt modules, schemas, and eval fixtures — reference specific files with line numbers
Non-determinism is the material; contracts are what make it buildable. A model's output cannot be trusted by construction, so every boundary — schema, budget, failure behavior, eval threshold — must be decided in the spec, or it gets decided implicitly in production.
Default to the simplest tier that satisfies the requirement. Specify the more complex tier only when you can name the requirement that forces it, and record the rejected alternatives with the reason each was rejected.
Default to the simplest tier that satisfies the requirement. Specify the more complex tier only when you can name the requirement that forces it, and record the rejected alternatives with the reason each was rejected.
Score the candidates against the actual requirement and record the table in the spec.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 23 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Quick Guide: Default to the simplest tier that satisfies the requirement — most features are one well-built model call. Pin the model id, define the output contract with a repair-vs-reject policy, budget in tokens and money rather than adjectives, enumerate the failure modes, and make quality measurable with an eval plan before implementation starts. Apply a framework only when the spec touches its artifact class — a feature with no retrieval needs no retrieval section.
<critical_requirements>
All specifications must be grounded in the codebase's real model clients, prompt modules, schemas, and eval fixtures — reference specific files with line numbers
(You MUST justify the approach against the simpler tier — a fixed code-orchestrated chain beats an agentic loop whenever the step sequence is known)
(You MUST pin an explicit model id in configuration with a named fallback — never a floating alias, never inline in code)
(You MUST define the output contract completely: mechanism, schema, validation boundary, and a repair-vs-reject policy)
(You MUST state budgets as numbers — tokens per call, calls per request, cost per request, p95 latency — never as adjectives)
(You MUST identify where untrusted input enters every prompt, and require adversarial eval cases wherever it does)
(You MUST apply each framework only when the spec touches its artifact class — an unused section is omitted, never filled)
</critical_requirements>
Auto-detection: AI spec, LLM feature spec, prompt design spec, model selection, RAG spec, retrieval design, tool calling spec, agent loop spec, eval plan, token budget, structured output
When to use:
When NOT to use:
Key patterns covered:
Detailed Resources:
Non-determinism is the material; contracts are what make it buildable. A model's output cannot be trusted by construction, so every boundary — schema, budget, failure behavior, eval threshold — must be decided in the spec, or it gets decided implicitly in production.
When specifying AI work:
When NOT to specify:
Core principles:
Does the task need knowledge that is not in the model and not in the request?
├─ NO → Single model call with a well-built prompt. Stop here. Most features end here.
└─ YES → Where does that knowledge live?
├─ A bounded set that fits the context window (< ~30% of it) → Pass it directly. No retrieval infrastructure.
├─ A large or growing corpus → Retrieval (RAG)
└─ A live system of record (database, third-party API) → Tool calling, not retrieval
Does the task need multiple dependent actions the model must sequence itself?
├─ NO → Single call, or a fixed chain of calls you orchestrate in code
│ (a fixed chain is cheaper, more debuggable, and easier to eval than a loop)
└─ YES → Agentic loop with an explicit step budget and termination conditions
Default to the simplest tier that satisfies the requirement. Specify the more complex tier only when you can name the requirement that forces it, and record the rejected alternatives with the reason each was rejected.
Score the candidates against the actual requirement and record the table in the spec.
| Dimension | Question to answer |
|---|---|
| Capability | Does the smallest candidate pass the eval set? Test before assuming not. |
| Context window | Does the worst-case assembled prompt fit with headroom for output? |
| Latency | Does the p95 profile fit the surface (streamed UI vs background job)? |
| Cost | What is the blended cost per request at projected volume? |
| Structured out | Does the provider support the output mechanism you selected? |
| Availability | What is the fallback when this provider returns 429 or 5xx? |
| Versioning | Is the model id pinned? What is the deprecation and re-eval plan? |
| Data handling | Does request content leave an acceptable boundary? Any retention concern? |
Rules:
Every prompt the spec introduces is named, located, versioned, and trust-annotated.
prompts/summarize-ticket.v1.ts), following the shape of an existing prompt module. The version is logged with every call so eval results attribute to a specific revision. Editing a shipped prompt in place is out of scope; ship the next version instead.Does the provider support tool calling / function calling?
├─ YES → Is the output a single well-defined record?
│ ├─ YES → Tool calling with a single submit-style tool. Strongest schema adherence.
│ └─ NO → Tool calling with one tool per action, plus a terminal final-answer tool
└─ NO → Does it support a JSON/structured output mode?
├─ YES → JSON mode + schema validation on receipt
└─ NO → Delimited free text + strict parser. Requires the widest eval coverage.
Every branch validates on receipt. Provider-side schema enforcement reduces violations; it does not eliminate them, and it never covers semantic correctness (a valid-shaped record with a hallucinated value passes schema validation).
Repair-vs-reject policy — state it explicitly:
| Situation | Policy |
|---|---|
| Shape violation (missing/typo'd field) | One repair attempt with the validator error appended, then reject |
| Semantic violation (impossible value) | Reject immediately; repair attempts tend to launder the bad value |
| Streaming partial JSON | Buffer and validate only on completion; never act on partial output |
| Repeated failure on the same input | Reject and record the input for eval-set inclusion |
| Decision | Options | How to choose |
|---|---|---|
| Chunk size | Small (200-400) vs large (800-1500) tokens | Small for fact lookup; large when answers need surrounding narrative |
| Overlap | 0 vs 10-20% of chunk size | Overlap when facts straddle boundaries; costs index size |
| Split boundary | Fixed tokens vs structural (heading, code) | Structural whenever the corpus has reliable structure — it preserves meaning |
| Retrieval mode | Semantic, keyword, hybrid | Hybrid when queries contain exact identifiers (error codes, SKUs, symbol names) |
| Top-k | Retrieve k, re-rank to n | Retrieve wide (15-30), re-rank narrow (3-8). Wide-only retrieval dilutes context. |
| Re-ranking | None vs cross-encoder/model re-rank | Add when precision@5 is the bottleneck; it costs latency |
| Metadata filtering | Pre-filter vs post-filter | Pre-filter on tenant, locale, or permission — never post-filter access control |
| Freshness | Batch reindex vs incremental | Match the corpus change rate; state who triggers reindex and how staleness is seen |
Always specify: what happens on empty retrieval, what happens on low-similarity retrieval, whether answers must cite sources, and whether the model may answer from parametric knowledge when retrieval returns nothing. That last one is a product decision, not an implementation detail — decide it in the spec.
Every loop specification names all six:
| Guard | Specification requirement |
|---|---|
| Step budget | Hard maximum number of model turns |
| Token budget | Cumulative input+output ceiling across the whole loop |
| Wall-clock budget | Total elapsed limit, independent of step count |
| Termination | Every condition that ends the loop, including the success condition |
| Repetition guard | Behavior when the model repeats an identical tool call |
| Partial-result policy | What is returned when a budget is exhausted before the success condition |
Tool side effects must be classified. Every tool is read-only or mutating. Mutating tools need: idempotency strategy, whether they require confirmation, and whether they are permitted on a retry after an ambiguous failure.
State carried between steps is named exactly — nothing else persists. On step-budget exhaustion, return the partial answer flagged as truncated; never silently return an unfinished result as complete.
| Component | Requirement |
|---|---|
| Dataset | Concrete location and case count. Include adversarial and empty-input cases, not just happy path |
| Labels | Who produced the expected outputs, and how disagreements were resolved |
| Metrics | Named and computable. "Accuracy" alone is not a metric — say accuracy of what, measured how |
| Thresholds | A number per metric that gates the merge |
| Grading | Deterministic assertion, rubric grading, or model-graded — state which, and its known weakness |
| Regression | Which existing evals must continue to pass unchanged |
| Cost/latency | Measured per run, recorded alongside quality metrics |
| Provenance | Every eval run records model id, prompt version, and retrieval parameters |
Include adversarial cases whenever untrusted text reaches the prompt. At minimum: instruction override, delimiter escape, and exfiltration attempts against any tool the loop can call.
Enumerate every applicable row for the feature. Absent rows become production incidents.
| Failure | Detection signal | Required behavior |
|---|---|---|
| Rate limited | 429 / provider header | Backoff with jitter, capped attempts, then fallback provider |
| Timeout | Elapsed > budget | Abort the call, return the documented timeout error |
| Provider outage | 5xx / connection error | Fallback chain, then documented degraded response |
| Malformed output | Schema validation fails | Repair-vs-reject policy from Pattern 4 |
| Context overflow | Pre-call token count | Shed lowest-priority context; never truncate the system prompt |
| Empty retrieval | Zero results above floor | Documented no-context behavior; decide answer-vs-abstain |
| Model refusal | Refusal in response | Surface unchanged; never retry with softened wording |
| Tool error | Tool throws or errors | Return the error to the model once; escalate on repeat |
| Runaway loop | Repetition guard trips | Terminate with partial result flagged as truncated |
| Cost ceiling exceeded | Running cost counter | Terminate and return partial; alert per observability section |
Budget in tokens and money, not adjectives. Per call: input and output token ceilings. Per user request: maximum model calls, blended cost target at current pricing, p95 end-to-end latency, and time-to-first-token for streamed surfaces. State the overflow behavior: what is shed first when the input budget is exceeded — never the system prompt.
Observability names four things: what is logged per call (model id, prompt version, token counts, latency, cost, outcome, correlation id), the trace span boundaries (retrieval, each model call, each tool call), what is redacted (prompt bodies with user data, retrieved content, keys, PII — named field by field), and what alerts (threshold breaches worth notifying).
<decision_framework>
Apply a framework only when the spec touches its artifact class. The per-artifact section templates live in examples/core.md.
Does the feature call a model at all?
├─ YES → Approach rationale (Pattern 1) + Model Selection (Pattern 2) + Prompt Architecture (Pattern 3)
│ + Output Contract (Pattern 4) + Budgets (Pattern 9) + Failure Modes (Pattern 8) + Eval Plan (Pattern 7)
├─ Does it retrieve from a corpus? → Retrieval Design section (Pattern 5)
├─ Does the model call tools? → Tool Contracts section (see examples/core.md)
├─ Does the model sequence steps? → Agentic Loop section (Pattern 6)
└─ None of the above touched → the section is omitted, never filled
| Mistake | Consequence |
|---|---|
| Specifying an agentic loop for a fixed sequence | Non-deterministic, expensive, hard to eval — a code chain was sufficient |
| Omitting the empty-retrieval case | The model answers from parametric knowledge and the answer looks cited |
| "Validate the response" with no schema | The developer invents a schema; downstream consumers break on drift |
| No prompt version in the spec | Eval results cannot attribute to a revision; regressions are untraceable |
| Floating model alias instead of a pinned id | Silent quality shift when the provider rotates the alias |
| Budgets stated as adjectives ("fast", "cheap") | No implementable target, no reviewable violation |
| No adversarial eval cases with untrusted input | Prompt injection ships undetected |
| Retry on refusals | Wastes budget and reads as an attempt to bypass a safety response |
| Truncating the system prompt on overflow | Instructions silently disappear; behavior changes without an error |
| Post-filtering retrieval for access control | Cross-tenant content reaches the model before it is filtered out |
| Eval thresholds set after seeing results | The gate ratifies whatever shipped instead of gating it |
| Including implementation code in the spec | The developer follows your sketch instead of the codebase's real patterns |
</decision_framework>
<red_flags>
High Priority Issues (a spec with one of these is incomplete):
Medium Priority Issues:
Common Mistakes:
Gotchas & Edge Cases:
</red_flags>
<critical_reminders>
All specifications must be grounded in the codebase's real model clients, prompt modules, schemas, and eval fixtures
(You MUST justify the approach against the simpler tier — a fixed code-orchestrated chain beats an agentic loop whenever the step sequence is known)
(You MUST pin an explicit model id in configuration with a named fallback — never a floating alias, never inline in code)
(You MUST define the output contract completely: mechanism, schema, validation boundary, and a repair-vs-reject policy)
(You MUST state budgets as numbers — tokens per call, calls per request, cost per request, p95 latency)
(You MUST identify where untrusted input enters every prompt, and require adversarial eval cases wherever it does)
(You MUST apply each framework only when the spec touches its artifact class — an unused section is omitted, never filled)
Failure to specify these contracts produces AI features whose outputs go unvalidated, whose costs are unbounded, whose injections ship undetected, and whose regressions cannot be traced to a prompt revision.
</critical_reminders>
Frequently asked questions
Quick Guide: Default to the simplest tier that satisfies the requirement — most features are one well-built model call. Pin the model id, define the output contract with a repair-vs-reject policy, budget in tokens and money rather than adjectives, enumerate the failure modes, an…
The source record exposes this install command: npx skills add https://github.com/agents-inc/skills --skill "src/skills/meta-planning-ai-planning". Inspect the command and pinned source before running it.
Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
coreyhaines31/marketingskills
When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers o
prowler-cloud/prowler
PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre