一键导入
npm-release
Publish x-gateway to npm with Bun, including secure token handling, dry-run checks, and post-publish verification.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Publish x-gateway to npm with Bun, including secure token handling, dry-run checks, and post-publish verification.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when writing to X/Twitter with x-gateway-writer. Covers auth preflight, schema inspection, and project-owned GraphQL mutations such as createPost, quotePost, repostPost, unrepostPost, replyToPost, deletePost, likes, Lists, and DMs. Do not use x-gateway-reader for mutations.
Use when reading data from X/Twitter with x-gateway-reader. Covers auth preflight, schema inspection, and read-only project-owned GraphQL queries such as account lookup, post lookup, search, timelines, Lists, DMs, social graph reads, and usage. Do not use for posting or other mutations.
Build macOS Swift binary archives for the x-gateway reader and writer CLI executables.
Publish x-gateway artifacts to GitHub Releases using gh CLI with tag/version validation and idempotent retry behavior.
Use when building, validating, publishing, or tap-rendering Homebrew formula tarball releases for this Swift project, including scripts/build-homebrew-release.sh, scripts/render-homebrew-formula.sh, and task build:homebrew, homebrew:formula-reader, or homebrew:formula-writer commands.
Execute Nix release validation for x-gateway by verifying flake reproducibility, lockfile integrity, and optional lock updates.
| name | npm-release |
| description | Publish x-gateway to npm with Bun, including secure token handling, dry-run checks, and post-publish verification. |
| allowed-tools | Bash, Read, Write, Grep, Glob |
| user-invocable | true |
| argument-hint | ["publish|dry-run"] |
Use this skill to publish x-gateway package versions to npm.
task ci
bun run build
VERSION=$(bun -e "const p = await Bun.file('./package.json').json(); console.log(p.version)")
bun -e "const version=process.env.VERSION; const r=await fetch('https://registry.npmjs.org/x-gateway'); if(!r.ok){throw new Error('registry query failed')} const body=await r.json(); const versions=Object.keys(body.versions ?? {}); if(versions.includes(version)){process.exit(1)}"
NPM_TOKEN recommended):test -n "$NPM_TOKEN"
Prefer ephemeral npm config from environment token:
TMP_NPMRC=$(mktemp)
cat > "$TMP_NPMRC" <<'EONPMRC'
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
EONPMRC
Use publish commands with:
NPM_CONFIG_USERCONFIG="$TMP_NPMRC" <publish command>
Cleanup:
rm -f "$TMP_NPMRC"
Do not commit tokens or write plaintext tokens into repository files.
Dry run:
NPM_CONFIG_USERCONFIG="$TMP_NPMRC" bunx npm publish --access public --dry-run
Real publish:
NPM_CONFIG_USERCONFIG="$TMP_NPMRC" bunx npm publish --access public
npm view x-gateway version
curl -s https://registry.npmjs.org/x-gateway/latest
bunx npm view x-gateway@"$VERSION" name version
403/EPUBLISHCONFLICT), stop and request version bump.EOTP, use automation token or provide --otp <code>.files/build outputs before publishing.Follow .agents/skills/supply-chain-secure-publish/SKILL.md for hardening checks before final publish.