run-tests
Skill8 starsChanged 8 months agoApache-2.0View on GitHub
The Makefile targets use Docker. To run one file, use the docker command directly: Add --tap for TAP format or --verbose-run for assertion details: Integration tests always show green in CI even when failing — they run with || true in .github/workflows/test.yml. After make test-integration, read the output explicitly. Add echo "TMPDIR: $TEST_TMPDIR" >&3 inside the failing @test body (bats redirects >&3 to the terminal). Run the test in verbose mode. Look for CALL: lines. If the mock was never…
17 other projects use a version of this.
Adopted by
Most recently taken up by
- vercel/next.jstheir own version, first seen Nov 29, 2026
- Dipeshpal/capestheir own version, first seen Sep 27, 2026
- nowsprinting/unity-coding-skillstheir own version, first seen Sep 22, 2026
- overmind-core/overmindtheir own version, first seen Sep 15, 2026
- dylanroscover/Embodytheir own version, first seen Sep 5, 2026
- Amplicode/spring-skillstheir own version, first seen Sep 2, 2026
Used with
Projects with it also use code-review.
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.
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 4 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- vercel/next.js★ 144ksame name
- microsoft/testfx★ 1ksame name
- microsoft/semantic-link-labs★ 584same name
- overmind-core/overmind★ 376same name
- dylanroscover/Embody★ 185same name
- Amplicode/spring-skills★ 126same name
- hoangsonww/AI-Agents-Orchestrator★ 87same name
- lorenliu13/claude-code-for-hydrology★ 67same name
- gabriel-dehan/claude_hooks★ 41same name
- nowsprinting/unity-coding-skills★ 20same name
7 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 repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
- lib/CLAUDE.mdCLAUDE.md
- prompts/CLAUDE.mdCLAUDE.md
- schemas/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- add-bats-testSkill
- add-edge-testSkill
- add-gather-agentSkill
- add-integration-testSkill
- add-synthesis-fixtureSkill
- audit-prompt-schema-syncSkill
- bundle-and-verifySkill
- check-ci-locallySkill
- debug-agent-failureSkill
- fixture-syncSkill
- pre-pr-checklistSkill
- rebuild-test-imageSkill
- release-ultrainitSkill
- tune-synthesis-contextSkill
- validate-generated-artifactSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Add --tap for TAP format or --verbose-run for assertion details:
- Very specific: line 79
Add echo "TMPDIR: $TEST_TMPDIR" >&3 inside the failing @test body (bats redirects >&3 to the terminal).
- Very specific: line 87
Look for CALL: lines. If the mock was never called when it should have been, check if setup_mock_claude was called in setup().
- Very specific: line 107
Only needed when Dockerfile.test changes:
“Common” is measured: kept by at least 6 in 10 of the 17 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
Before You Start
Makefile— all test targets and their Docker invocationstests/helpers/test_helper.bash—_common_setup,make_claude_envelopetests/helpers/mock_claude.bash—setup_mock_claude, dispatch modeDockerfile.test— the test image (must be built if changed)
Test Tiers
| Command | What it tests | Speed |
make test-unit | Individual lib/*.sh functions | ~30s |
make test-scripts | scripts/validate-skill.sh, scripts/validate-subagent.sh | ~15s |
make test-edge | Budget exhaustion, corrupt state, special chars, numeric edge cases | ~20s |
make test-integration | Phase-level pipeline (gather, synthesize, resume) | ~60s |
make test-all | All of the above | ~2min |
Running Tests
Full suite
make test-allSingle tier
make test-unit # fastest, run after every lib change
make test-scripts # after changes to scripts/validate-*.sh
make test-edge # after changes to budget, config, or CLI arg handling
make test-integration # after changes to gather.sh, synthesize.sh, or merge.shSingle .bats file
The Makefile targets use Docker. To run one file, use the docker command directly:
docker run --rm \
-v "$(pwd)":/workspace \
-w /workspace \
ghcr.io/joelbarmettleruzh/ultrainit-test:latest \
bats tests/unit/agent_run.batsVerbose output
Add --tap for TAP format or --verbose-run for assertion details:
docker run --rm -v "$(pwd)":/workspace -w /workspace \
ghcr.io/joelbarmettleruzh/ultrainit-test:latest \
bats --verbose-run tests/unit/agent_run.batsInterpreting Output
ok N - test name= passnot ok N - test name= fail, followed by assertion details# (from function ... source ... line N)= exact location of failed assertion
Integration tests always show green in CI even when failing — they run with || true in .github/workflows/test.yml. After make test-integration, read the output explicitly.
Debugging a Failing Test
1. Find the tmpdir
Add echo "TMPDIR: $TEST_TMPDIR" >&3 inside the failing @test body (bats redirects >&3 to the terminal). Run the test in verbose mode.
2. Inspect mock logs
cat $TEST_TMPDIR/.ultrainit/mock_claude.log # all mock invocationsLook for CALL: lines. If the mock was never called when it should have been, check if setup_mock_claude was called in setup().
3. Check dispatch matching
Dispatch mode matches agent name from the --json-schema argument basename (case-insensitive substring). If docs matches before docs-scanner, rename the dispatch file: longer/more-specific names first alphabetically.
4. Verify envelope wrapping
Passing raw fixture JSON where an envelope is expected causes run_agent to extract .structured_output as null, writing "null" to the findings file silently:
# Wrong — raw JSON, no envelope
cat tests/fixtures/findings/identity.json > "$MOCK_CLAUDE_RESPONSE"
# Correct — envelope-wrapped
make_claude_envelope "$(cat tests/fixtures/findings/identity.json)" "0.15" > "$MOCK_CLAUDE_RESPONSE"Building the Test Image
Only needed when Dockerfile.test changes:
make test-image # builds locallyThe CI image is pulled from ghcr.io/joelbarmettleruzh/ultrainit-test:latest. If the image doesn't exist yet on a fresh fork, run make test-image first.
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.

