tdd
Skill11 starsChanged 27 days agoMITView on GitHub
Fix a t3term bug test first: a focused test that fails before the fix, passes after it, and fails again when the fix is reverted. Also the bar every test here meets: it checks what a user, caller or T3 can observe, not how the code does it. Use when fixing a bug with a cheap local test, when asked for a regression test, or when reviewing whether a test proves anything.
194 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- trpc/trpctheir own version, first seen Nov 8, 2026
- wowyuarm/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Contexera/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Dimon94/dveritytheir own version, first seen Nov 8, 2026
- Dimon94/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use capture-learning-tools, design-frontend-dev and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
The-Vibe-CompanySkillcapture-learning-tools
Turn technical conversations, bugs, CI failures, review comments,
Also in 5 projects that use this
The-Vibe-CompanySkilldesign-frontend-dev
Clean Impeccable frontend design skill. Use when the user wants to
Also in 5 projects that use this
tristanphvnSkillketchup-video
Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.
Also in 14 projects that use this
jaydubya818Skillfigure-it-out
Use when novel or multi-phase work needs an auditable workflow and no narrower playbook fits.
Also in 54 projects that use this
jaydubya818Skillprinciple-laziness-protocol
Apply when a refactor is adding wrappers or abstractions instead of simplifying.
Also in 45 projects that use this
- +2 more from The-Vibe-Company
- +5 more from jaydubya818
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- mattpocock/skills★ 309ksame name
- trpc/trpc★ 41ksame name
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- MODSetter/SurfSense★ 17ksame name
- GreyDGL/PentestGPT★ 16ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- benchmark-checklistSkill
- blast-radiusSkill
- maintain-verify-t3termSkill
- verify-prSkill
- verify-t3termSkill
- verify-thisSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
When a bug has a clear, cheap test path, make the broken behavior fail in a test before changing the code.
- Very specific: line 17
No test reads the real ~/.t3, uses the Keychain or reaches a real T3 server (AGENTS.md).
- Distinctive: line 28
Commit the test first: Commit the failing test, then the fix on top, so the history reads as the argument: red, then green.
- Distinctive: line 35
Change the internals: Keep every observable result and restructure the code underneath.
- Distinctive: line 45
Don't change a test to match a wrong implementation.
- Distinctive: line 46
Don't loosen an assertion unless the intended behavior changed, and say why.
- Distinctive: line 47
Keep the test on the bug. No unrelated fixture churn.
- Distinctive: line 48
If the bug is flaky, make the test deterministic and name the signal it locks down.
- Distinctive: line 54
If you couldn't show failing-before, why, and the closest check you used instead.
“Common” is measured: kept by at least 6 in 10 of the 186 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test first
When a bug has a clear, cheap test path, make the broken behavior fail in a test before changing the code. The goal is a focused regression test that fails before the fix, passes after it and fails again with the fix reverted.
Adapted from pstack's tdd skill and its test-behavior-not-implementation principle (github.com/cursor/plugins, MIT) for this repo.
Where tests go here
- Unit and TUI tests sit in each module's
#[cfg(test)]block, or undersrc/tui/tests/for the TUI's larger ones. TUI tests draw frames on ratatui'sTestBackendwith a client that never connects, and check cells, the cursor and what the App asked the server for. tests/fake_server.rsruns the real RPC client against a fake Effect RPC server: reconnects, acks, cursors, refusals.tests/cli.rsruns the built binary with a temporary HOME and T3CODE_HOME against fake servers on 127.0.0.1: output,--json, exit codes.- No test reads the real
~/.t3, uses the Keychain or reaches a real T3 server (AGENTS.md). Copy the setup of a test near the one you're adding.
Steps
- Understand the bug. The intended behavior, the current behavior, the path that differs and the smallest observable reproduction. A verify-t3term drive often finds it. The test should fail at the same point that drive shows.
- Choose the narrowest test that can see it. The closest existing kind of test for that code. If none is practical, don't build new test machinery just for this. Use the closest executable check instead (see below).
- Write the failing test first. The smallest test that would have caught the bug. Derive the expected value from the requirement (the README, T3's source, the desktop's behavior), not from a run of the code.
- Run it before fixing.
cargo test --locked <name>. It must fail for the reason you expect. If it passes, or fails for another reason, fix the test before touching the code. - Fix the bug with the smallest change that gives the intended behavior and keeps nearby contracts.
- Run it again. It passes. Then run
cargo test --lockedfor everything. - Revert the fix and run it once more. It must fail. A test that still passes with the fix gone proves nothing. Put the fix back.
- Commit the test first. Commit the failing test, then the fix on top, so the history reads as the argument: red, then green.
What a test checks
A test is a claim about what the code does for its users: a person at the TUI, a script reading --json, T3 receiving a request. Judge each test against two imagined edits:
- Break the behavior. Return a wrong value, skip an effect, do it twice. If the test still passes, it proves nothing. The usual causes are an assertion looser than the contract, an expected value computed by the code under test, and an assertion on data the test built itself.
- Change the internals. Keep every observable result and restructure the code underneath. If the test now fails, it's pinned to the implementation and will need rewriting on every refactor without catching a bug.
Keep tests that catch the first edit and survive the second. In this repo the observable results are the cells and cursor a frame draws, the requests and their payloads the fake server receives, what the CLI prints and its exit code, and the files it writes in the temporary HOME. A call to a private helper isn't one.
When a failing test isn't practical
Use the closest executable check instead: a verify-t3term drive with captures before and after, a tests/cli.rs-style run, a script that replays a recorded event stream. Prefer no new test over a bad one: one that mostly tests mocks, pins current internals, depends on timing, or would be deleted right after.
Guardrails
- Don't change a test to match a wrong implementation.
- Don't loosen an assertion unless the intended behavior changed, and say why.
- Keep the test on the bug. No unrelated fixture churn.
- If the bug is flaky, make the test deterministic and name the signal it locks down.
Report
- The failing-before test and the failure it produced.
- The passing-after run, and the run with the fix reverted that failed again.
- If you couldn't show failing-before, why, and the closest check you used instead.
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.

