claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
Prepares pull requests by running quality gates, drafting descriptions, and validating tests. Use when completing a feature and ready for review.
$ npx -y skills add athola/claude-night-market --skill pr-prep --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/pr-prepContext preview
The summary Claude sees to decide when to auto-load this skill.
Prepares pull requests by running quality gates, drafting descriptions, and validating tests. Use when completing a feature and ready for review.
name: pr-prep
description: Prepares pull requests by running quality gates, drafting descriptions, and validating tests. Use when completing a feature and ready for review.
alwaysApply: false
category: artifact-generation
tags:
- git
- pr
- pull-request
- quality-gates
- testing
tools: []
complexity: medium
model_hint: standard
estimated_tokens: 1000
progressive_loading: true
modules:
- quality-gates.md
- pr-template.md
dependencies:
- sanctum:git-workspace-review
- imbue:proof-of-work
- imbue:justify
- imbue:structured-output
- scribe:slop-detector
- scribe:doc-generator
hooks:
PreToolUse:
- matcher: Bash
command: "# Log quality gate execution\ncmd=$(jq -r '.tool_input.command // empty' 2>/dev/null || echo 'N/A')\nif echo \"$cmd\" | grep -qE \"(make|npm|cargo|pytest|ruff|eslint|clippy) (test|lint|fmt|build|check)\"; then\n echo \"[skill:pr-prep] Quality gate: $cmd at $(date)\" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log\nfi\n"
once: false
PostToolUse:
- matcher: Write
command: "# Track PR template generation\nfile=$(jq -r '.tool_input.file_path // empty' 2>/dev/null)\nif echo \"$file\" | grep -qE \"(pr[-_]description|PR[-_]TEMPLATE|pull[-_]request)\"; then\n echo \"[skill:pr-prep] PR template written: $file at $(date)\" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log\nfi\n"
Stop:
- command: 'echo "[skill:pr-prep] === Workflow completed at $(date) ===" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log
'Use this skill to stage changes and generate a PR summary. Run `Skill(sanctum:git-workspace-review)` first to capture the repository state and diffs.
Create `TodoWrite` items for these steps before starting: 1. `pr-prep:workspace-reviewed` 2. `pr-prep:quality-gates` 3. `pr-prep:self-reviewed` 4. `pr-prep:changes-summarized` 5. `pr-prep:testing-documented` 6. `pr-prep:pr-drafted` 7. `pr-prep:content-verified`
Mark each item as complete as the section is finished.
Confirm that `Skill(sanctum:git-workspace-review)` is complete. If changes were staged after the initial review, re-execute the skill to refresh the context.
Execute formatting, linting, and tests using project-specific commands (e.g., `make lint`, `make test`). Resolve all failures before proceeding. If a task cannot be executed locally, document the reason and the alternative validation performed. Language-specific commands and failure handling are detailed in `modules/quality-gates.md`.
If any plugin files changed (plugin.json, skills, commands, agents, or hooks), run `make docs-sync-check` to verify `book/src/reference/capabilities-reference.md` is current. If it reports discrepancies, run `/sync-capabilities --fix` or update the reference manually before proceeding.
Read the diff as if you are a reviewer seeing it for the first time. This catches scope creep, stale debug code, and unclear changes before anyone else spends time on them.
**Automated checks:**
# Check for debug statements left in git diff --cached --name-only | xargs grep -nE \ '(console\.log|print\(|debugger|TODO|FIXME|HACK|XXX)' \ 2>/dev/null || true # Check for commented-out code blocks (3+ consecutive lines) git diff --cached | grep -c '^+.*//.*[a-zA-Z]' || true # Check for formatting-only commits mixed with feature work git log --oneline $(git merge-base HEAD origin/master)..HEAD | \ grep -iE '(fmt|format|lint|style|whitespace)' || true
**Additive bias audit:**
Run `Skill(imbue:justify)` to compute the additive bias score and check Iron Law compliance. If the score is YELLOW or above, justify each flagged signal before proceeding. If RED or STOP, rethink the approach.
**Manual verification:**
stated goal?
If issues are found, fix them before proceeding.
Use the notes from the workspace review and the output of `git diff --stat origin/main...HEAD` to understand the scope. Identify key points in the diffs and group them into 2-4 paragraphs highlighting the technical changes and their rationale. Note breaking changes, migrations, or documentation updates.
List each test command executed and its result. If tests were skipped, document the reason and the mitigation plan.
Attach a manual test plan when any of these hold:
reproduce step fails on the parent commit.
Write it as numbered steps, each stating its expected result. A step without an expected result is a step the reviewer cannot fail. Format and examples are in `modules/pr-template.md`.
Populate the template with the facts table (Who, Where, When), then the Why and What-and-how sections, then Test plan and Checklist. Write the title imperative and self-contained so it reads correctly in `git log` out of context.
All three table rows are filled on every PR. A row that does not apply says so (`External: none`, `on merge`) rather than being deleted, so a reader can tell an omitted blast radius from a blast radius of none.
Add issue references, screenshot
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.