Convert API docs/specs into Python CLI projects in three steps:
api-to-doc-> OpenAPI (<project-name>-api.yaml)doc-to-prd-> PRD ({project_name}_PRD.md)prd-to-cli-> generated CLI project
Before running the workflow, copy these skills into your local project under skills/:
skills/api-to-doc/skills/doc-to-prd/skills/prd-to-cli/
skills/api-to-doc/- API URL/docs -> OpenAPI 3.0 YAMLskills/doc-to-prd/- OpenAPI/docs -> PRD markdownskills/prd-to-cli/- PRD -> Python Click CLI scaffoldexample_APIs/- sample API specs/docsexample_PRDs/- generated PRD examplesexample_CLIs/- generated CLI examplesdocs/- supporting documentation
Claude Code:
/api-to-doc <api-docs-url> [output-path]Codex:
$api-to-doc <api-docs-url> [output-path]Claude Code:
/doc-to-prd <api-spec-path> [output-path]Codex:
$doc-to-prd <api-spec-path> [output-path]Notes:
project_nameis inferred from the spec/docs when possible.- If it cannot be inferred confidently, provide it explicitly.
- Canonical PRD template used by this skill:
skills/doc-to-prd/references/PRD_template.md
Claude Code:
/prd-to-cli <prd-file> <output-dir>Codex:
$prd-to-cli <prd-file> <output-dir>Generated project includes:
pyproject.tomlMakefilesrc/config.py,src/logger.py,src/output.py,src/utils.pytests/test_cli.pyrequirements.txt,.env.example
- Artifact: OpenAPI YAML
- Naming convention:
<project-name>-api.yaml - Example:
example_APIs/stripe-api-v1-codex.yaml
- Artifact: PRD markdown
- Naming convention:
{project_name}_PRD.md - Example:
example_PRDs/arkham_intel_api_PRD.md
- Artifact: generated CLI project directory
- Naming convention:
<cli-name>/(or provided output folder) - Example:
example_CLIs/arkm-cli/ - Common generated files:
pyproject.tomlMakefilesrc/cli.pysrc/client.pytests/test_cli.py
Use CLI entry points with uv:
cd <generated-project-dir>
uv sync
uv run [cli-name] --help
uv run [cli-name] <resource> <command> [options]Use this style in docs/examples/Makefiles:
uv run [cli-name] ...uv run $(PROJECT_NAME) ...
Avoid this style in project docs:
uv run python -m src.cli ...
Inside a generated project:
uv run pytest tests/ -v- Python 3.x, 4-space indentation, snake_case naming
- Keep generated outputs deterministic where possible
- Do not commit secrets; use
.envand keep it git-ignored
- API spec:
example_APIs/open-meteo/openapi.yaml - PRDs:
example_PRDs/ - CLIs:
example_CLIs/
For collaboration or questions, contact me on LinkedIn: https://www.linkedin.com/in/mfiandor/