writing-python

writing-python is a skill for Claude Code, Codex from AleksandarBisevac/claude-plugins. It costs 161 tokens per session (2,204 once invoked), scanned A, original, MIT.

A set of Python coding rules for a particular repository, including its supported Python version, allowed libraries, preferred function style, and checks enforced by code analysis.

In plain words
What is it for?
Use it when writing or reviewing Python in the repository, especially when choosing syntax, imports, data flow, functions, classes, and formatting.
Why use it?
It prevents code that looks acceptable in general Python but fails this project’s automated checks or adds unsupported language features and dependencies.

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/aleksandarbisevac/claude-plugins/writing-python
Any agent
npx skills add AleksandarBisevac/claude-plugins --skill writing-python
Clone the repo
git clone --depth 1 https://github.com/AleksandarBisevac/claude-plugins

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for writing-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/aleksandarbisevac/claude-plugins/writing-python.svg)](https://agentmods.dev/skills/aleksandarbisevac/claude-plugins/writing-python)
Your own site
<a href="https://agentmods.dev/skills/aleksandarbisevac/claude-plugins/writing-python"><img src="https://agentmods.dev/badge/skills/aleksandarbisevac/claude-plugins/writing-python.svg" alt="Measured on agentmods" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,204 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.00161 $0.02204
Opus 5 $0.00081 $0.01102
Sonnet 5 $0.00032 $0.00441
Haiku 4.5 $0.00016 $0.00220

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

Security

Grade A, and why

writing-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 3d 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.

.claude/skills/writing-python/SKILL.md · 135 lines

How it starts

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

Writing Python here

Not a general Python style guide. This repo bans things most guides mandate, and the bans are read out of the AST rather than trusted — _output.house_style_violations() fails the build, it does not warn. Everything below is either enforced or measured from the tree as it stands.

The dialect, in one paragraph

Stdlib only. Python 3.8 floor. No typing, no dataclasses, no annotations, no walrus, no from __future__ — banned by AST, because hooks start on every tool call and the import and parse cost is real. %-style formatting; there is not one f-string in the tree. Reach for os.path, json, re, subprocess — not for a dependency.

3.8 also rules out things that read as ordinary today: no X | Y unions, no match, no dict1 | dict2 merge, no list[str]. vermin -t=3.8- catches these; it will not catch the banned imports, which is why the AST lint exists alongside it.

Free functions, structured returns

The measured shape of this codebase is top-level functions by the hundred against a handful of classes, comprehensions everywhere, and global statements you can count on one hand. The ratio is the pattern to keep; the figures are not, so re-derive them rather than trusting a sentence:

grep -rhc '^def ' plugins/audit/scripts plugins/audit/hooks --include='*.py' | paste -sd+ | bc
grep -rn '^class \|^ *global ' plugins/audit/scripts plugins/audit/hooks --include='*.py' | wc -l
  • Write a function, not a class. A class here needs a reason you can say out loud — the six that exist are all genuine (a lock, a launcher). Grouping related functions is what a module prefix is for.
  • Return a new value; do not mutate an argument. 181 functions return a dict or tuple. A function that edits the caller's dict in place and also returns it is two contracts and the caller will rely on the wrong one.
  • No module state. Constants at module level are fine (52 of them, uppercase, frozen tables). Mutable module state that a function writes to is how two callers start disagreeing about the same run. Where a cache is genuinely needed the existing pattern is an explicit _cache/cache=True argument, not a hidden global.
  • Comprehensions over accumulate loops when the result is a list or dict and the body is one expression. Past that, a named function reads better than a nested comprehension.
  • Push I/O to the edges. A function that takes values and returns values can be tested by a --selftest case with no temp directory and no git init; one that reads a file and prints cannot. Split the read from the decision — decide() taking parsed input is the shape every hook already uses, and it is why their logic has cases at all.

Read the full file on GitHub · 135 lines

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. 3d ago First seen · 135 lines · 161 tokens per session scan A 88ebea887a5a

Subscribe to this mod's changes

writing-python is a skill published in the GitHub repository AleksandarBisevac/claude-plugins (4 stars, last pushed 5d ago), licensed MIT. It adds 161 tokens to every session and 2,204 once invoked, about $0.0008 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

jupyter-notebook

Use when the user asks to create, scaffold, or edit Jupyter notebooks (.ipynb) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script newnotebook.py to generate a clean starting notebook.

microsoft/ai-agents-for-beginners · 57 tokens

python-package-management

Guide for managing packages in the Agent Framework Python monorepo, including creating new connector packages, versioning, and the lazy-loading pattern. Use this when adding, modifying, or releasing packages.

microsoft/agent-framework · 43 tokens

python-feature-lifecycle

Guidance for package and feature lifecycle in the Agent Framework Python codebase, including stage meanings, feature-stage decorators, feature enums, and how to move APIs from one stage to the next.

microsoft/agent-framework · 43 tokens

python-testing

Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.

microsoft/agent-framework · 29 tokens

python-code-quality

Code quality checks, linting, formatting, and type checking commands for the Agent Framework Python codebase. Use this when running checks, fixing lint errors, or troubleshooting CI failures.

microsoft/agent-framework · 40 tokens

python-development

Coding standards, conventions, and patterns for developing Python code in the Agent Framework repository. Use this when writing or modifying Python source files in the python/ directory.

microsoft/agent-framework · 35 tokens