Use when creating an approachable, self-contained HTML review aid for a pull request; explaining what changed, why it matters, how it works, and how it fits into the broader system; turning PR diffs, commits, tests, and architecture context into a local `.pr-review/` HTML page for reviewers; or helping reviewers understand complex code changes without dumping the full diff.
npx skills add https://github.com/mastra-ai/mastra --skill pr-explainer
Create a local, self-contained HTML page that teaches a reviewer the PR story: what changed, why it matters, how it works, how it fits into the system, and how it was verified.
git status --short.git log --oneline -n 10.git diff <base>...HEAD --stat and git diff <base>...HEAD.git show --stat <commit> and git show <commit>..pr-review/..pr-review/ by default..git/info/exclude so generated review pages stay out of commits.Use this structure unless the PR clearly needs a different teaching order:
Add diagrams when they reduce cognitive load. Prefer simple HTML/CSS diagrams over external dependencies.
Good diagram types:
Each diagram must answer: “What does this help the reviewer understand faster?”
Show snippets along the explanation path, not giant patches. Each important snippet should include:
Use this pattern:
<div class="diff">
<div class="diff-title">packages/example/src/file.ts</div>
<pre>
<span class="del">- old behavior</span>
<span class="add">+ new behavior</span>
</pre>
</div>
A reviewer should understand the PR without opening GitHub, but the page should not replace the final full diff review.
End with proof. Include exact commands when available, for example:
pnpm --filter @scope/package test path/to/test.ts -- --run
pnpm turbo build --filter ./packages/package
If verification was not run, say so clearly and list the recommended commands.
Before calling the page done, confirm it has:
.pr-review/,When asked to create a PR explainer, produce or update a .pr-review/*.html file and summarize:
.pr-review/ remains untracked or excluded.Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
Comprehensive GitHub code review with AI-powered swarm coordination
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.
Take mastra-ai/pr-explainer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.