agentleFS
JakkuSakuraJakkuSakura/skills/python/SKILL.md

python

Skill1 starsChanged 9 months agoMITView on GitHub

Use when writing or refactoring Python code under strict style constraints that require explicit field access, no reflection-style checks, no implicit defaults, and minimal exception handling.

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 10 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

  • mcollinaSkill

    node

    Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules, testing, performance, caching, logging, and more. Use when setting up Node.js projects with native TypeScript support, configuring type stripping (--experimental-strip-types), writing Node 22+ TypeScript without a build step, or when the user mentions 'native TypeScript in Node', 'strip types', 'Node 22 TypeScript', '.ts files without compilation', 'ts-node alternative', or needs guidance on error handling, graceful shutdown, flaky tests, profiling, or environment configuration in Node.js. Helps configure tsconfig.json for type stripping, set up package.json scripts, handle module resolution and import extensions, and apply robust patterns across the full Node.js stack.

    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

  • +1 more from testdino-hq

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user wants strict, explicit Python code with low ambiguity and fail-fast behavior.

    line 8
  2. Distinctive:

    Put all imports at the top of the file.

    line 11
  3. Very specific:

    Never use getattr or hasattr.

    line 12
  4. Very specific:

    Never use isinstance type checks.

    line 13
  5. Distinctive:

    Do not introduce implicit defaults for required data paths.

    line 14
  6. Very specific:

    Avoid unnecessary try/except.

    line 15
  7. Distinctive:

    Use direct indexing/attribute access for required fields.

    line 19
  8. Distinctive:

    Prefer fail-fast errors over silent fallback behavior.

    line 21
  9. Distinctive:

    Keep control flow straightforward.

    line 22
  10. Very specific:

    No reflective access helpers (getattr, hasattr).

    line 26
  11. Very specific:

    No runtime type filtering with isinstance.

    line 27
  12. Distinctive:

    No hidden default values for required fields.

    line 28

“Common” is measured: kept by at least 6 in 10 of the 40 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

Python (Strict)

Use this skill when the user wants strict, explicit Python code with low ambiguity and fail-fast behavior.

Core Rules

  • Put all imports at the top of the file.
  • Never use getattr or hasattr.
  • Never use isinstance type checks.
  • Do not introduce implicit defaults for required data paths.
  • Avoid unnecessary try/except; only keep exception handling for a clearly required fallback or boundary.

Implementation Pattern

  1. Validate required keys/attributes explicitly.
  2. Use direct indexing/attribute access for required fields.
  3. For optional branches, use explicit if "key" in obj checks.
  4. Prefer fail-fast errors over silent fallback behavior.
  5. Keep control flow straightforward; avoid defensive swallowing of errors.

Review Checklist

  • Imports are module-level and grouped at file top.
  • No reflective access helpers (getattr, hasattr).
  • No runtime type filtering with isinstance.
  • No hidden default values for required fields.
  • Exception blocks are minimal and justified.
  • Errors are explicit and actionable.

References

  • references/patterns.md for quick before/after rewrite patterns.

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.