discard

discard is a skill for Claude Code, Codex from nick-railsback/skill-engine. It costs 36 tokens per session (680 once invoked), scanned C, original, MIT.

A cleanup command for removing a proposed staging directory while leaving the live contextualizer unchanged. It is part of a workflow for reviewing and promoting proposed changes.

In plain words
What is it for?
Use it after a review when a proposed contextualizer should not be promoted, especially when you want to revise it and run discovery again.
Why use it?
It gives you a defined way to reject a proposal and remove its temporary files without risking the active version. It also handles an already-missing proposal cleanly.

Skill for Claude CodeCodex

Part of the skill-engine plugin — 12 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nick-railsback/skill-engine/discard
Any agent
npx skills add nick-railsback/skill-engine --skill discard
Clone the repo
git clone --depth 1 https://github.com/nick-railsback/skill-engine

Made for: Claude Code, Codex.

Or install skill-engine, the plugin that ships this one along with the rest of its 12 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for discard

README.md
[![agentmods](https://agentmods.dev/badge/skills/nick-railsback/skill-engine/discard.svg)](https://agentmods.dev/skills/nick-railsback/skill-engine/discard)
Your own site
<a href="https://agentmods.dev/skills/nick-railsback/skill-engine/discard"><img src="https://agentmods.dev/badge/skills/nick-railsback/skill-engine/discard.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 680 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.00680
Opus 5 $0.00018 $0.00340
Sonnet 5 $0.00007 $0.00136
Haiku 4.5 $0.00004 $0.00068

Measured 3d ago against content hash 0372f7030252, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

discard scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "<install>/<name>-context.proposed/"
plugin/skill-engine/skills/discard/SKILL.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Discard

Remove a proposed staging directory. The live contextualizer is not modified. Idempotent — discarding a non-existent proposed dir exits cleanly with a one-line diagnostic.

When to invoke

Invoke /skill-engine:discard <name> when reviewing a proposal that does not warrant promotion — the predictions in Step 1 of REVIEW.md and the disagreement set in Step 2 surface enough divergence that re-running DISCOVER with a --hint=... is the right next move, not promotion. discard is also the path out when the user ticked [x] reject in Step 3: /skill-engine:apply refuses to promote a rejected proposal and points the user here.

Resolving <name> and <install>

Same resolution as /skill-engine:review. See review/SKILL.md § Resolving <name>.

Pre-discard prompt

Before removing anything, render a one-line confirmation naming the path:

Remove <install>/<name>-context.proposed/ (and its .review/ audit trail)? The live <name>-context/ is untouched. [y/N]

Accept y or yes (case-insensitive, leading/trailing whitespace trimmed) as consent. Treat N, blank input, or anything else as decline — the prompt is a single-shot, no re-prompt.

On decline, exit cleanly with:

Discard cancelled. <install>/<name>-context.proposed/ is untouched.

The removal

On consent:

rm -rf "<install>/<name>-context.proposed/"

Exit message:

Removed <install>/<name>-context.proposed/. Live <name>-context/ is untouched.

Idempotent paths

When the proposed dir does not exist at the resolved path (e.g., a stale invocation after an earlier discard, or a slug typo that resolves nowhere), surface:

No proposed staging dir at <install>/<name>-context.proposed/. Nothing to discard.

Exit zero (not an error condition — discarding nothing is a no-op).

When bare invocation finds zero *-context.proposed/ directories under <install>, same shape:

No proposed staging dirs found under <install>. Nothing to discard.

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 72 lines · 36 tokens per session scan C 0372f7030252

Subscribe to this mod's changes

discard is a skill published in the GitHub repository nick-railsback/skill-engine (2 stars, last pushed 27d ago), licensed MIT. It adds 36 tokens to every session and 680 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

erpaval

Workflow for autonomous software development with the Kiro CLI (open Agent Skills standard). Classifiers route scope, complexity, directory state, and spec readiness before committing to Explore / Research / Plan / Act / Validate, then close the loop with a Compound step that persists lessons to .erpaval/solutions/…

theagenticguy/erpaval · 174 tokens

product-discovery

File-first orchestrator for product discovery and spec frameworks. Frames the problem with a Discovery Lead, Product Analyst, or System Architect role. Spawns parallel framework agents (Double Diamond, How Might We, Jobs to Be Done, user stories with INVEST, EARS for AI-coder specs, Gherkin), synthesizes into a PRD or…

theagenticguy/erpaval · 242 tokens

agent-ux-patterns

Agent UX patterns and human-in-the-loop design: Twilio A2H protocol, Levels of Autonomy (L0-L5), inbox pattern, progressive trust, decision journal, gate reviews, autonomous work reports. Six-phase methodology from vague pain point to concrete data model via landscape research and multi-direction brainstorming. Use…

theagenticguy/erpaval · 182 tokens

meta-prompt-optimizer

Audit and rewrite prompts against Claude Opus 4.7 instruction-following best practices. Produces a scored audit plus a rewritten prompt. Use when the user asks to audit, review, critique, rewrite, improve, optimize, tighten, score, fix, migrate, or draft a prompt — including system prompts, CLAUDE.md files, Claude…

theagenticguy/erpaval · 230 tokens

product-strategy

File-first orchestrator for business and product strategy frameworks. Frames the challenge with a CPO / CSO / VP Design role, spawns parallel framework agents (Rumelt kernel + Crux, Wardley Maps, Minto Pyramid as thinking structure, Working Backwards PR-FAQ as discovery artifact), synthesizes outputs into one strategy…

theagenticguy/erpaval · 216 tokens

tech-stack-builder

Opinionated tech stack recommendations and settled library references. Two modes: (1) /build-stack runs parallel researcher agents to compare candidates and emit a stack report + ADRs for greenfield projects; (2) direct reference routing for coding with settled defaults. Use when the user asks to recommend a stack…

theagenticguy/erpaval · 274 tokens