一键导入
architecture-review
[pr-review-focus-area: Architecture] Review code for server/client boundary violations, import direction issues, and file placement conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
[pr-review-focus-area: Architecture] Review code for server/client boundary violations, import direction issues, and file placement conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Research a work item, draft an implementation plan, and begin work after approval.
Guided one-shot install — discover installed plugins (or help install new ones), pick install scope, calibrate risk tolerance into a concrete allowlist + hooks, scaffold or merge CLAUDE.md, and sanity-check the result.
Finalize work — commit via /commit, push, and create PRs on feature branches.
Reviewer-side PR workflow — checks out the branch in a worktree, runs focus-area reviews plus a senior-engineering pass, optionally cross-checks against an autonomous reviewer, and posts inline findings only on explicit approval. Read-only — never edits, commits, or pushes.
Fetch PR review comments, classify by severity and confidence, and fix the selected subset.
Triage CVE and SBOM scanner output (Trivy, Grype, Snyk, Docker Scout, Dependabot) into a ranked, deduplicated action list.
| name | architecture-review |
| description | [pr-review-focus-area: Architecture] Review code for server/client boundary violations, import direction issues, and file placement conventions. |
| user-invocable | true |
| disable-model-invocation | true |
| allowed-tools | ["Read","Grep","Glob"] |
Review codebase for structural violations: server/client boundaries, import direction, file placement, and component patterns.
/architecture-review — reviews changed files for architectural violations.
CLAUDE.md to identify:
"use client", "use server", decorators)git diff --name-only.Files that use client-only APIs (browser globals, DOM manipulation, event handlers, client state hooks) must be explicitly marked as client components using the framework's directive.
Enforce layering rules. Lower layers must not import from higher layers:
DB / Data layer (lowest)
|
Lib / Utils
|
Hooks / Services
|
Components
|
Pages / Routes (highest)
Adapt layer names to the project's actual directory structure.
Files should live in their conventional directories:
| Type | Expected location |
|---|---|
| Hooks | hooks/, */hooks/ |
| Constants | constants/, */constants/, config/ |
| Types | types/, */types/ |
| Utils | utils/, lib/, */utils/ |
| Components | components/, */components/ |
| Tests | Co-located or in __tests__/ |
Database queries and ORM calls must only appear in server-side code.
Dispatch to the principal-frontend subagent with the analysis from the prior steps. Ask it to apply its senior lens — server/client boundary, rendering strategy, import direction, file placement — to the findings. Integrate its top findings into the Report Format below; do not replace the skill's verdict contract.
Invocation:
Agent({
subagent_type: "principal-frontend",
description: "Architecture senior review",
prompt: "Review these architectural findings: <summary of boundary, import direction, placement, and component pattern findings from steps 1-5>. Apply senior scrutiny to server/client boundary correctness, rendering strategy choices, import direction, and file placement. Return top architectural risks in severity order."
})
## Architecture Review
### Server/Client Boundary
- [FAIL] src/components/Dashboard.tsx — uses `useEffect` but missing client directive
- [PASS] src/lib/db.ts — server-only, no client APIs
### Import Direction
- [FAIL] src/lib/format.ts → imports from src/hooks/useAuth.ts (lib cannot import hooks)
### File Placement
- [WARN] src/components/Button.tsx:15 — utility function `cn()` should be in utils/
### DB Access
- [PASS] All database access in server-side files
### Component Patterns
- [WARN] src/components/UserProfile.tsx — 245 lines, consider splitting
### Summary: 2 FAIL, 3 WARN