If no argument provided, scan the full test suite.
Step 1: Gather Requirements
Run test suite to establish baseline:
status=0
bun run test >test.log 2>&1 || status=$?
tail -n 20 test.log; echo "exit=$status"
The status is captured before the pipe, because a pipeline reports its LAST stage's exit code — tail always succeeds, so a failing run reads as exit=0 (falsifiable-checks, pager-shadowed status). || status=$? rather than ; status=$?: under set -e the ; form exits before the assignment, so the failure is never reported at all.
Scan test files for quality issues:
Weak assertions (toBeTruthy, toBeDefined instead of specific values)
Missing edge cases (no boundary values, no error paths)
Implementation coupling (testing internals rather than behavior)
Missing error path coverage
Duplicated setup that could indicate missing abstractions
Identify 10-20 test files with highest improvement potential, noting:
File path
Issues found (weak assertions, missing edge cases, etc.)
Estimated impact of improvement
Step 2: Compile Brief and Delegate
Compile the gathered information into a structured brief:
Improve test quality across the test suite.
Test files needing improvement (ordered by impact):
1. [test file] - [issues found]
- Weak assertions: [count]
- Missing edge cases: [description]
- Implementation coupling: [description]
2. ...
Verification: `bun run test` -> Expected: All tests pass, improved assertions and coverage
Invoke /lisa:implement with this brief to create the implementation plan.
1---2name: lisa-improve-tests-33description: improving test quality4---56# Improve Test Quality78Target: $ARGUMENTS910If no argument provided, scan the full test suite.1112## Step 1: Gather Requirements13141. **Run test suite** to establish baseline:15 ```bash16 status=017 bun run test >test.log 2>&1 || status=$?18 tail -n 20 test.log; echo "exit=$status"19 ```20 The status is captured before the pipe, because a pipeline reports its LAST stage's exit code — `tail` always succeeds, so a failing run reads as `exit=0` (`falsifiable-checks`, pager-shadowed status). `|| status=$?` rather than `; status=$?`: under `set -e` the `;` form exits before the assignment, so the failure is never reported at all.212. **Scan test files** for quality issues:22 - Weak assertions (`toBeTruthy`, `toBeDefined` instead of specific values)23 - Missing edge cases (no boundary values, no error paths)24 - Implementation coupling (testing internals rather than behavior)25 - Missing error path coverage26 - Duplicated setup that could indicate missing abstractions273. **Identify 10-20 test files** with highest improvement potential, noting:28 - File path29 - Issues found (weak assertions, missing edge cases, etc.)30 - Estimated impact of improvement3132## Step 2: Compile Brief and Delegate3334Compile the gathered information into a structured brief:3536```text37Improve test quality across the test suite.3839Test files needing improvement (ordered by impact):401. [test file] - [issues found]41 - Weak assertions: [count]42 - Missing edge cases: [description]43 - Implementation coupling: [description]442. ...4546Verification: `bun run test` -> Expected: All tests pass, improved assertions and coverage47```4849Invoke `/lisa:implement` with this brief to create the implementation plan.
Run npx get-skill add codyswanngt/lisa-improve-tests-3 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
improving test quality It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
codyswanngt (@codyswanngt) published this skill. Their other Agent Skills are listed on their SkillMD profile.