# Python API

> Look up the public API of a Python package against the installed version and cache what's worth keeping. Four shapes by question type: (0) cache hit under scratch/api/<lib/<version/; (1) inspect.signature + pydoc.renderdoc for a symbol; (2) dir / pkgutil.itermodules for a module surface; (3) WebSearch + WebFetch of versioned docs for narrative ("how", "which", "what does X return when Y"). Never write a symbol from training-data memory — recognition is not a lookup. TRIGGER — any of: - About to name a symbol (function / class / method / arg) in code. - User asks "what's the signature of X?", "what's in module Y?", "how do I call X?", "which of A/B should I use?". - User asks "what does X return when <condition?" (Shape 3 — see decision table). - Another workflow skill (build-ml-pipeline, evaluate-ml-pipeline, iterate-from-skore, smoke-test-ml-pipeline) says "consult the API skill". - About to reach for a library's "obvious" pattern from memory. SKIP when: the signature is obvious from a call site you just read in this turn; the work is filesystem / shell only (no Python symbols); a scratch/api/<lib/<version/<topic.md cache file already answers the question (still a Shape 0 consultation — you just don't fetch). HOW TO USE: resolve the package version first via a scratch file (scratch/<tsversion<pkg.py with import <pkg; print(<pkg.version) — run with pixi run python scratch/<tsversion<pkg.py). Then list scratch/api/<lib/<version/. Then pick the shape from the "What kind of question?" table. Narrative findings get cached back. All Python execution goes through scratch/<ts.py files — inline python -c is forbidden regardless of length. Stack-specific orientation lives in references/stackorientation.md — load on demand.

## Facts
- Page: https://tashan.sh/capability/skill-probabl-ai-python-api
- tashan id: skill:probabl-ai/python-api
- Source: https://github.com/probabl-ai/skills
- Type: skill
- Category: other
- tashan score: not scored (catalogued only — too little public evidence)
- Adoption: 9.0
- Upkeep: 97.0
- Freshness: 94.0
- Evidence coverage: 84% of the inputs this score can use
- Health: active
- Instruction depth: not yet graded
- License: BSD-3-Clause
- Official: no

## Install

```sh
cp -r python-api ~/.claude/skills/
```

## Security audit
Not scanned. We audit npm-published capabilities; this one has no npm package we can resolve, or has not reached the queue. This is not a clean bill of health.

---
Measured 2026-08-14 by tashan (https://tashan.sh) from public evidence. Scorer s5.
