coding-guidance-python

A set of practical rules for writing, changing, refactoring, and reviewing Python code. It focuses on clear interfaces, reliable types, tests, and maintainable module boundaries.

In plain words
What is it for?
Use it for Python features, bug fixes, refactors, code reviews, package layout, or work involving services, workers, subprocesses, or external input.
Why use it?
It reduces uncertainty about how Python code should be structured and tested, especially in production projects.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/n-n-code/n-n-code-skills/coding-guidance-python
Any agent
npx skills add n-n-code/n-n-code-skills --skill coding-guidance-python
Clone the repo
git clone --depth 1 https://github.com/n-n-code/n-n-code-skills

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,969 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.01969
Opus 5 $0.00026 $0.00984
Sonnet 5 $0.00011 $0.00394
Haiku 4.5 $0.00005 $0.00197

Measured 2d ago against content hash 34c84e84f8ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

coding-guidance-python scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/coding-guidance-python/SKILL.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Coding Guidance

This skill adds portable Python implementation, refactoring, and review guidance.

Adjacent Skills

This skill provides portable Python engineering principles. Compose with:

  • Workflow: thinking (ambiguous decision framing), recursive-thinking (stress-testing), security (threat modeling)
  • Domain overlays: backend-guidance (server-side code), backend-systems-guidance (stronger backend architecture, reliability, and trust-boundary work), ui-guidance (graphical UI/web frontend), project-core-dev (repo-specific completion discovery and reporting when needed)

Open bundled references only when the task needs that depth:

When Not to Lean on This Skill

  • non-Python work
  • notebook-first exploratory work where reproducibility and module design are not the main concern
  • one-off throwaway scripts where the repo explicitly does not want production Python standards

Implementation Workflow

  1. Read the touched modules, entrypoints, tests, package metadata, and nearby docs before editing.
  2. Infer intended behavior from existing code, imports, and tests when the request is only partially specified. Ask only when multiple plausible designs would change semantics.
  3. Choose the narrowest change that keeps contracts, side effects, error handling, and public API shape explicit.
  4. Implement with simple functions, clear module boundaries, explicit types where they improve the contract, and production-safe behavior at I/O boundaries.
  5. Add or update tests close to the changed behavior using the repo's existing framework and conventions. Use fixtures or parameterization when they make setup and cases clearer rather than merely shorter.
  6. Run the narrowest relevant formatter, linter, type checker, packaging check, and test targets the repo supports.

Read the full file on GitHub · 196 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 196 lines · 53 tokens per session scan A 34c84e84f8ad

Subscribe to this mod's changes

coding-guidance-python is a skill published in the GitHub repository n-n-code/n-n-code-skills (4 stars, last pushed 4d ago), licensed MIT. It adds 53 tokens to every session and 1,969 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cocoscout

Relevance-ranked context loading — Tier 2 async subagent (Haiku, <5s) that fires after Tier 1 deterministic checks in UserPromptSubmit. Injects ranked context from CocoGrove, CocoContext, Environment Inspector, Prompt Studio, and CocoDream.

Snowflake-Labs/cocoplus · 59 tokens

cocowatch

Developer engagement observer — non-blocking, always-on observational layer that tracks Delegation Intensity, Review Depth, and Engagement Zone throughout a session. Summary surfaced at $ship and FULL checkpoints.

Snowflake-Labs/cocoplus · 43 tokens

the-grilling

Use when adversarial brainstorming is needed after reconnaissance — the Proposer, Devils-Advocate, and Synthesizer each run ONE pass (no rounds); the Don is grilled on the IDEA first, one question at a time, then the proposal is attacked.

kucherenko/gangsta · 55 tokens

using-gangsta

Use when starting any conversation — establishes how to find and use Gangsta skills, enforces the 1% invocation rule, maps platform tools, and routes the Don's intent through the Gangsta Agents Family hierarchy.

kucherenko/gangsta · 47 tokens

interrogation-debugging

Use when encountering any bug, test failure, or unexpected behavior — finds the rat in the code through systematic root-cause interrogation before any fix attempts.

kucherenko/gangsta · 35 tokens

the-hit

Use when the execution plan is approved and it is time for parallel execution — dispatches workers through crew leads to implement work packages with TDD enforcement, report collection, and escalation protocols.

kucherenko/gangsta · 39 tokens