create-component-docs
星标11
分支3
更新时间2026年2月14日 08:02
Generates component documentation from implementation for demo-macros parsing
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Generates component documentation from implementation for demo-macros parsing
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Creates Leptos component implementations from daisyUI style guide documentation
Validates existing components against daisyUI style guide documentation
Fetches and splits the daisyUI style guide from the official LLM text file into organized sections
基于 SOC 职业分类
| name | create-component-docs |
| description | Generates component documentation from implementation for demo-macros parsing |
| disable-model-invocation | true |
Creates markdown documentation for existing components to be parsed by demo-macros.
src/components/{component_name}/ has implementationdoc/README.md for supported elements and structure.claude/rules/documentation.md for doc standardscat src/components/{component_name}/style.rs
cat src/components/{component_name}/component.rs
Extract:
#[component])doc/components/{component_name}.md
Use kebab-case matching module name from src/components/.
# {ComponentName}
One sentence description.
## Description
2-4 sentences: What it provides, when to use it, common cases.
## Examples
### Basic Usage
```rust
<Component prop1=value1 prop2=value2>
{children()}
</Component>
// Realistic example showing different configurations
| Prop | Type | Default | Description |
|---|---|---|---|
prop_name | Signal<PropType> | default | One-line description |
Brief description (1-2 sentences).
| Prop | Type | Default | Description |
|---|---|---|---|
prop | Type | default | Description |
### 4. Supported Elements (demo-macros)
Only these markdown elements are parsed:
- **Headings** (h1-h3): `#`, `##`, `###`
- **Paragraphs**: Plain text blocks
- **Code blocks**: ```rust ... ``` (executed as live components)
- **Tables**: Pipe-separated tables → daisyUI Table component
**NOT supported**:
- ❌ Lists, blockquotes, horizontal rules, images, links
### 5. Props Table Rules
- Alphabetical order for props
- Show `Signal<T>` wrapping explicitly
- Use `-` for required props (no default)
- Defaults: `""` for strings, `false`/`true` for bool, `-` for `Option<T>`
### 6. Sub Components
For components with child parts, follow same props table format.
### 7. Validate
```bash
# Check macro parsing
cargo build
# Verify in demo
cd demo && trunk serve
Check:
# Read implementation
cat src/components/button/component.rs
# Check existing doc (if updating)
cat doc/components/button.md
# Validate
cargo build
doc/README.md - Full documentation system guide.claude/rules/documentation.md - Documentation standardsdoc/components/accordion.md - Canonical example