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.
npx agentmods add skills/aleksandarbisevac/claude-plugins/writing-pythonnpx skills add AleksandarBisevac/claude-plugins --skill writing-pythongit clone --depth 1 https://github.com/AleksandarBisevac/claude-pluginsWrote 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.
[](https://agentmods.dev/skills/aleksandarbisevac/claude-plugins/writing-python)<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>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.
| Model | Per session | Once 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 |
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.
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=Trueargument, 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
--selftestcase with no temp directory and nogit 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.
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.
- 3d ago First seen · 135 lines · 161 tokens per session scan A 88ebea887a5a
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.
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.
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.
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.
python-testing
Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.
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.
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.