agentleFS
niksavisniksavis/basicly/.agents/skills/python/SKILL.md

python

Skill2 starsChanged 4 days agoMITView on GitHub

Writes typed Python with pathlib and Windows-safe subprocesses, and judges if an abstraction earns its keep. Use for .py edits, an except clause, a size gate or a silenced warning.

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use android-kotlin, java and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • alinaqiSkill

    android-kotlin

    Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing

    Also in 4 projects that use this

  • testdino-hqSkill

    java

    Google's official Java style guide. Covers 2-space indentation, 100-char line limit, naming conventions, braces, imports, Javadoc, exception handling, lambdas, and streams. Enforces @Override annotations and specific imports.

    Also in 6 projects that use this

  • testdino-hqSkill

    csharp

    Google's official C# style guide. Covers naming conventions, formatting, LINQ, async/await, XML documentation, and .NET best practices.

    Also in 4 projects that use this

  • ffsshhttiikkSkill

    flutter

    Flutter cross-platform framework

    Also in 4 projects that use this

  • VercelSkill

    react

    React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.

    Also in 7 projects that use this

  • dylantarreSkill

    angular

    Builds token-driven Angular components with signals and standalone components. Use when creating Angular component libraries, integrating design tokens, or building design system components with new control flow syntax.

    Also in 3 projects that use this

  • +1 more from testdino-hq

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write Python that passes the gates on every platform.

    line 9
  2. Very specific:

    Let the formatter own layout: Do not format by hand. Run ruff format and ruff check.

    line 26

“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “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
<!-- Generated by `basicly skills-build` from skill.yaml. Do not edit; edit the source. -->

Python

Write Python that passes the gates on every platform. The pre-commit hook runs every check that basicly.toml declares for mode fast, for example ruff and pyright. This skill holds the decisions that those gates cannot make.

Rules

  • Leave except A, B: unchanged. On Python 3.14 and later, PEP 758 makes it valid, and it catches either type. It is not the Python 2 capture form.
  • Keep the parentheses when the clause binds a name: except (A, B) as err:. Without them Python raises multiple exception types must be parenthesized when using 'as'.
  • Copy os.environ into a child environment. A bare env dict drops PATH, and Windows then raises [WinError 2].
  • Pass an argv list, not a shell string. shlex.split removes the backslashes of a Windows path.
  • Type-hint public functions, methods and dataclass fields. A public signature is a contract. Inference covers obvious local names.
  • Use pathlib.Path for filesystem work, not os.path string operations.
  • Let the formatter own layout. Do not format by hand. Run ruff format and ruff check.
  • Commit early and let the hook name a type error. A clean ruff check and a green pytest do not prove that pyright passes.

Type test doubles and helpers

Make a helper precise about the type it returns. Make a parameter structural about the double it receives.

  • Return the concrete type: def _fake_args() -> argparse.Namespace:, not -> object. An object trips reportArgumentType at the first call site that passes it on.
  • Type a captured container to its real value type: dict[str, list[str]], not dict[str, object]. An object value trips reportOperatorIssue when the test indexes or compares it.
  • Type a parameter that receives a double as Callable[..., _Proc] or a Protocol, never as a sibling fake class. A second fake or a lambda then fails with "_FakeB" is not assignable to "_FakeA" (reportArgumentType).

Shell out on every platform

Two subprocess mistakes pass on POSIX and fail only on Windows CI. The failure is deterministic, not flaky. Read references/cross-platform.md before you change code that starts a process or builds a command line.

Design decisions

A gate reports a size, a suppression or a complexity, but not the fix. Read references/design.md before you split a file, add an abstraction, silence a warning or choose what to raise and catch.

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.