CR-Fullstack — Diff-Scoped Fullstack Review (Auto-Detect)
Review scope: PR diff + directly affected files across all layers.
This skill dynamically detects which languages and frameworks are in the project, applies the matching criteria to each layer, and runs cross-layer checks from rules/fullstack.md.
Step 1 — Detect project stack
Scan the project root to identify all layers. Check:
Frontend detection:
package.jsonwithreact/next→ React layer → userules/react.mdpackage.jsonwithvue/nuxt→ Vue layer → userules/general.mdpackage.jsonwith@angular/core→ Angular layer → userules/general.mdpackage.jsonwithsvelte/@sveltejs/kit→ Svelte layer → userules/general.md
Backend detection:
package.jsonwithexpress/fastify/koa/hapi(and no React) → Node.js layer → userules/node.mdpyproject.toml/requirements.txtwithdjango/flask/fastapi→ Python layer → userules/python.mdgo.modexists → Go layer → userules/general.mdGemfilewithrails/sinatra→ Ruby layer → userules/general.mdcomposer.jsonwithlaravel→ PHP layer → userules/general.mdCargo.tomlexists → Rust layer → userules/general.mdbuild.gradle/pom.xml→ Java/Kotlin layer → userules/general.md
Monorepo detection:
- Check for
workspacesin rootpackage.json,lerna.json,nx.json,turbo.json - If monorepo, read each workspace's
package.jsonto classify
Log detected stack at the top of findings (e.g., "Detected: React frontend + Python backend").
Step 2 — Get PR context
Run these commands sequentially (no nested substitution):
gh pr view --json number,title,body,baseRefName,headRefName,url— store thebaseRefNamevaluegit diff <baseRefName>...HEAD— using the baseRefName from step 1git diff --name-only <baseRefName>...HEAD— changed files list
Classify each changed file by layer:
- Frontend:
.tsx,.jsx,.vue,.svelte,.component.tsfiles, or files in frontend directories - Backend:
.py,.go,.rb,.php,.java,.rsfiles, or.ts/.jsfiles in backend directories - Shared: files in
shared/,common/,types/,packages/shared/ - Config: config files, CI files, docker files
- Dependency:
package.json,requirements.txt, lockfiles
Step 3 — Apply language-specific criteria per layer
For each detected layer, apply the review passes from the matching criteria file:
- React files → all 7 passes from
rules/react.md - Node.js files → all 7 passes from
rules/node.md - Python files → all 7 passes from
rules/python.md - Other language files → all 5 passes from
rules/general.md
Include context-aware adjustments from each criteria file.
Step 4 — Run cross-layer checks
Apply all 7 cross-layer checks from rules/fullstack.md:
- API Contract Validation
- Shared Type Drift
- Environment Variable Hygiene
- Authentication Flow
- Error Contract
- Data Flow Security
- API Versioning & Deprecation
Step 5 — Output findings
Collect all findings for cr-fullstack-findings.md in this format:
# Fullstack Review Findings
Generated: [date]
Detected stack: [e.g., "React + Python (FastAPI)"]
Frontend files reviewed: [count]
Backend files reviewed: [count]
Shared files reviewed: [count]
## Frontend ([detected framework])
(findings per criteria pass, or "✅ Clean")
## Backend ([detected framework])
(findings per criteria pass, or "✅ Clean")
## Cross-Layer Issues
### Check 1 — API Contract Validation
(findings or "✅ Clean")
...
### Check 7 — API Versioning & Deprecation
(findings or "✅ Clean")
## Summary
- Total findings: [count]
- CRITICAL: [count] (frontend: X, backend: Y, cross-layer: Z)
- WARNING: [count] (frontend: X, backend: Y, cross-layer: Z)
- Top 3 files needing attention: [list]
Show the user the findings.
Step 6 — Autofix
Follow the autofix workflow defined in rules/autofix.md.
Local mode: present the three options (create findings file as
cr-fullstack-findings.md, fix step by step, fix all)CI mode: post findings as PR comments with
/fixand/fix-allreply instructionsDo not flag issues that are clearly intentional based on git blame context.
Run everything autonomously without asking to confirm each step (except the autofix choice in local mode).
Converted and distributed by TomeVault — claim your Tome and manage your conversions.