diff --git a/.github/workflows/agent-skills.yml b/.github/workflows/agent-skills.yml index a8ef533..6d4c4ea 100644 --- a/.github/workflows/agent-skills.yml +++ b/.github/workflows/agent-skills.yml @@ -19,12 +19,21 @@ jobs: - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 24.x - - name: Update the skills in each skills-lock.json + - name: Find the latest skills plugin release + id: skills + env: + GH_TOKEN: ${{ github.token }} + run: | + tag="$(gh release view --repo slackapi/slack-skills-plugin --json tagName --jq .tagName)" + echo "tag=$tag" >> "$GITHUB_OUTPUT" + - name: Update the skills in each skills-lock.json to the latest release + env: + TAG: ${{ steps.skills.outputs.tag }} run: | while IFS= read -r lock; do ( cd "$(dirname "$lock")" - npx --yes skills@1 add slackapi/slack-skills-plugin --skill '*' --agent universal --agent claude-code --copy --yes < /dev/null + npx --yes skills@1 add "slackapi/slack-skills-plugin#$TAG" --skill '*' --agent universal --agent claude-code --copy --yes < /dev/null skills="$(jq -r '.skills | to_entries[] | select(.value.source == "slackapi/slack-skills-plugin") | .key' skills-lock.json)" [ -n "$skills" ] for skill in $skills; do diff -rq ".agents/skills/$skill" ".claude/skills/$skill"; done @@ -33,12 +42,13 @@ jobs: - name: Open a pull request with the updates env: GH_TOKEN: ${{ github.token }} + TAG: ${{ steps.skills.outputs.tag }} run: | git add -- '*skills-lock.json' '*.agents/skills/*' '*.claude/skills/*' if git diff --cached --quiet; then exit 0; fi if git diff --cached --quiet -- . ':!*skills-lock.json' && git diff --cached --name-only -- '*skills-lock.json' | while IFS= read -r lock; do - [ "$(git show "HEAD:$lock" | jq -S 'del(.skills[].commit)')" = "$(jq -S 'del(.skills[].commit)' "$lock")" ] || exit 1 + [ "$(git show "HEAD:$lock" | jq -S 'del(.skills[].commit, .skills[].ref)')" = "$(jq -S 'del(.skills[].commit, .skills[].ref)' "$lock")" ] || exit 1 done; then exit 0 fi @@ -48,8 +58,12 @@ jobs: git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git switch -C agent-skills - git commit -m "chore: update agent skills" + git commit -m "chore: update agent skills to $TAG" git push --force origin agent-skills + title="chore: update agent skills to $TAG" + body="Updates the agent skills in \`skills-lock.json\` to the [$TAG](https://github.com/slackapi/slack-skills-plugin/releases/tag/$TAG) release." if [ "$(gh pr view agent-skills --json state --jq .state 2>/dev/null)" != "OPEN" ]; then - gh pr create --head agent-skills --title "chore: update agent skills" --body "Updates the agent skills in \`skills-lock.json\` to the latest versions." + gh pr create --head agent-skills --title "$title" --body "$body" + else + gh pr edit agent-skills --title "$title" --body "$body" fi diff --git a/README.md b/README.md index 915a249..5162105 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ All implementations share the same Slack listener layer and the same user experi Install the [Slack MCP and Skills Plugin](https://docs.slack.dev/ai/slack-skills-plugin/) so your coding agent can create, run, and deploy Slack apps, look up Web API methods and scopes, and build Block Kit without guessing. -`.github/workflows/agent-skills.yml` checks daily for updates to the agent skills in each `skills-lock.json` and opens a pull request when they change. To let it open pull requests in your own repository, turn on **Allow GitHub Actions to create and approve pull requests** in **Settings > Actions > General**. +`.github/workflows/agent-skills.yml` checks daily for a new [release](https://github.com/slackapi/slack-skills-plugin/releases) of the agent skills in each `skills-lock.json` and opens a pull request when they change. To let it open pull requests in your own repository, turn on **Allow GitHub Actions to create and approve pull requests** in **Settings > Actions > General**. ### Claude Code diff --git a/claude-agent-sdk/AGENTS.md b/claude-agent-sdk/AGENTS.md index e5b67ff..7874366 100644 --- a/claude-agent-sdk/AGENTS.md +++ b/claude-agent-sdk/AGENTS.md @@ -8,7 +8,7 @@ To install the Slack plugin for your coding agent, follow [Claude Code, Codex, C ## Slack skills -Slack skills are pre-installed in `.agents/skills` (and `.claude/skills` for Claude Code). Use them for Slack work. If the Slack plugin is installed, prefer its `slack:` skills, such as `slack:block-kit`, which may be newer. To update the pre-installed skills, run `npx --yes skills@1 add slackapi/slack-skills-plugin --skill '*' --agent universal --agent claude-code --copy --yes` from this folder. +Slack skills are pre-installed in `.agents/skills` (and `.claude/skills` for Claude Code). Use them for Slack work. If the Slack plugin is installed, prefer its `slack:` skills, such as `slack:block-kit`, which may be newer. To update the pre-installed skills, run `npx --yes skills@1 add slackapi/slack-skills-plugin# --skill '*' --agent universal --agent claude-code --copy --yes` from this folder, with `` set to the latest release from https://github.com/slackapi/slack-skills-plugin/releases. ## Claude Agent SDK specifics diff --git a/openai-agents-sdk/AGENTS.md b/openai-agents-sdk/AGENTS.md index 88daf8e..79fb208 100644 --- a/openai-agents-sdk/AGENTS.md +++ b/openai-agents-sdk/AGENTS.md @@ -8,7 +8,7 @@ To install the Slack plugin for your coding agent, follow [Claude Code, Codex, C ## Slack skills -Slack skills are pre-installed in `.agents/skills` (and `.claude/skills` for Claude Code). Use them for Slack work. If the Slack plugin is installed, prefer its `slack:` skills, such as `slack:block-kit`, which may be newer. To update the pre-installed skills, run `npx --yes skills@1 add slackapi/slack-skills-plugin --skill '*' --agent universal --agent claude-code --copy --yes` from this folder. +Slack skills are pre-installed in `.agents/skills` (and `.claude/skills` for Claude Code). Use them for Slack work. If the Slack plugin is installed, prefer its `slack:` skills, such as `slack:block-kit`, which may be newer. To update the pre-installed skills, run `npx --yes skills@1 add slackapi/slack-skills-plugin# --skill '*' --agent universal --agent claude-code --copy --yes` from this folder, with `` set to the latest release from https://github.com/slackapi/slack-skills-plugin/releases. ## OpenAI Agents SDK specifics diff --git a/pydantic-ai/AGENTS.md b/pydantic-ai/AGENTS.md index 131146b..392b9ec 100644 --- a/pydantic-ai/AGENTS.md +++ b/pydantic-ai/AGENTS.md @@ -8,7 +8,7 @@ To install the Slack plugin for your coding agent, follow [Claude Code, Codex, C ## Slack skills -Slack skills are pre-installed in `.agents/skills` (and `.claude/skills` for Claude Code). Use them for Slack work. If the Slack plugin is installed, prefer its `slack:` skills, such as `slack:block-kit`, which may be newer. To update the pre-installed skills, run `npx --yes skills@1 add slackapi/slack-skills-plugin --skill '*' --agent universal --agent claude-code --copy --yes` from this folder. +Slack skills are pre-installed in `.agents/skills` (and `.claude/skills` for Claude Code). Use them for Slack work. If the Slack plugin is installed, prefer its `slack:` skills, such as `slack:block-kit`, which may be newer. To update the pre-installed skills, run `npx --yes skills@1 add slackapi/slack-skills-plugin# --skill '*' --agent universal --agent claude-code --copy --yes` from this folder, with `` set to the latest release from https://github.com/slackapi/slack-skills-plugin/releases. ## Pydantic AI specifics