From hieutrtr-ai1-skills
Comprehensive pre-merge validation checklist for Python/React pull requests. Use before approving or merging any PR. Covers code quality checks (linting, formatting, type checking), test coverage requirements, documentation updates, migration safety, API contract compatibility, accessibility compliance, bundle size impact, and deployment readiness. Provides a systematic checklist that ensures nothing is missed before merge. Does NOT cover security review depth (use code-review-security).
npx claudepluginhub joshuarweaver/cascade-code-testing-misc --plugin hieutrtr-ai1-skillsThis skill is limited to using the following tools:
Activate this skill when:
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Activate this skill when:
Output: Write results to pre-merge-report.md with pass/fail status for each check and blocking issues.
Do NOT use this skill for:
code-review-security)python-backend-expert or react-frontend-expert)system-architecture)e2e-testing)Run automated checks in this order. Each check must pass before proceeding to the next. Use scripts/run-all-checks.sh to execute all checks at once.
Python (ruff):
# Check linting
ruff check app/ tests/
# Check formatting
ruff format --check app/ tests/
# Auto-fix (if needed before commit)
ruff check --fix app/ tests/
ruff format app/ tests/
TypeScript/React (eslint + prettier):
# Check linting
npx eslint 'src/**/*.{ts,tsx}' --max-warnings 0
# Check formatting
npx prettier --check 'src/**/*.{ts,tsx}'
# Auto-fix (if needed)
npx eslint 'src/**/*.{ts,tsx}' --fix
npx prettier --write 'src/**/*.{ts,tsx}'
Pass criteria:
# noqa or eslint-disable without a comment explaining whyPython (mypy):
mypy app/ --strict --no-error-summary
TypeScript:
npx tsc --noEmit
Use scripts/type-check.sh to run both in sequence with report output.
Pass criteria:
type: ignore or @ts-ignore without justificationAny leaks)Python:
pytest tests/ -q --tb=short
React:
npm test -- --run --reporter=verbose
Pass criteria:
Python:
pytest --cov=app --cov-report=term-missing --cov-fail-under=80
React:
npx vitest run --coverage --coverage.thresholds.lines=80
Pass criteria:
# Python dependencies
pip-audit --requirement requirements.txt
# npm dependencies
npm audit --audit-level=high
# Custom code scan (if code-review-security skill is available)
python scripts/security-scan.py --path app/ --output-dir ./security-results
Pass criteria:
After automated checks pass, review the PR manually against these categories.
Any: Return types and parameters are properly typed (no escape hatches)list[User], not list)Use scripts/accessibility-check.sh to run automated accessibility checks.
When a check fails, follow this escalation path:
Automated check failure:
Manual review finding:
Severity-based response:
| Finding Type | Action | Can Override? |
|---|---|---|
| Lint/format error | Fix before merge | No |
| Type error | Fix before merge | No |
| Test failure | Fix before merge | No |
| Coverage below threshold | Add tests or justify | Yes, with tech lead approval |
| Security finding (critical/high) | Fix before merge | No |
| Security finding (medium/low) | Fix or create follow-up ticket | Yes, with ticket reference |
| Accessibility violation | Fix or create follow-up ticket | Yes, with justification |
| Performance concern | Discuss in PR, may defer | Yes, with tech lead approval |
If a check must be overridden:
# OVERRIDE: Coverage below 80% for this module. See TICKET-1234.
# Approved by @tech-lead on 2024-01-15.
# Reason: Legacy code migration in progress; full coverage planned for Sprint 12.
Overrides are never acceptable for:
# Run the full check suite
./scripts/run-all-checks.sh --output-dir ./check-results
# Run only type checks
./scripts/type-check.sh --output-dir ./check-results
# Run accessibility checks
./scripts/accessibility-check.sh --output-dir ./check-results
./scripts/run-all-checks.sh --output-dir ./pr-reviewWrite results to pre-merge-report.md:
# Pre-Merge Report: [PR Title]
## Status: READY TO MERGE | BLOCKING ISSUES
## Automated Checks
| Check | Status | Details |
|-------|--------|---------|
| Linting (ruff) | PASS | No issues |
| Type check (mypy) | PASS | No errors |
| Tests (pytest) | PASS | 142 passed, 0 failed |
| Coverage | PASS | 85% (threshold: 80%) |
| Frontend lint | PASS | No issues |
| Frontend types | PASS | No errors |
## Manual Checks
- [x] Code follows project patterns
- [x] Tests cover new functionality
- [x] No breaking API changes
- [ ] Documentation updated (BLOCKING)
## Blocking Issues
1. README needs update for new CLI flag
## Recommendation
Address documentation before merge.