Pre-PR quality gate that runs build, type-check, lint, test, security scans, and finishes with a conventional commit. Use before creating a PR, after completing features, or when wrapping up a branch.
Install with Tessl CLI
npx tessl i github:0xrabbidfly/eric-cartman --skill branch-wrapup87
Quality
81%
Does it follow best practices?
Impact
100%
1.51xAverage score across 3 eval scenarios
Run a comprehensive 9-phase verification and commit workflow before code is considered "ready" for pull request. Catches issues locally before they reach CI/CD, ensures constitutional compliance, performs an obvious code-smell review, and closes with a proper conventional commit summarizing all branch changes.
Run branch-wrapup before I create a PR.Or invoke specific phases:
Run only the security scan phase of branch-wrapup.npm run build 2>&1 | Select-Object -Last 30Must pass to continue. Build failure = stop immediately.
What it catches:
npm run type-check 2>&1 | Select-Object -First 40Report all errors. Fix critical ones before continuing.
What it catches:
any type leaks (forbidden per constitution)npm run lint 2>&1 | Select-Object -First 40What it catches:
npm run test 2>&1 | Select-Object -Last 50Target: 80% coverage minimum.
Report:
Project-specific security checks based on copilot-instructions.md:
# 1. Check for forbidden localStorage/sessionStorage
Select-String -Path "app/**/*.ts","app/**/*.tsx","components/**/*.tsx","lib/**/*.ts" -Pattern "localStorage|sessionStorage" -Recurse | Select-Object -First 10
# 2. Check for exposed secrets
Select-String -Path "**/*.ts","**/*.tsx" -Pattern "sk-|api_key|password\s*=\s*['""]" -Recurse | Select-Object -First 10
# 3. Check for console.log in production code (should use structured logger)
Select-String -Path "app/**/*.ts","app/**/*.tsx","lib/**/*.ts" -Pattern "console\.(log|error|warn)" -Recurse | Select-Object -First 10
# 4. Check for hardcoded English strings (i18n violation)
Select-String -Path "components/**/*.tsx","app/**/*.tsx" -Pattern "<(h[1-6]|p|span|button|label)>[A-Z][a-z]+" -Recurse | Select-Object -First 10Constitutional violations (must fix):
localStorage / sessionStorage usageconsole.log in production codeuseTranslations)# 1. Check for relative imports (should use @/ alias)
Select-String -Path "app/**/*.ts","app/**/*.tsx","components/**/*.tsx" -Pattern 'from\s+[''"]\.\./' -Recurse | Select-Object -First 10
# 2. Check for inline styles with magic numbers
Select-String -Path "components/**/*.tsx" -Pattern 'style=\{\{.*\d+.*\}\}' -Recurse | Select-Object -First 10
# 3. Check for missing ARIA labels on interactive elements
Select-String -Path "components/**/*.tsx" -Pattern '<(button|a|input)[^>]*(?<!aria-label)[^>]*>' -Recurse | Select-Object -First 5
# 4. Check stale .gitignore entries (paths that no longer exist)
Get-Content .gitignore | Where-Object { $_ -match '^[^#\s]' -and $_ -notmatch '[\*\?]' } |
ForEach-Object { $p = $_.TrimEnd('/'); if (-not (Test-Path $p)) { "Stale: $_" } }
# 5. Check orphan scripts (scripts/ files not referenced in package.json)
$pkgJson = Get-Content package.json -Raw
Get-ChildItem scripts/*.ts | Where-Object { $pkgJson -notmatch $_.Name } |
ForEach-Object { "Orphan: scripts/$($_.Name)" }Additional hygiene checks:
.gitignore entries for deleted paths (vestigial clutter)package.json (dev artifacts that should be deleted)# Show what changed
git diff --stat
# List changed files
git diff HEAD~1 --name-only 2>$null || git diff --cached --name-onlyReview each changed file for:
Perform a quick static review for obvious refactoring opportunities and track them.
# 1. Scan for obvious P0 smells (blockers)
Select-String -Path "app/**/*.ts","app/**/*.tsx","components/**/*.ts","components/**/*.tsx","lib/**/*.ts","lib/**/*.tsx" -Pattern "\beval\s*\(|\bnew\s+Function\s*\(" -Recurse
# 2. Scan for obvious refactoring opportunities
Select-String -Path "**/*.{ts,tsx,js,jsx}" -Pattern "TODO|FIXME|HACK|\?.*\?.*:" -Recurse | Select-Object -First 50
# 3. Write or refresh code smell tracker
# Output file: code-smells.mdGate behavior:
P0 smell is found, stop immediately.P0 smell is found, write refactoring opportunities to code-smells.md.code-smells.md must include:
Only runs if all blocking phases passed. Stages all changes and creates a conventional commit summarizing the branch work.
# Stage all changes
git add -A
# Generate commit message from branch diff
$branch = git rev-parse --abbrev-ref HEAD
$diffSummary = git diff --cached --stat
$filesChanged = git diff --cached --name-only
# Commit with conventional message
# Format: <type>(scope): summary of changes
# Body: list of changed files grouped by area
git commit -m "<type>(scope): <summary>" -m "<body with file list>"Commit message rules:
type(scope): descriptionfeat, fix, refactor, docs, chore, test, styleauth, search, infra)After running all phases, produce this verification report:
╔══════════════════════════════════════════════════════════════╗
║ VERIFICATION REPORT ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ Build: [PASS/FAIL] ║
║ Types: [PASS/FAIL] (X errors) ║
║ Lint: [PASS/FAIL] (X warnings, Y errors) ║
║ Tests: [PASS/FAIL] (X/Y passed, Z% coverage) ║
║ Security: [PASS/FAIL] (X constitutional violations) ║
║ Hygiene: [PASS/FAIL] (X issues) ║
║ Diff: X files changed ║
║ Smells: [PASS/FAIL] (X P0, Y refactor opportunities) ║
║ Commit: [DONE / SKIPPED] ║
║ ║
╠══════════════════════════════════════════════════════════════╣
║ Overall: [COMMITTED / NOT READY] for PR ║
╚══════════════════════════════════════════════════════════════╝
Issues to Fix (by priority):
P0 - Constitutional Violations (must fix):
1. localStorage usage in lib/auth/session.ts:45
2. console.log in app/api/search/route.ts:23
P1 - Type/Build Errors:
3. Type error in components/Hero.tsx:12
P2 - Quality Issues:
4. Relative import in components/Footer.tsx:3
5. Missing ARIA label on button in components/SearchBar.tsx:28
Refactoring Opportunities (written to code-smells.md):
1. Nested ternary in components/Filters.tsx:44
2. Long parameter list in lib/search/buildQuery.ts:18| Phase | Blocking? | Rule |
|---|---|---|
| Build | ✅ Yes | Cannot proceed if build fails |
| Types | ⚠️ Soft | Report errors, suggest fixes |
| Lint | ⚠️ Soft | Report issues, allow override |
| Tests | ✅ Yes | Cannot proceed if tests fail |
| Security | ✅ Yes | Constitutional violations block PR |
| Hygiene | ⚠️ Soft | Report for cleanup |
| Diff | 📋 Info | Human review checkpoint |
| Code Smells | ✅ Yes (P0 only) | Stop on any P0 smell; otherwise track refactors in code-smells.md |
| Commit | ✅ Yes | Only runs if no P0/P1 blockers. Stages + commits all changes. |
For long coding sessions, run verification at these checkpoints:
Run a quick verification check (build + types + lint only).Near the end of a full run, add 1–2 implementable app ideas in code-smells.md under a Creative Implementation Ideas section.
| Skill | Relationship |
|---|---|
code-review | Branch-wrapup is tactical (pass/fail); code-review is strategic (architectural) |
testing | Branch-wrapup runs tests; testing skill helps write them |
git-commit | Branch-wrapup uses git-commit conventions for Phase 8 |
deployment | Run branch-wrapup before deployment skill |
ci-cd | Branch-wrapup is local preview of what CI will check |
For automated runs, use the bundled script:
See: verify.ps1 for standalone verification script
# Run full wrapup (verify + commit)
.\.github\skills\branch-wrapup\verify.ps1
# Run specific phases
.\.github\skills\branch-wrapup\verify.ps1 -Phases Build,Types,Lint
# Skip commit (verify only)
.\.github\skills\branch-wrapup\verify.ps1 -NoCommitnode_modules and .nextnpm ci (clean install)Check for circular imports:
npx madge --circular --extensions ts,tsx app/ components/ lib/If a pattern is intentionally used (e.g., localStorage in a polyfill check):
// verification-ignore: localStorage-check commentcode-review - Deep constitutional analysistesting - Test creation and debuggingsecurity-review - Comprehensive security audit (beyond quick scan)c62a8c6
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.