Audit or rewrite AGENTS.md so it holds only lasting principles. Run it only when the user asks for it by name; never invoke it on your own.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Ratchet source file size so every file stays small enough for an agent to read whole: find every file over a token budget, split oversized files by concept, and set up the pre-commit ratchet that stops them from growing. Use when a commit is blocked because a file is over the size budget, when asked to find or split oversized/long/god files, when a file you need to change is too large to read in one pass, or when asked to add a file-size limit or hook to a repository.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
A source file is over budget when it is past what an agent can read in one
pass (8,000 tokens, counted as bytes / 4, unless the repository sets
another). scripts/check-file-size.mjs owns
what counts as source, the budget, the ratchet, and the split rules; run it
with --help before anything else.
--all from the repository root, passing the
repository's --max-tokens if its hook sets one. Its list is the backlog.A file whose every split would cost more than it saves (one table or state
machine that only reads whole) may opt out instead. Put
@ratchet-files-ignore in a comment within its first 10 lines, in the
file's own comment syntax, followed by why splitting fails:
// @ratchet-files-ignore: one opcode table; split, each half reads without the other.
The check then skips the file entirely, even as it grows, so opt out only
after looking for a seam and finding none worth its cost, never to get past a
refusal. Tell the user each file you opt out and why. --all counts
opted-out files so they stay visible.
Done when every file you picked is under budget in its own commit, the
behaviour checks pass, and --all no longer lists those files.
Never install the hook without the user's explicit yes, even when they asked to set up the repository. Installing it freezes every file already over budget, so audit first and leave the repository untouched while you do:
npm install --prefix <scratch> linguist-languages there, and run
node <scratch>/check-file-size.mjs --all from the repository root (Node
18.3 or later). The script finds the package beside itself when the
repository lacks it.Once they agree, set up everything the check needs:
Script. The hook runs a copy committed in the repository, so every
clone runs the same check. If this skill folder is committed in the
repository, point the hook at its scripts/check-file-size.mjs; otherwise
copy that file to where the repository keeps its tool scripts (scripts/
if it has none). The entries below use scripts/check-file-size.mjs;
substitute the real path.
Dependency. Add linguist-languages at an exact version as a dev
dependency of the repository's root package.json, with the package
manager its lockfile names, or npm if there is none. The check needs Node
even in a repository written in another language: with no package.json,
create one at the root holding only "private": true and what this setup
adds, and make sure .gitignore covers node_modules/.
Hook. Run the script on every staged file with node (or bun where
the repository already runs its tools with it), appending --max-tokens N
for a budget other than the default. Add it beside the existing entries of
the pre-commit runner the repository already has:
| Runner | Where | Entry |
|---|---|---|
| lint-staged | its config | "*": "node scripts/check-file-size.mjs" |
| lefthook | pre-commit.commands | run: node scripts/check-file-size.mjs {staged_files} |
| pre-commit | .pre-commit-config.yaml, repo: local | id: ratchet-files, name: source file size, entry: node scripts/check-file-size.mjs, language: system |
| husky or a plain hook | the pre-commit script | git diff --cached --name-only -z | xargs -0 node scripts/check-file-size.mjs |
With no runner, add husky with lint-staged as dev dependencies, run
npx husky init, replace the whole of .husky/pre-commit (it starts as
npm test) with npx lint-staged or the package manager's equivalent, and
add the lint-staged entry above. Husky installs the hook on each clone's
package install.
Exclusions. Mark generated and vendored code linguist-generated or
linguist-vendored in .gitattributes instead of adding skip lists. The
script reads the staged .gitattributes, so stage it before rerunning
--all.
Docs. Document the budget, the opt-out pragma, and that a clone needs a package install for the hook, where the repository documents its other hooks; failing that, in a section of its README, creating one if needed.
Commit the setup through the new hook, without --no-verify.
Done when the setup commit passed the hook, and the installed hook refuses
git commit both of a staged new source file over the budget (a .js file
of more than four bytes per token of budget) and of a line added to a file the audit
listed, printing the split rules. Unstage and discard both probes afterwards.
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Audit or rewrite AGENTS.md so it holds only lasting principles. Run it only when the user asks for it by name; never invoke it on your own.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Audit the choices an implementing agent made, not its diff — a pure decision audit that traces the session's history into a choices ledger, changes no code, and never blocks an unsupervised run. Working code still embeds architecture the user never chose; surface it because future work inherits it. Use when the user wants to review the decisions the AI made on their behalf, before merging or committing AI-implemented work, when integrating a delegated subagent's pass, or when a fix "works" but might be a point fix.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Audit and prioritize performance work through bounded-work and forward-progress checks. Use when asked to find performance issues, investigate freezes/500s/OOMs, review retries or polling for no-progress loops, rank a performance backlog, or implement the next simple performance fixes.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Audit whether tests earn their maintenance cost and which suite owns each contract. Use when pruning redundant tests, investigating implementation coupling or test-only production hooks, reviewing the value of proposed coverage, or auditing an entire subsystem. Use write-tests to implement the resulting test changes.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Run fast, progressive experiments to map tunable parameters and their effects. Use when optimizing code, prompts, configurations, or other artifacts against a goal or benchmark, or when a long research run needs a planned hypothesis queue, focused trials, and durable findings.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Shoot software UI like a film. A sequence of hero shots, each a steep, oblique, extreme close-up of the interface floating in black, with a razor-thin focal plane, a slow motivated camera drift, and UI that acts on its own, hard-cut on the action, ending on one line of copy and a still logo. Use when asked for a launch video, product film, feature trailer, teaser, promo clip, hero shot, or any "cinematic" footage of an app or UI. This skill covers camera, framing, light, and edit. It is stack-agnostic.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.