From python-dev
Scaffold new Python projects or add components to existing ones. Triggers: "new python project", "scaffold", "add API/CLI to project", "init project", "create project skeleton", "update project dependencies". Also use when asked to add FastAPI, Flask, Django, or other components to an existing Python project.
npx claudepluginhub vino9net/claude-python-skillThis skill is limited to using the following tools:
1. Read this file for workflow and conventions
assets/snippets/cli.pyassets/snippets/fastapi.pyassets/snippets/flask.pyassets/templates/CLAUDE.mdassets/templates/format_on_save.pyassets/templates/init_remote_env.shassets/templates/permission_guard.pyassets/templates/pyproject.tomlassets/templates/python_build.ymlassets/templates/run_dev.shassets/templates/settings.jsonassets/templates/vscode-settings.jsonreferences/dependencies.mdtests/fixtures/edit_json_file.jsontests/fixtures/edit_py_file.jsontests/fixtures/heredoc_allow.jsontests/fixtures/ls_passthrough.jsontests/fixtures/push_feature_pass.jsontests/fixtures/push_main_deny.jsontests/test_format_on_save.pySearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
assets/snippets/fastapi.py, assets/snippets/flask.py, or assets/snippets/cli.py directlyreferences/dependencies.md directlyassets/templates/pyproject.toml directlyWhen the user asks to create a new project, gather requirements BEFORE generating any files. Do not ask all questions at once — group them into 2 rounds maximum.
Project name: {ask user, suggest snake_case}
One-line description: {ask user}
Components needed: [api, cli] — present as checklist, explain briefly
Include deptry? (yes/no, default: yes) — dependency checker that finds unused/missing deps
If the user picks the api component, immediately follow up:
API framework: FastAPI (recommended) / Flask / Django
django-admin startproject themselves)Summarize the choices back to the user in a short table and ask for confirmation before generating any files. Example:
Project: fund_parser
Type: Library (pip installable with extras)
Components: api, cli
API Framework: FastAPI
Deptry: yes
API extras: CORS enabled, no auth
Distribution: pip install fund_parser[api]
Proceed? (y/n)
Only after confirmation: read the relevant snippet files and generate the project.
uv (pyproject.toml based, no setup.py, no requirements.txt). Never ask the user which package manager to use — always use uv.src/{project_name}/tests/ mirroring src structure, pytest.pre-commit-config.yaml{project_name}/
├── pyproject.toml
├── README.md
├── CLAUDE.md
├── t # dev server launcher (api component only)
├── .python-version
├── .pre-commit-config.yaml
├── .gitignore
├── .claude/
│ ├── settings.json # skill reference + tool permissions
│ └── scripts/
│ ├── init_remote_env.sh
│ ├── permission_guard.py
│ └── format_on_save.py
├── .vscode/
│ └── settings.json # editor defaults for Python + ruff
├── .github/
│ └── workflows/
│ └── python_build.yml
├── src/
│ └── {project_name}/
│ ├── __init__.py
│ └── py.typed # PEP 561 marker
└── tests/
├── __init__.py
└── conftest.py
Do NOT search for templates. Read each template file directly by its exact path and copy to the target project.
| Template File (read from) | Target Location | Replacements |
|---|---|---|
assets/templates/pyproject.toml | pyproject.toml | {project_name}, {description}, {python_version}, remove deptry if declined |
assets/templates/CLAUDE.md | CLAUDE.md | {project_name}, {description}, remove deptry if declined |
assets/templates/.gitignore | .gitignore | None |
assets/templates/.pre-commit-config.yaml | .pre-commit-config.yaml | Remove deptry hook if declined |
assets/templates/vscode-settings.json | .vscode/settings.json | None |
assets/templates/python_build.yml | .github/workflows/python_build.yml | None |
assets/templates/settings.json | .claude/settings.json | None |
assets/templates/init_remote_env.sh | .claude/scripts/init_remote_env.sh | None (make executable) |
assets/templates/permission_guard.py | .claude/scripts/permission_guard.py | None (make executable) |
assets/templates/format_on_save.py | .claude/scripts/format_on_save.py | None (make executable) |
assets/templates/run_dev.sh | t | {dev_server_command}, {project_name} (make executable, api component only) |
After copying scripts, run chmod +x on the .sh and .py files in .claude/scripts/ and on t if generated.
If the user declines deptry during the interview, omit all deptry-related entries when generating files:
"deptry>=0.24.0" from [dependency-groups] devdeptry hook block (id, name, entry,
language, always_run, pass_filenames)4. deptry . from the Quality Gates list and renumber the
remaining stepsAfter all files are generated, tell the user to run these commands to finish setup:
cd {project_name}
uv sync
uv run pre-commit install
If the project includes an api component, also mention:
./t # start the dev server
When the user requests a component, follow these steps:
Read these snippet files directly by path when the component is requested:
| Component | Read This File | Creates |
|---|---|---|
| api (FastAPI) | assets/snippets/fastapi.py | api/, main.py, conftest fixtures |
| api (Flask) | assets/snippets/flask.py | api/, main.py, conftest fixtures |
| api (Django) | (no snippet — see below) | deps + dev script only |
| cli | assets/snippets/cli.py | cli.py, pyproject scripts |
When the user selects Django as the API framework, do not generate application code. Instead:
references/dependencies.md to pyproject.tomlt dev server script with the Django commandcd {project_name}
uv sync
uv run django-admin startproject config .
manage.py, config/, etc.)When the api component is selected (any framework), generate a t script in the
project root from assets/templates/run_dev.sh. Replace {dev_server_command} with the
appropriate command and {project_name} with the project name. Make it executable.
| Framework | {dev_server_command} |
|---|---|
| FastAPI | uv run uvicorn {project_name}.main:app --port 8000 --reload --reload-dir src |
| Flask | uv run flask --app src/{project_name}/main run --port 8000 --reload |
| Django | uv run python manage.py runserver 8000 |
When adding a component to an existing project:
references/dependencies.md for approved versions. Merge new
dependencies into existing [project.dependencies] — never overwrite existing ones.All dependency versions come from references/dependencies.md. This is the single source of
truth for approved versions. When generating pyproject.toml:
[project.dependencies]~=) for dev dependenciesWhen the user asks to make the project installable or distributable as a package, use
assets/templates/pyproject.toml as the reference template for standard sections.
Do NOT generate Dockerfiles, docker-compose files, or any Docker-related configuration. If the user asks for Docker support, explain that this scaffold does not include Docker and suggest they add it manually if needed.