/tstack:prevent-recurrencefrom tstack
Turn a mistake that keeps happening into something that cannot happen or that fails loudly, instead of adding another written rule. This skill MUST be used when the same kind of mistake has happened a second time in a project, when the user says an agent keeps doing something wrong (怎麼又、又犯了、一直犯同樣的錯、講過了), or asks to turn a rule into a check (把這個變成檢查、加個 lint). It MUST NOT be used for mistakes outside software engineering work, and MUST NOT answer a repeated mistake with only a new line in a rules file or a memory entry when a stronger level is available.
Ships in tstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When a mistake has happened twice, change the project so the next agent or person cannot make the mistake, or is stopped the moment they do.
Collect the occurrences from project-memory, commits and reverts, review comments, the user's corrections in this conversation, and comments that explain a workaround. Group them by what went wrong, not by where. A class counts once it has happened twice.
For each class write one sentence: what is done wrong, and what should be done instead.
Go down this list and stop at the first level that can carry the rule.
| Level | What it means | Examples |
|---|---|---|
| 1. Structure | The wrong thing is no longer possible | One supported way to do the task; one owner for each piece of state; one source of truth in place of lists kept in sync by hand; the old path and the dead code an agent would copy are deleted |
| 2. A check that fails | The wrong thing is written and then rejected, with an error that names what to do instead | A type or schema that cannot hold the bad state; a lint rule; a CI step; a pre-commit or agent hook; a script the project runs after every change |
| 3. A test | The behavior is pinned | A test that fails when the behavior breaks and keeps passing when only the internals change |
| 4. A written rule | Nothing fails when it is skipped | A line in AGENTS.md, or in project-memory where its promotion rule keeps it. Use this level only for judgment calls that no check can make |
Say for each class which level was chosen and why the level above it does not work.
Before adding a check that changes CI, shared lint configuration or hooks, propose it with what it will reject and get the user's go-ahead.
Run the new check against a real past occurrence and show that it fails there, then show that it passes on the corrected version. A check that has never been seen to fail is not evidence. The same command runs locally and in CI.
An exception to a check goes on the offending line, with the reason.
For levels 1 to 3 the check is the record: its error message, test name or comment names the mistake it stops. A written rule in AGENTS.md or in project memory that a check now enforces is removed from AGENTS.md, or re-added under the same key through project-memory naming the check. A level-4 rule goes where project-memory's promotion rule puts it.
For each class: the occurrences found, the level chosen and why not a higher one, what was added, and the output showing the check failing on the past occurrence.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub timlai666/tstack --plugin tstack13 skills in this plugin
/acceptance-reviewCheck finished work against what was originally asked: every requirement is matched to a result that was actually exercised, and the original problem is shown to be solved. This skill MUST be used before reporting substantial work as done or handing it back, and when the user asks whether the result meets the request. Work this conversation produced MUST be checked by an independent reviewer who is not given the implementer's summary. It MUST NOT be used outside software engineering work, and MUST NOT replace diff-review, security-scan or test-and-fix. Triggers on: 驗收、有沒有做到、有沒有符合需求、有沒有解決問題、做完了嗎、acceptance review/agent-delegationRules and script for handing work to a subagent or another CLI (OpenCode, Antigravity, Copilot, Codex, Claude). This skill MUST be loaded before dispatching any subagent or CLI, even for a small task, and before changing an existing API's name, signature, usage or behavior. New delegation MUST go through scripts/dispatch.py and its task-local levels, and MUST NOT skip tools based on earlier turns. It MUST NOT be applied to work that is not software engineering. A main agent MUST NOT dispatch through its own CLI. A dispatched worker MUST NOT apply this skill or delegate further. Triggers on: subagent、派工、分工、antigravity、agy、opencode、copilot、codex、誰來寫、用哪個模型、介面變更Other plugins' skills for the same job