agentleFS
hugobatistahugobatista/agent-skills/skills/python/pyproject-toml/SKILL.md

pyproject-toml

Skill1 starsChanged 53 days agoMITView on GitHub

Use when creating or modifying pyproject.toml configuration for Python projects. Covers hatchling build, uv dependency management, and tool configuration for pytest, coverage, mypy, and ruff.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Read config.toml from this directory.

    line 9
  2. Distinctive:

    Ask the user to confirm the author.

    line 11
  3. Very specific:

    Read assets/pyproject.toml.tmpl.

    line 13
  4. Very specific:

    Add [[tool.uv.index]] with explicit = true to declare the package index explicitly.

    line 16
  5. Very specific:

    Read the written file back and confirm every section below is present.

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

pyproject.toml (mandatory template)

Read config.toml from this directory. If it exists, use it for defaults. If not, ask the user for their author info and write it to config.toml (one-time setup — future runs are faster).

Ask the user to confirm the author. Do not try to parse the name and email, just show the string as-is and ask for confirmation or correction.

Read assets/pyproject.toml.tmpl. Replace AUTHOR_PLACEHOLDER with the confirmed author, replace projectname with your project name, and write it to the project root.

  • Set required-version in [tool.uv] to the latest stable uv release that's been available for > 30 days (check https://github.com/astral-sh/uv/releases) - but minimum 0.11.18
  • Add [[tool.uv.index]] with explicit = true to declare the package index explicitly. This documents the trust boundary and prevents accidental cross-resolution if multiple indexes are configured.
    [[tool.uv.index]]
    name = "pypi"
    url = "https://pypi.org/simple"
    explicit = true

Required sections — verify each exists after substitution

Read the written file back and confirm every section below is present. The .tmpl file is the authoritative source — do not skip, merge, or drop any section.

  • [project] (name, version, description, authors, requires-python, dependencies)
  • [project.scripts] (CLI entry point)
  • [build-system] (hatchling)
  • [tool.uv] (required-version, exclude-newer)
  • [[tool.uv.index]] (pypi with explicit = true)
  • [tool.hatch.build.targets.wheel] (packages = ["src/..."])
  • [dependency-groups] (lint, test, dev with include-group)
  • [tool.hatch.envs.default] (type = "virtual", path = ".venv")
  • [tool.hatch.envs.default.scripts] (lint, format, test, typecheck, validate, check, check-fast)
  • [tool.pytest.ini_options]
  • [tool.coverage.run] and [tool.coverage.report]
  • [tool.mypy]
  • [tool.ruff], [tool.ruff.lint], [tool.ruff.format]

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.