[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71JSPQ3TAJRESYT1EX3E2SS":3,"skill-same:01M71JSPQ3TAJRESYT1EX3E2SS":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"01M71JSPQ3TAJRESYT1EX3E2SS","publish-package",null,"Package registry publishing for npm, crates.io, PyPI, and Homebrew. Verifies prerequisites, runs the publish command, confirms success, and surfaces actionable error hints on failure.","danielvm-git\u002Fbigpowers","danielvm-git","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1020864?v=4","01M71H1N1CTQ529S0KN7KETVG6","Daniel V M","01M71H1N218Y3S8WHCJ58NPRSW",290,"MIT","https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Fpublish-package\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"publish","publish package","package","error","actionable","io","command","surfaces","registry","sonnet","for","homebrew","publishing","pypi","npm","2026-11-10 10:12:30",false,"---\nname: publish-package\nmodel: sonnet\ndescription: \"Package registry publishing for npm, crates.io, PyPI, and Homebrew. Verifies prerequisites, runs the publish command, confirms success, and surfaces actionable error hints on failure.\"\n---\n\n# Publish Package\n\n> **HARD GATE** — Do not attempt to publish without verifying prerequisites. Missing auth tokens, stale builds, or duplicate versions cause CI failures that are hard to debug post-push.\n>\n> **HARD GATE** — Always run `--dry-run` first. Package registries are append-only — a bad publish cannot be fully undone on most registries.\n\nPublish packages to language-specific registries. Detects package type from manifest files, verifies publish prerequisites, runs the registry-specific publish command, and confirms the version appears on the registry.\n\n## Process\n\n### 1. Detect package type\n\nRead the project root for manifest files to determine the package type:\n\n| Manifest | Registry | Publish command |\n|----------|----------|----------------|\n| `package.json` | npm | `npm publish --access public` |\n| `Cargo.toml` | crates.io | `cargo publish` |\n| `setup.py` \u002F `pyproject.toml` | PyPI | `twine upload dist\u002F*` or `flit publish` |\n| `Formula\u002F\u003Cname>.rb` | Homebrew | `brew bump-formula-pr` |\n| Multiple detected | Polyglot | Error: specify registry with `--registry \u003Cnpm|crates.io|pypi|brew>` |\n\nIf no manifest is found, prompt the user to specify the type or pass `--type \u003Cnpm|crates.io|pypi|brew>`.\n\n### 2. Verify prerequisites\n\nBefore attempting any publish, run all applicable checks:\n\n**npm (`package.json`):**\nSee [REFERENCE.md](REFERENCE.md)\n\n**crates.io (`Cargo.toml`):**\nSee [REFERENCE.md](REFERENCE.md)\n\n**PyPI (`setup.py` \u002F `pyproject.toml`):**\nSee [REFERENCE.md](REFERENCE.md)\n\n### 3. Run publish\n\nAfter all prerequisite checks pass, run the registry-specific command:\n\nSee [REFERENCE.md](REFERENCE.md)\n\n### 4. Verify publish success\n\nAfter publish, confirm the version appears on the registry:\n\nSee [REFERENCE.md](REFERENCE.md)\n\n### 5. Error handling\n\nOn failure, surface actionable hints:\n\nSee [REFERENCE.md](REFERENCE.md)\n\n### 6. Dry-run mode (`--dry-run`)\n\nRun `--dry-run` to verify all prerequisites without actually publishing:\n\nSee [REFERENCE.md](REFERENCE.md)\n\n### 7. Dry-run mode per registry\n\nSee [REFERENCE.md](REFERENCE.md)\n\n## Verify\n\n→ verify: `test -f skills\u002Fpublish-package\u002FSKILL.md && test -f package.json`\n→ verify: `grep -q publish-package SKILL-INDEX.md`\n\n---\n\n# Publish Package — Reference\n\n## Navigation\n\n| Lines | Section |\n|-------|---------|\n| 1 | Title |\n| 3–23 | Navigation |\n| 24–35 | Options |\n| 36–37 | Examples |\n| 38–51 | Publish an npm package |\n| 52–59 | Publish a Rust crate |\n| 60–69 | Missing token scenario |\n| 70–80 | Integration with release-branch |\n| 81–121 | Reference block 1 |\n| 122–143 | Reference block 2 |\n| 144–162 | Reference block 3 |\n| 163–180 | Reference block 4 |\n| 181–195 | Reference block 5 |\n| 196–230 | Reference block 6 |\n| 231–248 | Reference block 7 |\n| 249–260 | Reference block 8 |\n\n## Options\n\n| Flag | Description |\n|------|-------------|\n| `--dry-run` | Verify prerequisites and show publish command without executing |\n| `--registry \u003Ctype>` | Force registry type (skip auto-detection) |\n| `--otp \u003Ccode>` | One-time password for npm 2FA |\n| `--no-verify` | Skip prerequisite checks (use with caution) |\n\n\n---\n\n## Examples\n\n### Publish an npm package\n\n```bash\n# Verify first\npublish-package --dry-run\n\n# Publish\npublish-package\n\n# Output:\n#   [npm] Publishing my-package v0.4.0...\n#   OK: npm publish confirmed (my-package@0.4.0 on registry)\n```\n\n### Publish a Rust crate\n\n```bash\nexport CARGO_REGISTRY_TOKEN=\u003Ctoken>\npublish-package --dry-run\npublish-package\n```\n\n### Missing token scenario\n\n```bash\n$ publish-package\nFAIL: NPM_TOKEN not set. Set via: export NPM_TOKEN=\u003Ctoken> or add to .npmrc\n```\n\n\n---\n\n## Integration with release-branch\n\nWhen wired into `release-branch`, add a step after git push:\n\n```\n6a. Run publish-package to publish to package registries\n    → verify: publish-package --dry-run && publish-package\n```\n\n---\n\n## Reference block 1\n\n```bash\n# Check auth token exists\nif [ -z \"${NPM_TOKEN:-}\" ]; then\n  if [ ! -f ~\u002F.npmrc ] || ! grep -q \"_authToken\" ~\u002F.npmrc; then\n    echo \"FAIL: NPM_TOKEN not set. Set via: export NPM_TOKEN=\u003Ctoken> or add \u002F\u002Fregistry.npmjs.org\u002F:_authToken=\u003Ctoken> to .npmrc\"\n    exit 1\n  fi\nfi\n\n# Check version not already published\nPACKAGE_NAME=$(node -p \"require('.\u002Fpackage.json').name\")\nCURRENT_VER=$(node -p \"require('.\u002Fpackage.json').version\")\nif npm view \"$PACKAGE_NAME@$CURRENT_VER\" version 2>\u002Fdev\u002Fnull; then\n  echo \"FAIL: Version $CURRENT_VER already published for $PACKAGE_NAME. Bump version first.\"\n  exit 1\nfi\n\n# Check build artifacts are fresh\nif [ -d dist ] || [ -d lib ]; then\n  LATEST_BUILD=$(find dist lib 2>\u002Fdev\u002Fnull -name \"*.js\" -o -name \"*.cjs\" -o -name \"*.mjs\" | xargs ls -t 2>\u002Fdev\u002Fnull | head -1)\n  PACKAGE_MODIFIED=$(stat -f %m package.json 2>\u002Fdev\u002Fnull || stat -c %Y package.json 2>\u002Fdev\u002Fnull)\n  if [ -n \"$LATEST_BUILD\" ] && [ -n \"$PACKAGE_MODIFIED\" ]; then\n    BUILD_TIME=$(stat -f %m \"$LATEST_BUILD\" 2>\u002Fdev\u002Fnull || stat -c %Y \"$LATEST_BUILD\" 2>\u002Fdev\u002Fnull)\n    if [ \"$BUILD_TIME\" -lt \"$PACKAGE_MODIFIED\" ]; then\n      echo \"WARNING: Build artifacts may be stale (package.json modified after last build). Run npm run build first.\"\n    fi\n  fi\nfi\n\n# Check CHANGELOG is updated\nif [ -f CHANGELOG.md ]; then\n  if ! grep -q \"$CURRENT_VER\" CHANGELOG.md 2>\u002Fdev\u002Fnull; then\n    echo \"WARNING: Version $CURRENT_VER not found in CHANGELOG.md. Update changelog before publish.\"\n  fi\nfi\n```\n\n---\n\n## Reference block 2\n\n```bash\n# Check auth token exists\nif [ -z \"${CARGO_REGISTRY_TOKEN:-}\" ]; then\n  if [ ! -f ~\u002F.cargo\u002Fconfig.toml ] || ! grep -q \"token\" ~\u002F.cargo\u002Fconfig.toml; then\n    echo \"FAIL: CARGO_REGISTRY_TOKEN not set. Set via: export CARGO_REGISTRY_TOKEN=\u003Ctoken> or add to ~\u002F.cargo\u002Fconfig.toml\"\n    exit 1\n  fi\nfi\n\n# Check version not already published\nCRATE_NAME=$(grep '^name' Cargo.toml | head -1 | sed 's\u002F.*\"\\(.*\\)\"\u002F\\1\u002F')\nCURRENT_VER=$(grep '^version' Cargo.toml | head -1 | sed 's\u002F.*\"\\(.*\\)\"\u002F\\1\u002F')\nif cargo search \"$CRATE_NAME\" 2>\u002Fdev\u002Fnull | grep -q \"^${CRATE_NAME}.*\\\"$CURRENT_VER\\\"\"; then\n  echo \"FAIL: Version $CURRENT_VER already published for $CRATE_NAME. Bump version in Cargo.toml first.\"\n  exit 1\nfi\n```\n\n---\n\n## Reference block 3\n\n```bash\n# Check auth token exists\nif [ -z \"${TWINE_PASSWORD:-}\" ] && [ -z \"${POETRY_PYPI_TOKEN_PYPI:-}\" ]; then\n  if [ ! -f ~\u002F.pypirc ]; then\n    echo \"FAIL: PyPI token not configured. Set TWINE_PASSWORD or create ~\u002F.pypirc\"\n    exit 1\n  fi\nfi\n\n# Check for build artifacts\nif [ ! -d dist ] || [ -z \"$(ls dist\u002F*.whl 2>\u002Fdev\u002Fnull)\" ]; then\n  echo \"WARNING: No .whl files found in dist\u002F. Run: python -m build\"\nfi\n```\n\n---\n\n## Reference block 4\n\n```bash\n# npm\nnpm publish --access public\n\n# crates.io\ncargo publish\n\n# PyPI\npython -m twine upload dist\u002F*  # or: poetry publish\n\n# Homebrew (opens PR, does not publish directly)\nbrew bump-formula-pr --url=\u003Ctarball-url> \u003Cformula-name>\n```\n\n---\n\n## Reference block 5\n\n```bash\n# npm\nnpm view \"$PACKAGE_NAME\" versions --json 2>\u002Fdev\u002Fnull | grep -q \"\\\"$CURRENT_VER\\\"\" && echo \"OK: npm publish confirmed\"\n\n# crates.io\ncargo search \"$CRATE_NAME\" 2>\u002Fdev\u002Fnull | grep -q \"^${CRATE_NAME}.*\\\"$CURRENT_VER\\\"\" && echo \"OK: crates.io publish confirmed\"\n\n# PyPI\npip index versions \"$PACKAGE_NAME\" 2>\u002Fdev\u002Fnull | grep -q \"$CURRENT_VER\" && echo \"OK: PyPI publish confirmed\"\n```\n\n---\n\n## Reference block 6\n\n```bash\n# Generic failure handler\nif [ $? -ne 0 ]; then\n  case \"$REGISTRY\" in\n    npm)\n      echo \"FAIL: npm publish failed.\"\n      echo \"  Common causes:\"\n      echo \"  - NPM_TOKEN not set in secrets: add to GitHub repo secrets\"\n      echo \"  - Version already published: bump version in package.json\"\n      echo \"  - Two-factor auth required: use --otp=\u003Ccode> flag\"\n      echo \"  - Package scoped but not public: add --access public\"\n      ;;\n    crates.io)\n      echo \"FAIL: cargo publish failed.\"\n      echo \"  Common causes:\"\n      echo \"  - CARGO_REGISTRY_TOKEN not configured: see ~\u002F.cargo\u002Fconfig.toml\"\n      echo \"  - Version already published: bump version in Cargo.toml\"\n      echo \"  - Local changes not committed: cargo publish requires clean working tree\"\n      ;;\n    pypi)\n      echo \"FAIL: PyPI publish failed.\"\n      echo \"  Common causes:\"\n      echo \"  - TWINE_PASSWORD not configured: set env var or ~\u002F.pypirc\"\n      echo \"  - Build artifacts missing: run python -m build first\"\n      echo \"  - Version conflict: version already exists on PyPI\"\n      ;;\n  esac\n  exit 1\nfi\n```\n\n---\n\n## Reference block 7\n\n```bash\n# Example output\n$ publish-package --dry-run\n\n[DRY-RUN] Detected package type: npm\n[DRY-RUN] Package: my-package v0.4.0\n[DRY-RUN] Checking NPM_TOKEN... OK\n[DRY-RUN] Checking version 0.4.0 not already published... OK\n[DRY-RUN] Checking build artifacts... WARNING: package.json modified after build\n[DRY-RUN] Checking CHANGELOG... OK\n[DRY-RUN] Would run: npm publish --access public\n[DRY-RUN] Exiting without publishing.\n```\n\n---\n\n## Reference block 8\n\n```bash\n# npm dry-run\nnpm publish --access public --dry-run\n\n# crates.io dry-run (cargo does not have a publish dry-run; use --dry-run flag for validation only)\ncargo package --list 2>\u002Fdev\u002Fnull\n\n# PyPI dry-run\npython -m twine upload --repository testpypi dist\u002F*  # test.pypi.org\n```\n","# Publish Package\n\n> **HARD GATE** — Do not attempt to publish without verifying prerequisites. Missing auth tokens, stale builds, or duplicate versions cause CI failures that are hard to debug post-push.\n>\n> **HARD GATE** — Always run `--dry-run` first. Package registries are append-only — a bad publish cannot be fully undone on most registries.\n\nPublish packages to language-specific registries. Detects package type from manifest files, verifies publish prerequisites, runs the registry-specific publish command, and confirms the version appears on the registry.\n\n## Process\n\n### 1. Detect package type\n\nRead the project root for manifest files to determine the package type:\n\n| Manifest | Registry | Publish command |\n|----------|----------|----------------|\n| `package.json` | npm | `npm publish --access public` |\n| `Cargo.toml` | crates.io | `cargo publish` |\n| `setup.py` \u002F `pyproject.toml` | PyPI | `twine upload dist\u002F*` or `flit publish` |\n| `Formula\u002F\u003Cname>.rb` | Homebrew | `brew bump-formula-pr` |\n| Multiple detected | Polyglot | Error: specify registry with `--registry \u003Cnpm|crates.io|pypi|brew>` |\n\nIf no manifest is found, prompt the user to specify the type or pass `--type \u003Cnpm|crates.io|pypi|brew>`.\n\n### 2. Verify prerequisites\n\nBefore attempting any publish, run all applicable checks:\n\n**npm (`package.json`):**\nSee [REFERENCE.md](REFERENCE.md)\n\n**crates.io (`Cargo.toml`):**\nSee [REFERENCE.md](REFERENCE.md)\n\n**PyPI (`setup.py` \u002F `pyproject.toml`):**\nSee [REFERENCE.md](REFERENCE.md)\n\n### 3. Run publish\n\nAfter all prerequisite checks pass, run the registry-specific command:\n\nSee [REFERENCE.md](REFERENCE.md)\n\n### 4. Verify publish success\n\nAfter publish, confirm the version appears on the registry:\n\nSee [REFERENCE.md](REFERENCE.md)\n\n### 5. Error handling\n\nOn failure, surface actionable hints:\n\nSee [REFERENCE.md](REFERENCE.md)\n\n### 6. Dry-run mode (`--dry-run`)\n\nRun `--dry-run` to verify all prerequisites without actually publishing:\n\nSee [REFERENCE.md](REFERENCE.md)\n\n### 7. Dry-run mode per registry\n\nSee [REFERENCE.md](REFERENCE.md)\n\n## Verify\n\n→ verify: `test -f skills\u002Fpublish-package\u002FSKILL.md && test -f package.json`\n→ verify: `grep -q publish-package SKILL-INDEX.md`\n\n---\n\n# Publish Package — Reference\n\n## Navigation\n\n| Lines | Section |\n|-------|---------|\n| 1 | Title |\n| 3–23 | Navigation |\n| 24–35 | Options |\n| 36–37 | Examples |\n| 38–51 | Publish an npm package |\n| 52–59 | Publish a Rust crate |\n| 60–69 | Missing token scenario |\n| 70–80 | Integration with release-branch |\n| 81–121 | Reference block 1 |\n| 122–143 | Reference block 2 |\n| 144–162 | Reference block 3 |\n| 163–180 | Reference block 4 |\n| 181–195 | Reference block 5 |\n| 196–230 | Reference block 6 |\n| 231–248 | Reference block 7 |\n| 249–260 | Reference block 8 |\n\n## Options\n\n| Flag | Description |\n|------|-------------|\n| `--dry-run` | Verify prerequisites and show publish command without executing |\n| `--registry \u003Ctype>` | Force registry type (skip auto-detection) |\n| `--otp \u003Ccode>` | One-time password for npm 2FA |\n| `--no-verify` | Skip prerequisite checks (use with caution) |\n\n\n---\n\n## Examples\n\n### Publish an npm package\n\n```bash\n# Verify first\npublish-package --dry-run\n\n# Publish\npublish-package\n\n# Output:\n#   [npm] Publishing my-package v0.4.0...\n#   OK: npm publish confirmed (my-package@0.4.0 on registry)\n```\n\n### Publish a Rust crate\n\n```bash\nexport CARGO_REGISTRY_TOKEN=\u003Ctoken>\npublish-package --dry-run\npublish-package\n```\n\n### Missing token scenario\n\n```bash\n$ publish-package\nFAIL: NPM_TOKEN not set. Set via: export NPM_TOKEN=\u003Ctoken> or add to .npmrc\n```\n\n\n---\n\n## Integration with release-branch\n\nWhen wired into `release-branch`, add a step after git push:\n\n```\n6a. Run publish-package to publish to package registries\n    → verify: publish-package --dry-run && publish-package\n```\n\n---\n\n## Reference block 1\n\n```bash\n# Check auth token exists\nif [ -z \"${NPM_TOKEN:-}\" ]; then\n  if [ ! -f ~\u002F.npmrc ] || ! grep -q \"_authToken\" ~\u002F.npmrc; then\n    echo \"FAIL: NPM_TOKEN not set. Set via: export NPM_TOKEN=\u003Ctoken> or add \u002F\u002Fregistry.npmjs.org\u002F:_authToken=\u003Ctoken> to .npmrc\"\n    exit 1\n  fi\nfi\n\n# Check version not already published\nPACKAGE_NAME=$(node -p \"require('.\u002Fpackage.json').name\")\nCURRENT_VER=$(node -p \"require('.\u002Fpackage.json').version\")\nif npm view \"$PACKAGE_NAME@$CURRENT_VER\" version 2>\u002Fdev\u002Fnull; then\n  echo \"FAIL: Version $CURRENT_VER already published for $PACKAGE_NAME. Bump version first.\"\n  exit 1\nfi\n\n# Check build artifacts are fresh\nif [ -d dist ] || [ -d lib ]; then\n  LATEST_BUILD=$(find dist lib 2>\u002Fdev\u002Fnull -name \"*.js\" -o -name \"*.cjs\" -o -name \"*.mjs\" | xargs ls -t 2>\u002Fdev\u002Fnull | head -1)\n  PACKAGE_MODIFIED=$(stat -f %m package.json 2>\u002Fdev\u002Fnull || stat -c %Y package.json 2>\u002Fdev\u002Fnull)\n  if [ -n \"$LATEST_BUILD\" ] && [ -n \"$PACKAGE_MODIFIED\" ]; then\n    BUILD_TIME=$(stat -f %m \"$LATEST_BUILD\" 2>\u002Fdev\u002Fnull || stat -c %Y \"$LATEST_BUILD\" 2>\u002Fdev\u002Fnull)\n    if [ \"$BUILD_TIME\" -lt \"$PACKAGE_MODIFIED\" ]; then\n      echo \"WARNING: Build artifacts may be stale (package.json modified after last build). Run npm run build first.\"\n    fi\n  fi\nfi\n\n# Check CHANGELOG is updated\nif [ -f CHANGELOG.md ]; then\n  if ! grep -q \"$CURRENT_VER\" CHANGELOG.md 2>\u002Fdev\u002Fnull; then\n    echo \"WARNING: Version $CURRENT_VER not found in CHANGELOG.md. Update changelog before publish.\"\n  fi\nfi\n```\n\n---\n\n## Reference block 2\n\n```bash\n# Check auth token exists\nif [ -z \"${CARGO_REGISTRY_TOKEN:-}\" ]; then\n  if [ ! -f ~\u002F.cargo\u002Fconfig.toml ] || ! grep -q \"token\" ~\u002F.cargo\u002Fconfig.toml; then\n    echo \"FAIL: CARGO_REGISTRY_TOKEN not set. Set via: export CARGO_REGISTRY_TOKEN=\u003Ctoken> or add to ~\u002F.cargo\u002Fconfig.toml\"\n    exit 1\n  fi\nfi\n\n# Check version not already published\nCRATE_NAME=$(grep '^name' Cargo.toml | head -1 | sed 's\u002F.*\"\\(.*\\)\"\u002F\\1\u002F')\nCURRENT_VER=$(grep '^version' Cargo.toml | head -1 | sed 's\u002F.*\"\\(.*\\)\"\u002F\\1\u002F')\nif cargo search \"$CRATE_NAME\" 2>\u002Fdev\u002Fnull | grep -q \"^${CRATE_NAME}.*\\\"$CURRENT_VER\\\"\"; then\n  echo \"FAIL: Version $CURRENT_VER already published for $CRATE_NAME. Bump version in Cargo.toml first.\"\n  exit 1\nfi\n```\n\n---\n\n## Reference block 3\n\n```bash\n# Check auth token exists\nif [ -z \"${TWINE_PASSWORD:-}\" ] && [ -z \"${POETRY_PYPI_TOKEN_PYPI:-}\" ]; then\n  if [ ! -f ~\u002F.pypirc ]; then\n    echo \"FAIL: PyPI token not configured. Set TWINE_PASSWORD or create ~\u002F.pypirc\"\n    exit 1\n  fi\nfi\n\n# Check for build artifacts\nif [ ! -d dist ] || [ -z \"$(ls dist\u002F*.whl 2>\u002Fdev\u002Fnull)\" ]; then\n  echo \"WARNING: No .whl files found in dist\u002F. Run: python -m build\"\nfi\n```\n\n---\n\n## Reference block 4\n\n```bash\n# npm\nnpm publish --access public\n\n# crates.io\ncargo publish\n\n# PyPI\npython -m twine upload dist\u002F*  # or: poetry publish\n\n# Homebrew (opens PR, does not publish directly)\nbrew bump-formula-pr --url=\u003Ctarball-url> \u003Cformula-name>\n```\n\n---\n\n## Reference block 5\n\n```bash\n# npm\nnpm view \"$PACKAGE_NAME\" versions --json 2>\u002Fdev\u002Fnull | grep -q \"\\\"$CURRENT_VER\\\"\" && echo \"OK: npm publish confirmed\"\n\n# crates.io\ncargo search \"$CRATE_NAME\" 2>\u002Fdev\u002Fnull | grep -q \"^${CRATE_NAME}.*\\\"$CURRENT_VER\\\"\" && echo \"OK: crates.io publish confirmed\"\n\n# PyPI\npip index versions \"$PACKAGE_NAME\" 2>\u002Fdev\u002Fnull | grep -q \"$CURRENT_VER\" && echo \"OK: PyPI publish confirmed\"\n```\n\n---\n\n## Reference block 6\n\n```bash\n# Generic failure handler\nif [ $? -ne 0 ]; then\n  case \"$REGISTRY\" in\n    npm)\n      echo \"FAIL: npm publish failed.\"\n      echo \"  Common causes:\"\n      echo \"  - NPM_TOKEN not set in secrets: add to GitHub repo secrets\"\n      echo \"  - Version already published: bump version in package.json\"\n      echo \"  - Two-factor auth required: use --otp=\u003Ccode> flag\"\n      echo \"  - Package scoped but not public: add --access public\"\n      ;;\n    crates.io)\n      echo \"FAIL: cargo publish failed.\"\n      echo \"  Common causes:\"\n      echo \"  - CARGO_REGISTRY_TOKEN not configured: see ~\u002F.cargo\u002Fconfig.toml\"\n      echo \"  - Version already published: bump version in Cargo.toml\"\n      echo \"  - Local changes not committed: cargo publish requires clean working tree\"\n      ;;\n    pypi)\n      echo \"FAIL: PyPI publish failed.\"\n      echo \"  Common causes:\"\n      echo \"  - TWINE_PASSWORD not configured: set env var or ~\u002F.pypirc\"\n      echo \"  - Build artifacts missing: run python -m build first\"\n      echo \"  - Version conflict: version already exists on PyPI\"\n      ;;\n  esac\n  exit 1\nfi\n```\n\n---\n\n## Reference block 7\n\n```bash\n# Example output\n$ publish-package --dry-run\n\n[DRY-RUN] Detected package type: npm\n[DRY-RUN] Package: my-package v0.4.0\n[DRY-RUN] Checking NPM_TOKEN... OK\n[DRY-RUN] Checking version 0.4.0 not already published... OK\n[DRY-RUN] Checking build artifacts... WARNING: package.json modified after build\n[DRY-RUN] Checking CHANGELOG... OK\n[DRY-RUN] Would run: npm publish --access public\n[DRY-RUN] Exiting without publishing.\n```\n\n---\n\n## Reference block 8\n\n```bash\n# npm dry-run\nnpm publish --access public --dry-run\n\n# crates.io dry-run (cargo does not have a publish dry-run; use --dry-run flag for validation only)\ncargo package --list 2>\u002Fdev\u002Fnull\n\n# PyPI dry-run\npython -m twine upload --repository testpypi dist\u002F*  # test.pypi.org\n```\n",{"name":5,"model":28,"description":7},"main","72f5e4c8b43f60cf86b37078ad8cd7e22daf67aa",".qwen\u002Fskills\u002Fpublish-package",24,"https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers","https:\u002F\u002Fdanielvm-git.github.io\u002Fbigpowers\u002F","https:\u002F\u002Fgithub.com\u002Fdanielvm-git","danielvm.net","2026-11-10 01:18:54",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add danielvm-git\u002Fbigpowers --skill publish-package",{"tool":54,"command":55},"bunx","bunx skills add danielvm-git\u002Fbigpowers --skill publish-package",{"tool":57,"command":58},"pnpm","pnpm dlx skills add danielvm-git\u002Fbigpowers --skill publish-package","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Fpublish-package\u002FSKILL.md",true,[],[63,83,90,118,141,162],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":74,"publishedAt":34},"01M71KBG9F8X644MJB16H4V8M7","skill-verify-fail-open-fixture","Negative-path fixture for run-skill-verify.sh — must never PASS.","https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers\u002Fblob\u002Fmain\u002Fspecs\u002Fverifications\u002Ffixtures\u002Fskill-verify-fail-open\u002FSKILL.md",[69],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[75,76,77,78,79,80,81,29,82],"fixture","open","verify","skill verify fail open fixture","skill verify","path","run","never",{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":34},"01M71KBE3BKEMKNE0C5DGVDWZH","negative-path","https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers\u002Fblob\u002Fmain\u002Fspecs\u002Fverifications\u002Ffixtures\u002Fnegative-path\u002FSKILL.md",[],[89,80],"negative path",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":99,"publishedAt":34},"01M71KBBGF7Y4EB4AMHBZ8CJFC","write-document","Write, organize, and sync high-integrity technical documents using the BMAD methodology. Ensures every document is Bold, Minimal, Actionable, and Durable. Use when creating architectural docs, technical guides, or organizing the specs\u002F directory.","https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-document\u002FSKILL.md",[96],{"categoryNo":97,"categoryName":98,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000002","文档处理",[100,101,102,103,23,104,105,106,107,108,109,110,111,112,28,113,114,115,116,117],"write","write document","document","documents","technical","methodology","high","bmad","standard","use","when","minimal","bold","integrity","organize","sync","directory","guides",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":34},"01M71KB8TM089JJD5AY5KAFSDM","wire-observability","Add structured JSON logging, observability commands, and idempotent setup scripts to a project. Use when a project needs production-readiness instrumentation, when user wants structured logging, or as a production-readiness gate at any phase of development.","https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers\u002Fblob\u002Fmain\u002Fskills\u002Fwire-observability\u002FSKILL.md",[],[125,126,127,108,128,109,129,130,131,132,28,133,134,135,136,137,138,110,139,140],"observability","wire observability","readiness","commands","development","as","logging","add","instrumentation","at","structured logging","production-readiness","idempotent","phase","project","scripts",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":34},"01M71KB6CNRANP449DQA3NJZ96","wire-ci","CI pipeline setup with bundled, forge-neutral templates and local validation. Detects the forge from the git remote, generates workflows for supported forges, and skips honestly for the rest. The CI equivalent of wire-observability.","https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers\u002Fblob\u002Fmain\u002Fskills\u002Fwire-ci\u002FSKILL.md",[],[148,149,150,151,152,153,154,155,156,157,158,108,159,29,125,28,160,161],"wire ci","ci","remote","local","pipeline","forge","validation","setup","templates","REST","with","ci pipeline setup","git","workflows",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":179,"publishedAt":34},"01M71KB2ZV98P03X88QR8MT9F1","visual-dashboard","Start a browser-based dashboard that visualizes architecture, implementation plans, and project status. Persists artifacts in .bigpowers\u002Fdashboard\u002F. Reads specs\u002Fstate.yaml, release-plan.yaml, epics, and planning-status via HTTP API or opencode panel.","https:\u002F\u002Fgithub.com\u002Fdanielvm-git\u002Fbigpowers\u002Fblob\u002Fmain\u002Fskills\u002Fvisual-dashboard\u002FSKILL.md",[168,171,176],{"categoryNo":169,"categoryName":170,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000013","分析与可视化",{"categoryNo":172,"categoryName":173,"taxonomyType":174,"taxonomyTypeDesc":175},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":177,"categoryName":178,"taxonomyType":174,"taxonomyTypeDesc":175},"01JBSEEDCAT000000000000033","数据分析师",[180,181,182,183,184,185,186,187,188,28,189,190,191,192,193,194,195,139,196,197],"dashboard","visual","visual dashboard","status","artifacts","http","plans","planning","panel","start","release","opencode","plan","browser","api","architecture","project status","http api"]