domain-readme
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Generates or updates a README.md for a domain library. Analyzes the library's source code, exports, NgRx stores, services, and components to produce accurate architecture documentation. Use when a library is missing a README or when it needs updating.
6installs
Added on
NPX Install
npx skill4agent add bogusweb/workspace-context-skills domain-readmeTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Domain README Generator
Generate or update a for the domain library at .
README.md$ARGUMENTSStep 1 — Resolve the Target Path
$ARGUMENTS- A relative path:
libs/widget-chat - A domain name: → look for
widget-chatlibs/widget-chat - An import path: → look it up in the Domain Registry in
@myapp/widget-chatCLAUDE.md
If the path cannot be resolved, ask the user.
Step 2 — Inventory the Library
Read the following files (skip those that don't exist):
<path>/
index.ts ← public API surface
src/lib/ ← all source files
src/index.ts ← re-exports
project.json ← name, tags, importPath
package.json ← name, version, peerDeps
ng-package.json ← Angular package configFor each subdirectory in :
src/lib/- Identify the layer type: ,
domain,feature,uiutil - List key exported symbols: services, stores, components, directives, pipes, types
Focus on:
- NgRx Stores: read the store file, extract state interface, computed signals, methods
- Facade services: extract public methods and their signatures
- Angular components: extract /
@Input()properties and selector@Output() - Public types/interfaces: exported from
index.ts
Step 3 — Generate the README
Write a with this exact structure:
README.mdmarkdown
# <Library Name>
<One-sentence description. What this library does and why it exists.>
## Architecture
<Describe the layer structure. Include a text diagram if the library has multiple layers.>
\`\`\`
<path>/
├── domain/ → NgRx store, facade, services
├── feature/ → Container components, routing
├── ui/ → Presentational components
└── util/ → Types, helpers
\`\`\`
## Public API
### <ServiceName>
> `import { ServiceName } from '<importPath>'`
| Method / Property | Type | Description |
|-------------------|------|-------------|
| `methodName(arg)` | `ReturnType` | What it does |
### <StoreName> (NgRx Signal Store)
| Signal / Method | Type | Description |
|-----------------|------|-------------|
| `items` | `Signal<Item[]>` | List of items |
| `loadItems()` | `void` | Fetches items from API |
### <ComponentName>
**Selector**: `<app-component-name>`
| Input | Type | Description |
|-------|------|-------------|
| `data` | `Item[]` | Data to display |
| Output | Type | Description |
|--------|------|-------------|
| `selected` | `EventEmitter<Item>` | Emits on selection |
## Key Patterns
<Document any conventions specific to this domain:>
- State shape and update strategy
- Error handling approach
- How the facade wraps the store
- Any domain-specific patterns
## Usage Example
\`\`\`typescript
import { FeatureComponent } from '<importPath>/feature';
import { DomainService } from '<importPath>/domain';
// Minimal example showing how to consume this library
\`\`\`
## Dependencies
**Depends on:**
- `@scope/shared/...` — description
**Consumed by:**
- `apps/aero-host` — used as widget
## Development
\`\`\`bash
npx nx test <project-name> # Run unit tests
npx nx build <project-name> # Build library
npx nx lint <project-name> # Lint
\`\`\`Step 4 — Handle Existing README
If already exists:
README.md- Preserve any manually written sections that are not auto-generated
- Update sections that reflect code (Public API, Dependencies)
- Add a comment at the top of auto-generated sections:
<!-- auto-generated by domain-readme skill, do not edit manually -->
Step 5 — Write the File
Write the generated content to .
<path>/README.mdConfirm to the user:
✓ README.md written to <path>/README.md
Documented: N services, N stores, N componentsArguments
$ARGUMENTSExamples:
/domain-readme libs/widget-chat/domain-readme widget-chat/domain-readme libs/shared/sidebar- ← no args: ask the user which domain to document
/domain-readme