From coding-standards
Audit and reorganize any project folder into domain-driven structure. Detects framework/language, applies best practices, proposes groupings, and executes moves with import updates.
How this skill is triggered — by the user, by Claude, or both
Slash command
/coding-standards:organizeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Audit any folder's file organization, detect its framework/language, apply best practices, and propose + execute domain-driven restructuring.
Audit any folder's file organization, detect its framework/language, apply best practices, and propose + execute domain-driven restructuring.
Analyze the target folder to determine:
Framework/runtime — detect from config files, imports, file patterns:
| Signal | Framework |
|---|---|
convex/ with query(), mutation(), action() | Convex backend |
src/app/ with page.tsx, layout.tsx | Next.js App Router |
src/components/ with .tsx files | React component library |
src/routes/ or +page.svelte | SvelteKit |
*.py with models.py, views.py | Django |
*.py with routers/, schemas/ | FastAPI |
*.go with cmd/, internal/ | Go project |
*.rs with Cargo.toml | Rust project |
src/ with index.ts and *.service.ts | NestJS |
Generic .ts/.js files | Node.js/TypeScript |
Current organization style — flat, prefix-based, partially nested, fully domain-driven
File count and complexity — small (<15 files, probably fine), medium (15-40, could benefit), large (40+, definitely needs structure)
Use context7 MCP or built-in knowledge to check:
Framework-specific patterns:
convex/
├── admin/ # Admin-only queries, mutations, actions
│ ├── users.ts
│ ├── workshops.ts
│ └── analytics.ts
├── auth/ # Authentication, access control
│ ├── access.ts
│ └── users.ts
├── billing/ # Stripe, products, purchases
│ ├── stripe.ts
│ └── products.ts
├── course/ # Courses, modules, lessons, progress
│ ├── courses.ts
│ ├── modules.ts
│ └── lessonProgress.ts
├── email/ # All email-related logic
│ ├── brevo.ts
│ ├── lifecycle.ts
│ └── templates.ts
├── workshop/ # Workshop domain
│ ├── workshops.ts
│ ├── participants.ts
│ └── insights.ts
├── webhooks/ # All webhook handlers
│ ├── clerk.ts
│ ├── stripe.ts
│ └── luma.ts
├── lib/ # Shared utilities
├── _generated/ # Auto-generated (never touch)
├── schema.ts # Root schema
├── http.ts # HTTP routes
└── crons.ts # Cron jobs
IMPORTANT: Moving convex/adminUsers.ts → convex/admin/users.ts changes the API from api.adminUsers.fn to api.admin.users.fn. ALL frontend imports must be updated.
src/components/
├── auth/ # Login, signup, guards
├── course/ # Course cards, lesson views
├── dashboard/ # Dashboard widgets
├── marketing/ # Landing page sections
├── settings/ # User settings
└── shared/ # Truly cross-cutting (modals, etc.)
src/
├── modules/
│ ├── users/ # User domain
│ │ ├── users.service.ts
│ │ ├── users.controller.ts
│ │ ├── users.types.ts
│ │ └── users.constants.ts
│ ├── billing/
│ └── auth/
├── lib/ # Shared utilities
└── types/ # Shared types
admin*.ts → admin domainworkshop*.ts → workshop domainemail*.ts → email domain*.helpers.ts, *.constants.ts, *.types.ts → support files follow their parentGenerate a clear table showing the proposed reorganization:
## Proposed Domain Mapping
| Current File | → New Location | Domain |
|---|---|---|
| adminUsers.ts | admin/users.ts | admin |
| adminWorkshops.ts | admin/workshops.ts | admin |
| workshopEmails.ts | workshop/emails.ts | workshop |
| ... | ... | ... |
### Breaking Changes
- `api.adminUsers.listAll` → `api.admin.users.listAll`
- `api.workshopEmails.send` → `api.workshop.emails.send`
### Files That Stay
- schema.ts (root config)
- http.ts (root config)
- crons.ts (root config)
STOP HERE — wait for user approval before executing moves.
Only after user approves:
git mv (preserves history)api.oldPath.fn → api.new.path.fn in all frontend filespnpm typecheck to verify nothing brokeThese files must stay at the folder root regardless of framework:
schema.ts / schema.prisma / models.pyhttp.ts / routes.ts / urls.pycrons.ts / celery.pyauth.config.ts / settings.pyconvex.config.ts / next.config.ts_generated/ / __pycache__/seed.ts + seed.*.ts (seeding stays together at root)| Framework | File naming | Folder naming |
|---|---|---|
| Convex | camelCase.ts (required by runtime) | camelCase/ |
| Next.js src/ | kebab-case.tsx | kebab-case/ |
| React components | kebab-case.tsx | kebab-case/ |
| Python | snake_case.py | snake_case/ |
| Go | snake_case.go | lowercase/ |
| Rust | snake_case.rs | snake_case/ |
Support files follow their parent domain:
workshops.ts → workshop/workshops.tsworkshopInsights.helpers.ts → workshop/insights.helpers.tsworkshopInsights.types.ts → workshop/insights.types.tsworkshopInsights.constants.ts → workshop/insights.constants.tsWhen a domain has many support files, the prefix becomes redundant inside the folder:
workshopFeedbackEmails.ts → workshop/feedbackEmails.ts (drop workshop prefix)workshopFeedbackEmails.constants.ts → workshop/feedbackEmails.constants.ts/organize convex/ — audit and reorganize the convex folder/organize src/components/ — audit and reorganize components/organize --dry-run — show proposed changes without executing/organize --execute — skip approval step (use with caution)npx claudepluginhub likeahuman-ai/likeahuman --plugin coding-standardsGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.