AGENT SKILL

sync

Syncs WDS skills from the current project (_bmad/wds/) to ~/.claude/commands/ so they work in any project. Called automatically on every agent activation.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 0
Forks
0

01 前言 Front Matter

name
sync
agents
[ "saga", "freya", "mimir" ]
version
1.0.0
description
Syncs WDS skills from the current project (_bmad/wds/) to ~/.claude/commands/ so they work in any project. Called automatically on every agent activation.

03 SKILL.md 正文

WDS Sync

Keeps ~/.claude/commands/ current with the WDS installation in the active project. Agents call this silently on every activation. Users can also call it directly.


Entry points

On agent activation — silent mode

  • First time (no global commands exist): ask the user once, then sync.
  • Subsequent activations: compare files, sync silently if changed, skip if identical.
  • Never block activation. If sync fails for any reason, continue.

Direct user request ("sync", "update WDS", "sync skills", "check for updates") — verbose, report each step.


Steps

1 — Locate project installation

Find _bmad/wds/ relative to the current project root.

If _bmad/wds/ does not exist:

  • Silent mode: stop silently.
  • Verbose mode: ⚠️ WDS not installed in this project. Run: npx bmad-method install

Store the source root: WDS_SRC = {project-root}/_bmad/wds


2 — Detect home directory

# Mac / Linux
HOME_DIR="$HOME"

# Windows (PowerShell)
$HOME_DIR = $env:USERPROFILE

Destination directories:

  • Commands: {HOME_DIR}/.claude/commands/
  • Tools: {HOME_DIR}/.claude/wds/tools/memory/
  • Data: {HOME_DIR}/.claude/wds/data/

3 — Check sync state

Check if {HOME_DIR}/.claude/commands/wrap.md exists.

First time (file missing): go to step 4 — ask user.

Already synced: compare {HOME_DIR}/.claude/commands/wrap.md to {WDS_SRC}/skills/wrap.md.

# Mac / Linux
diff -q "{HOME_DIR}/.claude/commands/wrap.md" "{WDS_SRC}/skills/wrap.md"

# Windows
Compare-Object (Get-Content "{HOME_DIR}\.claude\commands\wrap.md") (Get-Content "{WDS_SRC}\skills\wrap.md")

If identical: finish silently. If different: go to step 5 — sync silently.


4 — First time: ask user

Print exactly:

WDS is installed in this project but skills are not yet available globally.
Sync now? Adds /saga /freya /mimir /start /wrap /handoff to all Claude Code sessions.
[Y/n]

If n: stop. Do not ask again this session. If y (or Enter): go to step 5.


5 — Sync files

Create destination directories if they don't exist:

# Mac / Linux
mkdir -p "{HOME_DIR}/.claude/commands"
mkdir -p "{HOME_DIR}/.claude/wds/tools/memory"
mkdir -p "{HOME_DIR}/.claude/wds/data"

# Windows
New-Item -ItemType Directory -Force "{HOME_DIR}\.claude\commands"
New-Item -ItemType Directory -Force "{HOME_DIR}\.claude\wds\tools\memory"
New-Item -ItemType Directory -Force "{HOME_DIR}\.claude\wds\data"

Copy agent commands:

Source Destination
{WDS_SRC}/skills/saga.activation.md {HOME_DIR}/.claude/commands/saga.md
{WDS_SRC}/skills/freya.activation.md {HOME_DIR}/.claude/commands/freya.md
{WDS_SRC}/skills/mimir.activation.md {HOME_DIR}/.claude/commands/mimir.md
{WDS_SRC}/skills/start.md {HOME_DIR}/.claude/commands/start.md
{WDS_SRC}/skills/wrap.md {HOME_DIR}/.claude/commands/wrap.md
{WDS_SRC}/skills/handoff.md {HOME_DIR}/.claude/commands/handoff.md

Copy tools and data:

Source Destination
{WDS_SRC}/tools/memory/SKILL.md {HOME_DIR}/.claude/wds/tools/memory/SKILL.md
{WDS_SRC}/data/wds-glossary.md {HOME_DIR}/.claude/wds/data/wds-glossary.md
{WDS_SRC}/data/agent-contracts.md {HOME_DIR}/.claude/wds/data/agent-contracts.md
{WDS_SRC}/data/shared-activation.md {HOME_DIR}/.claude/wds/data/shared-activation.md

Skip any source file that does not exist — do not error.


6 — Report

First-time / direct call:

✓ WDS skills synced to ~/.claude/commands/
  /saga  /freya  /mimir  /start  /wrap  /handoff

Silent update (changes detected):

✓ WDS skills updated.

No changes (direct call only):

WDS skills are up to date.

Silent mode with no changes: no output.

04 同仓库更多 Skills

thkennedy
thkennedy/tk-studio

tk-studio-track

Tracking verbs on the bound Jira project — `block` moves a story the loop cannot progress, and each dependent story, to "Blocked - Awaiting User" with a comment that @mentions the owner (or, with `--engagement`, one engagement's questions issue, which `close` later moves to "Done"); `reply` posts the owner's answer (or "Done.") with the owner's host-only token and moves the issue to "Block Resolved"; `validate` checks that resolution and passes the issue back to work or re-blocks it with a follow-up. Use when the user says "block this story", "tk track block", "put it in the owner's inbox", "reply to the blocked issue", "validate the resolution", or a supervisor or engagement payload names this skill.

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-session

Session discipline as a surface — land a boundary handoff (optionally carrying knowledge deltas) and end the session, or resume a fresh session from a run workspace alone. Use when the user says "hand off this run", "tk session", "resume the run", or a boundary/budget trigger says the session must split.

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-research

Run a chartered research pass — survey the topics a charter scopes, grade every finding by evidence, land the findings in the run workspace, and emit observation events for recommendation-worthy ones. Use when the user says "run the ecosystem watch", "tk research", or a research job's invoke-skill directive names this skill.

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-report

One-verb human defect report — "the skill did the wrong thing" — recorded as a report event in the local measurement ledger. Use when the user says "tk report", "report a defect", "that skill misbehaved", or "log a studio issue".

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-playable-judge

The playable-verify leg's screenshot judge (Story 34.3) — reads only a playable run's report.json and its frames, answers the fixed rubric (scene loaded, player visible and framed, no magenta or error overlay, HUD reads, the named moments shown) with pass or fail and findings each naming a frame and a rubric line. Driven headless by the supervisor's host leg on the project's sandbox tier; use when the payload names a playable `media` folder, or the user says "judge the playable frames".

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-plan-sync

Planning adapter — canonicalize BMad-native planning artifacts (normalize pass, sole id authority) and sync them with the bound planning backend. Use when the user says "sync the plan", "normalize planning artifacts", "tk plan sync", or after stock BMad planning flows produce or change epics/stories.

★ 0