Agent skill

Python Packaging

by Yikai-Liao in Yikai-Liao/symusic

Create and publish distributable scientific Python packages following Scientific Python community best practices.

MITAuto-check passedDevelopment

Install Python Packaging

skills CLI
$ npx skills add Yikai-Liao/symusic --skill python-packaging -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Yikai-Liao/symusic python-packaging --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Yikai-Liao/symusic.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/python-packaging .claude/skills/python-packaging && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-packaging
GitHub stars
189
Token cost
~2.3k tokens
SKILL.md length
688 words
Files
12 (incl. scripts, references, assets)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Create and publish distributable scientific Python packages following Scientific Python community best practices.

  • Works in 4 steps: Modern Build Systems → Build Backend: Hatchling → Package Structure → …
  • Development work in your project
  • SKILL.md covers Quick Decision Tree, When to Use This Skill, Core Concepts and Quick Start, plus 9 more sections
  • Runs Python scripts from its folder; calls pip and python; reaches test.pypi.org

What it does

Python Packaging is an agent skill from Yikai-Liao/symusic. Create and publish distributable scientific Python packages following Scientific Python community best practices. Covers pyproject.toml, src layout, Hatchling, metadata, CLI entry points, and PyPI publishing.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts, reference files and assets (for example `assets/github-actions-publish.yml`, `assets/readme-template.md` and `assets/sphinx-conf.py`).

It sits in Development. It works with Python. The repository describes itself as: A swift and unified toolkit for symbolic music processing. The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/python-packaging”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Modern Build Systems
  2. Build Backend: Hatchling
  3. Package Structure
  4. Scientific Python Standards

What it can do on your machine

Read from SKILL.md and the folder at commit 3cdd0ee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • test.pypi.org

    Also links to:

    • learn.scientific-python.org
    • packaging.python.org
    • pypi.org
    • hatch.pypa.io
    • pypa-build.readthedocs.io
    • twine.readthedocs.io
    • github.com
    • numpydoc.readthedocs.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Python Packaging loads about 2.3k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 56 tokens; SKILL.md has 688 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Yikai-Liao/symusic at commit 3cdd0ee, republished under its MIT licence (© Yikai-Liao). 688 words, ~2,328 tokens.

Download SKILL.mdSave it as .claude/skills/python-packaging/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
python-packaging
description
Create and publish distributable scientific Python packages following Scientific Python community best practices. Covers pyproject.toml, src layout, Hatchling, metadata, CLI entry points, and PyPI publishing.
metadata.assets
assets/pyproject-minimal.toml, assets/pyproject-full-featured.toml, assets/readme-template.md, assets/github-actions-publish.yml, assets/sphinx-conf.py…
metadata.references
references/common-issues.md, references/docstrings.md, references/metadata.md, references/patterns.md
metadata.scripts
scripts/cli-example.py

Scientific Python Packaging

A comprehensive guide to creating, structuring, and distributing Python packages for scientific computing, following the Scientific Python Community guidelines. This skill focuses on modern packaging standards using pyproject.toml, PEP 621 metadata, and the Hatchling build backend.

Quick Decision Tree

Package Structure Selection:

START
  ├─ Pure Python scientific package (most common) → Pattern 1 (src/ layout)
  ├─ Need data files with package → Pattern 2 (data/ subdirectory)
  ├─ CLI tool → Pattern 5 (add [project.scripts])
  └─ Complex multi-feature package → Pattern 3 (full-featured)

Build Backend Choice:

START → Use Hatchling (recommended for scientific Python)
  ├─ Need VCS versioning? → Add hatch-vcs plugin
  ├─ Simple manual versioning? → version = "X.Y.Z" in pyproject.toml
  └─ Dynamic from __init__.py? → [tool.hatch.version] path

Dependency Management:

START
  ├─ Runtime dependencies → [project] dependencies
  ├─ Optional features → [project.optional-dependencies]
  ├─ Development tools → [dependency-groups] (PEP 735)
  └─ Version constraints → Use >= for minimum, avoid upper caps

Publishing Workflow:

1. Build: python -m build
2. Check: twine check dist/*
3. Test: twine upload --repository testpypi dist/*
4. Verify: pip install --index-url https://test.pypi.org/simple/ pkg
5. Publish: twine upload dist/*

Common Task Quick Reference:

bash
# Setup new package
mkdir -p my-pkg/src/my_pkg && cd my-pkg
# Create pyproject.toml with [build-system] and [project] sections

# Development install
pip install -e . --group dev

# Build distributions
python -m build

# Test installation
pip install dist/*.whl

# Publish
twine upload dist/*

When to Use This Skill

  • Creating scientific Python libraries for distribution
  • Building research software packages with proper structure
  • Publishing scientific packages to PyPI
  • Setting up reproducible scientific Python projects
  • Creating installable packages with scientific dependencies
  • Implementing command-line tools for scientific workflows
  • Following community standards for scientific Python development
  • Preparing packages for peer review and publication

Core Concepts

1. Modern Build Systems

Python packages now use standardized build systems instead of classic setup.py:

  • PEP 621: Standardized project metadata in pyproject.toml
  • PEP 517/518: Build system independence
  • Build backend: Hatchling
  • No classic files: No setup.py, setup.cfg, or MANIFEST.in
2. Build Backend: Hatchling
  • Hatchling: Excellent balance of speed, configurability, and extendability
  • Modern, standards-compliant build backend
  • Automatic package discovery in src/ layout
  • VCS-aware file inclusion for SDists
  • Extensible through plugins
3. Package Structure
  • src/ layout: Required for proper isolation (prevents importing uninstalled code)
  • Automatic discovery: Hatchling auto-detects packages in src/
  • Standard structure: Consistent organization for testing and documentation
4. Scientific Python Standards
  • Dependency management: Careful version constraints
  • Python version support: Minimum version without upper caps
  • Development dependencies: Use dependency-groups (PEP 735)
  • Documentation: Include README, LICENSE, and docs folder
  • Testing: Dedicated tests folder

Quick Start

Minimal Scientific Package Structure
my-sci-package/
├── pyproject.toml
├── README.md
├── LICENSE
├── src/
│   └── my_sci_package/
│       ├── __init__.py
│       ├── analysis.py
│       └── utils.py
├── tests/
│   ├── test_analysis.py
│   └── test_utils.py
└── docs/
    └── index.md

See assets/pyproject-minimal.toml for a complete minimal pyproject.toml template.

Package Structure Patterns

See references/patterns.md for detailed package structure patterns including:

  • Pure Python scientific package (recommended)
  • Scientific package with data files
  • Versioning strategies
  • Building and publishing workflows
  • Testing installation

Project Metadata

See references/metadata.md for detailed information on:

  • License configuration (SPDX format)
  • Python version requirements
  • Dependency management
  • Classifiers
  • Optional dependencies (extras)
  • Development dependencies (dependency groups)

Command-Line Interface

For CLI tool implementation, see scripts/cli-example.py for a complete example using Click.

Register in pyproject.toml:

toml
[project.scripts]
sci-analyze = "my_sci_package.cli:main"

File Templates

Ready-to-use templates are available in the assets/ directory:

Documentation

NumPy-style Docstrings

See references/docstrings.md for examples of NumPy-style docstrings and documentation best practices.

Show full SKILL.md (304 more words)Show less

Checklist for Publishing Scientific Packages

  • Code is tested with pytest (>90% coverage recommended)
  • Documentation is complete (README, docstrings, Sphinx docs)
  • Version number follows semantic versioning
  • CHANGELOG.md or NEWS.md updated
  • LICENSE file included with appropriate license
  • pyproject.toml has complete metadata
  • Package uses src/ layout
  • Package builds without errors (python -m build)
  • SDist contents verified (tar -tvf dist/*.tar.gz)
  • Installation tested in clean environment
  • CLI tools work if applicable
  • All classifiers are appropriate
  • Python version constraint is correct (no upper bound)
  • Dependencies have appropriate version constraints
  • Repository is linked in project.urls
  • Tested on TestPyPI first
  • GitHub release created (if using)
  • Documentation published (ReadTheDocs, GitHub Pages)
  • Citation information included (CITATION.cff or README)

Best Practices for Scientific Python Packages

  1. Use src/ layout - Prevents importing uninstalled code, ensures proper testing
  2. Use pyproject.toml - Modern standard, tool-independent configuration
  3. Use Hatchling - Modern, fast, and configurable build backend
  4. No classic files - Avoid setup.py, setup.cfg, MANIFEST.in
  5. Version constraints - Minimum versions for dependencies, no upper cap for Python
  6. Test SDist contents - Always verify what files are included/excluded
  7. Use TestPyPI - Always test publishing before going to production
  8. Document thoroughly - README, docstrings, Sphinx documentation
  9. Include LICENSE - Use SPDX identifiers, choose appropriate scientific license
  10. Use dependency-groups - For development dependencies (PEP 735)
  11. Semantic versioning - Clear versioning strategy
  12. Automate CI/CD - GitHub Actions for testing and publishing
  13. Type hints - Include py.typed marker for typed packages
  14. Citation information - Make it easy for users to cite your work
  15. Community standards - Follow Scientific Python guidelines

Common Issues and Solutions

See references/common-issues.md for solutions to:

  • Import errors in tests
  • Missing files in distribution
  • Dependency conflicts
  • Python version incompatibility

Resources

© Yikai-Liao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files (scripts, references, assets) in .agents/skills/python-packaging of Yikai-Liao/symusic.

  • SKILL.md
  • assets/.gitignore
  • assets/github-actions-publish.yml
  • assets/pyproject-full-featured.toml
  • assets/pyproject-minimal.toml
  • assets/readme-template.md
  • assets/sphinx-conf.py
  • references/common-issues.md
  • references/docstrings.md
  • references/metadata.md
  • references/patterns.md
  • scripts/cli-example.py

Open the folder on GitHubat commit 3cdd0ee

Compare with similar skills

Python Packaging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Packaging compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Packaging this skillYikai-Liao/symusic189—~2.3kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Merge Dependabot PRsonyx-dot-app/onyx32k1 repos~2.2kAutomated safety check: PassMIT
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
LangBot Plugin Developmentlangbot-app/LangBot18k—~3.9kAutomated safety check: PassApache-2.0
Senior Architect Toolkitmaslennikov-ig/claude-code-orchestrator-kit2597 repos~1.2kAutomated safety check: NotesCustom licence

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Merge Dependabot PRs

    onyx-dot-app/onyx

    Triages and lands a batch of open Dependabot PRs in the Onyx repo, where main is gated exclusively by GitHub's merge queue: approves and enqueues green PRs, closes superseded duplicates, fixes…

    32k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • LangBot Plugin Development

    langbot-app/LangBot

    Guides building, debugging and testing LangBot plugins: components, SDK calls, README and locale rules, SDK pitfalls and WebSocket-based testing.

    18k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Senior Architect Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive software architecture skill for designing scalable, maintainable systems using ReactJS, NextJS, NodeJS, Express, React Native, Swift, Kotlin…

    259 GitHub starsUsed in 7 repos~1.2k tokens
    DevelopmentAuto-check: notes
  • Flowsint Enricher Builder

    reconurge/flowsint

    Guides building Flowsint enrichers and types: where definitions live, how the base class and vault work, and when a new type is warranted.

    9.3k GitHub stars~2.6k tokensUpdated 4 days ago
    DevelopmentAuto-check passed

More from Yikai-Liao/symusic

All 11 skills in this repo
  • Uv Package Manager

    Yikai-Liao/symusic

    Master the uv package manager for fast Python dependency management, virtual environments, and modern Python project workflows.

    189 GitHub starsUsed in 15 repos~4k tokens
    Auto-check: notes
  • Code Reviewer

    Yikai-Liao/symusic

    Analyzes code diffs and files to identify bugs, security vulnerabilities (SQL injection, XSS, insecure deserialization), code smells, N+1 queries, naming issues, and architectural concerns, then…

    189 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Cpp Pro

    Yikai-Liao/symusic

    Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques.

    189 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Debugging Wizard

    Yikai-Liao/symusic

    Parses error messages, traces execution flow through stack traces, correlates log entries to identify failure points, and applies systematic hypothesis-driven methodology to isolate and resolve bugs.

    189 GitHub starsUsed in 1 repo~909 tokens
    Auto-check passed
  • Devops Engineer

    Yikai-Liao/symusic

    Creates Dockerfiles, configures CI/CD pipelines, writes Kubernetes manifests, and generates Terraform/Pulumi infrastructure templates.

    189 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Scientific Documentation

    Yikai-Liao/symusic

    Set up and maintain documentation for scientific Python packages.

    189 GitHub stars~5.5k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Python Packaging

What does Python Packaging do?

Create and publish distributable scientific Python packages following Scientific Python community best practices. Python Packaging is an agent skill from Yikai-Liao/symusic. Create and publish distributable scientific Python packages following Scientific Python community best practices.

When should I use Python Packaging?

Python Packaging fits situations like: development work in your project.

How do I install Python Packaging in Claude Code?

Run `npx skills add Yikai-Liao/symusic --skill python-packaging -a claude-code`. Or copy the skill folder (.agents/skills/python-packaging in Yikai-Liao/symusic) into .claude/skills/python-packaging in your project. Claude Code loads it when a task matches its description.

How do I install Python Packaging in Codex?

Run `npx skills add Yikai-Liao/symusic --skill python-packaging -a codex`. Or copy the skill folder (.agents/skills/python-packaging in Yikai-Liao/symusic) into .agents/skills/python-packaging in your project. Codex loads it when a task matches its description.

Can I use Python Packaging in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Yikai-Liao/symusic --skill python-packaging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-packaging, .gemini/skills/python-packaging, .github/skills/python-packaging and .opencode/skills/python-packaging in your project.

What does Python Packaging need to run?

Going by SKILL.md and its folder, Python Packaging needs Python for the scripts in its folder and the command-line tools its instructions call (pip and python). Our summary lists: Python 3.

Does Python Packaging access the network?

SKILL.md names 9 domains. In commands or code: test.pypi.org; the agent is likely to contact it when it follows the instructions. As links in the text: learn.scientific-python.org, packaging.python.org, pypi.org, hatch.pypa.io, pypa-build.readthedocs.io, twine.readthedocs.io, github.com and numpydoc.readthedocs.io. This is read from the text; nothing was executed.

Is Python Packaging safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Python Packaging use?

Python Packaging is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Packaging use?

About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.1k tokens, read only when the agent opens those files.

What are the alternatives to Python Packaging?

Skills that share tags, products or a category with Python Packaging: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Merge Dependabot PRs (onyx-dot-app/onyx, 32k stars), Kedro Babysit (kedro-org/kedro, 11k stars) and LangBot Plugin Development (langbot-app/LangBot, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Packaging?

Yikai-Liao (a GitHub user) maintains it in Yikai-Liao/symusic, which has 189 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 11, 2026.

Source: Yikai-Liao/symusic on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.