Index of every page on this site: llms.txt
All skills
raphaelsalaja avatar

/restraint

@b2e4283
Run it yourself

Ships the smallest thing that does the job and deletes what nobody asked for.

Use this Skill: https://skilld.dev/gh/raphaelsalaja/skills/restraint

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈22 tokens for metadata: the name and description. ≈1.6k when used: this file. ≈23 more on demand in 1 file.

Description uses 1.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈89 characters, or 1.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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, a library or a native element belongs to reuse. Which element a change may touch belongs to scope. Staging and committing belong to ship. Whether an animation should exist belongs to motion, and deleting one cleanly belongs here.

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

Build at the size the ask needs: local state before a store, one app before a monorepo and a fixed value before a setting. A global store added for one panel's toggle is restraint-smallest-build. A preference nobody will change is restraint-no-needless-setting.

Write code inline until a third copy appears. A new helper, hook, wrapper or config object with one caller is restraint-no-single-use-abstraction. When rg -w useRowFormatter finds only the definition and one call, inline it.

Only the lines the ask needs

A fix does not reformat, rename, reorder imports or upgrade packages around it. Compare git diff --stat with git diff -w --stat. A large gap between them is whitespace churn. Unasked churn is restraint-no-drive-by-changes.

No files nobody asked for

Add no README, notes, summary, example page or script the task did not ask for. Delete scratch files made while working before you reply. A stray NOTES.md or test-fix.js is restraint-no-unrequested-files. git status --short marks every new file ??, so read that list before replying. This covers only files you made. A file someone else changed stays, and ship asks before committing it.

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.

Validate only where data enters: user input, the network and storage. A try with an empty catch around code that cannot throw goes too.

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.

A deleted animation takes its start and its waits

Deleting an animation also deletes its start state: initial={{ opacity: 0 }}, animation-fill-mode: forwards from opacity: 0 and reveal classes waiting on an observer. A start state left behind keeps the element invisible, which is restraint-remove-the-start-state.

It also deletes what waited on it: onAnimationEnd, transitionend, exit-complete callbacks and timeouts sized to a duration. Focus moved in such a callback moves at once instead. A leftover setTimeout(focusInput, 200) is restraint-remove-the-wait.

No debugging left behind

Remove every console.log, debugger and block of commented-out code you added before reporting done. git diff -U0 | rg '^\+.*(console\.(log|debug)\(|\bdebugger\b)' finds them. One left in the diff is restraint-no-leftover-debug.

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 global store added for one panel's open toggle useState in the panel
restraint-no-needless-setting A preference for a gap nobody changes A fixed --gap
restraint-no-single-use-abstraction A useRowFormatter hook with one caller Its three lines inline
restraint-no-drive-by-changes A one-line fix with 300 lines of reformatting The one line
restraint-no-unrequested-files NOTES.md and test-fix.js left in the tree Neither created, or both deleted before the reply
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-remove-the-start-state animate removed, initial={{ opacity: 0 }} left Both removed, and motion.div back to div
restraint-remove-the-wait setTimeout(focusInput, 200) left after the exit is gone focusInput() when the panel closes
restraint-no-leftover-debug console.log("row", row) in the diff Removed
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. It is also an element left invisible by a deleted animation's start state. MEDIUM is a fallback, a legacy branch, a leftover variable or a single-use abstraction. It is also a toast for a result already on screen, or a build bigger than the ask. So is unasked churn, a file nobody asked for or a callback or timeout still waiting on a deleted animation. LOW is a narrating comment or a leftover debug line.

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.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1d3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    The skill consists of a set of instructions designed to help an AI agent minimize code changes and remove unrequested features. It does not include any scripts, external dependencies, or malicious behaviors.

  • Socket1d

    No alerts

  • Snyk2d

    Risk: LOW · No issues

Signed by skilld at b2e4283. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 12 hours ago.

Activeupdated yesterday

README badge

README badge for raphaelsalaja/skills/restraint