Help us improve
Share bugs, ideas, or general feedback.
From fullstack-agents
Dynamically detect project patterns and coding style before code generation. MANDATORY before first generation in any session.
npx claudepluginhub adelabdelgawad/fullstack-agents --plugin fullstack-agentsHow this skill is triggered — by the user, by Claude, or both
Slash command
/fullstack-agents:codebase-scanningThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detect project structure, conventions, and coding patterns to ensure generated code matches the existing codebase exactly.
Analyzes any codebase to extract conventions, patterns, and style via specialized agents for structure, naming, testing, frontend. Generates .claude/codebase-style.md for unfamiliar projects.
Scans project's tech stack, directory structure, and code conventions to generate before-modify (pre-change checklist) and project-structure (index) skills for consistent style and avoiding duplicates.
Analyzes existing codebases to detect project types, frameworks, structures, and collision risks. Supports context, brownfield, and setup modes for feature planning.
Share bugs, ideas, or general feedback.
Detect project structure, conventions, and coding patterns to ensure generated code matches the existing codebase exactly.
MANDATORY before the first code generation in any session. Run this scan BEFORE any generate agent produces code.
If you have already scanned this session and the results are still in context, skip re-scanning and use the cached profile.
Quickly identify the project layout:
CHECK: src/backend/ exists?
YES → Nested layout (src/backend/api/, src/backend/db/, etc.)
NO → Flat layout (api/, db/, etc.)
CHECK: src/frontend/ exists?
YES → Nested layout (src/frontend/app/, src/frontend/lib/, etc.)
NO → Check for app/ or pages/ directly
CHECK: Router registration
SCAN: How are routers included in the app?
- app_setup/routers_group/ pattern?
- Direct app.include_router() in main.py?
- APIRouter prefix pattern?
CHECK: Frontend directory layout
- app/(pages)/ grouping?
- Direct app/ pages?
- pages/ directory (Pages Router)?
Read 2-3 existing entities to extract actual patterns. Read ONE file from each category:
ONE router file (e.g., the first .py in api/routers/setting/):
SessionDep param? Depends(get_session)?)response_model= on decorator? Return type annotation?)skip/limit params? Page-based?)ONE model (from db/model.py or db/models/):
SQLModel? Base? Custom base?)Mapped[str]? Column(String)?)ONE schema (from api/schemas/):
CamelModel? BaseModel?)ONE service or CRUD file (from api/services/ or api/crud/):
ONE page.tsx (from app/(pages)/):
ONE table component (from _components/table/):
useState with initialData? useSWR?)updateItems? router.refresh()?)api.put? Server actions?)After extraction, build this profile and keep it in your working context:
┌─────────────────────────────────────────────────────────┐
│ CODEBASE STYLE PROFILE │
├──────────────────────┬──────────────────────────────────┤
│ Backend layout │ [src/backend/ | flat] │
│ Frontend layout │ [src/frontend/ | flat] │
│ Router registration │ [routers_group | main.py direct] │
│ Session pattern │ [SessionDep | Depends(get_session)] │
│ Schema base class │ [CamelModel | BaseModel] │
│ Data access pattern │ [Repository | CRUD helpers | Service+Repo] │
│ Who commits? │ [Service | Router | CRUD helper] │
│ Bilingual fields │ [yes: name_en/name_ar | no] │
│ Soft delete │ [is_active | hard delete] │
│ Audit fields │ [created_at/updated_at | none] │
│ Model inheritance │ [SQLModel | declarative Base] │
│ Type annotations │ [Mapped[T] | Column(T)] │
│ Frontend state │ [useState | useSWR | hybrid] │
│ Mutation approach │ [client api.put | server actions] │
│ Table update pattern │ [updateItems in-place | router.refresh] │
│ API route pattern │ [route factory | manual proxy] │
│ Import style │ [absolute | relative] │
│ Indentation │ [2 spaces | 4 spaces] │
└──────────────────────┴──────────────────────────────────┘
Codebase patterns ALWAYS override skill reference patterns.
If the actual project uses a different pattern than what's described in skill references:
The skill references are starting points. The real codebase is the source of truth.
After scanning, briefly report:
Then proceed with the generation task that triggered this scan.