AgentSkillsCN

qa-hardening

当用户询问“进行质量保证审查”“做好生产就绪准备”“通过加固测试”“审查测试覆盖率”“执行错误处理审计”,或希望在发布前检验代码质量时,可运用此技能。

SKILL.md
--- frontmatter
name: qa-hardening
description: This skill should be used when the user asks for "QA review", "production readiness", "hardening pass", "test coverage review", "error handling audit", or wants to check code quality before release.
argument-hint: "[area to review]"
disable-model-invocation: true

QA Hardening

Requires: Claude Code Agent Teams feature.

Production readiness review with 5 specialists: test runner, error auditor, security, edge case hunter, and UX reviewer.

Arguments: $ARGUMENTS

Instructions

  1. Get the recipe: Call mcp__mira__recipe (or mcp__plugin_mira_mira__recipe) tool:

    code
    recipe(action="get", name="qa-hardening")
    
  2. Parse arguments (optional):

    • --roles test-runner,security -> Only spawn these specific agents
    • No arguments -> spawn all 5 agents
    • Any other text -> use as the context/focus for the review
  3. Determine context: The area to review, specific concerns, or scope of analysis. If no context is obvious, ask the user what they'd like hardened.

  4. Create the team:

    code
    TeamCreate(team_name="qa-hardening-{timestamp}")
    
  5. Create tasks FIRST: For each recipe task, create with TaskCreate before spawning agents.

  6. Spawn agents: For each member in the recipe (or filtered subset), use the Task tool:

    code
    Task(
      subagent_type=member.agent_type,
      name=member.name,
      team_name="qa-hardening-{timestamp}",
      prompt=member.prompt + "\n\n## Context\n\n" + user_context,
      run_in_background=true
    )
    

    Spawn all agents in parallel (multiple Task calls in one message). IMPORTANT: Do NOT use mode="bypassPermissions" — these are read-only discovery agents.

  7. Assign tasks: Use TaskUpdate to assign each task to its corresponding agent.

  8. Wait for findings: All agents will send their findings via SendMessage when complete.

  9. Synthesize findings: Combine all findings into a prioritized hardening backlog:

    • Critical — Must fix before release (panics in production paths, security holes, data loss)
    • High — Should fix before release (poor error messages, resource leaks, missing validation)
    • Medium — Fix soon after release (coverage gaps, edge cases, docs drift)
    • Low — Polish (naming consistency, minor UX, nice-to-have tests)
    • Deferred — Needs design discussion (architectural changes, large refactors)

    Cross-reference findings — when multiple agents flag the same area, elevate priority.

  10. Cleanup: Send shutdown_request to each teammate, then call TeamDelete.

Want findings implemented?

After presenting the hardening backlog, ask the user if they want fixes implemented. If yes, follow Phase 3 from the recipe's coordination instructions to spawn implementation agents.

Examples

code
/mira:qa-hardening
-> Prompts for what to review, then spawns all 5 agents

/mira:qa-hardening Review the recipe system
-> All 5 agents review the recipe code for production readiness

/mira:qa-hardening --roles security,error-auditor
-> Only spawns security and error-auditor agents

Agent Roles

RoleFocus
test-runnerTest suite health, coverage gaps, build quality
error-auditorError handling, panic safety, error message quality
securityInput validation, data exposure, secure defaults
edge-case-hunterBoundary conditions, resource management, concurrency
ux-reviewerAPI ergonomics, error experience, documentation freshness