Skip to content
Agentmart
Submit a tool

ugrc-python-packaging

Python packaging migration guidance.

Skill by agrc

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/agrc-ugrc-python-packaging

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Python packaging migration guidance. Use when reviewing or migrating projects from setup.py to pyproject.toml, including Hatchling, dependencies, versioning, and console scripts.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ugrc-python-packaging

What's inside

Skill name
ugrc-python-packaging
Description
Python packaging migration guidance. Use when reviewing or migrating projects from setup.py to pyproject.toml, including Hatchling, dependencies, versioning, and console scripts.
License
MIT
Instructions
32 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

When a project uses a legacy `setup.py`, offer to migrate its packaging configuration to `pyproject.toml`; do not perform this migration automatically. If the user approves, make the migration in a separate commit from unrelated changes.

Preserve the existing package metadata, dependencies, optional dependency groups, and package-discovery configuration. Upgrade the build backend to Hatchling when the user approves: use `requires = ["hatchling"]` and `build-backend = "hatchling.build"`, then replace setuptools-specific configuration with the equivalent Hatchling configuration. Update CI cache dependency paths that reference `setup.py` to reference `pyproject.toml`. Remove obsolete `setup.py` configuration only after the declarative configuration is complete, and validate the migration by building source and wheel distributions and running the project's tests and Ruff checks.

Put all testing and build dependencies in `[project.optional-dependencies]` under a `dev` group, and remove any `tests` group. Make sure to update any documentation that references the `tests` group to reference the `dev` group instead.

When the version is stored only in a dedicated module migrate that value to a static `version` field in `[project]`, remove `dynamic = ["version"]` and the setuptools dynamic-version configuration, and delete the unused module. Fix any imports of the old version module using the following pattern:

Resolve the version once in your top-level __init__.py file using importlib.metadata, and then import that version attribute across your other modules.
In the root __init__.py (e.g., uocc_skid/__init__.py)

```python
from importlib.metadata import version
try:
    # Use distribution name as defined in pyproject.toml
    __version__ = version("uocc-skid")
except PackageNotFoundError:
    # Fallback when running from raw source tree without installation
    __version__ = "0.0.0-dev"
```

Then in other modules, import the version attribute from the top-level package:

```python
from uocc_skid import __version__
```

Clean up any remaining references to the old version module in the codebase, including in CI workflows and documentation.

Review declared console scripts during the migration. Remove an entry point only when its target is confirmed stale or nonexistent; otherwise preserve it in `[project.scripts]`.

From agrc/agent-skills, MIT.

Signals

Stars
2
Forks
0
Open issues
1
Last commit (this folder)
Sep 9, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from agrc

Cite this page

ugrc-python-packaging skill. Agent Mart. https://agentmart.dev/skills/agrc-ugrc-python-packaging (last updated 2026-10-24)