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/mckruz/claude-code-sdlc/api-pattern-pythonnpx skills add MCKRUZ/claude-code-sdlc --skill api-pattern-pythongit clone --depth 1 https://github.com/MCKRUZ/claude-code-sdlcWhat 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.00106 | $0.00953 |
| Opus 5 | $0.00053 | $0.00477 |
| Sonnet 5 | $0.00021 | $0.00191 |
| Haiku 4.5 | $0.00011 | $0.00095 |
Grade A, and why
api-pattern-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 — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API pattern — Python
Consistency is the point: the same kind of work looks the same everywhere, so the reviewer and the
next agent read it without re-learning. You do not invent structure — you locate the codebase's
canonical example and replicate it. The depth is in .claude/rules/project-structure.md.
Procedure
-
Find the canonical example. If the spec names one under "Reuse this pattern," read it. Otherwise
Grepfor the nearest sibling of the same shape and pick the most recent, most-tested one — not the oldest. Useful anchors:- the package's public surface:
src/*/__init__.py(what the codebase chooses to export) - a CLI command:
Grepforargparse,add_parser(,@click.command, or@app.command - a loader/parser of the same input kind:
Grepforyaml.safe_load,json.load,Path( - the project's exception base:
Grepforclass .*Error\(/Exception\) - the entry-point wiring:
[project.scripts]inpyproject.toml
- the package's public surface:
-
Extract the pattern, don't paraphrase it. Note, from the example:
- Layering — CLI/entry point (parses args, prints, sets the exit code) → service function (pure logic, returns values, raises domain errors) → I/O or client. Human output lives at the CLI layer only; the layer below it logs and returns.
- The signature — fully annotated params and return. What typed object it returns (dataclass /
TypedDict/ model), not a rawdict[str, Any]. - Validation — where external input is parsed into that typed object, at the boundary, once.
- Error model — which domain exception it raises and from which base; what it deliberately
does not catch. Confirm it never swallows (
except: pass) and never bare-excepts. - Logging —
logging.getLogger(__name__), structured, on failure paths. - Naming and placement —
snake_casemodule under the right package, one concern per module. - The test shape —
tests/test_<module>.py,test_scenario_expected_resultnames, fixtures (tmp_path,monkeypatch) over setup methods,@pytest.mark.parametrizefor variant cases.
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 · 63 lines · 106 tokens per session scan A 7182a1c40d8d
api-pattern-python is a skill published in the GitHub repository MCKRUZ/claude-code-sdlc (4 stars, last pushed 5d ago), licensed MIT. It adds 106 tokens to every session and 953 once invoked, about $0.0005 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
bump-dependency
Bumps a Python package dependency across Home Assistant Core integrations, regenerates core requirement files, runs verification tests and prek lint, and prepares a pull request with proper release/compare links.
biopython
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…
marimo-pair
Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.
adk-style
Python style and codebase conventions for ADK (Agent Development Kit): private-by-default file visibility, imports, type hints, Pydantic v2 models, formatting, docstrings, logging, async I/O, file and test layout, and unit test structure. Use when writing or editing ADK source or tests, deciding whether a new file or…
coding
编写并运行 Python 代码,验证脚本逻辑和输出。.
ax-python-agent
Use when writing Python code with axllm for agents, child delegation, tools, MCP, citations, persistent playbook learning, stage instructions, runtime state, final typed responses, and direct-respond executor skipping.