Skip to content

feat(skills): add list, find, add, update CLI commands#243

Merged
amirulabu merged 6 commits into
mainfrom
CRF-1140
May 15, 2026
Merged

feat(skills): add list, find, add, update CLI commands#243
amirulabu merged 6 commits into
mainfrom
CRF-1140

Conversation

@amirulabu

@amirulabu amirulabu commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds four new wukong skills subcommands for interacting with the skills registry:

CRF-1140 — wukong skills list

  • Fetches full skill catalog from skills GraphQL query
  • Displays a table with Name, Slug, Description, and Installed status
  • Local-only skills (created via init, not from registry) shown in a separate section
  • Installed column shows scope: ✓ project, ✓ global, local, or

CRF-1141 — wukong skills find <keyword>

  • Calls skills query with keyword filter
  • Same table format as list, filtered to matching results
  • Helpful message when no matches found

CRF-1142 — wukong skills add [name]

  • Optional --global / --project flags to skip scope prompt
  • If <name> provided and exactly 1 match, auto-selects with confirmation
  • If multiple matches or no name, shows inquire::MultiSelect
  • Downloads SKILL.md content via skill query, creates .agents/skills/<slug>/SKILL.md + symlink
  • Tracks content hashes in mv-manifest.json for future update checks
  • Skips already-installed skills with a warning

CRF-1143 — wukong skills update

  • Scans project and global mv-manifest.json files for tracked skills
  • Calls checkSkillUpdates API with all (slug, currentHash) pairs
  • Downloads and replaces SKILL.md for UPDATE_AVAILABLE skills
  • Updates manifest hashes; reports updated/up-to-date/not-found counts

SDK Changes

  • 3 new GraphQL query files: skills.graphql, skill.graphql, check_skill_updates.graphql
  • Updated schema.json with Skill, SkillContent, SkillUpdateState, SkillUpdateStatus, SkillUpdateCheckInput types and query fields
  • Added SkillsList, SkillBySlug, CheckSkillUpdates derive structs in skill.rs
  • Added fetch_skills(), fetch_skill(), check_skill_updates() to SDK WKClient
  • Added CLI-level wrappers with token refresh in wukong_client.rs

Other

  • Added CLAUDE.md with pre-commit checks (cargo fmt, cargo clippy, cargo test)

Jira

amirulabu added 5 commits May 12, 2026 09:51
Add four new skills subcommands for interacting with the skills registry:

- `wukong skills list`: Display all registry skills with local install status
  (CRF-1140)
- `wukong skills find <keyword>`: Search registry skills by keyword
  (CRF-1141)
- `wukong skills add [name]`: Install skills from registry with --global/--project
  flags; interactive multi-select; tracks hashes in mv-manifest.json
  (CRF-1142)
- `wukong skills update`: Batch update outdated skills using
  checkSkillUpdates API; replaces SKILL.md content and symlinks
  (CRF-1143)

SDK layer adds GraphQL queries for `skills`, `skill`, and
`checkSkillUpdates` endpoints, plus WKClient methods with token refresh.

Refs: https://mindvalley.atlassian.net/browse/CRF-1140
Refs: https://mindvalley.atlassian.net/browse/CRF-1141
Refs: https://mindvalley.atlassian.net/browse/CRF-1142
Refs: https://mindvalley.atlassian.net/browse/CRF-1143
@amirulabu amirulabu requested a review from mfauzaan May 12, 2026 07:46
mfauzaan
mfauzaan previously approved these changes May 12, 2026
…red code

- Add Windows symlink support via cfg(windows) fallback in new common module
- Fix skills add crash (EEXIST) when .claude/ symlink exists but .agents/ was deleted
- Always recreate symlink on update even if previously deleted
- Extract update_manifest and create_skill_symlink to shared common.rs
- Compute relative symlink path dynamically instead of hardcoding depth
- Handle \r\n line endings in frontmatter parser
@amirulabu

Copy link
Copy Markdown
Contributor Author

Manual Test Run

Tested on macOS with cargo run -p wukong against the dev registry.

# Login
❯ cargo run -p wukong -- login
❯ Choose the account you would like to continue with amirul.a@mindvalley.com
You are logged in as: amirul.a@mindvalley.com

# List skills
➜ cargo run -p wukong -- skills list
┌──────────────┬──────────────┬─────────────┬───────────┐
│ Name         │ Slug         │ Description │ Installed │
├──────────────┼──────────────┼─────────────┼───────────┤
│ hello-world  │ hello-world  │ Test skill  │ —         │
├──────────────┼──────────────┼─────────────┼───────────┤
│ hello-world2 │ hello-world2 │ Test skill  │ —         │
├──────────────┼──────────────┼─────────────┼───────────┤
│ hello-world3 │ hello-world3 │ Test skill3 │ —         │
└──────────────┴──────────────┴─────────────┴───────────┘
# (+ 20 local skills listed correctly)

# Find skill
➜ cargo run -p wukong -- skills find "hello 3"
┌──────────────┬──────────────┬─────────────┬───────────┐
│ Name         │ Slug         │ Description │ Installed │
├──────────────┼──────────────┼─────────────┼───────────┤
│ hello-world3 │ hello-world3 │ Test skill3 │ —         │
└──────────────┴──────────────┴─────────────┴───────────┘

# Add skill
➜ cargo run -p wukong -- skills add hello-world2
❯ Found one skill: hello-world2 — hello-world2. Install it? Yes
❯ Where should these skills be installed? Project (current directory)
  Installed [project] hello-world2

Installed 1 skill(s).

# Update (already up to date)
➜ cargo run -p wukong -- skills update
0 skill(s) updated
  Up to date: hello-world2

All commands working as expected. ✅

@amirulabu amirulabu merged commit 75ea4d0 into main May 15, 2026
6 checks passed
@amirulabu amirulabu deleted the CRF-1140 branch May 15, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants