kicad-sch-api: Command for Claude Code

.claude/commands/dev/publish-pypi.md

publish-pypi is a command for Claude Code from circuit-synth/kicad-sch-api. It costs 0 tokens per session (5,446 once invoked), scanned D, original, MIT.

A release command for publishing a Python package to PyPI, the main public service for sharing Python packages. It takes a version number and runs the release checks, version update, Git steps, and publication.

In plain words
What is it for?
Use it to test or publish a new Python package version, or to run the release checks without publishing. It can publish to Test PyPI, a separate testing service, before the real release.
Why use it?
It gathers the repetitive release work into one documented process and checks for common problems such as an invalid version, uncommitted changes, or an existing release.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is circuit-synth/kicad-sch-api's own configuration. It tells Claude Code how to work on kicad-sch-api itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kicad-sch-api configures →

Reuse

Borrowing it

Nothing to install: this file belongs to circuit-synth/kicad-sch-api. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/circuit-synth/kicad-sch-api/main/.claude/commands/dev/publish-pypi.md
Clone the repo
git clone --depth 1 https://github.com/circuit-synth/kicad-sch-api

Made for: Claude Code.

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 publish-pypi

README.md
[![agentmods](https://agentmods.dev/badge/commands/circuit-synth/kicad-sch-api/publish-pypi/github.svg)](https://agentmods.dev/commands/circuit-synth/kicad-sch-api/publish-pypi)
Your own site
<a href="https://agentmods.dev/commands/circuit-synth/kicad-sch-api/publish-pypi"><img src="https://agentmods.dev/badge/commands/circuit-synth/kicad-sch-api/publish-pypi/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 publish-pypi

Your own site · 80×15
<a href="https://agentmods.dev/commands/circuit-synth/kicad-sch-api/publish-pypi"><img src="https://agentmods.dev/badge/commands/circuit-synth/kicad-sch-api/publish-pypi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,446 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 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.00000 $0.05446
Opus 5 $0.00000 $0.02723
Sonnet 5 $0.00000 $0.01089
Haiku 4.5 $0.00000 $0.00545

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

Security

Grade D, and why

publish-pypi scanned grade D with 2 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 10d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Set proper file permissions: `chmod 600 ~/.pypirc`

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf build/ dist/ *.egg-info/ kicad_sch_api.egg-info/
.claude/commands/dev/publish-pypi.md · 711 lines

How it starts

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

PyPI Release Command - kicad-sch-api

Usage

/publish-pypi <version> [--test-only] [--check-only]

⚠️ CRITICAL: Version number is MANDATORY - command will fail if not provided!

Description

Complete PyPI release pipeline - from testing to tagging to publishing. This command handles version management, git operations, comprehensive testing, and PyPI publication.

Parameters

  • version - REQUIRED Version number (e.g., "0.4.1", "1.0.0", "0.5.0-beta.1")
  • --test-only: Publish to Test PyPI only (for validation)
  • --check-only: Run all checks without publishing

What This Command Does

This command automates the complete release process:

1. Pre-Release Validation

  • Check branch status - Ensure we're on main branch
  • Validate version format - Semantic versioning check
  • Check for uncommitted changes - Ensure clean working directory
  • Sync with remote - Fetch latest changes from origin
  • Version conflict check - Ensure version doesn't already exist on PyPI or git tags

2. Version Management

  • Update pyproject.toml - Set new version number
  • Commit version changes - Clean commit for version bump
  • Show version comparison - Display current vs new version

3. Testing and Validation

  • Run full test suite - All tests must pass
  • Code quality checks - Black, isort, mypy, flake8
  • Format preservation tests - Critical for KiCAD compatibility
  • Build package - Create wheel and sdist
  • Test installation - Verify package installs correctly
  • Import validation - Ensure package imports work

4. Git Operations

  • Create release tag - Tag commit with version number
  • Push release tag - Push tag to origin
  • Create GitHub release - Generate release notes and publish

5. PyPI Publication

  • Build distributions - Create wheel and sdist
  • Upload to PyPI - Publish to registry
  • Verify upload - Check package is available

6. Post-Release Verification

  • Test installation from PyPI - Verify package works
  • Display release summary - Show URLs and next steps

Read the full file on GitHub · 711 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. 10d ago First seen · 711 lines · 0 tokens per session scan D f72c259e9d62

Subscribe to this mod's changes

publish-pypi is a command published in the GitHub repository circuit-synth/kicad-sch-api (52 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,446 tokens. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.