codeprobe-framework
Original:🇺🇸 English
Not Translated
Detects framework-specific anti-patterns, convention violations, and idiom misuse across PHP/Laravel, React/Next.js, and Python/Django/FastAPI codebases. Loads framework-specific reference guides and checks against framework conventions. Generates severity-scored findings with copy-pasteable fix prompts. Trigger phrases: "framework review", "framework check", "laravel best practices", "react best practices", "framework audit", "framework-specific review".
3installs
Sourcenishilbhave/codeprobe
Added on
NPX Install
npx skill4agent add nishilbhave/codeprobe codeprobe-frameworkSKILL.md Content
Standalone Mode
If invoked directly (not via the orchestrator), you must first:
- Read for the output contract, execution modes, and constraints.
../codeprobe/shared-preamble.md - Load applicable reference files from based on the project's tech stack.
../codeprobe/references/ - Default to mode unless the user specifies otherwise.
full
Framework-Specific Best Practices
Domain Scope
This sub-skill detects framework-specific anti-patterns and convention violations. Unlike other sub-skills that apply universal principles, this one loads framework-specific reference guides and checks against framework idioms.
Supported frameworks:
- PHP / Laravel — Eloquent ORM, routing, validation, queues, events, configuration
- React / Next.js — Component design, hooks, data fetching, type safety
- Python / Django / FastAPI — PEP conventions, ORM patterns, async handling
Important: If no supported framework is detected at the target path, emit zero findings and return an empty summary with a note: "No supported framework detected — skipping framework-specific checks."
Version Awareness: When checking framework conventions, attempt to determine the framework version:
- Laravel: check for
composer.jsonversion. Laravel 9+ uses attribute-based accessors instead oflaravel/framework.getXAttribute() - Next.js: check and
next.config.*for Next.js version. 13+ uses App Router withpackage.jsondirectory.app/ - Django: check or
requirements.txtfor Django version.setup.py
What It Does NOT Flag
- Issues already covered by other sub-skills even if they appear in framework code. Specifically:
- Security issues in framework code → covered by (SEC)
codeprobe-security - SOLID violations in framework classes → covered by (SRP/OCP/etc.)
codeprobe-solid - Performance issues like N+1 queries → covered by (PERF)
codeprobe-performance - Error handling in framework middleware → covered by (ERR)
codeprobe-error-handling
- Security issues in framework code → covered by
- This sub-skill focuses exclusively on framework idiom violations — using the framework incorrectly or ignoring its conventions.
- When this sub-skill and another sub-skill flag the same file:line range, the orchestrator's deduplication step (Section 7A) will keep the finding in whichever category is most relevant and mark the framework finding as a duplicate.
- Framework-generated boilerplate files (migration stubs, config defaults, scaffolded controllers).
- Intentional deviations from framework conventions with clear comments explaining the reason.
- Test files — test-specific framework usage has different conventions.
Detection Instructions
PHP / Laravel
| ID Prefix | Area | What to Detect | How to Detect | Severity |
|---|---|---|---|---|
| Eloquent | Raw queries where Eloquent query builder works | Search for | Minor |
| Eloquent | Missing | Model attributes that should be cast (dates, booleans, arrays, JSON) accessed without | Minor |
| Eloquent | Repeated WHERE conditions without scopes | Same | Minor |
| Routing | Logic in route closures instead of controllers | Route definitions in | Minor |
| Routing | Missing route model binding | Routes that accept an ID parameter and manually call | Minor |
| Validation | Validation in controller instead of Form Request | Controller methods with inline validation rules ( | Minor |
| Queues | Long-running tasks in request cycle | Operations likely to take > 5 seconds (sending emails, generating PDFs, calling external APIs, processing uploads) executed synchronously in a controller/request handler. Should be dispatched to a queue. | Major |
| Queues | Queue jobs without retry configuration | Job classes missing | Minor |
| Events | Tight coupling where events would decouple | After a state change (create, update, delete), a method directly calls 3+ other services. Should dispatch an event and let listeners handle side effects. | Minor |
| Config | | Using | Major |
React / Next.js
| ID Prefix | Area | What to Detect | How to Detect | Severity |
|---|---|---|---|---|
| Components | Components exceeding 200 LOC | Single component files with more than 200 lines of code. Should be decomposed into smaller, focused components. | Minor |
| Components | Prop drilling more than 3 levels deep | Props passed through 3+ intermediate components that don't use them. Should use Context, state management, or composition. Trace prop names through component hierarchy. | Minor |
| Hooks | | | Major |
| Hooks | State updates inside render | Calling | Major |
| Hooks | Custom hooks exceeding 50 LOC | Custom hooks that do too much. Should be composed from smaller hooks. | Minor |
| Data Fetching | Client-side fetch where SSR/SSG is appropriate | | Minor |
| Data Fetching | Missing error and loading states | Data fetching without corresponding loading indicator and error handling in the UI. | Minor |
| Type Safety | | Explicit | Minor |
| Type Safety | Missing return types on exported functions | Exported functions without explicit return type annotations. Rely on inference for internal, but exported API surfaces should be explicitly typed. | Minor |
Python / Django / FastAPI
| ID Prefix | Area | What to Detect | How to Detect | Severity |
|---|---|---|---|---|
| Django | | Single view module with too many views. Should be split into separate view modules or use ViewSets. | Minor |
| Django | Missing model | Django models without | Minor |
| Django | N+1 in templates | Template tags accessing related objects without | Major |
| FastAPI | Sync database calls in async views | Using synchronous ORM calls (Django ORM, SQLAlchemy sync) inside | Major |
| Python | Non-PEP 8 naming | | Minor |
ID Prefix & Fix Prompt Examples
All findings use the prefix, numbered sequentially: , , etc.
FWK-FWK-001FWK-002Fix Prompt Examples
- "Move the validation rules from (lines 15-30) into a new
OrderController@storeform request class: runStoreOrderRequest, move the validation array, and type-hintphp artisan make:request StoreOrderRequestin the controller method signature."StoreOrderRequest - "Replace the call at line 12 of
env('MAIL_HOST')withapp/Services/MailService.php. Theconfig('mail.mailers.smtp.host')function returnsenv()when the config is cached. Move the env lookup tonullwhere it belongs."config/mail.php - "The component at
ProductList(220 LOC) should be decomposed: extractsrc/components/ProductList.tsx(lines 50-90),ProductCard(lines 100-140), andProductFilters(lines 160-200) into separate components in the same directory."ProductPagination - "Add missing dependency to the
userIddependency array atuseEffect. The current empty arraysrc/hooks/useProfile.ts:15means the effect runs once with the initial[]and never refetches when it changes."userId