Skip to main content
skill CX Codex

restraint — Claude Code skill: what it does, how to install

The restraint Claude Code skill trims changes to the requested scope. It flags extra UI, settings, and code paths during implementation and cleanup.

MIT 175 installs ★ 69 updated 2026-11-14

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add raphaelsalaja/skills --skill restraint -a claude-code
Open on GitHub

What restraint does

The skill compares a change with the request and flags elements that were not asked for and are not needed. It favors native HTML over custom components, fixed values over settings, and deletion over keeping legacy branches in unreleased work.

For a removal request, it calls for deleting related styles, variables, routes, and menu entries. A cleanup request produces a list of unused files, exports, styles, dependencies, and prototypes. Deletion requires approval; an unapproved cut is a proposal.

Findings use one line per root cause, with a file path, line number, and rule ID, followed by a severity count. The skill will not approve a file it has not read, and checks it could not run are marked Not verified.

What it helps with

  • remove UI elements that were never requested
  • replace a custom component with a native HTML element
  • delete leftover styles, variables, and routes with a package
  • find unused files, exports, and dependencies

Example prompts for the agent

  • Trim this change to what the request requires.
  • Remove this package and its related styles, variables, and menu entries.
  • Check the project for needless settings, fallback branches, and unused files.

How to install restraint

1Skills CLI (Vercel)

npx skills add raphaelsalaja/skills --skill restraint -a claude-code

2Manually: put the files in place

~/.claude/skills/restraint/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/restraint/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about restraint

How do I install restraint in Claude Code?

Run npx skills add raphaelsalaja/skills --skill restraint -a claude-code. The skill file is at ~/.claude/skills/restraint/SKILL.md.

What does restraint do?

It checks changes against the request, flags extra interface elements and code, then reports findings by rule ID and severity.

Does restraint delete code it finds?

A removal the user has not approved is presented as a proposal. For an approved removal request, the skill also calls for deleting related styles, variables, routes, and menu entries.

Source text

SKILL.md · MIT
---
name: restraint
description: Ships the smallest thing that does the job and deletes what nobody asked for.
---

# Restraint

This skill cuts a change down to the ask. It removes extra interface, options and code and treats "remove" as delete.

## Build the ask

An element, option or code path the user did not ask for is a finding unless the ask needs it to work. Work that has not shipped carries no backwards compatibility. A cut the user has not approved is a proposal, not an edit.

Label wording belongs to `copy`. Reusing an existing part belongs to `reuse`.

## Nothing beside the ask

Add no sections, badges, counts, captions, footers, icons inside buttons, sounds or decorative effects the user did not request. A count badge on every row is `restraint-no-unrequested-ui`.

## No feedback the screen already gives

Do not add a toast or a dialog for an action whose result is already on screen. That is `restraint-no-redundant-feedback`.

## The smallest build that works

Use the native element before a custom one, one app before a monorepo and a fixed value before a setting. A custom video player where `<video controls>` works is `restraint-smallest-build`. A preference nobody will change is `restraint-no-needless-setting`.

## No defensive code before release

Keep no legacy branch and no compatibility shim in unshipped work. That is `restraint-no-legacy`. Do not add a fallback for a value that is always set. That is `restraint-no-fallbacks`.

## Remove means delete

When the user says remove, delete the code and its styles, variables, routes and menu entries. "Deferred for review" is `restraint-delete-dont-defer`. A removed package that leaves its variables in `theme.css` is `restraint-remove-the-trail`.

Asked for a cleanup, list unused files, exports, styles, dependencies and leftover prototypes. Delete them once approved.

## Comments state constraints or go

Delete comments that narrate the code. Keep one only when it states a constraint the code cannot show. A narrating comment is `restraint-no-narrating-comments`.

## The pair

Every check is a pair. The broken line sits beside the line that replaces it.

| Rule | Broken | Replacement |
| --- | --- | --- |
| `restraint-no-unrequested-ui` | A count badge on every row | No badge |
| `restraint-no-redundant-feedback` | A toast after a move the user can see | No toast |
| `restraint-smallest-build` | A custom video player | `<video controls>` |
| `restraint-no-needless-setting` | A preference for a gap nobody changes | A fixed `--gap` |
| `restraint-no-legacy` | A legacy branch kept "for safety" | Deleted |
| `restraint-no-fallbacks` | `value ?? defaultValue` for a value that is always set | `value` |
| `restraint-delete-dont-defer` | "Deferred for your review" | Deleted, or one question |
| `restraint-remove-the-trail` | A removed package's variables left in `theme.css` | The variables removed with it |
| `restraint-no-narrating-comments` | `// Render the header` | No comment |

## Reporting

**Severity.** `HIGH` is a feature, setting or code path nobody asked for, or a "removed" item that still exists. `MEDIUM` is a fallback, a legacy branch or a leftover variable. `LOW` is a narrating comment.

**Format.** One finding per root cause:

```
file:line - [rule-id] what is wrong
```

Then a `Rule | Count | Severity` summary. `Block` when any `HIGH` remains, `Approve` otherwise. Never `Approve` a file you did not read. Mark every check you could not run as `Not verified`.

© raphaelsalaja · MIT · raphaelsalaja/skills

Similar skills

SKILL.md skills catalog →

From the same set25

The whole set →
audit Audits diffs, branches, or codebases against an entire skill set into a ranked report. Consolidates multi-rule findings before fixes begin. CX Codex +1 176installs frames This Claude Code skill records a browser interaction under CPU throttling and identifies dropped frames or input delays. It records the same steps again to check the fix. CX Codex +1 176installs match The match Claude Code skill rebuilds a named interface part from its source and compares the result with the reference. It activates when a request points to an app, URL, screenshot, or design file. CX Codex +1 175installs reuse Skill for Claude Code enforces a strict reuse hierarchy: internal project parts first, maintained libraries next, custom code last. Flags duplicate UI components and stray styles during reviews. CX Codex +1 175installs defaults defaults — a skill for Claude Code enforces interface baseline rules across surfaces, scrolling, shadows, focus states, and overlays. Audits markup against common UI flaws directly in code. CX Codex +1 174installs lab lab — a skill for Claude Code that builds an isolated preview route displaying all states and variants of actual UI components. Runs during component styling and design tuning in local development. CX Codex +1 173installs copy copy — a Claude Code skill that inspects and edits interface text. Enforces Title Case on buttons and headers, cuts excess phrasing, and bans em dashes. CX Codex +1 172installs verify The verify Claude Code skill checks UI and behaviour changes in the running app. The agent opens the affected screen, tests new controls and reports where the result can be seen. CX Codex +1 171installs

Project sponsors

Companies that keep this analytics open