agentleFS
khangledoanminhkhangledoanminh/agentskillslab/skills/test-engineer/SKILL.md

test-engineer

Skill1 starsChanged 3 months agoMITView on GitHub

Coverage-driven test engineering: analyze code, find uncovered paths, generate tests targeting them, run, measure coverage, mutate to verify test strength, and iterate until quality targets are met. Use when asked to write tests, improve test coverage, or verify that existing tests actually catch bugs.

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use system-architect, documentation-writer and 1 more.

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.
  • nahisahoSkill

    system-architect

    Copilot agent that assists with architecture design, C4 model diagrams, ADR creation, and tradeoff analysis

    Also in 4 projects that use this

  • GitHubSkill

    documentation-writer

    Diátaxis Documentation Expert. An expert technical writer specializing in creating high-quality software documentation, guided by the principles and structure of the Diátaxis technical documentation authoring framework.

    Also in 4 projects that use this

  • JeffallanSkill

    security-reviewer

    Identifies security vulnerabilities, generates structured audit reports with severity ratings, and provides actionable remediation guidance. Use when conducting security audits, reviewing code for vulnerabilities, or analyzing infrastructure security. Invoke for SAST scans, penetration testing, DevSecOps practices, cloud security reviews, dependency audits, secrets scanning, or compliance checks. Produces vulnerability reports, prioritized recommendations, and compliance checklists.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test hành vi, không test implementation detail (trừ khi cố ý contract test).

    line 31
  2. Distinctive:

    Test phải deterministic; không dùng sleep/rand mà không seed.

    line 32
  3. Distinctive:

    Test file đặt cạnh code hoặc trong tests/, tên rõ ràng.

    line 34

“Common” is measured: kept by at least 6 in 10 of the 19 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Test Engineer

Viết test có mục tiêu, không viết test cho đủ số. Vòng lặp: inspect → uncovered paths → generate → run → coverage → mutate → improve → dừng khi đạt target.

Quy trình (7 bước)

  1. Inspect code: đọc module, xác định hàm public, branches, edge cases, error paths.
  2. Tìm uncovered paths: chạy coverage tool (python3 -m pytest --cov) để lấy coverage report thật. KHÔNG đoán coverage bằng mắt.
  3. Generate tests: ưu tiên branch chưa cover, edge cases (empty, None, boundary, error paths). Mỗi test có tên mô tả hành vi + assert cụ thể.
  4. Run: chạy toàn bộ suite, mọi test phải pass.
  5. Measure coverage: lấy line + branch coverage thật từ tool. Ghi số trước/sau.
  6. Mutate (nếu mutation tool có): chạy mutant (VD thay + thành -, đổi điều kiện). Test mạnh phải kill mutant. Tỉ lệ survive cao = test yếu dù coverage cao.
  7. Improve: dựa vào mutant survive + branch miss, viết thêm test. Lặp 3–7 cho tới: coverage mục tiêu (VD ≥80%) VÀ mutant kill rate ≥70%.

Quality targets mặc định

MetricTarget
Line coverage≥ 80%
Branch coverage≥ 70%
Mutation kill rate≥ 70%
Flaky tests0 (chạy 3 lần phải nhất quán)

Nguyên tắc

  • Test hành vi, không test implementation detail (trừ khi cố ý contract test).
  • Test phải deterministic; không dùng sleep/rand mà không seed.
  • Coverage 100% không phải mục tiêu — diminishing returns; dừng khi đạt target + chi phí hợp lý.
  • Test file đặt cạnh code hoặc trong tests/, tên rõ ràng.

Scripts

  • scripts/coverage_report.py <module-dir> [--target N] — chạy pytest --cov, xuất JSON coverage thật.
  • scripts/mutate.py <module> [--operator list] — simple mutator: thay arithmetic/condition operators, chạy test, báo mutant survive/kill.

References

  • COVERAGE-GUIDE.md
  • MUTATION-REFERENCE.md

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.