Skip to content

feat: create qa agent skill for detailed code review#834

Open
amaan-bhati wants to merge 1 commit intomainfrom
qa-agent-skill
Open

feat: create qa agent skill for detailed code review#834
amaan-bhati wants to merge 1 commit intomainfrom
qa-agent-skill

Conversation

@amaan-bhati
Copy link
Copy Markdown
Member

@amaan-bhati amaan-bhati commented Apr 14, 2026

production-grade QA review skill bundle at .claude/skills/qa-agent/ for Claude Code workflows. The implementation is designed to support /qa-agent style review flows by packaging a single orchestrator prompt, three specialized subagent prompts, project-specific rulebooks, review checklists, generated codebase context, and a reusable reporting template.

The goal is not just to add a generic review prompt, but to add a repo-aware QA system that understands how this codebase is actually built and where regressions are most likely to happen. In practice, that means the skill now reviews Docusaurus docs, versioned sidebars, shared components, theme overrides, SEO metadata, and browser scripts differently instead of treating the repo like a generic React app.

What Was Implemented

1. Main orchestrator

  • Added .claude/skills/qa-agent/SKILL.md
  • This is the entrypoint prompt that:
    • parses arguments such as empty input, file-specific review, --diff, --full, and --hotspots
    • always loads repo context before reviewing
    • instructs Claude to fan out work across three parallel subagents
    • merges dependency mapping, impact tracing, and QA findings into a single report
    • writes the final output into qa-reports/YYYY-MM-DD-HH-MM.md at runtime

Why this exists:

  • a single monolithic review prompt would miss cross-file dependency tracing and would lose repo-specific review context between steps
  • the orchestrator gives one stable review flow while keeping the actual analysis delegated and structured

How it was designed:

  • from the requested command behavior in the task
  • from Anthropic’s Claude Code docs on custom slash commands, frontmatter, arguments, bash execution, and reusable markdown-based command definitions

2. Specialized agent definitions

  • codebase-explorer.md
    • maps repo structure around the target files
    • identifies barrel files and import/export relationships
    • returns compact structured output instead of raw file dumps
  • impact-tracer.md
    • finds direct and indirect dependents
    • checks config references, re-exports, barrel files, linked docs, and versioned counterparts
  • qa-reviewer.md
    • applies framework, security, performance, content, SEO, and accessibility rules
    • skips known suppressions and ignored/generated files
    • uses lower scrutiny for impacted files and deeper scrutiny for target files

3. Rules layer

  • framework.md
    • encodes Docusaurus-specific review expectations for docs frontmatter, sidebars, internal links, images, headings, theme overrides, versioning, and metadata behavior
  • typescript.md
    • defines how to review future TypeScript additions even though this repo does not currently use first-class TS source files
  • security.md
    • focuses on public docs repo risks such as secrets, unsafe browser scripts, insecure examples, and third-party script additions
  • performance.md
    • focuses on client script weight, rerender risk in shared components, heavy assets, and shared rendering paths
  • content.md
    • covers editorial quality, alt text, link clarity, completeness, anchors, and frontmatter expectations
  • seo.md
    • focuses on canonical behavior, structured data, social metadata, redirects, sitemap-related surfaces, and broken internal links

4. Checklists layer

  • Added:
    • .claude/skills/qa-agent/checklists/pr-review.md
    • .claude/skills/qa-agent/checklists/accessibility.md
    • .claude/skills/qa-agent/checklists/seo.md

5. Context layer

  • Added:
    • .claude/skills/qa-agent/context/codebase-map.md
    • .claude/skills/qa-agent/context/hotspots.md
    • .claude/skills/qa-agent/context/known-suppressions.md
    • .claude/skills/qa-agent/context/ignore.md

6. Report template

  • Added .claude/skills/qa-agent/templates/report.md

What it does:

  • defines the final QA report shape:
    • severity counts
    • files reviewed
    • impacted files
    • skipped files
    • gate checklist
    • categorized findings
    • cross-file impact map

Why The Folder Structure Looks Like This

The structure under .claude/skills/qa-agent/ is intentionally layered:

  • SKILL.md
    • orchestration and runtime behavior
  • agents/
    • task-specialized delegated prompts
  • rules/
    • reusable policy and review standards
  • checklists/
    • final gate criteria
  • context/
    • generated repo facts and historical signals
  • templates/
    • stable output format

Validation Performed

  • confirmed all required files exist under .claude/skills/qa-agent/
  • verified SKILL.md frontmatter is valid YAML
  • verified context/codebase-map.md and context/hotspots.md contain real repo data
  • verified no [TODO] or [placeholder] markers remain in context files
  • did not create qa-reports/, because the skill is designed to create it only when run

Sources And References

Local repo sources

  • package.json
  • docusaurus.config.js
  • sidebars.js
  • src/theme/DocItem/index.js
  • src/pages/index.js
  • src/components/index.js
  • .gitignore
  • .vale.ini
  • .github/workflows/main.yml
  • .github/workflows/build_and_check.yml
  • .github/workflows/vale-lint-action.yml
  • git history and grep-based reconnaissance commands run during implementation

External references used to verify the implementation approach

Notes

  • The subagent behavior is verified against Anthropic’s official subagent model, while the exact asset bundling under .claude/skills/qa-agent/agents/ is a project-local organization choice for this skill package.
  • The rules are intentionally repo-specific and Docusaurus-specific because this repository’s highest-risk failures are docs navigation, metadata, SEO, versioning, and site-wide theme/config regressions.

Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
Copilot AI review requested due to automatic review settings April 14, 2026 23:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new repo-specific Claude Code QA skill pack at .claude/skills/qa-agent/ to drive structured QA reviews (impact tracing + rule/checklist-based review) tailored to this Docusaurus docs repository.

Changes:

  • Introduces a /qa-agent orchestrator (SKILL.md) with argument parsing and a 3-subagent workflow (explore/impact/review) plus report generation.
  • Adds repo-tailored rule docs (framework/SEO/security/performance/content/TypeScript) and gate checklists (PR review, SEO, accessibility).
  • Adds static context inputs (codebase map, hotspots, ignore list, known suppressions) and a QA report template.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.claude/skills/qa-agent/SKILL.md Skill orchestrator: args, workflow, severity model, report pathing
.claude/skills/qa-agent/agents/codebase-explorer.md Subagent spec for mapping repo structure/import relationships
.claude/skills/qa-agent/agents/impact-tracer.md Subagent spec for tracing direct/indirect/config references
.claude/skills/qa-agent/agents/qa-reviewer.md Subagent spec for applying rules/checklists and emitting findings
.claude/skills/qa-agent/rules/framework.md Docusaurus-specific review rules and navigation/versioning expectations
.claude/skills/qa-agent/rules/content.md Docs/content quality rules (links, alt text, frontmatter, examples)
.claude/skills/qa-agent/rules/seo.md SEO-focused review rules for links, canonicals, structured data, redirects
.claude/skills/qa-agent/rules/security.md Security review rules for secrets, scripts, redirects, and docs examples
.claude/skills/qa-agent/rules/performance.md Frontend/build performance review rules for shared components/scripts
.claude/skills/qa-agent/rules/typescript.md Conditional TypeScript rules for future TS additions / TS-heavy examples
.claude/skills/qa-agent/checklists/pr-review.md Gate checklist for PR readiness (security, console logs, docs metadata, etc.)
.claude/skills/qa-agent/checklists/accessibility.md Accessibility checklist for content and interactive UI changes
.claude/skills/qa-agent/checklists/seo.md SEO checklist to ensure common regressions are explicitly checked
.claude/skills/qa-agent/context/codebase-map.md Captured repo map (structure, routing, CI/CD, conventions, risk areas)
.claude/skills/qa-agent/context/hotspots.md Hotspot file list intended for prioritized review modes
.claude/skills/qa-agent/context/ignore.md Paths/patterns the QA workflow should skip by default
.claude/skills/qa-agent/context/known-suppressions.md Known suppressions/deviations to reduce review false positives
.claude/skills/qa-agent/templates/report.md Markdown template for the generated QA report

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

---
name: qa-agent
description: "Run a full QA review of this codebase. Traces cross-file impact, checks framework best practices, security, performance, and accessibility. Use /qa-agent for full review, /qa-agent [filepath] for targeted review, /qa-agent --diff for changed files only, /qa-agent --hotspots for most-changed files only."
allowed-tools: Read, Grep, Glob, Bash
Comment on lines +44 to +50
Review `git diff HEAD --name-only`.

If that returns no files, fall back to the 10 most recently changed tracked files:

```bash
git log --name-only --format="" -n 20 | awk 'NF' | awk '!seen[$0]++' | head -10
```
@@ -0,0 +1,48 @@
# Framework Rules

Project classification: Docusaurus 3.9.2 docs site using `@docusaurus/preset-classic` in `docusaurus.config.js`, with docs mounted at the site root via `routeBasePath: "/"`.
- Project type: versioned documentation website for Keploy
- Primary framework: Docusaurus `3.9.2` from `package.json`
- Runtime stack: React `18.2.0`, plain JavaScript source, Tailwind-enabled styling, MDX docs
- Router strategy: Docusaurus docs plugin mounted at `/` via `routeBasePath: "/"` in `docusaurus.config.js`
Comment on lines +7 to +8
1. All docs must include frontmatter with `id`, `title`, and `description`.
Follow the pattern used in `versioned_docs/version-4.0.0/running-keploy/public-api.md`.
A broken `#section` link in docs is a user-facing bug even if the page still builds.

5. Frontmatter must include:
`title` required, `description` required, `tags` optional but encouraged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants