一键导入
test-design-review
Review tests for design quality using test design guidelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review tests for design quality using test design guidelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Convert URLs or local files (PDF/DOCX/PPTX/HTML) to Markdown, with optional summarization. Single or batch processing. Uses markitdown for intelligent extraction, falls back to curl+pandoc. Use when fetching web pages as markdown, converting documents for analysis, or producing quick summaries.
Use `uv` instead of pip/python/venv. Run scripts with `uv run script.py`, add deps with `uv add`, use inline script metadata for standalone scripts.
Adversarial code reviewer. Use when you need a quality agent to critically review code, a diff, test output, or a pull request — looking for bugs, edge cases, correctness failures, lazy shortcuts, and pattern violations. Works standalone (against any code/diff/worktree) or with GitHub PR mechanics (inline comments, merge decision) when a PR number is provided. Triggers: "bart", "review this", "adversarial review", "code review", "review PR", "find bugs", "QA", "quality check".
Use this skill to orchestrate multiple parallel sub-agents (Ralph/Bart) across isolated git worktrees to burn down a TODO.md backlog. Trigger this when asked to implement multiple independent features simultaneously, dispatch a "wave of agents", or perform "multi-agent orchestration". This handles complex dependency analysis, model spread, and feedback accumulation, which standard dispatch skills cannot.
Launch Claude Code CLI as a headless sub-agent in a tmux pane, monitor its stream-json JSONL output, and poll for completion. Use when delegating a well-defined coding task (bug fix, feature, refactor) to a Claude agent subprocess with live observability. Triggers include "run claude agent", "delegate to claude", "claude sub-agent", or any request to run claude headlessly and monitor it.
Launch GitHub Copilot CLI as a headless sub-agent in a tmux pane, monitor its JSONL output stream, and poll for completion. Use when delegating a well-defined coding task (bug fix, feature, refactor) to a Copilot agent subprocess with live observability. Triggers include "run copilot agent", "delegate to copilot", "copilot sub-agent", or any request to run copilot headlessly and monitor it.
| name | test-design-review |
| description | Review tests for design quality using test design guidelines. |
When invoked, review the specified tests (or the diff if none specified) against the guidelines in this document.
Important: use a SEPARATE AGENT which does not share your context.
For each violation found, show the offending code and suggest a fix. Group by guideline.
Related Skills:
- Use
farley-tddfor guidance on the broader Red-Green-Refactor workflow and high-level test suite properties.- Use
adzic-bddfor evaluating high-level Gherkin/BDD feature specifications.
Tests are executable specifications. A specification answers: "In scenario X, what should happen?"
Good: "When the user submits an empty form, display a validation error." Good: "When the API returns 500, show a graceful error message." Good: "When no records exist, display 'No results found'."
Bad: "It works correctly." (What does 'correctly' mean?) Bad: "It handles errors." (Which errors? How?) Bad: "It validates input." (What validation? What happens on failure?)
Bad:
#[cfg(test)]
mod tests {
use super::*;
mod tick {
use super::*;
#[test]
fn marks_the_particles_position_blue() {
let mut world = World::new(10, 10);
world.tick();
assert_eq!(world.color_at(5, 0), 0x0000FF);
}
}
}
Good:
mod when_a_particle_touches_a_grid_cell {
use super::*;
#[test]
fn the_cell_turns_the_particles_color() {
let mut world = World::new(10, 10);
let particle_color = world.particle_color();
let particle_position = world.particle_position();
world.tick();
assert_eq!(
world.color_at(particle_position.0, particle_position.1),
particle_color
);
}
}
Bad:
describe "scope=failed" do
Good:
describe "rerunning only failed tests" do
Using .first or .last to retrieve records in tests is fragile because it depends on ordering, which can change unexpectedly. Instead, use explicit queries with change and where:
Bad:
post repositories_path, params: { repo_full_name: "jasonswett/ductwork" }
repository = Repository.last
expect(repository.github_account).to eq(github_account_jasonswett)
Good:
expect { post repositories_path, params: { repo_full_name: "jasonswett/ductwork" } }
.to change { Repository.where(github_account: github_account_jasonswett).count }.by(1)
Only assert what matters. Don't assert things that are:
be_successful - if it wasn't successful, the body check would fail)Bad:
expect(response).to be_successful # redundant noise
expect(response.body).not_to include("deleted_item")
Good:
expect(response.body).not_to include("deleted_item")
If the response wasn't successful, the body assertion tells you something went wrong. The be_successful check adds nothing.
Bad:
describe "Rerun test suite run", type: :system do
# ... existing tests ...
describe "Rerun Failed button" do
context "when the test suite run has failed tests" do
let!(:test_suite_run) { create(:test_suite_run, :with_failed_run) }
let!(:failed_test_case_run) { create(:test_case_run, task: test_suite_run.tasks.first, status: "failed") }
before do
allow(ENV).to receive(:fetch).and_call_original
allow(ENV).to receive(:fetch).with("NOVA_K8S_API_URL").and_return("https://k8s.example.com")
allow(ENV).to receive(:fetch).with("NOVA_K8S_TOKEN").and_return("test-token")
allow(ENV).to receive(:fetch).with("NOVA_K8S_CA_CERT").and_return("test-ca-cert")
allow_any_instance_of(User).to receive(:can_access_repository?).and_return(true)
login_as(test_suite_run.repository.user)
end
it "displays the Rerun Failed button" do
visit repository_test_suite_run_path(id: test_suite_run.id, repository_id: test_suite_run.repository.id)
expect(page).to have_button("Rerun Failed")
end
end
end
end
Good:
describe "Rerun Failed button", type: :system do
context "when the test suite run has failed tests" do
let!(:test_suite_run) { create(:test_suite_run, :with_task) }
let!(:test_case_run) { create(:test_case_run, task: test_suite_run.tasks.first, status: "failed") }