package-audit

package-audit is a command for Claude Code from oborchers/fractional-cto. It costs 34 tokens per session (757 once invoked), scanned A, original, MIT.

A command that scans an entire Python package repository for issues in its structure, configuration, typing, tests, automation, documentation, and security. It first maps the repository and checks key files such as pyproject.toml, CI workflows, and test files.

In plain words
What is it for?
Use it for a full repository audit, especially before publishing a package or taking over an unfamiliar Python codebase.
Why use it?
It provides a systematic package health check instead of relying on a few manually inspected files. It also records existing good practices before reporting problems.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the python-package plugin — 13 skills, 2 commands, 1 agent shipped together

Good fit Use it for a full repository audit, especially before publishing a package or taking over an unfamiliar Python codebase.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/oborchers/fractional-cto/package-audit
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.

Clone the repo
git clone --depth 1 https://github.com/oborchers/fractional-cto

Made for: Claude Code.

Or install python-package, the plugin that ships this one along with the rest of its 13 skills, 2 commands, 1 agent.

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 package-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/oborchers/fractional-cto/package-audit/github.svg)](https://agentmods.dev/commands/oborchers/fractional-cto/package-audit)
Your own site
<a href="https://agentmods.dev/commands/oborchers/fractional-cto/package-audit"><img src="https://agentmods.dev/badge/commands/oborchers/fractional-cto/package-audit/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 package-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/oborchers/fractional-cto/package-audit"><img src="https://agentmods.dev/badge/commands/oborchers/fractional-cto/package-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 757 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00034 $0.00757
Opus 5.5 $0.00014 $0.00303
Sonnet 5.5 $0.00007 $0.00151
Haiku 4.5 $0.00003 $0.00076

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

Security

Grade A, and why

package-audit 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.

python-package/commands/package-audit.md · 72 lines

What it actually says

Perform a comprehensive audit of the entire Python package repository (or the scope provided as argument).

Follow this process:

  1. Discover the package: Use Glob and Read to understand the repository structure:

    • Identify whether it uses src/ or flat layout
    • Map the directory structure and module boundaries
    • Locate pyproject.toml, setup.py/setup.cfg (if any legacy files remain)
    • Identify CI configuration, documentation, and test directories
    • Check for py.typed marker, init.py files, _internal/ convention
  2. Sample strategically: Read key files:

    • pyproject.toml (always — this is the most important file)
    • init.py files (check all, public API surface)
    • Configuration files (ruff, mypy, pytest sections in pyproject.toml)
    • CI workflows (.github/workflows/)
    • Documentation config (mkdocs.yml or conf.py)
    • SECURITY.md, CONTRIBUTING.md, CHANGELOG.md
    • 3-5 representative source files from the main package
    • 2-3 test files
  3. Establish the package's current state: Before flagging violations, document what the package already does well:

    • Which modern standards it follows
    • What tooling is already configured
    • What patterns are established
  4. For each python-package principle, invoke the corresponding skill and audit:

    • Project Structure — src/ layout, init.py, py.typed, _internal/
    • pyproject.toml — PEP 621 metadata, build backend, dependency groups, SPDX license
    • Code Quality — Ruff config, mypy strict, modern type hints
    • Testing Strategy — pytest config, coverage, fixtures, strict mode
    • CI/CD — GitHub Actions, test matrix, trusted publishing, caching
    • Documentation — MkDocs Material, Diataxis, docstrings
    • Versioning & Releases — SemVer, changelog, deprecation policy
    • API Design — all, progressive disclosure, exception hierarchy
    • Packaging & Distribution — wheels, platform tags, package size
    • Security & Supply Chain — OIDC, Sigstore, SECURITY.md, dependency scanning
    • Developer Experience — one-command setup, CONTRIBUTING.md, Makefile
  5. Report findings in this structure:

    Package Overview

    • Package name, layout, Python version support, build backend, total source files

    Current Strengths

    • What the package already does well (acknowledge compliance)

    Findings by Principle

    For each principle with violations:

    • [Principle Name] — X violations
    • Specific findings with file:line references
    • Whether this is a systemic issue or isolated
    • The fix (show before/after for configurations)

    Migration Path

    • If legacy patterns exist (setup.py, setup.cfg), outline migration steps
    • Prioritized list of changes by impact

    Summary

    • Severity counts: Critical / Important / Suggestion
    • Top 5 highest-impact improvements
    • Overall package health: exemplary / solid / adequate / needs-work / non-compliant
    • One-paragraph verdict

Focus on actionable improvements with the highest impact. A missing trusted publishing setup matters more than a slightly suboptimal Ruff rule.

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 · 72 lines · 34 tokens per session scan A 4e830a8ced11

Subscribe to this mod's changes

package-audit is a command published in the GitHub repository oborchers/fractional-cto (32 stars, last pushed 3d ago), licensed MIT. It adds 34 tokens to every session and 757 once invoked, about $0.0001 per session on Opus 5.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-10-13.