/bellosoft-default-skills:bellosoft-audit-codebasefrom bellosoft-default-skills
Use this skill to analyse an existing codebase before planning. Triggers: /bellosoft-audit-codebase, "read the project", "understand what's built", "what already exists", "analyse the code", "what's implemented", "map the codebase". Produces a structured inventory of what is already built, what is partial, what is missing, and what technical patterns are in use. Saves the result to docs/planning-artifacts/codebase-audit.md so bellosoft-plan-epics and bellosoft-plan-epic can use it. Run this before /bellosoft-plan-epics on any existing project. Safe to re-run — detects changes since last audit.
Ships in bellosoft-default-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Deeply read an existing project and produce a structured inventory that answers:
This output becomes the foundation for /bellosoft-plan-epics and /bellosoft-plan-epic — without it,
epics and stories are planned in a vacuum and end up duplicating existing work or
ignoring established patterns.
/bellosoft-audit-codebase ← audits the current project root
/bellosoft-audit-codebase src/ ← audits a specific subdirectory
Start by understanding the repo structure at a high level:
# Get directory tree (2-3 levels, ignore noise)
find . -type f \
-not -path '*/.git/*' \
-not -path '*/node_modules/*' \
-not -path '*/bin/*' \
-not -path '*/obj/*' \
-not -path '*/.next/*' \
-not -path '*/dist/*' \
| sort | head -200
Also read:
README.md (if exists)*.sln, *.csproj, package.json, pyproject.toml — whatever defines the projectdocker-compose*.yml — services and infradocs/planning-artifacts/ state files from prior runsRead config/bootstrap files to determine:
| Concern | Where to look |
|---|---|
| Language / runtime | *.csproj, package.json, go.mod, pyproject.toml |
| Framework | Program.cs, Startup.cs, main.ts, app.vue, nuxt.config.* |
| Database | appsettings*.json, docker-compose.yml, migration folders |
| Auth | Program.cs DI registrations, auth/, middleware/ |
| API style | Controllers folder, minimal API endpoints, GraphQL schema |
| Frontend | src/views/, src/components/, src/pages/, router file |
| Testing | *.Tests.csproj, *.spec.ts, cypress/, playwright/ |
| CI/CD | .github/workflows/, Dockerfile, dokploy.yml |
| External integrations | appsettings.json, env vars, HttpClient registrations |
Read enough of the code to identify the logical modules/domains:
For .NET projects:
src/*Service.cs, *Controller.cs, *Repository.cs — read full method bodies, not just signatures. A method that exists but returns Ok() with no logic, or throws NotImplementedException, is NOT implemented.DbContext — all DbSet<> declarations reveal the data model*.cs files in Domain/, Entities/, Models/*.Tests/) for test files corresponding to each service/controllerFor Vue/TS projects:
src/router/index.ts — all routes reveal all pagessrc/stores/ — read full store bodies, not just the store name. A store with empty actions or // TODO comments is 🔶 Partial or 🔲 Stub, not ✅ Complete.src/api/ or src/services/ — all API calls reveal backend surface usedsrc/views/ and key components — not just names, but enough to see if there's real logic or just placeholder templatessrc/**/__tests__/, *.spec.ts, *.test.ts for test coverage per moduleFor databases:
Up() method) — reveals full schema historyDbContext OnModelCreating — reveals current schemaFor each module/area discovered, classify:
| Status | Meaning |
|---|---|
| ✅ Complete | Core functionality implemented AND readable in code AND has corresponding tests |
| 🔶 Partial | Started and partially working, but missing key functionality or tests |
| 🔲 Stub | File/class/route exists but body is empty, returns placeholder, or has no logic |
| ❌ Missing | Referenced in config/types/routes/schema but file doesn't exist at all |
| ⚠️ Tech debt | Functional but with known issues: hardcoded values, missing validation, no tests, inconsistent patterns |
When in doubt, use 🔶 Partial. Do not upgrade to ✅ Complete unless you have read the implementation and confirmed it works end-to-end. It is much safer to underestimate completeness than to plan around code that doesn't actually work.
Signals that PREVENT ✅ Complete — if any of these are true, cap at 🔶 Partial or 🔲 Stub:
// TODO, // FIXME, // HACK in the implementationthrow new NotImplementedException() anywhere in the classreturn Ok() / return NoContent() with no actual logic<template><div/></template>DbSet<> in context but no service or repository reads/writes itEvidence requirement: Each ✅ Complete or 🔶 Partial classification must cite the specific file (and function if relevant) that justifies the status. Do not classify based on folder name or file name alone — read the code.
Document the patterns new code MUST follow:
### Established Conventions
**API layer:**
- Route pattern: `/api/v1/{resource}`
- Auth: JWT via `[Authorize]` attribute, role claims in `ClaimTypes.Role`
- Response wrapper: `ApiResponse<T>` with `Success`, `Data`, `Errors`
- Validation: FluentValidation, registered in DI, called via pipeline
**Data layer:**
- ORM: EF Core with repository pattern (`IRepository<T>`)
- Migrations: `dotnet ef migrations add` in `Infrastructure` project
- Soft deletes: `IsDeleted` flag on all entities, global query filter applied
- Audit: `CreatedAt`, `UpdatedAt`, `CreatedBy` on all entities
**Frontend layer:**
- State: Pinia stores, one per domain
- API calls: `useApi()` composable, not raw fetch
- Forms: `vee-validate` + `zod` schemas
- Components: PascalCase, one file per component, no inline styles
**Testing:**
- Unit: xUnit, Moq for mocking, FluentAssertions
- Integration: `WebApplicationFactory<Program>`, test DB via `Respawn`
- Coverage threshold: 80% on service layer
**Error handling:**
- Global exception middleware returns RFC 7807 ProblemDetails
- Business errors: `DomainException` with error code
If a pattern is inconsistent across the codebase — note it:
⚠️ INCONSISTENCY: Some controllers use repository pattern, others query DbContext directly.
New code should use repository pattern.
Output the full report and save to docs/planning-artifacts/codebase-audit.md:
# Codebase Audit — [Project Name]
**Audited:** [today's date]
**Root:** [path audited]
**Stack:** [e.g. .NET 10 / Vue 3 / PostgreSQL / Docker]
---
## Stack Summary
| Concern | Technology |
|---------|-----------|
| Backend | .NET 10, ASP.NET Core minimal API |
| Frontend | Vue 3, TypeScript, Pinia, Vite |
| Database | PostgreSQL 16, EF Core 9, pgvector |
| Auth | JWT, ASP.NET Core Identity |
| Testing | xUnit, Vitest, Playwright |
| Infra | Docker, Dokploy, Nginx |
| External | Evolution API (WhatsApp), Stripe, Mercado Pago |
---
## Module Inventory
| Module | Status | Notes |
|--------|--------|-------|
| Auth / Identity | ✅ Complete | JWT + refresh tokens, roles implemented |
| Contacts | ✅ Complete | CRUD, soft delete, audit fields |
| Messaging / WhatsApp | 🔶 Partial | Send works; receive webhook handler stubbed |
| Campaigns | 🔶 Partial | Create/list done; scheduling not wired to Hangfire |
| Billing / Stripe | 🔲 Stub | `StripeService.cs` exists, all methods throw NotImplementedException |
| Opt-out flow | ❌ Missing | Referenced in `ContactDto` but no handler, no DB column |
| Admin dashboard | 🔶 Partial | Stats page exists; charts hardcoded with mock data |
| User management | ✅ Complete | Invite, roles, deactivate all working |
| API rate limiting | ⚠️ Tech debt | Implemented but limit is hardcoded, not configurable per tenant |
---
## Data Model (current schema)
Key entities and their relationships:
- `Tenants` → `Users` (1:N)
- `Tenants` → `Contacts` (1:N, soft delete)
- `Contacts` → `Messages` (1:N)
- `Campaigns` → `CampaignContacts` (N:M via join table)
- `Subscriptions` → `Tenants` (1:1, nullable — billing not complete)
Missing tables (referenced in code but no migration):
- `OptOutLogs` — referenced in `ContactDto.OptedOutAt` but no table
- `WebhookEvents` — `IWebhookEventStore` interface exists but no implementation
---
## TODOs and Stubs Found
| File | Line | Content |
|------|------|---------|
| `StripeService.cs` | 23, 45, 67 | `throw new NotImplementedException()` |
| `CampaignScheduler.cs` | 89 | `// TODO: wire to Hangfire` |
| `src/views/Analytics.vue` | 15 | `// FIXME: replace mock data` |
| `WebhookController.cs` | 112 | Empty `Ok()` return — no logic |
---
## Established Conventions
[Filled from Step 5]
---
## Tech Debt Register
| Item | Severity | Impact on planning |
|------|----------|--------------------|
| Hardcoded rate limits | Medium | Any multi-tenant work needs this fixed first |
| Missing tests on service layer | High | New features must add tests; refactor sprint needed |
| DbContext queried directly in 3 controllers | Low | Follow repository pattern for new code |
---
## Recommendations for Planning
Based on this audit, before adding new features:
1. **Must fix first:** [any blocking tech debt]
2. **Complete before extending:** [partial modules that block new work]
3. **Safe to build on:** [stable modules new epics can depend on]
4. **Watch out for:** [gotchas, inconsistencies, known issues]
If docs/planning-artifacts/epics.md already exists, cross-reference:
Output a reconciliation note if docs/planning-artifacts/ state exists:
## Reconciliation with existing plan
| Epic | Planned status | Actual status (from audit) |
|------|---------------|---------------------------|
| E1: Auth | ✅ Done (per plan) | ✅ Confirmed complete |
| E2: Campaigns | 🔲 Not started (per plan) | 🔶 Actually ~40% done |
| E3: Billing | 🔲 Not started (per plan) | 🔲 Stub only — confirms plan |
Save the report to docs/planning-artifacts/codebase-audit.md.
Output:
✅ Audit complete. Saved to docs/planning-artifacts/codebase-audit.md
Summary:
✅ Complete modules: N
🔶 Partial modules: N
❌ Missing (referenced but absent): N
⚠️ Tech debt items: N
Next steps:
/bellosoft-plan-epics [prd.md] ← will use this audit automatically
/bellosoft-plan-epic E1 ← will use this audit for conventions + status
docs/planning-artifacts/codebase-audit.md before finishingWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bellosoft-limited/bellosoft-default-skills --plugin bellosoft-default-skills29 skills in this plugin
/ckm:banner-designDesign banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills./bellosoft-dev-executeExecutes a plan approved and saved by /bellosoft-dev-plan (docs/planning-artifacts/dev-plans/*.md). Use this skill when the user types /bellosoft-dev-execute [plan path], ideally in a new context window. Follows strict TDD: writes ALL test cases first, confirms they fail, then implements the code to make them pass, one step at a time. Never skip the red-phase. Do NOT invoke on general coding tasks or without an approved plan.
/bellosoft-dev-planInvoked when the developer wants AI help planning a story before coding. Use this skill when the user types /bellosoft-dev-plan, mentions a Jira ticket ID (PROJ-123), a story file path (.md), or says "start story", "plan this story", "help me implement STORY-123". Accepts a local .md file, a Jira ticket ID or URL, or pasted story content. Produces a short implementation plan with TDD approach — tests listed BEFORE implementation steps. Waits for explicit approval before any code is written. THIS SKILL IS OPTIONAL — devs can work directly from Jira without it. Do NOT auto-invoke on general coding tasks.
/bellosoft-dev-reviewInvoked after /bellosoft-dev-execute completes, or when the developer wants to validate their implementation against a story. Use when the user types /bellosoft-dev-review, says "review this", "check the story", "is this done?", or "validate AC". Reads the original story (local .md or Jira ticket), maps each acceptance criterion to the actual code and tests, and produces a pass/fail verdict per criterion. Highlights gaps, missing edge cases, and anything that would block the story from being marked Done. Does NOT rewrite code — only audits and reports. THIS SKILL IS OPTIONAL — devs can self-review directly in Jira.
/bellosoft-documentUse whenever the user wants a client-facing Bellosoft document — a proposal, quote, statement of work, report, memo, letter, brief, contract summary or any deliverable that goes out under the Bellosoft name, in English or Portuguese, as HTML, PDF or Word. Also use when the user mentions the Bellosoft template, Bellosoft branding, or asks to "put this on Bellosoft letterhead"./bellosoft-doraCompute DORA metrics (Deployment Frequency, Lead Time, Change Failure Rate, MTTR) from Jira + GitHub + Dokploy for any Bellosoft project. Triggers: "dora metrics", "show dora", "/bellosoft-dora AP --days 30".