with one click
create-python-project
// Use when creating a new Python project from Rob's Awesome Python Template (cookiecutter). Don't use for adding Python to existing projects, installing packages, or working with established codebases.
// Use when creating a new Python project from Rob's Awesome Python Template (cookiecutter). Don't use for adding Python to existing projects, installing packages, or working with established codebases.
Use when bootstrapping the design of a brand new project — producing a plan.md through iterative exploration. Don't use for modifying existing plans, implementing features, or working with established codebases.
Use when creating or modifying custom opencode commands in the `commands/` directory. Covers markdown command files, frontmatter options (description, agent, model, subtask), prompt templates with $ARGUMENTS, shell output injection, and file references.
Use when asked to create, generate, or scaffold a new Agent Skill. Don't use for modifying existing skills or writing general documentation.
Use when doing a thorough exploration of an existing codebase. Guides a subagent through reading documentation, reviewing tests, analyzing architecture, and producing a comprehensive overview. Don't use for quick lookups or single-file questions.
All actions on GitHub must use this skill. Covers pull requests, issues, repositories, releases, GitHub Actions, searches, and API requests via the `gh` CLI.
Use when creating, modifying, or reviewing GitHub Actions workflow files. Covers workflow syntax, action selection, dependabot configuration, and CI/CD best practices.
| name | create-python-project |
| description | Use when creating a new Python project from Rob's Awesome Python Template (cookiecutter). Don't use for adding Python to existing projects, installing packages, or working with established codebases. |
| compatibility | Requires `uv` installed |
| license | MIT |
| metadata | {"author":"Robert Hafner","source":"https://github.com/tedivm/opencode-config"} |
Generate new Python projects using uvx cookiecutter. The template handles all setup automatically via post-generation hooks.
Verify uv is installed:
which uv
If missing, read references/installation_guide.md and provide the user with the installation instructions. Do not install anything yourself — instruct the user to run the commands.
Set these defaults before asking the user anything:
| Parameter | Default |
|---|---|
python_version | 3.13 |
include_github_actions | y |
include_agents_instructions | y |
If whoami returns tedivm, also set:
| Parameter | Value |
|---|---|
author_name | Robert Hafner |
license | MIT license |
github_org | tedivm |
Determine project type. Ask the user what kind of project they are building. Use their answer to pre-select features (see below).
Pre-select features based on project type.
Web app: Enable fastapi, sqlalchemy, jinja2, aiocache, docker, requirements_files automatically. Ask if they need background tasks — if so, discuss the choice:
y.Library: Enable publish_to_pypi.
CLI tool: Enable include_cli.
Minimal/other: Leave optional features at n unless the user requests them.
Implicit dependencies: If fastapi, sqlalchemy, jinja2, or celery are enabled, also set include_docker=y and include_requirements_files=y.
Gather remaining details. Ask the user for any values not yet determined:
package_name — always ask (required, must match ^[_a-zA-Z][_a-zA-Z0-9]+$)short_description — always askauthor_name — ask unless already set by user identitylicense — ask unless already set by user identitygithub_org — ask unless already set by user identityinclude_cli — ask if not already determinedpublish_to_pypi — ask if not already determinedConfirm the configuration. Present the final set of options to the user before generating.
Run cookiecutter non-interactively. Execute from the desired parent directory using uvx with --no-input and all parameters passed as extra context arguments:
uvx cookiecutter --no-input --overwrite-if-exists --accept-hooks yes \
gh:tedivm/robs_awesome_python_template \
package_name="<name>" \
author_name="<author>" \
short_description="<description>" \
python_version="<version>" \
github_org="<org>" \
license="<license>" \
include_cli="<y or n>" \
include_fastapi="<y or n>" \
include_sqlalchemy="<y or n>" \
include_quasiqueue="<y or n>" \
include_jinja2="<y or n>" \
include_aiocache="<y or n>" \
include_celery="<y or n>" \
include_docker="<y or n>" \
include_github_actions="<y or n>" \
include_requirements_files="<y or n>" \
include_agents_instructions="<y or n>" \
publish_to_pypi="<y or n>"
--no-input forces cookiecutter to use cookiecutter.json defaults plus the extra context arguments, skipping all prompts and automatically refreshing cached templates.
Verify the result. The post-generation hook runs make all, make lock, and various code quality fixes automatically. Confirm the project directory was created and contains the expected structure.
Initialize git. Run git init inside the new project directory.
uv not found: The template's pre_gen_project.py exits with an error if uv is missing. Direct the user to references/installation_guide.md.^[_a-zA-Z][_a-zA-Z0-9]+$. No hyphens or spaces.uvx cookiecutter --no-input ... command with the same arguments to regenerate.