python-package-api-interface-design

python-package-api-interface-design is a skill for Claude Code, Codex from HolobiomicsLab/asb-skill-collections. It costs 54 tokens per session (1,833 once invoked), scanned B, original, Apache-2.0.

A design guide for organizing and exposing utility functions in a scientific Python library. It covers subpackages, stable imports, public interfaces, testing, and Sphinx reference documentation.

In plain words
What is it for?
Use it when building or refactoring a scientific Python package with related analysis, filtering, or computation functions that should be publicly available.
Why use it?
It helps library users reliably import functions and helps maintainers keep the public API understandable as the package changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building or refactoring a scientific Python package with related analysis, filtering, or computation functions that should be publicly available.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/holobiomicslab/asb-skill-collections/python-package-api-interface-design
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.

Any agent
npx skills add HolobiomicsLab/asb-skill-collections --skill python-package-api-interface-design
Clone the repo
git clone --depth 1 https://github.com/HolobiomicsLab/asb-skill-collections

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for python-package-api-interface-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/holobiomicslab/asb-skill-collections/python-package-api-interface-design/github.svg)](https://agentmods.dev/skills/holobiomicslab/asb-skill-collections/python-package-api-interface-design)
Your own site
<a href="https://agentmods.dev/skills/holobiomicslab/asb-skill-collections/python-package-api-interface-design"><img src="https://agentmods.dev/badge/skills/holobiomicslab/asb-skill-collections/python-package-api-interface-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-package-api-interface-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/holobiomicslab/asb-skill-collections/python-package-api-interface-design"><img src="https://agentmods.dev/badge/skills/holobiomicslab/asb-skill-collections/python-package-api-interface-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,833 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00054 $0.01833
Opus 5 $0.00027 $0.00916
Sonnet 5 $0.00011 $0.00367
Haiku 4.5 $0.00005 $0.00183

Measured 3d ago against content hash a2c1fa2f0473, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

python-package-api-interface-design scanned grade B with 1 finding 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- Sphinx documentation build completes without warnings and function appears in the generated API reference with correct signature and docstring.
collections/epigenomics/v1/skills/python-package-api-interface-design/SKILL.md · 114 lines

How it starts

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

Python Package API Interface Design

Summary

Design and document a well-structured Python package API that exposes utility functions through organized subpackages (e.g., cooltools.lib) with clear imports, stable interfaces, and comprehensive Sphinx documentation. This skill ensures that scientific computation libraries are discoverable, testable, and maintainable across versions.

When to use

You are building or refactoring a scientific Python library and need to decide how to organize and expose utility functions (e.g., adaptive coarse-graining, filtering, analysis routines) so that end users can import and call them reliably. Use this skill when you have a set of related functions that should live in a logical subpackage (lib, utils, analysis) and you want to document the API surface, enforce code quality, and validate that the interface works as intended.

When NOT to use

  • Your package is a single-file script or does not need to expose a public API to other projects.
  • You are working with unstable, experimental code that is not ready for external consumption (the article notes: 'New functionality for smoothing P(s) and derivatives (API is not yet stable)').
  • Your primary goal is rapid prototyping; formal API design and documentation overhead may not justify the effort until the library is stabilized.

Inputs

  • Python source files with utility functions (e.g., .py modules)
  • Package structure with init.py files defining public exports
  • Docstrings in Numpy or similar parseable format
  • Configuration files (setup.py, setup.cfg, pyproject.toml, Sphinx conf.py)

Outputs

  • Organized subpackage (e.g., cooltools.lib) with importable public API
  • Sphinx-generated HTML API reference documentation
  • pytest unit test suite confirming importability and function behavior
  • Code coverage and style reports (pytest-cov, pytest-flake8 output)
  • Formatted source code passing black or autopep8 checks

How to apply

Organize utility functions into a dedicated subpackage (e.g., cooltools.lib) with explicit init.py imports that expose the public API. Write each function with Numpy-style docstrings so that Sphinx can automatically generate API reference documentation. Install the package in editable (development) mode using pip install -e . to allow rapid testing of changes. Run pytest with code-coverage extensions (pytest-cov) and style checks (pytest-flake8, flake8) to ensure functions meet quality standards. Apply a code formatter like black or autopep8 to maintain consistent style. Build the Sphinx documentation locally with make docs and verify that the function appears in the API reference with correct signatures and docstrings. Confirm via pytest that the function is importable from the intended path (e.g., from cooltools.lib import adaptive_coarsegrain) and behaves as expected in unit tests.

Read the full file on GitHub · 114 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. 3d ago First seen · 114 lines · 54 tokens per session scan B a2c1fa2f0473

Subscribe to this mod's changes

python-package-api-interface-design is a skill published in the GitHub repository HolobiomicsLab/asb-skill-collections (15 stars, last pushed 4d ago), licensed Apache-2.0. It adds 54 tokens to every session and 1,833 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.

Related

Other skills, from other repositories

pytdc

Use Therapeutics Data Commons through the PyTDC Python package for registry discovery, approved dataset access, task-aware splits (scaffold, cold-start, temporal, combination), evaluator metrics, benchmark groups, and bounded molecular-oracle workflows. Use this skill to find which TDC datasets exist for a therapeutic…

K-Dense-AI/drug-discovery-agent-skills · 150 tokens

datamol

Pythonic wrapper around RDKit with a simplified interface and sensible defaults. Preferred for standard drug discovery work — SMILES/SELFIES/InChI conversion, molecule standardization and sanitization, descriptors, ECFP and other fingerprints, Tanimoto distance matrices, Butina clustering and diverse subset picking…

K-Dense-AI/drug-discovery-agent-skills · 178 tokens

biopython-sequence-analysis

Biopython sequence analysis: parse FASTA/FASTQ/GenBank/GFF (SeqIO), NCBI Entrez (esearch/efetch/elink), remote/local BLAST, pairwise/MSA alignment (PairwiseAligner, MUSCLE/ClustalW), phylogenetic trees (Phylo). Use for gene family studies, phylogenomics, comparative genomics, NCBI pipelines. For…

jaechang-hits/SciAgent-Skills · 118 tokens

pyimagej-fiji-bridge

Python bridge to ImageJ2/Fiji for macros, plugins (Bio-Formats, TrackMate, Analyze Particles), NumPy↔ImagePlus/ImgLib2 exchange, and ImageJ Ops. Automates Fiji headlessly from Python. Use scikit-image for pure Python without Fiji plugins; napari for visualization.

jaechang-hits/SciAgent-Skills · 73 tokens

trackpy-particle-tracking

Python library for single-particle tracking (SPT) in video microscopy via the Crocker-Grier algorithm. Locate particles (fluorescent spots, colloids, vesicles, cells) per frame, link into trajectories, filter short tracks, and compute MSD for diffusion analysis. 2D/3D with subpixel accuracy; reads TIF stacks, AVI…

jaechang-hits/SciAgent-Skills · 103 tokens

anndata-data-structure

Annotated matrices for single-cell genomics. Stores X with obs/var metadata, layers, embeddings (obsm/varm), graphs (obsp/varp), uns. Use for .h5ad/.zarr I/O, concatenation, scverse integration. For analysis use scanpy; for probabilistic models use scvi-tools.

jaechang-hits/SciAgent-Skills · 76 tokens