Loading...
Loading...
Analyzes code architecture and structure — layer violations, circular dependencies, god objects, anemic domain models, missing boundaries, directory structure issues, and configuration problems. Generates severity-scored findings with fix prompts. Trigger phrases: "architecture review", "structure check", "layer analysis", "god class".
npx skill4agent add nishilbhave/codeprobe-claude codeprobe-architecture../codeprobe/shared-preamble.md../codeprobe/references/fulldist/build/.next/__pycache__/| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Controllers containing business logic | Scan files in controller directories ( | Major |
| Models/entities containing presentation logic | Scan model/entity files. Flag models that contain: HTML generation, string formatting for display (e.g., | Major |
| Views/components calling database directly | Scan view files ( | Critical |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Module A imports B, B imports A (direct or transitive) | Trace import/require/use statements across files. Build a dependency graph for modules/directories. Look for: (1) direct cycles — file A imports file B, file B imports file A, (2) transitive cycles — A imports B, B imports C, C imports A. Focus on module-level (directory-level) cycles which are more architecturally significant than file-level cycles within the same module. Report the specific import chain. | Major |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| File exceeds 500 LOC | Count total lines in each source file (excluding blank lines and comments). Flag files exceeding 500 LOC. For files exceeding 1000 LOC, escalate to critical. | Major |
| Class with 20+ methods | Count public, protected, and private methods in each class. Flag classes with 20+ methods. List the method groups to suggest how the class could be split. | Major |
| Single file handling request-to-response lifecycle | Look for files that handle the full request lifecycle: receiving/parsing the request, validating input, executing business logic, performing persistence, formatting the response, and logging — all in one file or class. Flag when 4+ of these concerns are in a single file. | Major |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Entity/model classes with only getters/setters, zero behavior | Scan model/entity classes. If a class has only property declarations, getters, setters, and constructor assignment — with no business logic methods (no validation, no calculations, no state transitions, no domain rules) — it is an anemic entity. | Minor |
| All logic in "Service" classes operating on dumb data bags | Check if the codebase has a pattern where entity classes are pure data containers and all behavior (validation, calculation, state transitions) lives in separate | Minor |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| No clear module/domain separation in medium+ projects | For projects with 20+ source files, check whether the code is organized into modules, domains, or bounded contexts. If all source files live in a single flat directory or are only separated by technical layer (controllers/, models/, services/) with no domain grouping, flag it. | Major |
| Shared database tables accessed directly across unrelated features | Search for the same database table name, model, or entity being imported/queried from multiple unrelated modules or feature directories. If | Major |
| Cross-feature direct imports instead of events/interfaces | Check whether feature modules import directly from other feature modules' internal files. For example, | Minor |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Framework conventions violated | Check whether the project follows its framework's expected directory structure. Examples: business logic classes in a | Minor |
| No separation between layers for 20+ files | For projects with 20+ source files, check whether there is any directory-based separation between layers (controllers, services, models, views) or domains. If everything lives in one flat directory, flag it. | Major |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Hardcoded environment-specific values in source code | Search for hardcoded URLs ( | Major |
| Missing environment abstraction | Check whether the project has an environment abstraction layer ( | Minor |
file_stats.pyreviewscripts/python3 scripts/file_stats.py <target_path>codeprobe/scripts/file_stats.pyARCH-ARCH-001ARCH-002OrderController@storePricingServiceapp/Services/PricingService$this->pricingService->calculate($order)UserManagerUserAuthServiceUserProfileServiceUserNotificationServiceUserManagerbilling/InvoiceServiceshipping/ShippingCalculatorShippingCostProvidershared/contracts/ShippingCalculatorShippingCostProviderInvoiceServicehttp://localhost:3000/apisrc/services/ApiClient.tsprocess.env.API_BASE_URLAPI_BASE_URL=http://localhost:3000/api.env.exampleUserControllerUserServiceUserRepositoryUserPolicyapp/Domains/User/OrderPaymentNotification