agentleFS
pesappesap/skills/python/SKILL.md

python

Skill1 starsChanged 3 months agoMITView on GitHub

Write and review Python using pesap's function-first, standard-library-first style, rust-ok errors, and loguru logging. Use for Python implementation, debugging, refactoring, tests, and API design, including requests identified by .py paths or Python repository context rather than the word Python. Not for non-Python tasks or purely conceptual explanations.

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

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

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 5

    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. Distinctive:

    Read local instructions, metadata, public APIs, callers, and relevant tests.

    line 16
  2. Very specific:

    Follow explicit repository requirements, not accidental nearby style.

    line 17
  3. Very specific:

    Keep meaningful types; do not hide uncertain contracts behind Any or casts.

    line 61
  4. Distinctive:

    Use context managers for resources and readable loops over clever chains.

    line 62
  5. Distinctive:

    Do not block an async event loop.

    line 63
  6. Distinctive:

    Test public success, failures, and supported flag combinations.

    line 69
  7. Distinctive:

    Do not preload references or evaluation files.

    line 82

“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

First

Read local instructions, metadata, public APIs, callers, and relevant tests. Follow explicit repository requirements, not accidental nearby style. Ask about conflicting requirements before editing. Preserve configured tooling; use uv for new or unconfigured projects. Change only what the task requires.

Default decisions

DecisionUse
DependencyStdlib when it meets the task's correctness and operational requirements. rust-ok and loguru are explicit exceptions. Reuse canonical public APIs, not dependency-removal rewrites.
ComputationTyped functions with explicit inputs and returned values. Separate I/O and logging. No stateless manager classes, one-use factories, or inheritance frameworks.
DataExisting domain models first; stdlib dataclasses for new named records. Use distinct types for meaningful states, not wrappers for every scalar. Classes may own real state or resources.
ReturnOrdinary computation: T. Expected recoverable failure: Result[T, E]. Fallible command with no payload: Result[None, E]. Do not invent success payloads.
ParametersPrimary data operands positional-only (/); everything else keyword-only (*). Configuration-only APIs need no positional operand. Respect framework-mandated signatures.
Public APIExport supported operations through __init__.py; each delegates to an underscore-free implementation. No leading-underscore function names except required protocols. Exports define support, not access control.
ConfigurationRequire a domain-named context such as ctx: CsvImportContext for configured operations. Inject typed immutable snapshots, not generic Context bags, default instances, or environment lookups. Independent flags use booleans; exclusive behaviors use modes. Flags never bypass validation.
LoggingLoguru, not a fallback. Configure sinks at the application boundary; library logging is opt-in and never reconfigures application sinks. Keep CLI stdout for data.

Working pattern

This internal helper demonstrates a Result boundary, not a package export. Copy the contract, not its domain. Do not wrap a sufficient direct stdlib call.

from rust_ok import Err, Ok, Result


def parse_integer(raw: str, /, *, base: int = 10) -> Result[int, ValueError]:
    """Parse an integer, retaining expected conversion errors as values."""
    try:
        value = int(raw, base=base)
    except ValueError as error:
        return Err(error)
    return Ok(value)

Guardrails

  • Handle or propagate every Result. Catch specific documented exceptions at the failing operation. Preserve error context; no bare unwrap, swallowed error, broad suppression, or success-shaped fallback. Programming defects remain visible, not ordinary failure values.
  • Validate external input explicitly; annotations and removable assertions are not runtime validation. Use zip(strict=True) for equal lengths and unpacking for required cardinality. Do not revalidate trusted data everywhere.
  • Keep meaningful types; do not hide uncertain contracts behind Any or casts. Use context managers for resources and readable loops over clever chains. Do not block an async event loop. Measure performance claims.
  • Reuse public APIs and fixtures. No legacy compatibility wrappers, unrelated dependency churn, generated-file edits, logging wrappers, or print debugging.

Finish

Test public success, failures, and supported flag combinations. Reproduce bugs when practical. Run configured format, lint, type, and behavior checks, starting narrowly. Do not silence findings with blanket ignores, casts, or disabled rules. Pedantic sweeps are diagnostic, not automatic policy changes. Report results and gaps.

Read only when needed

  • Public facades, domain contexts, flags, structured returns, or cross-package error translation: patterns.
  • Public docstrings or array shape/dtype/axis contracts: docstrings.
  • Requested strict sweep: inspect Ruff or ty; these use installed tools, not installers.

Do not preload references or evaluation files.

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.