Borrowing it
Nothing to install: this file belongs to richard-luc/KiCAD-Schematic-Manipulation. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/richard-luc/KiCAD-Schematic-Manipulation/main/.claude/commands/dev/publish-pypi.mdgit clone --depth 1 https://github.com/richard-luc/KiCAD-Schematic-ManipulationWrote 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.
[](https://agentmods.dev/commands/richard-luc/kicad-schematic-manipulation/publish-pypi)<a href="https://agentmods.dev/commands/richard-luc/kicad-schematic-manipulation/publish-pypi"><img src="https://agentmods.dev/badge/commands/richard-luc/kicad-schematic-manipulation/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.
<a href="https://agentmods.dev/commands/richard-luc/kicad-schematic-manipulation/publish-pypi"><img src="https://agentmods.dev/badge/commands/richard-luc/kicad-schematic-manipulation/publish-pypi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01791 |
| Opus 5 | $0.00000 | $0.00896 |
| Sonnet 5 | $0.00000 | $0.00358 |
| Haiku 4.5 | $0.00000 | $0.00179 |
Grade A, and why
publish-pypi 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 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.
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.
This is a copy
88% identical to publish-pypi — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Publish to PyPI - MCP KiCAD Schematic API
Usage
/publish-pypi [options]
Description
Builds and publishes the MCP KiCAD Schematic API server package to PyPI, making it available for installation via pip install KiCAD-Schematic-Manipulation.
Options
--version=auto- Version increment:auto,patch,minor,major, or specific version (e.g.,1.2.3)--test-pypi- Upload to Test PyPI instead of production--dry-run- Build package but don't upload--skip-tests- Skip running tests before publishing--force- Bypass confirmation prompts
Implementation
#!/bin/bash
# Parse arguments
VERSION="auto"
TEST_PYPI=false
DRY_RUN=false
SKIP_TESTS=false
FORCE=false
while [[ $# -gt 0 ]]; do
case $1 in
--version=*)
VERSION="${1#*=}"
shift
;;
--test-pypi)
TEST_PYPI=true
shift
;;
--dry-run)
DRY_RUN=true
shift
;;
--skip-tests)
SKIP_TESTS=true
shift
;;
--force)
FORCE=true
shift
;;
*)
echo "Unknown option: $1"
exit 1
;;
esac
done
# Ensure we're in project root
if [[ ! -f "pyproject.toml" ]]; then
echo "❌ Must run from KiCAD-Schematic-Manipulation root"
exit 1
fi
# Get current version
CURRENT_VERSION=$(grep 'version = ' pyproject.toml | sed 's/.*version = "\(.*\)".*/\1/')
echo "📋 Current version: $CURRENT_VERSION"
# Calculate new version
if [[ "$VERSION" == "auto" ]]; then
# Auto-increment patch version
IFS='.' read -ra ADDR <<< "$CURRENT_VERSION"
MAJOR="${ADDR[0]}"
MINOR="${ADDR[1]}"
PATCH="${ADDR[2]}"
NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
elif [[ "$VERSION" == "patch" ]]; then
IFS='.' read -ra ADDR <<< "$CURRENT_VERSION"
MAJOR="${ADDR[0]}"
MINOR="${ADDR[1]}"
PATCH="${ADDR[2]}"
NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
elif [[ "$VERSION" == "minor" ]]; then
IFS='.' read -ra ADDR <<< "$CURRENT_VERSION"
MAJOR="${ADDR[0]}"
MINOR="${ADDR[1]}"
NEW_VERSION="$MAJOR.$((MINOR + 1)).0"
elif [[ "$VERSION" == "major" ]]; then
IFS='.' read -ra ADDR <<< "$CURRENT_VERSION"
MAJOR="${ADDR[0]}"
NEW_VERSION="$((MAJOR + 1)).0.0"
else
NEW_VERSION="$VERSION"
fi
echo "🚀 Publishing version: $NEW_VERSION"
# Confirmation
if [[ "$FORCE" == "false" ]]; then
read -p "Continue with version $NEW_VERSION? (y/N) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "❌ Cancelled"
exit 1
fi
fi
# Run tests first
if [[ "$SKIP_TESTS" == "false" ]]; then
echo "🧪 Running tests..."
pytest tests/ -v || { echo "❌ Tests failed"; exit 1; }
echo "✅ Tests passed"
fi
# Update version in files
echo "📝 Updating version to $NEW_VERSION..."
sed -i.bak "s/version = \".*\"/version = \"$NEW_VERSION\"/" pyproject.toml
sed -i.bak "s/__version__ = \".*\"/__version__ = \"$NEW_VERSION\"/" src/mcp_kicad_sch_api/__init__.py
# Clean up backup files
rm -f pyproject.toml.bak src/mcp_kicad_sch_api/__init__.py.bak
# Build package
echo "📦 Building package..."
python -m build || { echo "❌ Build failed"; exit 1; }
# Validate package
echo "✅ Validating package..."
python -m twine check dist/mcp_kicad_sch_api-$NEW_VERSION* || { echo "❌ Package validation failed"; exit 1; }
if [[ "$DRY_RUN" == "true" ]]; then
echo "🏁 Dry run completed. Package built but not uploaded."
echo "📦 Built: dist/mcp_kicad_sch_api-$NEW_VERSION*"
exit 0
fi
# Upload to PyPI
if [[ "$TEST_PYPI" == "true" ]]; then
echo "🚀 Uploading to Test PyPI..."
python -m twine upload --repository testpypi dist/mcp_kicad_sch_api-$NEW_VERSION*
echo "✅ Uploaded to Test PyPI: https://test.pypi.org/project/KiCAD-Schematic-Manipulation/$NEW_VERSION/"
else
echo "🚀 Uploading to PyPI..."
python -m twine upload dist/mcp_kicad_sch_api-$NEW_VERSION*
echo "✅ Uploaded to PyPI: https://pypi.org/project/KiCAD-Schematic-Manipulation/$NEW_VERSION/"
fi
# Create git tag
echo "🏷️ Creating git tag..."
git add pyproject.toml src/mcp_kicad_sch_api/__init__.py
git commit -m "Release version $NEW_VERSION"
git tag "v$NEW_VERSION"
git push origin main --tags
echo "🎉 Release $NEW_VERSION completed successfully!"
echo "📦 Install with: pip install --upgrade KiCAD-Schematic-Manipulation"
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.
- 10d ago First seen · 229 lines · 0 tokens per session scan A 3ffae4ad057c
publish-pypi is a command published in the GitHub repository richard-luc/KiCAD-Schematic-Manipulation (0 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,791 tokens. A static security scan graded it A with 0 findings. It is 88% identical to publish-pypi, differing in 14 lines, and is treated as a copy.
Other commands, from other repositories
release
Prepare and execute a Python package release with verification steps.
uv-publish
A command for publishing a Python package with uv, a Python tool for managing projects and dependencies, to PyPI, the main public package repository.
create_project
Create a new project from template with uv and Git initialization.
cargo-publish
Command "cargo-publish" from olorehq/olore, covering cargo-publish(1), name, synopsis, description and options.
release
Prepara e pubblica una nuova release del plugin mcp-legal-it. Bumpa la versione in tutti i manifest, aggiorna i changelog e la description con il conteggio tool corretto, crea il release branch, merge in main e tagga.
gsd:ship
Create PR, run review, and prepare for merge after verification passes.