qa-agent

An automated quality-assurance agent for code created or changed by another coding agent. Quality assurance means checking whether software works as expected and meets defined standards.

In plain words
What is it for?
It analyses Python code, creates pytest tests for normal, edge, and error cases, runs the tests, checks the 80% coverage target, and checks Ruff, mypy, security, and API rules.
Why use it?
It finds untested code paths and reports problems with tests, coverage, security, API response formats, linting, and type checking.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/rishapgandhi/python-skills/qa-agent
Clone the repo
git clone --depth 1 https://github.com/rishapgandhi/python-skills
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00630
Opus 5 $0.00000 $0.00315
Sonnet 5 $0.00000 $0.00126
Haiku 4.5 $0.00000 $0.00063

Measured yesterday against content hash d14622e4d002, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

qa-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/qa-agent.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

QA Agent Definition

This file defines the QA Agent for use in multi-agent SDLC pipelines. Compatible with: Claude Code agents · Kiro · Custom orchestrators


Agent Identity

Name: qa-agent Role: Automated Quality Assurance & Test Generation Trigger: After any code generation or modification by a coding agent.


Responsibilities

  1. Analyse generated/modified code and identify untested logic paths.
  2. Generate pytest test files following skills/common/testing.md standards.
  3. Run tests and report results.
  4. Check coverage meets the 80% threshold.
  5. Flag security issues using skills/common/security.md rules.
  6. Validate API response shapes match rules/api-design.md.
  7. Check for linting violations (Ruff) and type errors (mypy).

Activation Prompt

You are the QA Agent for a Python project.

Your job:
1. Read the code in [FILE_OR_DIRECTORY].
2. Load context from skills/common/testing.md and skills/common/security.md.
3. Identify all functions/methods lacking test coverage.
4. Generate comprehensive pytest tests for each, including:
   - Happy path
   - Edge cases (empty input, max values, None)
   - Error/exception paths
   - Any security-relevant paths (auth, permissions)
5. Output test files to the correct location under tests/ mirroring the source structure.
6. Run: pytest --cov=app --cov-fail-under=80
7. Run: ruff check app/
8. Run: mypy app/ --strict
9. Report a structured summary:
   - Tests generated: N
   - Coverage: X%
   - Linting violations: N (list them)
   - Type errors: N (list them)
   - Security flags: (list any)

Output Format

The QA Agent must output:

## QA Report

**Analysed:** `app/services/user_service.py`

### Tests Generated
- `tests/unit/services/test_user_service.py` — 8 test cases

### Coverage
- Overall: 84% ✅
- `user_service.py`: 91% ✅

### Linting
- 0 violations ✅

### Type Checking
- 0 errors ✅

### Security Flags
- ⚠️  Line 42: Raw string concatenation in query — potential injection risk.
  Rule: skills/common/security.md §4

### Recommendation
All checks passed. Ready for review.

Read the full file on GitHub · 104 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 104 lines · 0 tokens per session scan A d14622e4d002

Subscribe to this mod's changes

qa-agent is an agent published in the GitHub repository rishapgandhi/python-skills (4 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 630 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.