agentleFS
jyjejyje/pilot-upstage-solar-open2/.claude/skills/python-lint/SKILL.md

python-lint

Skill2 starsChanged 5 months agoMITView on GitHub

Lint, format, and type-check Python code with ruff and ty, then run pytest, before considering any Python change done. Use whenever Python source files are added or edited in a uv-managed project.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. Paldom/python-skills★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every uv project that ships Python source must declare these as dev dependencies (add once per project, not per change):

    line 14
  2. Distinctive:

    Run these in order after editing Python files, and again right before declaring the task complete:

    line 28
  3. Very specific:

    All four must exit clean (ruff/ty report no remaining issues, pytest reports no failures) before the change is done.

    line 48
  4. Distinctive:

    Don't write tests for trivial pass-through code (e.g.

    line 63
  5. Very specific:

    Run these commands from the uv project root (where pyproject.toml lives), not from a subdirectory — uv run resolves the project from there.

    line 69
  6. Very specific:

    If ruff or ty aren't yet in pyproject.toml's dev group, add them first (see above) rather than invoking a global/ad-hoc install.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Python Lint & Test

jyje's Python projects are uv-managed and require three checks to pass before a change is considered finished: ruff (lint + format), ty (type check), and pytest (tests). Skipping any one of them is not acceptable for a "done" change.

Required dev dependencies

Every uv project that ships Python source must declare these as dev dependencies (add once per project, not per change):

uv add --dev ruff ty pytest

This populates [dependency-groups] dev = [...] in pyproject.toml. Do not substitute alternatives (e.g. mypy, black, flake8, unittest) — ruff replaces lint+format, ty replaces mypy, pytest replaces unittest, and mixing tools fragments config for no benefit.

Steps

Run these in order after editing Python files, and again right before declaring the task complete:

  1. Lint, with autofix
    uv run ruff check --fix .
  2. Format
    uv run ruff format .
  3. Type check
    uv run ty check .
  4. Test
    uv run pytest

All four must exit clean (ruff/ty report no remaining issues, pytest reports no failures) before the change is done. If ty or ruff flag something that can't be fixed immediately (e.g. a third-party stub gap), say so explicitly rather than silently ignoring the finding — don't suppress with blanket # noqa / # type: ignore unless the suppression targets the exact rule and includes a short reason.

Test coverage expectations ("appropriate pytest")

  • New functions/modules with non-trivial logic get at least one test that exercises the golden path and one that exercises a realistic edge case (empty input, error path, boundary value) — not just a smoke test that imports the module.
  • Tests live under tests/, named test_*.py, mirroring the source layout they cover.
  • Don't write tests for trivial pass-through code (e.g. a one-line wrapper with no branching) — match effort to actual risk, per jyje's general no-superfluous-abstraction preference.

Notes

  • Run these commands from the uv project root (where pyproject.toml lives), not from a subdirectory — uv run resolves the project from there.
  • If ruff or ty aren't yet in pyproject.toml's dev group, add them first (see above) rather than invoking a global/ad-hoc install.

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.