check-pr-readiness
Pre-PR gauntlet — run the project's typecheck, linter, formatter, and test suite against the branch's diff vs.
Skill by Acauhi99
Chalk Labs
Need help deploying check-pr-readiness?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/acauhi99-check-pr-readiness
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, testing, devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/check-pr-readiness
What's inside
- Skill name
check-pr-readiness- Description
- Pre-PR gauntlet — run the project's typecheck, linter, formatter, and test suite against the branch's diff vs. the base, plus a residue sweep for `console.log`, `.only` / `.skip`, debugger statements, leftover TODOs in changed files, dropped lockfiles, and unintended large/binary additions. Reports each gate's pass/fail with the exact reproduction command. Auto-fixes only the format-and-lint-fix gate when it has a known auto-fix; everything else is reported, never silently fixed. Trigger phrases — "pre-pr check", "ready to PR?", "is this PRable", "pre-flight this branch", "gauntlet", "/check-pr-readiness", "lint+test+types before PR". Skip for — branches with no commits beyond base, doc-only or comment-only diffs (still useful but optional), repos with no CI conventions to enforce.
- License
- MIT
- Compatibility
- opencode
- Metadata
- source: Adapted from AgentSystemLabs/core (MIT) · requires_codegraph: true
- Instructions
- 164 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
> **Tool mapping (OpenCode):** This skill uses:
> - `question` tool for user prompts (not `AskUserQuestion`)
> - `task` tool for subagents (not `Agent` or `Task` subagent syntax)
> - `skill({ name: "..." })` to load other skills (not `Skill(skill="...", args="...")`)
> - `codegraph_explore`, `codegraph_search`, `codegraph_context` for codebase exploration (preferred)
> - `todowrite` for phase/progress tracking
> - `grep`, `glob`, `read`, `bash` as fallback when `.codegraph/` not initialized
>
> **Context rule:** This skill supersedes any prior skill instructions. Follow ONLY these instructions now. Read the user's goal and any mode/include/skip from the conversation context.
# Check PR Readiness
A pre-flight gate for code that is about to go on a pull request. Each check has one exit condition: **green** or **report-and-stop**. Do not run the next check if the previous fails — surface the failure first.
---
## Phase 1 — Scope the Diff
Use `todowrite` to mark this phase as `in_progress`.
Determine the branch range:
- Base = `git merge-base HEAD origin/$(git rev-parse --abbrev-ref origin/HEAD | sed 's@^origin/@@')` if origin/HEAD is set; else `origin/main`; else the user-specified base.
- Changed files = `git diff --name-only <base>...HEAD` plus `git status --porcelain` for unstaged/untracked.
If the changed-file list is empty, stop: "No changes against base — nothing to check."
**Exit:** the file list and the base ref are fixed.
---
## Phase 2 — Detect Project Tooling
Use `todowrite` to mark this phase as `in_progress`.
Read `package.json` (or `pyproject.toml` / `Cargo.toml` / `go.mod` for non-JS) to find the actual scripts. Do not guess command names. Map to:
| Gate | Detection (in order) |
|---|---|
| typecheck | `package.json` script `typecheck` / `check-types` / `tsc`; else `npx tsc --noEmit` |
| lint | script `lint` / `lint:check`; else local config presence (`eslint.config.*`, `.eslintrc*`) → `npx eslint <changed-files>` |
| format | script `format:check` / `prettier:check`; else `npx prettier --check <changed-files>` if `.prettierrc*` exists |
| test | script `test` / `test:unit` / `test:run`; for vitest, prefer `vitest run --changed <base>` |
| build | script `build` (only if user asks for full readiness; otherwise skip) |
Report what was detected. If a gate has no tooling, mark it `n/a` and continue — do not invent a checker.
**Exit:** every gate has a concrete command or `n/a`.
---
## Phase 3 — Run the Gauntlet
Use `todowrite` to mark this phase as `in_progress`.
Run each detected gate in this order. Stop at the first failure and report; do not auto-fix code (except in Phase 4 below for format).
1. typecheck
2. lint
3. format
4. test
5. residue sweep (Phase 5)
For each: print the command, run it, capture exit code + last 30 lines of output on failure.
```
[✓] typecheck (npx tsc --noEmit) — clean
[✗] lint (pnpm lint) — 3 errors in src/foo.ts
src/foo.ts:14: 'unused' is defined but never used
...
```
If a gate fails, stop the gauntlet and produce a final report with: the exact reproduction command, the failing files/lines, and the suggested fix path (run the auto-fix script for lint/format; otherwise the user fixes).
**Exit:** all gates green, or one is red and reported.
---
## Phase 4 — Auto-Fix Gate (Format/Lint Only)
Use `todowrite` to mark this phase as `in_progress`.
If `format` failed and a `format` (write) script exists (`format`, `prettier:write`, `lint:fix` for stylistic-only rules), offer to run it via `question` tool:
```
Format check failed. Auto-fix available: pnpm format
Apply? (y/n)
```
Wait for `y`. After running, re-run the format check. Do not auto-fix lint errors that aren't pure stylistic — they often encode real bugs.
**Exit:** format gate is green, or user declined auto-fix.
---
## Phase 5 — Residue Sweep
Use `todowrite` to mark this phase as `in_progress`.
`git diff <base>...HEAD` filtered to source files (exclude `*.lock`, `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, generated dirs). Search the **added** lines only (not the whole file) for:
- `console.log`, `console.debug`, `console.dir` (allow `console.error` / `console.warn` if the project uses them)
- `debugger;`
- `.only(` and `.skip(` in test files
- `// TODO` / `// FIXME` / `// XXX` newly added in this branch
- `it.todo(` left in
- Large file additions (> 500 KB) and binary files not under `assets/` or `public/`
- Lockfile changed without a `package.json` change (suggests stale resolve)
- `package.json` `dependencies` / `devDependencies` change without a lockfile change
Report each hit with file:line. Do not delete — these are intentional sometimes (e.g., `console.error` for genuine error logging).
**Exit:** residue list is reported.
---
## Phase 6 — Final Report
Use `todowrite` to mark this phase as `in_progress`.From Acauhi99/opencode-agent-system, MIT.
More from Acauhi99/opencode-agent-system
- 0.502score
add-regression-test
Acauhi99
After a bug fix lands (or is staged), generate a regression test that fails on the pre-fix code and passes on the post-fix code — pinning the bug so it can't…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
add-e2e-test
Acauhi99
Add a Playwright end-to-end test for a user-facing flow — sign-in, form submit, multi-step wizard, payment, navigation, etc.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
add-empty-error-states
Acauhi99
Sibling to add-skeleton-loaders.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
address-pr-comments
Acauhi99
Address every unresolved review comment on a GitHub pull request — locate the PR (current branch, PR URL, PR number, or issue number with linked PR), fetch…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
audit
Acauhi99
Whole-codebase tech-debt sweep.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
continue
Acauhi99
Resume and continue work from a previous session.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
fix-pr-tests
Acauhi99
Diagnose and fix failing CI tests on a GitHub pull request.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
handoff-opencode
Acauhi99
Hand off a stalled task or stubborn bug to the OpenCode CLI for a second pass — package the original request, what the agent tried, and the live `git status`…
SkillCFreshness: C★ 1Claude Code +9 - 0.472score
domain-modeling
Acauhi99
Build and sharpen a project's domain model.
SkillCFreshness: C★ 1Claude Code +9 - 0.267score
fix-bug
Acauhi99
No description from the publisher yet.
SkillCFreshness: C★ 1Claude Code +9 - 0.267score
add-migration
Acauhi99
No description from the publisher yet.
SkillCFreshness: C★ 1Claude Code +9 - 0.267score
add-observability
Acauhi99
No description from the publisher yet.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 24, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Acauhi99
- 0.502score
add-regression-test
Acauhi99
After a bug fix lands (or is staged), generate a regression test that fails on the pre-fix code and passes on the post-fix code — pinning the bug so it can't…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
add-empty-error-states
Acauhi99
Sibling to add-skeleton-loaders.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
address-pr-comments
Acauhi99
Address every unresolved review comment on a GitHub pull request — locate the PR (current branch, PR URL, PR number, or issue number with linked PR), fetch…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
audit
Acauhi99
Whole-codebase tech-debt sweep.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
continue
Acauhi99
Resume and continue work from a previous session.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
handoff-opencode
Acauhi99
Hand off a stalled task or stubborn bug to the OpenCode CLI for a second pass — package the original request, what the agent tried, and the live `git status`…
SkillCFreshness: C★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get check-pr-readiness running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
check-pr-readiness skill. Agent Mart. https://agentmart.dev/skills/acauhi99-check-pr-readiness (last updated 2026-10-24)