run-tests
Use when running, writing, debugging, or adding tests; when a test fails; when a CI quality gate fails (SonarQube, coverage threshold, lint, typecheck); or…
Skill by KSriki
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ksriki-run-tests
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, testing, devops, ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/run-tests
What's inside
- Skill name
run-tests- Description
- Use when running, writing, debugging, or adding tests; when a test fails; when a CI quality gate fails (SonarQube, coverage threshold, lint, typecheck); or before declaring any code change complete. Covers unit, integration, contract, and e2e tests plus the full local quality-gate sequence. Do NOT use for evaluating LLM/agent outputs (`eval-harness`), or for building a feature TEST-FIRST — the red→green loop is `tdd`; this skill is the gate you run on code that exists.
- License
- MIT
- Instructions
- 98 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Running tests and quality gates ## When to use this Any time code changed and you need to prove it still works — and *always* before claiming a task is done. A change without passing tests is not done, it is in progress. **Not this skill if:** you're scoring non-deterministic LLM/agent output → `eval-harness`. Tests assert; evals score. ## Prerequisites - Deps installed: 〈`uv sync`〉 - Integration/e2e need the local stack: 〈`docker compose up -d`〉 ## The gate sequence Run in this order — each is cheaper than the next, so fail fast. ### 1. Fast feedback: the one test you care about ```bash 〈uv run pytest tests/unit/test_thing.py::test_case -x -q〉 ``` ### 2. Unit suite (no I/O, must be fast) ```bash 〈uv run pytest tests/unit -q〉 ``` If unit tests need the DB or the network, that's a design smell — the logic under test belongs in a layer that doesn't do I/O. Say so rather than mocking around it. ### 3. Integration (real deps) ```bash 〈docker compose up -d && uv run pytest tests/integration -q〉 ``` ### 4. Static gates ```bash 〈uv run ruff check --fix . && uv run ruff format .〉 # lint + format 〈uv run mypy src/〉 # types ``` ### 5. Coverage ```bash 〈uv run pytest --cov=src --cov-report=term-missing〉 ``` **Coverage is a floor, not a trophy.** Do not add assertion-free tests to move the number. If coverage dropped, find the *behavior* that's now untested and test that. Report an honest gap rather than gaming it. ### 6. SonarQube / CI parity 〈`sonar-scanner` or: push and read the PR check〉 Watch for: duplication, cyclomatic complexity, unused code, security hotspots. If Sonar flags duplication, check it's *real* repetition before deduplicating — two things that merely look alike are not yet an abstraction. ## Writing tests (when adding them) - **Test behavior and edges, not lines.** The error path, the empty input, the boundary, the concurrent case — that's where bugs live. - **Match the level to the thing.** Pure logic → unit. Crossing a boundary (DB/queue/API) → integration. A contract with another service → contract test. - **Tests are part of the same commit as the code.** Not a follow-up commit, not a follow-up PR. - **Deterministic.** No sleeps, no real clocks, no live network, no test that passes or fails based on ordering. ## Failure modes | Symptom | Cause | Fix | |---|---|---| | Integration tests hang, no error | Local stack not up | 〈`docker compose up -d`〉 | | `ModuleNotFoundError` | Bare `python` instead of `uv run` | Use 〈`uv run`〉 | | Passes locally, fails in CI | Env drift / missing fixture / ordering | Run with 〈`-p no:randomly`〉 off to check ordering; diff env | | Coverage dropped after refactor | New branch untested | Test the branch; don't lower the threshold | | Flaky | Time, ordering, or shared state | Fix it or delete it — a flaky test is worse than none | ## Definition of done - [ ] Tests written **and passing** for the change - [ ] Unit suite green; integration green if a boundary was touched - [ ] Lint + format + typecheck clean - [ ] Coverage not regressed - [ ] Sonar gate clean (or the flag consciously triaged, with a reason) - [ ] **PR is not merged on red**
From KSriki/agent-harness-template, MIT.
More from KSriki/agent-harness-template
- 0.565score
evolve-harness
KSriki
Use to turn a repeated correction, a recurring failure, or a researched new practice/trend into a durable change to the AGENT LAYER — a new or edited skill…
SkillAFreshness: AClaude Code +9 - 0.524score
grill-me
KSriki
Use to grill the user relentlessly about a plan, decision, or idea — a frontier-batched interview down the design tree (rounds of ready questions, each with a…
SkillBFreshness: BClaude Code +9 - 0.524score
eval-harness
KSriki
Use when building, running, or debugging evaluations for LLM or agent components: golden sets, regression evals, LLM-as-judge, rubric scoring…
SkillBFreshness: BClaude Code +9 - 0.524score
prd-to-issues
KSriki
Use to break a plan, spec/PRD, or the current conversation into a set of tracer-bullet tickets — each a narrow-but-complete vertical slice, declaring its…
SkillBFreshness: BClaude Code +9 - 0.524score
observability
KSriki
Use when instrumenting a service (structured logs, metrics, traces), defining SLOs or alerts, building a dashboard, or triaging a live production incident /…
SkillBFreshness: BClaude Code +9 - 0.524score
orchestrate-agents
KSriki
Use to ship a multi-part change by running several agents IN PARALLEL — fan-out across subagents, each isolated in its own git worktree, then verify-and-merge.
SkillBFreshness: BClaude Code +9 - 0.524score
review-pr
KSriki
Use when preparing your own change for review (self-review, commit hygiene, writing the PR description) or when reviewing someone else's pull request for…
SkillBFreshness: BClaude Code +9 - 0.524score
ci-cd
KSriki
Use when setting up or debugging a CI pipeline, adding a workflow or gate, promoting a build through environments, deploying, cutting a versioned release, or…
SkillBFreshness: BClaude Code +9 - 0.524score
codebase-design
KSriki
Use to design or improve a single MODULE's interface — deciding where a seam goes, making code more testable / AI-navigable, or judging whether a module is…
SkillBFreshness: BClaude Code +9 - 0.520score
graphify
KSriki
Use for STRUCTURE and relationship questions about a codebase/corpus — how X reaches Y, what depends on what, blast radius, architectural hubs — and to build…
SkillBFreshness: BClaude Code +9 - 0.499score
harness-help
KSriki
Use when the user asks how to customize the harness or where something goes: "how do I add a rule / gotcha / skill", "where do I change the gate", "what file…
SkillBFreshness: BClaude Code +9 - 0.474score
debug-research
KSriki
Use when the answer likely lives OUTSIDE this repo: debugging an error from a library/framework/API, checking whether an SDK signature is current, evaluating…
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 22, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/KSriki/agent-harness-template
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from KSriki
- 0.565score
evolve-harness
KSriki
Use to turn a repeated correction, a recurring failure, or a researched new practice/trend into a durable change to the AGENT LAYER — a new or edited skill…
SkillAFreshness: AClaude Code +9 - 0.524score
grill-me
KSriki
Use to grill the user relentlessly about a plan, decision, or idea — a frontier-batched interview down the design tree (rounds of ready questions, each with a…
SkillBFreshness: BClaude Code +9 - 0.524score
orchestrate-agents
KSriki
Use to ship a multi-part change by running several agents IN PARALLEL — fan-out across subagents, each isolated in its own git worktree, then verify-and-merge.
SkillBFreshness: BClaude Code +9 - 0.524score
eval-harness
KSriki
Use when building, running, or debugging evaluations for LLM or agent components: golden sets, regression evals, LLM-as-judge, rubric scoring…
SkillBFreshness: BClaude Code +9 - 0.524score
observability
KSriki
Use when instrumenting a service (structured logs, metrics, traces), defining SLOs or alerts, building a dashboard, or triaging a live production incident /…
SkillBFreshness: BClaude Code +9 - 0.524score
review-pr
KSriki
Use when preparing your own change for review (self-review, commit hygiene, writing the PR description) or when reviewing someone else's pull request for…
SkillBFreshness: BClaude Code +9
Cite this page
run-tests skill. Agent Mart. https://agentmart.dev/skills/ksriki-run-tests (last updated 2026-10-24)