mcpField
R
restraint

restraint

github.com/raphaelsalajaDevelopment5362 installsUpdated today
Repository

About restraint

A design and code-review skill that keeps changes limited to what was requested. It identifies unrequested interface elements, unnecessary settings and code, and specifies how removals and findings should be handled.

Key features

  1. 01Flag unrequested interface and code
  2. 02Prefer the smallest working implementation
  3. 03Remove obsolete code and related artifacts
  4. 04Avoid needless settings and fallbacks
  5. 05Report findings by severity

Use cases

  1. 01Reviewing a feature change for extra UI
  2. 02Cleaning up code after removal
  3. 03Checking a proposed implementation for needless options

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/raphaelsalaja/skills --skill restraint

After installing, type/restraintin Claude Code to confirm it loaded.

Bundled filesagents/openai.yaml

Details

From the project README

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.

RuleBrokenReplacement
restraint-no-unrequested-uiA count badge on every rowNo badge
restraint-no-redundant-feedbackA toast after a move the user can seeNo toast
restraint-smallest-buildA custom video player<video controls>
restraint-no-needless-settingA preference for a gap nobody changesA fixed --gap
restraint-no-legacyA legacy branch kept "for safety"Deleted
restraint-no-fallbacksvalue ?? defaultValue for a value that is always setvalue
restraint-delete-dont-defer"Deferred for your review"Deleted, or one question
restraint-remove-the-trailA removed package's variables left in theme.cssThe variables removed with it
restraint-no-narrating-comments// Render the headerNo 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.

Comments

Markdown supported