ワンクリックで
pr-review
Automated code review using ReadLints and Shell for technical validation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Automated code review using ReadLints and Shell for technical validation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Connect and verify the Well MCP — authenticate, confirm the tools work, and show what to ask. Use when the user runs /well:connect, just installed the Well plugin, or says the Well connection/MCP "isn't working" / "nothing happened".
Produce an accounts-receivable aging report and surface overdue invoices for a Well workspace. Use when the user asks who owes them money, an AR aging report, overdue invoices, days sales outstanding (DSO), or which customers to chase.
Forecast cash flow and runway for a Well workspace from booked invoices and collected bank transactions. Use when the user asks for a cash-flow forecast, runway, how long until they run out of cash, projected balance, or expected inflows/outflows.
Run a month-end (or period) close checklist against a Well workspace — verify everything is reconciled and posted before the books are closed. Use when the user asks to close the month/period, run a close checklist, check if the books are ready to close, or what's left before closing.
Produce a VAT / sales-tax summary for a period from a Well workspace's posted ledger. Use when the user asks for a VAT return, VAT summary, sales tax owed, output vs input VAT, or tax declaration figures for a period.
Build a balance sheet (bilan) from a Well workspace. Use when the user asks for a balance sheet, bilan, assets/liabilities/equity, or financial position at a point in time.
| name | pr-review |
| description | Automated code review using ReadLints and Shell for technical validation |
Automated technical validation before commits. Uses ReadLints for lint/type errors and Shell for running validation commands.
Verify development environment is ready. Auto-resolve safe issues, prompt for risky ones.
Check if dependencies are fresh:
# Check if node_modules exists
ls -d node_modules 2>/dev/null
# Check if package-lock.json is newer than node_modules
find package-lock.json -newer node_modules 2>/dev/null
If node_modules missing or stale (auto-resolve):
npm install
Wait for install to complete before proceeding.
Check if required containers are running:
docker ps --filter name=well_ --format "{{.Names}}: {{.Status}}"
Expected: well_postgres and well_hasura running
If not running (auto-resolve):
cd apps/api/docker && docker compose up -d
Wait up to 30 seconds for containers to be healthy.
Check for pending migrations:
cd apps/api && npm run mikro:up -- --dry-run 2>&1 | head -5
If migrations pending (WARN - do NOT auto-run):
Database migrations may be pending.
Run manually if needed: cd apps/api && npm run mikro:up
Continue without running migrations? (y/n)
Wait for user confirmation before proceeding.
curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/health --max-time 5
Expected: HTTP 200
If not responding:
lsof -i :8080API server not running on port 8080.
Start with: npm run dev (in apps/api)
API server on port 8080 is unresponsive (process exists but not responding).
Options:
A) Kill process and restart (recommended)
B) Skip and continue anyway
C) Abort commit
Reply with A, B, or C.
lsof -ti :8080 | xargs kill -9 2>/dev/null
Then prompt user to restart: cd apps/api && npm run devcurl -s -o /dev/null -w "%{http_code}" http://localhost:3000 --max-time 5
Expected: HTTP 200
If not responding:
lsof -i :3000Web server not running on port 3000.
Start with: npm run dev (in apps/web)
Web server on port 3000 is unresponsive (process exists but not responding).
Options:
A) Kill process and restart (recommended)
B) Skip and continue anyway
C) Abort commit
Reply with A, B, or C.
lsof -ti :3000 | xargs kill -9 2>/dev/null
Then prompt user to restart: cd apps/web && npm run devIf typecheck passes but runtime errors occur (module not found, stale code):
npm run clean
Then prompt user to restart dev servers.
### Runtime Environment
| Service | Status | Action |
|---------|--------|--------|
| Dependencies | FRESH/STALE | [installed/skipped] |
| Docker (postgres) | UP/DOWN | [started/already running] |
| Docker (hasura) | UP/DOWN | [started/already running] |
| Migrations | CURRENT/PENDING | [warning shown/current] |
| API Server (8080) | UP/DOWN/STALE | [running/started/killed/skipped] |
| Web Server (3000) | UP/DOWN/STALE | [running/started/killed/skipped] |
**Runtime:** [READY / WAITING - user action needed]
If any service requires manual action, wait for user confirmation before proceeding.
npm run typecheck
Expected: Exit code 0, no errors
npm run lint
Expected: Exit code 0, no errors
Use Cursor's ReadLints tool on changed files:
ReadLints:
paths: [list of changed files]
Categorize results:
| Severity | Action |
|---|---|
| Error | BLOCK - must fix before commit |
| Warning | WARN - should fix, can proceed |
| Info | PASS - informational only |
Search changed files for debug statements:
Grep:
pattern: "console\.(log|debug|warn|error)"
path: [changed files]
If found: WARN - remove before commit
Grep:
pattern: "(TODO|FIXME|HACK|XXX):"
path: [changed files]
If found: INFO - document or address
Grep:
pattern: "(localhost|127\.0\.0\.1|hardcoded)"
path: [changed files]
If found: WARN - use environment variables
Calculate risk score based on:
| Factor | Weight | Criteria |
|---|---|---|
| Lines Changed | 1-3 | <50=1, 50-200=2, >200=3 |
| Files Changed | 1-3 | <5=1, 5-10=2, >10=3 |
| New Dependencies | 0-2 | None=0, 1=1, >1=2 |
| API Changes | 0-2 | None=0, Internal=1, Public=2 |
| Database Changes | 0-2 | None=0, Field=1, Entity=2 |
Risk Levels:
## PR Review Report
### Runtime Environment
| Service | Status | Action |
|---------|--------|--------|
| Dependencies | FRESH/STALE | [installed/skipped] |
| Docker (postgres) | UP/DOWN | [started/already running] |
| Docker (hasura) | UP/DOWN | [started/already running] |
| Migrations | CURRENT/PENDING | [warning shown/current] |
| API Server (8080) | UP/DOWN/STALE | [running/killed/skipped] |
| Web Server (3000) | UP/DOWN/STALE | [running/killed/skipped] |
**Runtime:** [READY / WAITING]
### Technical Validation
| Check | Status | Details |
|-------|--------|---------|
| TypeCheck | PASS/FAIL | [error count or "clean"] |
| Lint | PASS/FAIL | [error count or "clean"] |
| ReadLints | PASS/WARN/FAIL | [summary] |
### Code Quality
| Check | Status | Count | Files |
|-------|--------|-------|-------|
| console.log | PASS/WARN | [N] | [files] |
| TODO/FIXME | PASS/INFO | [N] | [files] |
| Hardcoded | PASS/WARN | [N] | [files] |
### Risk Assessment
| Factor | Score |
|--------|-------|
| Lines Changed | [N] |
| Files Changed | [N] |
| New Dependencies | [N] |
| API Changes | [N] |
| Database Changes | [N] |
| **Total Risk** | [N] ([LOW/MEDIUM/HIGH]) |
### Verdict
**[PASS / WARN / BLOCK]**
[If BLOCK: List issues that must be fixed]
[If WARN: List issues that should be addressed]
[If PASS: Ready to commit]
| Condition | Verdict |
|---|---|
| Runtime WAITING (user action needed) | BLOCK |
| User chose C (Abort) for stale server | BLOCK |
| Dependencies installed | Continue (auto-resolved) |
| Migrations pending | WARN (can proceed after confirmation) |
| Server killed by user (chose A) | Continue after user restarts |
| TypeCheck FAIL or Lint FAIL | BLOCK |
| ReadLints has Errors | BLOCK |
| console.log found | WARN |
| Risk >= HIGH | WARN |
| All checks pass | PASS |
This skill is invoked by:
commit.mdc - Before each commitpush-pr.mdc - Phase 1.1 validationagent.mdc - Part of commit-level workflow| Tool | Purpose |
|---|---|
| Shell | Run npm scripts (typecheck, lint) |
| ReadLints | Get IDE diagnostic errors |
| Grep | Search for patterns in code |
| Read | Examine specific file contents |
For rapid iteration, run minimal checks:
## Quick Review
- [ ] `npm run typecheck` - PASS
- [ ] `npm run lint` - PASS
- [ ] No console.log - PASS
**Verdict:** PASS - Ready to commit
Use full review before PR push; quick mode acceptable for intermediate commits.