tighten
Use when tightening named files or pasted text in place by removing verbose prose, brittle references, and low-value noise.
- License 许可
- MIT
- 所属仓库
- tony/skills
- 最近更新
- 2026-11-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- tighten
- description
- Use when tightening named files or pasted text in place by removing verbose prose, brittle references, and low-value noise.
- allowed-tools
- [ "Bash", "Read", "Grep", "Glob", "AskUserQuestion" ]
- argument-hint
- [paths/globs] [--stdin] [--gates] [--diff-only]
- disable-model-invocation
- true
02 资源文件 1
- 参考文档agents/openai.yaml292 B
03 SKILL.md 正文
/lean:tighten
Tighten specified files in the working tree and print a diff. Never commits, never pushes, never requires a clean tree, never scans repo-wide.
$ARGUMENTS
paths/globs: files to tighten, resolved byscope.py --paths.--stdin: tighten a pasted draft read from stdin instead of files; print the tightened text and edit nothing.--gates: after editing, run the project's discovered format/lint/typecheck once and report. Never commits.--diff-only: show what would change without editing.
If $ARGUMENTS is empty, ask which files via AskUserQuestion; without
a question tool, print the usage and stop.
With targets but no question tool, act as --diff-only unless the
request itself says "go ahead": that authorizes the edits it names,
never a commit.
The commands below run from the user's directory. Resolve
../../scripts/scope.py against the directory of this SKILL.md (the path
it was read from) and write that absolute path literally in each command;
shell variables do not persist between Bash calls. Never show that path in
the reply.
Steps
-
Resolve targets. Read stdin with
--stdin; with--stdinand no text, print the usage and stop. Otherwise resolve the paths:$ python3 ../../scripts/scope.py --paths <paths/globs>It prints
path<TAB>tracked|untracked|deletedper file, and exits 2 naming a path that matches no file: report that and stop. Skip adeletedrow: nothing is on disk to edit. -
Load the rules and voice. Read
../../references/prose-rules.mdand../../references/lean-rubric.mdbefore drafting any rewrite,--stdinincluded: the cut list lives there. Then read./AGENTS.mdand./CLAUDE.mdfor the host's rubric and accepted voice. For--gates, take the format/lint/typecheck commands from a checks section in those files; if none is defined, skip gates. -
Detect. Flag what the prose rules list as cut. Preserve every load-bearing reference and "why" comment.
-
Preview and confirm. Show the proposed edits and confirm via
AskUserQuestionbefore writing; the preview and the printed diff (Step 6) are the review surface. Skip when--diff-onlyor--stdin; a--diff-onlyrun prints its proposal in step 6. Without an interactive question tool, follow the headless rule in$ARGUMENTS. -
Apply in place. Use
Edit. Replacements are concrete and shorter than the original. -
Diff. Print the diff per
../../references/handoff.md. A--diff-onlyrun prints the proposed edits as a unifieddiffblock instead (the proposal, notgit diff). Skip for runs that edited nothing; for--stdin, print the tightened text per step 7. With--gates, run the discovered checks once and report; never commit, whatever the gates report. -
Report and hand off. Write it per
../../references/prose-rules.md: a one-line count of findings (one per edited span) resolved and skipped, with no section labels and no recap of what changed. Reply in this shape, as plain text outside any code fence, with plain bullets, no bold (never- **Label:** ...), and no local paths:5 findings resolved, 1 skipped.With
--diff-only, or no question tool and no go-ahead, the hero isN findings proposed, 0 applied., followed by the proposed edits in adiffblock and nothing else:2 findings proposed, 0 applied. ```diff --- a/NOTES.md +++ b/NOTES.md @@ -3 +3 @@ -We should probably consider maybe running the sync job nightly. +Run the sync job nightly. ```A rewrite adds no fact the original lacks. A stopped run follows
../../references/handoff.md. The reply adds no sentence outside the shape, anywhere (not even to say nothing was edited, why, or what the session cannot do); do not explain text you kept.After a proposal-only run (nothing written), offer to apply the proposal or stop; there is nothing to commit or discard. Otherwise offer next steps as
../../references/handoff.mddescribes: commit, or discard the edits. Offer a file option only for files on disk; pasted text has none and is never matched to a scaffold file. For--stdin, skip the handoff: the reply is the tightened text with no lead-in, then at most one line, and only to name load-bearing text kept that the user might expect cut. Never narrate what was removed.
What this does not do
- Delete whole files. Report them instead.
04 同仓库更多 Skills
serene-bliss
Use when asked to make a CLI --help, docs page, error message, or tooling UX more serene or calmer for developer experience; returns text, no edits.
review
Weave code review: run independent adversarial reviews in parallel, then synthesize findings
refine
Use when asked to refine a draft, iterate on code until cleaner, or polish a README through repeated critique and improvement.
prompt
Weave prompt: compare independent adversarial implementations, then adopt the single best one
plan
Weave planning: compare independent adversarial plans, then synthesize the best one
fix-review
Fix weave review findings: validate, add test coverage, fix, and commit each as atomic changes