{"data":{"slug":"discovered-a44510e2612cd055347b9e48ce2be0265c97c9ce0f93f649","title":"Koi Audit \u2014 Styleguide Coverage Check","summary":"Scan a folder, file, or repository to identify components used or implemented but missing from Koi\/styleguide. The audit ensures every component used in the app has a corresponding entry in Koi\/styleguide, and can generate stubs or update navigation based on the selected mode.","url":"https:\/\/skillshunter.net\/skills\/discovered-a44510e2612cd055347b9e48ce2be0265c97c9ce0f93f649","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-a44510e2612cd055347b9e48ce2be0265c97c9ce0f93f649","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-a44510e2612cd055347b9e48ce2be0265c97c9ce0f93f649.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-a44510e2612cd055347b9e48ce2be0265c97c9ce0f93f649\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running the audit, ensure the repository has a valid `\/koi\/styleguide` directory and that the target project is correctly configured with `tsconfig.json` or `jsconfig.json` for component aliases. The audit does not modify or rename existing components, only adds stubs or reports gaps.","instructions":"---\nname: koi-audit\ndescription: >\n  Scans a folder, file, or whole repository and reports every component that's\n  used or implemented but missing from \/koi\/styleguide. Catches app\n  components, shadcn\/ui primitives, wrapped components, and page-local\n  components, then either reports gaps, creates missing playground stubs, or\n  creates stubs and updates navigation. Use whenever the user asks to \"audit\n  styleguide\", \"check coverage\", \"find missing components\", \"what's not in\n  the styleguide\", \"components not registered\", \"compare repo to design\n  system\", \"styleguide gaps\", or wants to verify that every component used\n  in the app is documented in Koi\/styleguide.\n---\n\n# Koi \u2014 Styleguide Coverage Audit\n\nScan a target (folder, file, or whole repo) and report every component that's\nused or implemented but missing from Koi\/styleguide. Either report only,\nor create missing stubs, or create stubs and update navigation.\n\n> This is a **coverage check**, not a refactor. The audit never deletes or\n> renames components.\n\n## Input\n\n```txt\nTarget to scan: [FOLDER OR FILE PATH]\nTarget project: [PROJECT PATH OR CURRENT REPOSITORY]\nStyleguide path: [\/koi\/styleguide OR CUSTOM PATH]\nApp styleguide route: [\/app\/koi\/styleguide OR CUSTOM PATH]\nMode: [report only | create missing stubs | create missing stubs and update navigation]\n```\n\nOptional:\n\n```txt\nInclude playground as covered: [yes | no]   # default: yes\nIgnore paths: [node_modules, .next, dist, build, generated, etc.]\n```\n\n## Goal\n\nMake sure every component imported, implemented, or used in the target has a\ncorresponding entry in Koi\/styleguide. The audit catches:\n\n- app components\n- shadcn\/ui components\n- wrapped shadcn components\n- page-local reusable components\n- imports from `@\/components\/*`\n- imports from `@\/components\/ui\/*`\n- components found in scanned components folders\n\n## Non-negotiables\n\n- shadcn\/ui stays the primitive layer.\n- The canonical namespace is `Koi\/styleguide`.\n- Repository styleguide source defaults to `\/koi\/styleguide`.\n- Next.js route showcases default to `\/app\/koi\/styleguide`.\n- Do **not** use `\/app\/styleguide`.\n- The audit never deletes or renames components.\n\n## Workflow\n\n### 1. Inspect project paths\n\nResolve:\n\n- repository root\n- the scan target (the user-specified folder or file)\n- `\/koi\/styleguide\/components`\n- `\/koi\/styleguide\/playground\/components`\n- `\/app\/koi\/styleguide\/components`\n- navigation and registry files\n- aliases from `tsconfig.json`, `jsconfig.json`, and `components.json`\n\n### 2. Build a component inventory from the target\n\nScan the target for:\n\n- component files: `.tsx`, `.jsx`, `.ts`, `.js`\n- exported React components\n- default exports with PascalCase names\n- imports from `@\/components\/ui\/*`\n- imports from `@\/components\/*`\n- relative imports that resolve to component files\n\nIgnore (unless explicitly requested):\n\n- `node_modules`\n- `.next`\n- `dist`\n- `build`\n- `out`\n- coverage folders\n- test fixtures\n- generated files\n\nNormalize names:\n\n- `button.tsx` \u2192 `Button`\n- `data-table.tsx` \u2192 `DataTable`\n- `navigation-menu.tsx` \u2192 `NavigationMenu`\n\n### 3. Build the styleguide inventory\n\nScan:\n\n```txt\n\/koi\/styleguide\/components\n\/koi\/styleguide\/playground\/components\n\/app\/koi\/styleguide\/components\n```\n\nAlso inspect:\n\n```txt\n\/app\/koi\/styleguide\/navigation.ts\n\/koi\/styleguide\/registry\/components.json\n\/koi\/styleguide\/components\/index.ts\n```\n\nClassify each component:\n\n- **official** \u2014 present in `\/koi\/styleguide\/components`\n- **playground** \u2014 present in `\/koi\/styleguide\/playground\/components`\n- **route showcase only** \u2014 has a page in `\/app\/koi\/styleguide\/components\/[name]` but no source entry\n- **registry only** \u2014 appears in registry\/navigation but has no actual entry\n- **missing** \u2014 used in the app but not present anywhere in the styleguide\n- **orphaned** \u2014 present in the styleguide but not used anywhere in the app\n\n### 4. Compare coverage\n\nFor every component found in the target:\n\n```txt\nComponent:        [name]\nSource files:     [paths where it's defined]\nImported from:    [files in target that import it]\nStyleguide status: [official | playground | route-only | registry-only | missing]\nRequired action:  [none | promote | add stub | document]\n```\n\nCoverage is valid when a component appears in at least one accepted styleguide\nlocation.\n\nIf `Include playground as covered` is `no`, playground entries are reported as\n**needs official promotion**.\n\n### 5. Apply the chosen mode\n\n#### `report only`\n\nDo not edit files. Return the full report (see Output below).\n\n#### `create missing stubs`\n\nFor each missing component, create a minimal styleguide source entry under:\n\n```txt\n\/koi\/styleguide\/playground\/components\/[component-name]\n```\n\nEach stub includes:\n\n- purpose (short description, can be marked TODO)\n- source files\n- import path\n- shadcn primitive if applicable\n- status: **needs review**\n- TODOs for variants, states, props, and accessibility\n\n#### `create missing stubs and update navigation`\n\nDo everything from the previous mode, then update existing navigation or\nregistry files. Don't invent a navigation system when none exists \u2014 if the\nproject has nothing to update, fall back to stubs only and note it in the output.\n\n### 6. Validate\n\nIf files changed, run available checks:\n\n```bash\nnpm run lint\nnpm run typecheck\nnpm run test\nnpm run build\n```\n\nIf nothing changed (report-only mode), skip validation.\n\n## Output to return\n\n```md\nKoi styleguide coverage audit complete.\n\nScan:\n- Target: [path]\n- Styleguide: [path]\n- Mode: [mode]\n\nSummary:\n- Components found: [N]\n- Covered: [N]\n- Missing: [N]\n- Playground only: [N]\n- Orphaned styleguide entries: [N]\n\nMissing components:\n| Component | Found in | Required action |\n|-----------|----------|-----------------|\n| [name]    | [files]  | [action]        |\n\nOrphaned styleguide entries (optional):\n| Component | Styleguide path | Note |\n|-----------|-----------------|------|\n\nChanged:\n- [file path] \u2014 what changed   (omit this section in report-only mode)\n\nValidation:\n- [command] \u2014 passed \/ failed \/ not available\n```\n\n## Notes\n\n- Treat shadcn components imported into the app as components that need\n  styleguide coverage \u2014 they're part of the surface area the team is shipping.\n- Prefer adding missing entries to **playground** first unless the user asks\n  to promote them directly.\n- This audit is a coverage check, not a refactor. Don't move, rename, or\n  delete components.\n- When the same component name resolves to different files (e.g. a local\n  `Button` and `@\/components\/ui\/button`), report both and let the user decide.\n- If the project has no styleguide structure at all, stop and recommend\n  running the `koi-foundation` skill first.\n","use_cases":["Verify that all components used in the app are documented in Koi\/styleguide","Identify missing components and generate stubs for them","Ensure consistency between the app and the styleguide","Check for orphaned components in the styleguide that are not used in the app"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/MirandaSls\/koi-design\/blob\/d86c88cb439045af1785329fcabfbd645fa3b646\/skills\/design-system\/koi-audit\/SKILL.md","source_commit":"d86c88cb439045af1785329fcabfbd645fa3b646","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:43:58.000000Z","updated_at":"2026-11-29T10:53:15.000000Z","seo_title":"Koi Audit \u2014 Styleguide Coverage Check Tool","seo_description":"Audit your project's styleguide coverage to ensure all components are documented in Koi\/styleguide. Identify missing components, generate stubs, and update navigation as","seo_keywords":["styleguide audit","component coverage check","Koi styleguide","component documentation","Next.js styleguide","shadcn\/ui audit","styleguide gaps","component stub generation"]}}