Skip to content
Back to skills

Generate Cli Docs

ASecurity

Regenerate the HTML docs site (CLI Reference, Configuration, content sections) from decorators, the pydantic config schema, and markdown source files

  • 154 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 15, 2026
ai-agentspython

Works with

  • cli

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add mycelium-io/mycelium --skill generate-cli-docs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Generate Cli Docs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Generate Cli Docs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mycelium-io-generate-cli-docs/badge)](https://www.skillsdirectory.com/skills/mycelium-io-generate-cli-docs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: generate-cli-docs
description: Regenerate the HTML docs site (CLI Reference, Configuration, content sections) from decorators, the pydantic config schema, and markdown source files
user_invocable: true
---

Regenerate the docs site from three sources:

- **CLI Reference** — generated from `@doc_ref` decorators on Typer commands
- **Configuration** — generated from `Field(..., description=...)` on the pydantic config schema in `mycelium-cli/src/mycelium/config.py`
- **Content sections** — generated from markdown files in `mycelium-cli/src/mycelium/docs/`

Steps:
1. Run: `cd mycelium-cli && uv run python ../docs/generate_docs.py`
2. Report what was generated

## Adding a new CLI command

If a CLI command was added or modified and doesn't have a `@doc_ref` decorator, add one:

```python
from mycelium.doc_ref import doc_ref

@doc_ref(
    usage="mycelium <group> <command> <args>",
    desc="One-line description. May contain <code>html</code>.",
    group="room",  # setup, room, memory, message, config, or "other"
)
@app.command()
def my_command(...): ...
```

Groups: setup, room, memory, message, config, other

## Adding a new config knob

Each pydantic field on a sub-model of `MyceliumConfig` becomes a row in the Configuration section of the docs. The only requirement is a non-empty `description=`:

```python
class ConductorConfig(BaseModel):
    """Tunables for the conductor's flows."""

    step_timeout_s: float = Field(
        default=300.0,
        description=(
            "Seconds each member gets to answer a step before the conductor "
            "moves on without them."
        ),
    )
```

Whatever shows up in `description=` is what users will read. Spell it out — assume the reader doesn't know the internal names. To add a brand new namespace:

1. Add a `<NewName>Config(BaseModel)` class with `Field(..., description=...)` on every field.
2. Wire it onto `MyceliumConfig` (e.g. `new_name: NewNameConfig = Field(default_factory=NewNameConfig)`).
3. Optionally add the namespace to `CONFIG_NAMESPACE_ORDER` in `docs/generate_docs.py` to control its position; otherwise it appends after the listed namespaces.
4. Re-run the generator.

## Markdown source

Markdown files in `mycelium-cli/src/mycelium/docs/` (`concepts/`, `guides/`, `reference/`) are converted to HTML and embedded in the right `<section>` of the page `SECTION_CONFIG` assigns them to. Sections in the existing HTML marked with `<!-- keep -->` are preserved verbatim (used for hand-crafted interactive components).

Then re-run the generator.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.