choose-by-consequence
Skill25 starsChanged 32 days agoMITView on GitHub
Use when code must decide what happens on an unusual or failing path. Also use it when the user says "just handle that case", "skip it if it fails", or "is this the best way?". Compares the easy route with each alternative by what it does to the user''s files, data, and output. Picks the option that fails loudly and keeps every count and exit code true. Never writes through a file that the change does not own. Not for checking finished work against the real command output (use `verify-and-review`).
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- evals/AGENTS.mdAGENTS.md
- tooling/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- evals/CLAUDE.mdCLAUDE.md
- tooling/CLAUDE.mdCLAUDE.md
- choose-by-consequenceSkill
- design-deep-modulesSkill
- diagnose-before-editingSkill
- plan-with-review-pageSkill
- research-primary-sourcesSkill
- resolve-conflicts-by-intentSkill
- scope-confirmed-changesSkill
- shadowclone-build-preferencesSkill
- shadowclone-reviewSkill
- shadowclone-workSkill
- tests-that-catch-bugsSkill
- typescript-type-safetySkill
- verify-and-reviewSkill
- write-plain-englishSkill
- choose-by-consequenceSkill
- data-handlingSkill
- design-deep-modulesSkill
- diagnose-before-editingSkill
- plan-with-review-pageSkill
- research-primary-sourcesSkill
- resolve-conflicts-by-intentSkill
- scope-confirmed-changesSkill
- shadowclone-build-preferencesSkill
- shadowclone-reviewSkill
- shadowclone-workSkill
- tests-that-catch-bugsSkill
- typescript-type-safetySkill
- verify-and-reviewSkill
- write-plain-englishSkill
- design-deep-modulesSkill
- diagnose-before-editingSkill
- guided-pr-reviewSkill
- plan-with-review-pageSkill
- research-primary-sourcesSkill
- resolve-conflicts-by-intentSkill
- scope-confirmed-changesSkill
- shadowclone-reviewSkill
- shadowclone-workSkill
- tests-that-catch-bugsSkill
- typescript-type-safetySkill
- verify-and-reviewSkill
- verify-review-findingsSkill
- write-plain-englishSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Do all counts, totals, and statuses in the output still match what happened?
- Distinctive: line 30
Put each risky choice to the user as one question with 2 to 4 options.
- Distinctive: line 34
Do not ask again about a choice that the user made while planning.
- Distinctive: line 36
Do the full job safely.
- Distinctive: line 39
Never use a silent fallback.
- Distinctive: line 40
Write the message that the user reads before you write the code that prints it.
- Distinctive: line 41
Run the real command, and read the summary line, the final lines, and the exit code.
- Distinctive: line 42
Write down each choice and its output line for the handoff.
- Distinctive: line 49
Best route: Do not write through the link.
- Distinctive: line 54
Never write through a symbolic link, a shared file, or a file that another tool owns.
- Distinctive: line 55
Do not catch an error only to continue.
- Distinctive: line 56
Do not change a default that people rely on without a line in the output and in the handoff.
- Distinctive: line 58
Keep the decision in one place.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Choose by Consequence
Use when
The code must decide what happens when something is unusual or fails. Examples: a file is a symbolic link, a tool is missing, or a step times out. Each of these is a behavior choice. A choice is risky when it touches owned or shared files, data, security, or public behavior such as output and exit codes.
Gates
- For each option, can you say what the user sees and what happens to their files and data? If not, check before you choose.
- While you plan, did you give each risky choice to the user as an open decision? Put the option that fails loudly first.
- While you execute, did you pick the option that fails loudly? A skip is loud only when the summary counts it, the final output names it, and the exit code shows it.
- Do all counts, totals, and statuses in the output still match what happened?
- Does any write go through a file that the change does not own, such as a symbolic link target? If so, block, and name both paths.
- Does the handoff list each choice with the real output line that shows it?
Process
While you plan
- List the options. Usual options: do the full job safely, block with an error, skip with a visible line, ask, or fall back.
- For each option, write its hidden cost: who finds the problem, when, and what the recovery costs.
- Put each risky choice to the user as one question with 2 to 4 options. Put the option that fails loudly first, and give one reason for it.
While you execute
- Do not ask again about a choice that the user made while planning. Follow it.
- For a new choice, act without asking. Pick the first option that applies:
- Do the full job safely.
- Block with a message that names the file, the cause, and the next action.
- Skip with a counted line at the end of the output, and a nonzero exit code.
- Never use a silent fallback. A fallback is acceptable only when the output names it and the result is still correct.
- Write the message that the user reads before you write the code that prints it.
- Run the real command, and read the summary line, the final lines, and the exit code.
- Write down each choice and its output line for the handoff.
Example
Situation: A setup command installs guidance for several agents. The instruction file of one agent is a symbolic link to a file that other tools share. Easy route: Skip that agent, print the skip in the middle of the output, and report success. Hidden cost: The summary still said "Installed for 2 agents". The user believed that the setup installed the agent, and nothing told them that the shared file was left alone. Best route: Do not write through the link. Count the agent as not installed. End the output with a line that names the agent and the link target. Exit with a nonzero code. Evidence: The last line is "Not installed for codex: its AGENTS.md is a symbolic link to a shared file". The summary says "Installed for 1 agent", and the exit code is 1.
Guardrails
- Never write through a symbolic link, a shared file, or a file that another tool owns. Block, and name both paths.
- Do not catch an error only to continue. Catch it to add context, then report it.
- Do not change a default that people rely on without a line in the output and in the handoff.
- Make each error message specific: the path, the cause, and one next action. "Something went wrong" is not a message.
- Keep the decision in one place. A second copy of the same check drifts, and then the two paths disagree.
Completion
- Each risky choice in one line: the option that you picked and the hidden cost that it avoids.
- The command that you ran and the output line that shows each skip, block, or fallback.
- The exit code of that command.
- The summary or count line, checked against what happened.
- The
file:lineof each new block, skip, or fallback.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

