python-api-docs

A set of rules for documenting public Python code and MCP tool handlers with accurate explanations and type information. It also covers keeping generated API reference documentation up to date.

In plain words
What is it for?
Use it when adding or changing public Python modules, classes, functions, or MCP tools. It guides docstrings, type hints, and API-reference build changes.
Why use it?
It helps people and AI agents understand how public functions behave, including their inputs, outputs, requirements, and side effects. This reduces the chance that documentation becomes misleading after code changes.

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/hs737/mcp-server-for-ynab/python-api-docs
Any agent
npx skills add hs737/mcp-server-for-ynab --skill python-api-docs
Clone the repo
git clone --depth 1 https://github.com/hs737/mcp-server-for-ynab

Made for: Claude Code, Codex.

Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 603 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.00024 $0.00603
Opus 5 $0.00012 $0.00302
Sonnet 5 $0.00005 $0.00121
Haiku 4.5 $0.00002 $0.00060

Measured yesterday against content hash 39294b8b0c50, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python-api-docs 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.

.agents/skills/python-api-docs/SKILL.md · 53 lines

How it starts

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

Python API Docs

Use this skill when adding or changing public Python modules, classes, functions, or MCP tool handlers whose contracts should be clear to humans and agents.

Use When

  • Adding or changing exported functions, classes, or protocols in the package
  • Changing behavior, preconditions, side effects, or error semantics
  • Refactoring module boundaries that affect the public surface
  • Updating Sphinx, MkDocs, or other API-reference build config

Read First

  • AGENTS.md (if present)
  • README.md and pyproject.toml (optional doc/build dependency groups)
  • .agents/skills/contract-sync/SKILL.md (when schemas or OpenAPI are involved)
  • .agents/skills/docs-honesty/SKILL.md

Core Rules

  1. Public callables should have docstrings. Follow the style this repo already uses (Google, NumPy, or Sphinx reST)—do not mix styles in one module.
  2. Use type hints on public functions and methods; update hints when behavior changes.
  3. Update docstrings when behavior changes materially; do not leave stale parameter or return descriptions.
  4. For MCP tools, docstrings and parameter descriptions are part of the agent-facing contract—keep them accurate and specific (what the tool does, inputs, failure modes).
  5. Treat HTTP or JSON Schema contracts (Pydantic models, OpenAPI) as the source of truth for wire formats; module docstrings complement those for Python callers.
  6. After substantive public API changes, run this repo’s doc build or type checker if configured (pytest, mypy, pyright, ruff check, doc generator in CI or pyproject.toml scripts).
  7. CI green does not prove prose correctness; verify docstrings against actual code paths.

Workflow

  1. Identify public symbols touched by the change (__all__, documented package exports, MCP tool registrations).
  2. Update docstrings and type hints for changed semantics (Args, Returns, Raises, or equivalent).
  3. Run the repo’s lint/type/doc commands defined in pyproject.toml, Makefile, or CI.
  4. Commit regenerated reference output only if this repo checks it in.
  5. Update README or operator docs if user-visible behavior changed.

Read the full file on GitHub · 53 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. yesterday First seen · 53 lines · 24 tokens per session scan A 39294b8b0c50

Subscribe to this mod's changes

python-api-docs is a skill published in the GitHub repository hs737/mcp-server-for-ynab (1 stars, last pushed 3d ago), licensed Apache-2.0. It adds 24 tokens to every session and 603 once invoked, about $0.0001 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

financial-planner

Your Personal Finance Manager for Canadians — an AI financial planning partner that conducts thorough financial interviews, builds complete plans, generates interactive dashboards, and provides ongoing coaching. Use this skill whenever someone asks about budgeting, saving, investing, debt strategy, retirement…

cjpatten/canadian-finance-planner-skill · 156 tokens

webmcp-nexus

当接入 webmcp-nexus-sdk 的项目中需要新增 WebMCP 工具函数、将现有业务方法改造为 WebMCP 工具函数,或配置 vite-plugin-webmcp-nexus / webpack-plugin-webmcp-nexus 时使用本技能。本技能约束工具函数的签名、JSDoc、TS 类型写法,并提供零风险的改造流程(仅改签名与注释,不动原方法业务逻辑)。触发示例:"新增一个 WebMCP 工具"、"把这个函数改造成能被 AI Agent 调用的工具"、"让 xxx 函数接入 WebMCP"、"配置 webmcp 构建插件"。.

alibaba/webmcp-nexus · 159 tokens

dark-memory

Use for governance, memory, drift detection, and audit trail via dark-memory-mcp. Covers 52 canonical + 3 red-team tools across 16 namespaces: session lifecycle, agentmemory CRUD+search, vibe-flow spec/artifact publish + drift, LLM-as-judge, delegation+mindset, research, observability, error observatory, governance…

Opita-Code/dark-memory-mcp · 353 tokens

driving-unreal

Use when driving an Unreal Engine 5.x editor through the unreal-ai-connection MCP tools — building or populating a level, spawning/transforming actors, authoring materials and material instances, setting up lighting and atmosphere, reconstructing a scene from a reference photo, setting up a sequencer/cinematic shot…

NAJEMWEHBE/unreal-ai-connection · 269 tokens

youtube-transcripts

Read and search YouTube videos through VidWords. Use when the user supplies a YouTube URL, a bare 11-character video id, a youtu.be or Shorts link, or a channel handle, and wants any of: the transcript or subtitles (TXT/SRT/VTT), what a video says about a topic, a quote with a citable timestamp, only the words spoken…

haljishi/vidwords-mcp · 111 tokens

lyrenth-web-reading

Read the content of one or many public web pages through Lyrenth, as clean Markdown instead of raw HTML. Use when the user gives a URL to read, summarize, quote, compare or extract from, or when a link needs to be opened to answer a question.

lyrenth/lyrenth-mcp · 61 tokens