skills/python-cookiecutter/SKILL.md
Sets up a standard Python package development repo structure with bin, etc, notebooks, source (Python source), src (C++ source), and test directories, plus a templated setup.py and pyproject.toml for local dev and pybind11 C++ bindings. Use when the user asks to "set up python project structure", "scaffold a python package", "initialize python repo structure", or "run python-cookiecutter". Do NOT use for installing packages, running tests, or modifying existing project code.
npx skillsauth add armandli/get-skilled python-cookiecutterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read $ARGUMENTS and extract package_name (the first word/token).
$ARGUMENTS is empty or missing, stop and ask the user: "Please provide a package name, e.g. /python-cookiecutter myproject."Run pwd and git rev-parse --show-toplevel 2>/dev/null.
pwd, warn the user and stop. All paths must be relative to the repo root.Run:
mkdir -p bin etc notebooks source src test
All six directories are created with -p (no error if already present).
source/__init__.pyUse Glob to check whether source/__init__.py already exists.
Only if it does not exist, use the Write tool to create source/__init__.py with empty content (just a newline).
setup.pyUse Glob to check whether setup.py already exists.
Only if it does not exist, use the Write tool to create setup.py with this exact content, replacing <package_name> with the value from Step 1:
from glob import glob
from setuptools import setup, find_packages
from pybind11.setup_helpers import Pybind11Extension, build_ext, ParallelCompile, naive_recompile
ParallelCompile("NPY_NUM_BUILD_JOBS", needs_recompile=naive_recompile).install()
__version__ = '0.0.1'
ext_modules = [
Pybind11Extension(
"cppext",
sorted(glob("src/*.cpp")) + sorted(glob("src/*.cc")),
cxx_std=17,
),
]
setup(
name='<package_name>',
version=__version__,
description='',
author='',
author_email='',
url='',
packages=find_packages(exclude=['']),
package_data={},
data_files={},
install_requires=[
'pybind11',
'marimo',
'typer',
'polars',
'altair',
'tqdm',
'anywidget',
],
entry_points={
'console_scripts': []
},
scripts=[],
cmdclass={"build_ext": build_ext},
ext_modules=ext_modules,
zip_safe=False,
)
Substitute the literal string <package_name> in name='<package_name>' with the actual package name from Step 1.
pyproject.tomlUse Glob to check whether pyproject.toml already exists.
Only if it does not exist, use the Write tool to create pyproject.toml with this exact content:
[build-system]
requires = ["setuptools>=42", "pybind11~=2.6.1"]
build-backend = "setuptools.build_meta"
Print a summary listing:
-p)source/__init__.py: created or skipped (already exists)setup.py: created or skipped (already exists)pyproject.toml: created or skipped (already exists)After the skill's primary task completes, run:
python3 ${PWD}/.claude/skills/skill-stat/scripts/record-stat.py "python-cookiecutter"
tools
--- name: update-readme description: Updates a project README.md with build instructions, unit test instructions, and a mermaid architecture diagram. Use when a project README needs to be created or refreshed. Trigger phrases: "update readme", "generate readme", "create readme", "refresh readme docs". Emphasizes project interfaces, extension points, and customization hooks in the diagram — not concrete implementations. Do NOT use for documentation sites, wikis, or non-project READMEs. argument-h
business
--- name: skill-stat description: Records skill usage statistics and issue reports into .claude/skill-stats.md. Increments the Uses count for a skill name, and optionally logs an issue report that increments the Issues count and appends a row to the Issue Reports table. Use when tracking how often a skill is invoked, when a user reports a problem with a skill, or when another skill needs to log its own usage. Trigger phrases: "record skill stat", "log skill usage", "report skill issue". Do NOT u
testing
--- name: revert description: Reverts ALL git changes in the working directory: staged changes, unstaged modifications, and new untracked files. Use when user asks to "revert all changes", "undo all changes", "discard all changes", "reset all git changes", or "clean working directory". Do NOT use for reverting a specific file or a specific commit — those need targeted git commands. disable-model-invocation: true --- Revert all git changes in the working directory. This is destructive and cannot
tools
Scans a Python codebase for duplicate or near-duplicate logic patterns across functions, classes, and files, then extracts those patterns into typed utility classes in a shared module. Use when the user asks to "refactor this Python code", "find duplicate logic", "extract shared utilities", "apply DRY to Python", "deduplicate Python code", or "find repeated patterns in Python". Groups extracted helpers by the object type they operate on (strings, numbers, dates, collections, etc.). Do NOT use for performance optimization (use optimize-python), for debugging logic errors, or for explaining code. Do NOT extract code that appears only once. Run this skill before optimize-python.