ward
Skill19 starsChanged 3 months agoMITView on GitHub
Ward the codebase — an ad-hoc test-gap audit that reveals unguarded code (untested functions, uncovered edge cases, missing error-handling and integration tests) and conjures ready-to-paste test skeletons as protective wards against regression, surfaced inline in the session. Scoped to your current diff by default, or to a path/area you name. Use before merging risky changes or when you suspect thin coverage. Replaces the old always-on `testgaps` daemon worker (alias: /test-gaps).
3 other projects use a version of this.
Adopted by
Most recently taken up by
- frankieramirez/manatheir own version, first seen Oct 17, 2026
- Alexander-Tyagunov/magiciantheir own version, first seen Sep 28, 2026
- frankieramirez/ripentheir own version, first seen Sep 8, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Alexander-Tyagunov/magician★ 14same name
- frankieramirez/mana★ 1same name
- frankieramirez/ripen★ 0same name
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 repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- communeSkill
- connector-builderSkill
- distillSkill
- divineSkill
- eldarSkill
- flflSkill
- flo-simplifySkill
- floSkill
- floSkill
- guidanceSkill
- healerSkill
- luminariumSkill
- meditateSkill
- memory-optimizationSkill
- memory-patternsSkill
- memory-teamSkill
- memory-worktreeSkill
- optimize-learningsSkill
- perf-auditSkill
- publishSkill
- quickenSkill
- reasoningbank-intelligenceSkill
- reset-epicSkill
- spell-builderSkill
- spell-scheduleSkill
- test-gapsSkill
- vector-searchSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
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
- Very specific: line 32
If the diff is empty and no target was given, ask what to ward rather than defaulting to --all.
- Distinctive: line 48
Only flag gaps in code that has a real failure mode.
“Common” is measured: kept by at least 6 in 10 of the 3 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
/ward — Test-Gap Audit
Cast over the code to reveal where it sits unprotected and raise wards against regression. This is the ad-hoc, in-session successor to the removed testgaps background worker: instead of a billed daemon loop re-scanning the whole tree every 20 minutes into a report nobody reads, /ward runs when you ask, scopes to what actually changed, and surfaces gaps — with test skeletons — in the conversation where you can act on them.
Arguments: $ARGUMENTS
Phase 1: Memory first (gate requirement)
mcp__moflo__memory_search { query: "<the symbols/files in scope> test coverage", namespace: "tests" }The tests namespace maps source → covering tests; use it to see what's already covered before flagging a gap. Also check patterns for the project's test framework and conventions so skeletons match house style.
Phase 2: Decide scope
Pick the smallest scope that answers the ask — a whole-codebase re-scan is exactly the waste this skill was built to end.
| Argument | Scope |
| (none) | The current diff: git diff HEAD + git diff main...HEAD. Ward the changed code only. |
| a path or glob | That subtree (e.g. /ward src/api). |
| an area in prose | Resolve to files via code-map search, then ward those. |
--all | Whole codebase. Only on explicit request — say so and expect it to be slower. |
If the diff is empty and no target was given, ask what to ward rather than defaulting to --all.
Phase 3: Detect the framework
Before writing any skeleton, determine the project's test runner and conventions (vitest / jest / pytest / go test / etc.) from config files, existing tests, and the tests memory. Skeletons MUST be in the project's actual framework and match its file naming, import style, and assertion idiom — a skeleton in the wrong dialect is noise.
Phase 4: Find the gaps
For the in-scope code, look for, in rough order of risk:
- Untested functions / classes / exports — public surface with no covering test. Cross-check against the
testsnamespace before flagging. - Uncovered edge cases — boundaries (empty, null/undefined, zero, negative, max), off-by-one, unusual-but-valid inputs the happy-path test skips.
- Missing error-handling tests —
throw/reject/error branches with no test asserting the failure path; validation that nothing exercises. - Integration gaps — units tested in isolation but the seam between them (I/O, DB, external calls, cross-module contracts) is unexercised.
- Regression-prone changes — in a diff, logic that changed behavior but whose tests didn't.
Only flag gaps in code that has a real failure mode. Don't demand tests for trivial pass-throughs.
Phase 5: Surface gaps + conjure wards inline
Report in-thread, ranked most-risky first. For each gap:
- What's unguarded & where — one line +
file:line. - The risk — what breaks silently if this regresses.
- The ward — a ready-to-paste test skeleton in the project's framework, as a fenced code block. Fill in the arrange/act/assert structure and the specific cases; leave a
// TODOonly where a real fixture/mock the user must supply is needed.
End with a one-line summary (e.g. "4 gaps: 2 high (error paths in parseConfig), 2 medium"). If coverage is genuinely solid, say so — a clean audit is a valid result.
Phase 6: Offer to act
Ask whether to write the skeletons into the test tree. Only create/modify test files when the user confirms (or invoked with a clear "add the tests" intent). If the audit was large and the user wants a record, offer to write it to .moflo/reports/ward-<scope>.md — but the in-thread report is the primary deliverable, not a file.
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.

