Skill: onboard-codebase
Purpose
Analyze unmapped codebase, extract technical/business context, populate Wiki per project standards.
When to use
- Installing agentic setup into legacy/existing project.
- Wiki outdated or has context gap from recent code changes.
Steps
- Infrastructure Audit:
- Map directory structure.
- Identify tech stack, entry points, build/deploy scripts.
- Store in
llmwiki/wiki/entities/project-structure.md.
- Deep Code Analysis:
- Scan for core domain logic (Services, Models, Controllers).
- Identify patterns (Repository, Event-driven, etc.).
- Extract Concepts for
llmwiki/wiki/concepts/.
- Frontend & Style Audit (skip if no frontend):
- Identify UI framework (Next.js, React, Vue, etc.) and CSS approach (Tailwind, CSS Modules, styled-components, SCSS).
- Extract design tokens: color palette, typography scale, spacing, breakpoints — from
tailwind.config.*, CSS variables, or theme files.
- Identify component library (shadcn/ui, MUI, Ant Design, Radix, Headless UI, etc.) and local wrappers.
- Trace global styles:
globals.css, base layout files, font loading strategy.
- Document component naming conventions (PascalCase, feature-folder, colocated stories, etc.).
- Note UI state management (Zustand, Jotai, Context, Redux, etc.) and data-fetching pattern (React Query, SWR, server actions, etc.).
- Capture routing conventions (file-based, nested layouts, auth guards).
- Store in
llmwiki/wiki/concepts/fe-style.md.
- Business Logic Extraction:
- Reverse-engineer user stories and business rules from code.
- Generate/Update
AGENT-business.md.
- Entity Cataloging:
- List internal services, external APIs, database tables.
- Create entries in
llmwiki/wiki/entities/.
- Knowledge Injection:
- Synthesize into Wiki structure.
- Update
llmwiki/wiki/index.md and llmwiki/wiki/log.md.
- Final Verification:
- Run
lint on generated wiki — check for contradictions.
Rules
- ALWAYS read implementation to verify business claims.
- Cross-reference
README.md/comments but prioritize truth in code.
- Focus on "Why" and "How" at code level, not just "What".
- NEVER overwrite existing manual wiki entries without checking
## Origin section.
- OKF v0.1 (R9): mọi trang wiki bắt đầu bằng YAML frontmatter (
---) có type không rỗng (concept/entity/source) — copy _template.md tương ứng. Giữ ## Origin (R2).
- For
fe-style.md: record actual values (hex codes, px/rem sizes, class names), not descriptions — goal is reproducible visual style without guessing.
Output Report
After all main skill tasks complete, write a propose draft to the wiki.
Steps
1. Build the filename:
- Format:
DDMMYY-<ten>.md
DDMMYY = today (e.g., 020626 for 2 June 2026)
<ten> = 2–4 kebab-case words summarising what was done (e.g., landing-page-coteccons, brand-kit-fintech, ingest-auth-spec)
2. Write llmwiki/wiki/sources/draft/DDMMYY-<ten>.md:
# DDMMYY-<ten>
**Type:** draft
**Status:** proposed
**Tags:** <skill-name>, output-report
**Proposed:** YYYY-MM-DD
## What
<One sentence — what this skill invocation produced or decided>
## Output
<Key artefacts, files created/modified, or decisions made>
## Files
| File | Action |
|------|--------|
| `path/to/file` | created / modified |
## Notes
- Invoked via: `/<skill-name>` skill
## Origin
- **Draft:** `wiki/sources/draft/DDMMYY-<ten>.md`
- **Commit:** _(filled by verify-before-commit)_
- **Date promoted:** _(filled by verify-before-commit)_
3. Update wiki index & log:
llmwiki/wiki/index.md — append one row: | [DDMMYY-<ten>](sources/draft/DDMMYY-<ten>.md) | draft | YYYY-MM-DD |
llmwiki/wiki/log.md — append: ## YYYY-MM-DD — <skill-name> — <ten>
Skip only when the skill produces zero artefacts and zero decisions (e.g., a pure display mode like /caveman-stats).
1---2name: onboard-codebase3description: Deep codebase analysis — populate wiki with architecture, concepts, entities4---56# Skill: onboard-codebase78## Purpose9Analyze unmapped codebase, extract technical/business context, populate Wiki per project standards.1011## When to use12- Installing agentic setup into legacy/existing project.13- Wiki outdated or has context gap from recent code changes.1415## Steps161. **Infrastructure Audit**:17 - Map directory structure.18 - Identify tech stack, entry points, build/deploy scripts.19 - Store in `llmwiki/wiki/entities/project-structure.md`.202. **Deep Code Analysis**:21 - Scan for core domain logic (Services, Models, Controllers).22 - Identify patterns (Repository, Event-driven, etc.).23 - Extract Concepts for `llmwiki/wiki/concepts/`.243. **Frontend & Style Audit** *(skip if no frontend)*:25 - Identify UI framework (Next.js, React, Vue, etc.) and CSS approach (Tailwind, CSS Modules, styled-components, SCSS).26 - Extract design tokens: color palette, typography scale, spacing, breakpoints — from `tailwind.config.*`, CSS variables, or theme files.27 - Identify component library (shadcn/ui, MUI, Ant Design, Radix, Headless UI, etc.) and local wrappers.28 - Trace global styles: `globals.css`, base layout files, font loading strategy.29 - Document component naming conventions (PascalCase, feature-folder, colocated stories, etc.).30 - Note UI state management (Zustand, Jotai, Context, Redux, etc.) and data-fetching pattern (React Query, SWR, server actions, etc.).31 - Capture routing conventions (file-based, nested layouts, auth guards).32 - Store in `llmwiki/wiki/concepts/fe-style.md`.334. **Business Logic Extraction**:34 - Reverse-engineer user stories and business rules from code.35 - Generate/Update `AGENT-business.md`.365. **Entity Cataloging**:37 - List internal services, external APIs, database tables.38 - Create entries in `llmwiki/wiki/entities/`.396. **Knowledge Injection**:40 - Synthesize into Wiki structure.41 - Update `llmwiki/wiki/index.md` and `llmwiki/wiki/log.md`.427. **Final Verification**:43 - Run `lint` on generated wiki — check for contradictions.4445## Rules46- ALWAYS read implementation to verify business claims.47- Cross-reference `README.md`/comments but prioritize truth in code.48- Focus on "Why" and "How" at code level, not just "What".49- NEVER overwrite existing manual wiki entries without checking `## Origin` section.50- **OKF v0.1 (R9):** mọi trang wiki bắt đầu bằng YAML frontmatter (`---`) có `type` không rỗng (`concept`/`entity`/`source`) — copy `_template.md` tương ứng. Giữ `## Origin` (R2).51- For `fe-style.md`: record actual values (hex codes, px/rem sizes, class names), not descriptions — goal is reproducible visual style without guessing.5253---5455## Output Report5657After all main skill tasks complete, write a propose draft to the wiki.5859### Steps6061**1. Build the filename:**62- Format: `DDMMYY-<ten>.md`63- `DDMMYY` = today (e.g., `020626` for 2 June 2026)64- `<ten>` = 2–4 kebab-case words summarising what was done (e.g., `landing-page-coteccons`, `brand-kit-fintech`, `ingest-auth-spec`)6566**2. Write** `llmwiki/wiki/sources/draft/DDMMYY-<ten>.md`:6768```69# DDMMYY-<ten>70**Type:** draft71**Status:** proposed72**Tags:** <skill-name>, output-report73**Proposed:** YYYY-MM-DD7475## What76<One sentence — what this skill invocation produced or decided>7778## Output79<Key artefacts, files created/modified, or decisions made>8081## Files82| File | Action |83|------|--------|84| `path/to/file` | created / modified |8586## Notes87- Invoked via: `/<skill-name>` skill8889## Origin90- **Draft:** `wiki/sources/draft/DDMMYY-<ten>.md`91- **Commit:** _(filled by verify-before-commit)_92- **Date promoted:** _(filled by verify-before-commit)_93```9495**3. Update wiki index & log:**96- `llmwiki/wiki/index.md` — append one row: `| [DDMMYY-<ten>](sources/draft/DDMMYY-<ten>.md) | draft | YYYY-MM-DD |`97- `llmwiki/wiki/log.md` — append: `## YYYY-MM-DD — <skill-name> — <ten>`9899> Skip only when the skill produces zero artefacts and zero decisions (e.g., a pure display mode like `/caveman-stats`).