setting-up-python-libraries

setting-up-python-libraries is a skill for Claude Code, Codex from CHENyiru3/AI-Skills-Collections. It costs 82 tokens per session (840 once invoked), scanned A, original, MIT.

A guide to starting or modernising a Python library with a standard project layout and development tools. It covers package configuration, tests, linting, type checks, pre-commit checks, Makefiles, and GitHub Actions.

In plain words
What is it for?
Use it to scaffold a Python package, create a pyproject.toml, set up a src layout, configure Ruff and pytest, and add continuous integration with GitHub Actions.
Why use it?
It provides the basic structure and automated checks that a new library can otherwise lack. A consistent layout also separates package code from development files and makes the project easier to install and maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scaffold a Python package, create a pyproject.toml, set up a src layout, configure Ruff and pytest, and add continuous integration with GitHub Actions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chenyiru3/ai-skills-collections/project-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add CHENyiru3/AI-Skills-Collections --skill project-setup
Clone the repo
git clone --depth 1 https://github.com/CHENyiru3/AI-Skills-Collections

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setting-up-python-libraries

README.md
[![agentmods](https://agentmods.dev/badge/skills/chenyiru3/ai-skills-collections/project-setup/github.svg)](https://agentmods.dev/skills/chenyiru3/ai-skills-collections/project-setup)
Your own site
<a href="https://agentmods.dev/skills/chenyiru3/ai-skills-collections/project-setup"><img src="https://agentmods.dev/badge/skills/chenyiru3/ai-skills-collections/project-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setting-up-python-libraries

Your own site · 80×15
<a href="https://agentmods.dev/skills/chenyiru3/ai-skills-collections/project-setup"><img src="https://agentmods.dev/badge/skills/chenyiru3/ai-skills-collections/project-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 840 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.00840
Opus 5.5 $0.00033 $0.00336
Sonnet 5.5 $0.00016 $0.00168
Haiku 4.5 $0.00008 $0.00084

Measured 6d ago against content hash ab7e26d49ecc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

setting-up-python-libraries scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/create_project.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills-market/programming/python/project-setup/SKILL.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Library Project Setup

Quick Start

Create a new library with this structure:

my-library/
├── src/my_library/
│   ├── __init__.py
│   └── py.typed
├── tests/
├── pyproject.toml
├── Makefile
├── .pre-commit-config.yaml
└── .github/workflows/ci.yml

Use src/ layout to prevent accidental imports of development code.

Core Configuration

For complete templates, see:

  • PYPROJECT.md - Full pyproject.toml with all tool configs
  • CI.md - GitHub Actions and pre-commit setup
  • MAKEFILE.md - Makefile automation patterns

Minimal pyproject.toml

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "my-library"
version = "0.1.0"
description = "What it does"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
dependencies = []

[project.optional-dependencies]
dev = ["pytest>=7.0", "ruff>=0.1", "mypy>=1.0"]

[tool.setuptools.packages.find]
where = ["src"]

Essential Commands

# Setup
pip install -e ".[dev]"
pre-commit install

# Daily workflow
ruff check src tests        # Lint
ruff format src tests       # Format
pytest                      # Test
mypy src                    # Type check

Key Decisions

Choice Recommendation Why
Layout src/ Catches packaging bugs early
Build backend setuptools Mature, broad compatibility
Linter ruff Fast, replaces flake8+isort+black
Python range >=3.10 Don't pin exact versions
Dependencies Minimal Move optional deps to extras

Checklist

Project Setup:
- [ ] src/ layout with py.typed marker
- [ ] pyproject.toml (not setup.py)
- [ ] Makefile with dev/test/lint/format
- [ ] .pre-commit-config.yaml
- [ ] .github/workflows/ci.yml
- [ ] README.md, LICENSE, CHANGELOG.md
- [ ] .gitignore

Helper Script

Create a new project structure:

python scripts/create_project.py my-library --author "Name"

Read the full file on GitHub · 109 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 109 lines · 82 tokens per session scan A ab7e26d49ecc

Subscribe to this mod's changes

setting-up-python-libraries is a skill published in the GitHub repository CHENyiru3/AI-Skills-Collections (1 stars, last pushed 7d ago), licensed MIT. It adds 82 tokens to every session and 840 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.

Related

Other skills, from other repositories

uv-package-manager

Master the uv package manager for fast Python dependency management, virtual environments, and modern Python project workflows. Use when setting up Python projects, managing dependencies, or optimizing Python development workflows with uv.

Galaxy-Dawn/claude-scholar · 42 tokens

pypi-ops

Publish Python packages to PyPI via OIDC Trusted Publishing (PEP 740 attestations, gh-action-pypi-publish) instead of stored tokens. Use for: invalid-publisher errors, pending-publisher 404s, uv publish/twine, TestPyPI, environment approval gates, and rotating/auditing publish tokens.

0xDarkMatter/claude-mods · 74 tokens

simple-modern-uv

Start, selectively modernize, fully migrate, or update Python projects using simple-modern-uv practices: uv, ruff, BasedPyright, pytest, GitHub Actions CI, and tag-driven PyPI publishing. Use when creating a Python project; adding selected tooling or repository practices to an existing project; migrating from Poetry…

jlevy/simple-modern-uv · 98 tokens

python-deploy

Build and deploy Python applications — uv, poetry, pdm, pipenv, pip, framework detection, and Dockerfile patterns. Use when deploying a Python project, or when requirements.txt, pyproject.toml, or Pipfile is detected.

nixopus/nixopus · 53 tokens

setup-python-project

Scaffold a new Python project with uv, ruff, pytest, and GitHub Actions CI. Use when the user says "set up a new Python project", "scaffold a project", "create a new Python app", or similar.

phobologic/claude_code_helpers · 53 tokens

scaffold-python

Scaffold a complete Python project with CI/CD, release pipeline, justfile, sr.yaml, pyproject.toml, .envrc, and standard files. Uses uv, ruff, and justfile (Python lacks a native task runner like pnpm scripts, so just fills that gap). Loads on top of scaffold-project (run that first for cross-language standard files).…

urmzd/dotfiles · 135 tokens