python-projectlisted
Install: claude install-skill TsukiNi22/ai-utils
# Python project
`SKILL_DIR` = the directory of this file. The code follows `python-style` (load it). Generator:
```bash
python3 SKILL_DIR/scripts/new_project.py <name> --kind script|app|package --dir <parent> --desc "<one line>" \
[--python 3.12] [--version 1.0.0] [--banner xartania|none|<text>]
```
## 1. Ask (one AskUserQuestion call, French) - only what the request doesn't say
- **Type**: `Package installable (Recommandé pour un outil / une lib)` · `Application (structure MAGIC)` ·
`Script seul`.
- **Nom** (folder, distribution and command name; the package is the name in lower case with `_`), **description**,
**version Python minimale** (default: the installed one, `python3 --version`, at least 3.10 for `X | None`).
- **Extras** (multiSelect): `Tests pytest` · `README (readme-style)` · `Licence (license)` ·
`git init + premier commit (git-conventions)` · `Dépôt GitHub (gh repo create)`.
- **CI/CD**: when the project is (or becomes) a GitHub repository (`git remote -v` shows `github.com`, or the
`Dépôt GitHub` extra), the **`ci-cd` skill** is loaded after the generation: it asks what to run (tests, style,
coverage, PyPI, release...) and writes the workflows (`templates/python.yml`, `pypi.yml`, `release.yml`).
## 2. Layouts
| Kind | Files | Run |
|---|---|---|
| `package` | `pyproject.toml`, `src/<pkg>/{__init__,__main__,const,exception,main}.py`, `tests/test_main.py` | `pip install -e ".[dev]"` then `<name>` / `python -m <pkg>`, `pytest` |
| `app` (MAGIC)