hard-cut

hard-cut is a skill for Claude Code, Codex from udecode/plate-template. It costs 67 tokens per session (415 once invoked), scanned A, a copy of hard-cut, MIT.

A code-removal procedure for deleting a feature entirely, including its entry points, callers, tests, documentation, and leftover code.

In plain words
What is it for?
Use it when ripping out a feature, command, route, flag, fallback, or other behavior that should no longer exist.
Why use it?
It prevents removed features from surviving as unused commands, compatibility code, placeholders, or misleading documentation. It is intended for a complete removal rather than a gradual deprecation.

Skill for Claude CodeCodex

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/udecode/plate-template/hard-cut
Any agent
npx skills add udecode/plate-template --skill hard-cut
Clone the repo
git clone --depth 1 https://github.com/udecode/plate-template

Made for: Claude Code, Codex.

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 hard-cut

README.md
[![agentmods](https://agentmods.dev/badge/skills/udecode/plate-template/hard-cut.svg)](https://agentmods.dev/skills/udecode/plate-template/hard-cut)
Your own site
<a href="https://agentmods.dev/skills/udecode/plate-template/hard-cut"><img src="https://agentmods.dev/badge/skills/udecode/plate-template/hard-cut.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 415 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00067 $0.00415
Opus 5 $0.00034 $0.00208
Sonnet 5 $0.00013 $0.00083
Haiku 4.5 $0.00007 $0.00042

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

Security

Grade A, and why

hard-cut scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to hard-cut — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/hard-cut/SKILL.md · 60 lines

What it actually says

Hard Cut

Use this when a feature should die, not linger.

Rules

  • Delete the surface. Do not deprecate it.
  • Do not leave throw new Error("Not implemented"), placeholder notices, "feature removed" banners, or TODOs about bringing it back unless the user explicitly asks.
  • Do not keep compatibility aliases, deprecated shims, fallback parsing, migration bridges, or dead exports.
  • Delete tests for deleted behavior. Keep tests only for the behavior that still exists.
  • Delete comments that describe deleted code or mourn the old feature.
  • If removal exposes adjacent dead code, keep cutting until the graph is clean.

Sweep

  1. Find the real surface area:
    • exports
    • commands and flags
    • routes
    • UI entrypoints
    • feature flags
    • docs and examples
  2. Trace references with rg.
  3. Delete the implementation and the glue:
    • call sites
    • types
    • state
    • tests
    • docs
    • comments
  4. Grep again for the removed name and obvious aliases.
  5. Run the narrowest honest verification for the surviving product.

Smells

  • deprecated notices
  • not-implemented throws
  • stub handlers
  • dead enum or union members
  • permanently-false feature-flag branches
  • unused env vars and config
  • tests that only prove the deleted feature used to exist

Bias

If the choice is between deleting more code and leaving a zombie seam, delete more code.

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 · 60 lines · 67 tokens per session scan A 83081a0c4139

Subscribe to this mod's changes

hard-cut is a skill published in the GitHub repository udecode/plate-template (59 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 415 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to hard-cut, differing in 0 lines, and is treated as a copy.