
Validate Before Merge
- 35 installs
- 80 repo stars
- Updated July 29, 2026
- cartridge-gg/controller
Run the full CI validation sequence (lint, build, tests) locally to confirm code is ready to merge.
About
Runs the full set of CI validation checks locally (lint, build, tests) to confirm code is ready to merge. A developer uses it as a final check before merging a PR or requesting review.
- Runs the full CI validation sequence locally before merge
- Lint, build, unit tests in order with fixes for each failure
Validate Before Merge by the numbers
- 35 all-time installs (skills.sh)
- Ranked #639 of 1,354 Code Review & Quality skills by installs in the Skillselion catalog
- Data as of Jul 30, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cartridge-gg/controller --skill validate-before-mergeAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 35 |
|---|---|
| repo stars | ★ 80 |
| Last updated | July 29, 2026 |
| Repository | cartridge-gg/controller ↗ |
What it does
Run the full CI validation sequence (lint, build, tests) locally to confirm code is ready to merge.
Files
Validate Before Merge
Overview
This skill runs all checks that CI performs to validate code is ready for merge. Use this to catch issues locally before CI runs.
Full Validation Sequence
Run these checks in order. Each step must pass before proceeding.
Step 1: Lint and Format Check
pnpm lint:checkExpected: No errors or warnings If fails: Run pnpm format to auto-fix
Step 2: Build All Packages
pnpm buildExpected: Successful build with no TypeScript errors If fails: Fix type errors in the reported files
Step 3: Unit Tests
pnpm test:ciExpected: All tests pass If fails:
- Review failing test output
- Fix code or update tests as appropriate
- Never skip failing tests without justification
Step 4: Visual Regression Tests (if UI changed)
Only required if changes touch:
packages/keychain/src/components/packages/keychain/src/hooks/(UI-related)- Storybook configuration
pnpm test:storybookExpected: All visual comparisons pass If fails with intentional changes:
pnpm test:storybook:update
git add packages/*/__image_snapshots__/
git commit -m "chore: update storybook snapshots"Step 5: Verify No Uncommitted Changes
git statusExpected: Clean working directory (or only untracked files you intend to ignore)
Quick Validation Script
For a fast validation (similar to pre-commit):
pnpm lint:check && pnpm build && pnpm testFull CI Mirror
To exactly mirror what GitHub Actions runs:
# Clean environment (optional but recommended)
pnpm clean && pnpm i
# Quality job
pnpm lint:check
# Test job
pnpm build
pnpm test:ci --coverage
# Storybook job (if UI changes)
pnpm test:storybookValidation Checklist
Before requesting merge, verify:
- [ ]
pnpm lint:checkpasses - [ ]
pnpm buildsucceeds with no errors - [ ]
pnpm test:ciall tests pass - [ ]
pnpm test:storybookpasses (if UI changed) - [ ] No console.log or debug statements left in code
- [ ] No hardcoded secrets or credentials
- [ ] PR description accurately describes changes
- [ ] Related issues are linked
Common Pre-Merge Issues
Forgotten console.log
grep -r "console.log" packages/*/src --include="*.ts" --include="*.tsx" | grep -v "test"Outdated dependencies
git fetch origin main
git rebase origin/mainMerge conflicts
git fetch origin main
git merge origin/main
# Resolve conflicts
pnpm build # Verify after resolvingReporting Results
After validation, report:
## Validation Results
- [x] Lint: Passed
- [x] Build: Passed
- [x] Tests: Passed (X tests, X% coverage)
- [x] Storybook: Passed (or N/A if no UI changes)
Ready for merge.Or if issues found:
## Validation Results
- [x] Lint: Passed
- [ ] Build: Failed - Type error in packages/controller/src/account.ts:42
- [ ] Tests: Not run (blocked by build failure)
### Issues to Fix
1. Type error: Property 'foo' does not exist on type 'Bar'