anotherben/claude-enterprise-skills/enterprise-review
Claude Code and agent skill by anotherben/claude-enterprise-skills
- community
Checking that the SKILL.md file is still in the repository.
Two-stage code review: spec compliance THEN code quality. Separate concerns prevent spec bugs hiding behind quality observations. Medium+ tier requires a separate agent — builder never reviews own work. Use after enterprise-build.
Install
npx vskill@latest install anotherben/claude-enterprise-skills/enterprise-reviewSKILL.md
The same SKILL.md was published earlier as anotherben/claude-enterprise-skills/enterprise-review.
Enterprise Review
You are reviewing code that was built from a contract. Your job is adversarial verification — find what's wrong, not confirm what's right. Two stages, two separate concerns: spec compliance FIRST, code quality SECOND. They never mix.
THE SEPARATION PRINCIPLE
Quality findings during Stage 1? Write them down, but DO NOT report them until Stage 2. Spec findings during Stage 2? STOP — you missed something. Go back to Stage 1.
STACK RESOLUTION
Read .claude/enterprise-state/stack-profile.json at skill start. Extract:
$TEST_CMD=commands.test_all$SOURCE_DIR=structure.source_dirs.backend$FRONTEND_DIR=structure.source_dirs.frontend$TENANT_FIELD=multi_tenancy.field$TENANT_ENABLED=multi_tenancy.enabled$AUTH_MIDDLEWARE=auth.middleware_name$FILE_EXTENSIONS=conventions.file_extensions
If no profile exists: BLOCKED — run /enterprise-discover first.
PREREQUISITES
Before starting review:
- Verify upstream artifacts exist:
``bash # Contract must exist ls docs/contracts/*contract* 2>/dev/null || echo "BLOCKED: No contract found" # Build must have produced changes git diff --stat HEAD 2>/dev/null | tail -1 || echo "BLOCKED: No changes to review" # Tests must be passing $TEST_CMD 2>&1 | tail -5 `` If any check fails: STOP. Report what's missing.
- Identify the contract — find the contract document in
docs/contracts/or.claude/designs/ - Identify the plan — find the plan in
docs/plans/ - Identify all changed files — run
git diff --name-only <base-branch>...HEAD - Identify the tier — Micro/Small/Medium/Large/XL from the contract
- Check builder identity — Medium+ tier: you MUST be a different agent than the builder
SCOPE CLASSIFICATION
Before reviewing any code, classify EVERY changed file:
| Category | Definition | Review Action | |
|---|---|---|---|
| REQUIRED | Directly implements a postcondition | Full Stage 1 + Stage 2 | |
| ENABLING | Infrastructure needed by REQUIRED files (utils, types, migrations) | Stage 2 only | |
| DRIFT | Not traceable to any postcondition | Flag for removal |
DRIFT files are a red flag. They indicate scope creep. Report them prominently. The builder must justify each one or revert it.
STAGE 1: SPEC COMPLIANCE
1A — Postcondition Verification
For EACH postcondition in the contract (PC-1, PC-2, etc.):
Common spec failures:
- Test passes but doesn't actually verify the postcondition (assertion too weak)
- Implementation handles happy path but not the error case stated in the PC
- Test mocks the exact thing the postcondition is about
- Postcondition says "returns X" but implementation returns X wrapped in something else
1B — Consumer Map Verification
For each consumer listed in the contract's consumer map:
1C — Invariant Verification
For each invariant in the contract:
1D — Stage 1 Verdict
If Stage 1 FAILS: STOP. Do not proceed to Stage 2. Report failures and return to builder.
STAGE 2: CODE QUALITY
Only runs after Stage 1 passes. Stage 2 has 8 quality lenses.
2A — File Size
- Soft limit: 400 lines. Flag files over 400.
- Hard limit: 800 lines. FAIL files over 800 (unless pre-existing legacy).
- Test files are exempt from line limits.
2B — Tenant Isolation
For EACH new query:
- Has
$TENANT_FIELDin WHERE clause? (Exception:customerstable has no$TENANT_FIELD) - Has
$TENANT_FIELDin INSERT values? - Uses parameterized query (no string interpolation)?
2C — Query Safety
- ALL queries must use parameterized placeholders (
$1,$2, etc.) - No string concatenation in SQL
- No template literals building SQL with user input
2D — Import Verification
2E — Debug Code
console.log/console.debugin production code = FAILconsole.warn/console.errorwith context = OK (they're intentional logging)debuggerstatements = FAILTODO/FIXME/HACK/XXX= FLAG (not auto-fail, but must be intentional)
2F — Security
For each new route or endpoint:
- Auth middleware applied? (
$AUTH_MIDDLEWAREor equivalent) - Permission checks present? (role-based access)
- Input validation present? (request body/params validated)
- Route order correct? (public routes before auth middleware)
2G — Pattern Compliance
- Does the code follow existing patterns in the codebase?
- Are there unnecessary abstractions not seen elsewhere?
- Does error handling match existing conventions?
- Are existing utilities reused (not reinvented)?
2H — Migration Safety (if applicable)
For each migration:
- Uses
IF NOT EXISTS/IF EXISTSguards? - Uses
TIMESTAMPTZ(notTIMESTAMP)? - Adds indexes for foreign keys?
- Reversible? (or documented as irreversible)
2I — Stage 2 Verdict
FINAL REVIEW REPORT
Save to: docs/reviews/YYYY-MM-DD-<slug>-review.md
REVIEW WORKFLOW
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/enterprise-review/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Oct 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/anotherben/claude-enterprise-skills/enterprise-review)