framework/claude/skills/sdd-publish-setup/SKILL.md
Set up CI/CD publish pipeline (GitHub Actions + Trusted Publisher)
npx skillsauth add sync-dev-org/sync-sdd sdd-publish-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Set up a CI/CD publish pipeline for the project. Creates a GitHub Actions workflow that automatically publishes to a package registry when a version tag is pushed. Designed to complement /sdd-release (which creates tags) by adding the automated publish step.
This is a one-time setup command per project. If the workflow already exists, offer to regenerate or skip.
.github/workflows/publish.yml already exists
git remote get-url origin
git remote add origin <url>" → aborthttps://github.com/{owner}/{repo}.git → extract owner, repo[email protected]:{owner}/{repo}.git → extract owner, repo.git suffix if presentDetect the project ecosystem by checking configuration files. Use the first match in priority order:
Detection: pyproject.toml exists AND contains [tool.hatch.version] with source = "vcs"
build package (uv run python -m build)Detection: pyproject.toml exists (not hatch-vcs)
build packageDetection: package.json exists
Detection: Cargo.toml exists
Detection: None of the above matched
Report the detected ecosystem to the user and confirm before proceeding.
Create .github/workflows/publish.yml based on the detected ecosystem.
Detect the following from the project:
uv.lock exists → uv, otherwise check for poetry.lock → poetry, fallback to pipruff is in dev dependencies → uv run ruff check src/ tests/, otherwise skip lint steppytest is in dev dependencies → uv run pytest, otherwise skip test stepsrc/ directory exists (affects build behavior)Generate the workflow:
name: Publish to PyPI
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v4
- run: uv sync
# lint step (if ruff detected)
- run: uv run ruff check src/ tests/
# test step (if pytest detected)
- run: uv run pytest
- run: uv run python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish:
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
Adjust the workflow based on detection:
pip instead of uv: replace astral-sh/setup-uv with actions/setup-python, replace uv sync with pip install ., replace uv run with direct commandspoetry: use snok/install-poetry, replace accordinglyfetch-depth: 0 is critical (keep it). If standard: fetch-depth: 0 is harmless (keep it)name: Publish to npm
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm test
- run: npm run build --if-present
publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Publish to crates.io
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test
- run: cargo build --release
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Check if the build tool is available in dev dependencies and add it if missing.
Check if build is in [dependency-groups] dev (pyproject.toml).
"build" to the dev dependency list using Edit tooluv sync to installNo additional dev dependencies needed (npm handles publishing natively).
No additional dev dependencies needed (cargo handles publishing natively).
Display the manual steps the user needs to perform in their browser. These cannot be automated.
Output the following:
## PyPI Trusted Publisher Setup
Complete these steps in your browser:
### 1. PyPI — Pending Publisher Registration
URL: https://pypi.org/manage/account/publishing/
Enter the following values:
- PyPI project name: {project_name}
- Owner: {github_owner}
- Repository name: {github_repo}
- Workflow name: publish.yml
- Environment name: pypi
### 2. GitHub — Environment Creation
URL: https://github.com/{github_owner}/{github_repo}/settings/environments
- Click "New environment"
- Name: pypi
- (Optional) Add "Required reviewers" for publish approval gate
Where {project_name} is from pyproject.toml [project] name, {github_owner} and {github_repo} are from Step 1.
Output the following:
## npm Publish Setup
### 1. npm — Access Token
URL: https://www.npmjs.com/settings/~/tokens
- Create a new "Automation" token
- Copy the token value
### 2. GitHub — Repository Secret
URL: https://github.com/{github_owner}/{github_repo}/settings/secrets/actions
- Click "New repository secret"
- Name: NPM_TOKEN
- Value: (paste the npm token)
Output the following:
## crates.io Publish Setup
### 1. crates.io — API Token
URL: https://crates.io/settings/tokens
- Create a new token with "publish-update" scope
- Copy the token value
### 2. GitHub — Repository Secret
URL: https://github.com/{github_owner}/{github_repo}/settings/secrets/actions
- Click "New repository secret"
- Name: CARGO_REGISTRY_TOKEN
- Value: (paste the crates.io token)
Output verification steps:
## Verification
After completing the registry setup above:
1. Commit and push the workflow file:
git add .github/workflows/publish.yml
git commit -m "ci: add publish workflow"
git push origin main
2. Create a test release to verify the pipeline:
/sdd-release patch "test publish pipeline"
3. Check GitHub Actions:
https://github.com/{github_owner}/{github_repo}/actions
4. Check the package registry for the published version.
If the publish fails, check the Actions log for error details.
Common issues:
- PyPI: Trusted Publisher not configured → check environment name matches "pypi"
- npm: NPM_TOKEN secret not set → check repository secrets
- crates.io: CARGO_REGISTRY_TOKEN not set → check repository secrets
Output:
.github/workflows/publish.ymlv*git remote add origin <url> first."tools
--- name: sdd-steering description: Set up project-wide context (create, update, delete, custom) allowed-tools: Bash, Glob, Grep, Read, Write, Edit, Skill argument-hint: [-y] [custom] --- # SDD Steering (Unified) <instructions> ## Core Task Manage project steering documents. Lead handles directly (no SubAgent dispatch needed) since it requires user interaction. **Before any steering operation**, read `{{SDD_DIR}}/settings/rules/agent/steering-principles.md` and apply its principles (content
tools
--- name: sdd-status description: Check progress and analyze downstream impact allowed-tools: Read, Glob, Grep argument-hint: [feature-name] [--impact] --- # SDD Status (Unified) <instructions> ## Core Task Display comprehensive status for specifications and optionally analyze downstream impact of changes. Lead handles directly (read-only, no SubAgent needed). ## Step 1: Parse Arguments ``` $ARGUMENTS = "" → Overall roadmap + all specs progress $ARGUMENTS = "{feature}"
tools
Session start — invoke on "再開", "continue", "resume", or at every session start
content-media
Unified spec lifecycle (design, impl, review, roadmap management)