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 instructions/rjmurillo/ai-agents/pythongit clone --depth 1 https://github.com/rjmurillo/ai-agentsWrote 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/instructions/rjmurillo/ai-agents/python)<a href="https://agentmods.dev/instructions/rjmurillo/ai-agents/python"><img src="https://agentmods.dev/badge/instructions/rjmurillo/ai-agents/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.01593 | $0.01593 |
| Opus 5 | $0.00796 | $0.00796 |
| Sonnet 5 | $0.00319 | $0.00319 |
| Haiku 4.5 | $0.00159 | $0.00159 |
Grade A, and why
ai-agents python.instructions.md 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 yesterday.
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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Rules
These rules apply when you write or review Python. The dev and install target is
3.14 (.python-version, CI, requires-python = ">=3.14"). But plugin hooks and
skill scripts run under the host's ambient interpreter, which may be older, so a
blocking gate (scripts/validation/validate_python_syntax.py, issue #2655)
requires every tracked file to parse at the hook-portability syntax floor,
currently 3.10. Write to that floor: avoid syntax newer than 3.10, such as PEP
695 generics (def f[T](), 3.12+) and PEP 758 unparenthesized except A, B:
(3.14). Defer to pyproject.toml, ruff config, and mypy settings over
personal preference.
Typing
- Type every public function signature: parameters and return. Internal helpers with obvious types may omit annotations, but a boundary without types is a bug.
- Use built-in generics (
list[str],dict[str, int],tuple[int, ...]) andX | Noneinstead ofOptional[X]. - Prefer precise types:
Sequence/Mappingfor read-only parameters,Protocolfor structural interfaces,Literalfor fixed string sets,TypedDictfor structured dict payloads at a boundary. - Run
mypyin CI and treat type errors as failures. A passing type checker is part of the contract, not optional.
Idioms
- Use
@dataclass(frozen=True, slots=True)for immutable value objects. Reach for Pydantic only when you need validation or serialization at a boundary; do not pay its cost for internal data. - Prefer comprehensions and generator expressions over
map/filterwith lambdas. Use a generator when the result is consumed once and may be large; materialize a list only when you need to index or reuse it. - Manage every resource with a context manager (
with). Write your own withcontextlib.contextmanagerrather than pairedopen/closecalls. - Use
pathlib.Pathfor filesystem paths, not string concatenation oros.path. - Use structural pattern matching (
match/case) for dispatch over shapes, not as a glorifiedifchain over equal values; a dict lookup is clearer there.
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.
- yesterday First seen · 118 lines · 1,593 tokens per session scan A 6d2a140a839d
ai-agents python.instructions.md is an instructions file published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed today), licensed MIT. It adds 1,593 tokens to every session, about $0.0080 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-09-03.
Other instructions, from other repositories
MemMachine AGENTS.md
AGENTS.md instructions for MemMachine/MemMachine, covering memmachine agent guide, repository orientation, environment setup, build, lint, and test commands and python (repo root).
technocore-chat AGENTS.md
AGENTS.md instructions for flop-labs/technocore-chat: CI runs exactly these — run them before pushing.
continuum AGENTS.md
AGENTS.md instructions for shyftlabs/continuum, covering continuum — ai assistant knowledge pack, what is continuum?, repository layout, setup invariants (do not violate) and core api.
infrahub-mcp tooling.instructions.md
Instructions for opsmill/infrahub-mcp, a project described as: MCP server for Infrahub.
caddis-plugin python.instructions.md
Python coding conventions and guidelines.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).