Skip to content

Commit 4001390

Browse files
committed
fix: resolve ESLint no-control-regex and TS7053 errors in search-multiselect test
1 parent 8f1adec commit 4001390

2 files changed

Lines changed: 442 additions & 45 deletions

File tree

skills/skills-manager/SKILL.md

Lines changed: 53 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
---
22
name: skills-manager
3-
description: Manage AI agent skills backup and sync via the skills-manager CLI. Use when the user asks to push skills to GitHub, pull skills from GitHub, link/symlink skills to agents, sync skills across machines, set up project-level skills, or manage the ~/.agents/ directory. Triggers on "push skills", "pull skills", "link skills", "sync skills", "backup skills", "restore skills", "skills-manager", "link --project", "project skills setup".
3+
description: Manage AI agent skills backup and sync via the skills-manager CLI. Use when the user asks to push skills to GitHub, pull skills from GitHub, link or symlink skills to agents, sync skills across machines, set up project-level skills, or manage the ~/.agents/ directory. Also triggers on "sm push", "sm pull", "sm link", "backup my skills", "restore skills on new machine", "link --project", "project skills setup", "sync agents skills", or any question about the skills-manager or sm CLI.
44
---
55

66
# skills-manager CLI
77

88
CLI companion to [vercel-labs/skills](https://github.com/vercel-labs/skills) — backup, restore, and symlink AI agent skills via GitHub.
99

10-
## Wrapper script (set once)
10+
## Invocation
1111

12-
Use the bundled wrapper script so the CLI works without a global install. The wrapper handles the npm package resolution internally — **never construct the package name yourself**.
12+
Two equivalent ways to run the CLI:
1313

1414
```bash
15-
export SM="$HOME/.agents/skills/skills-manager/scripts/sm.sh"
16-
```
17-
18-
Test it:
15+
# Global install (recommended)
16+
npm install -g @tc9011/skills-manager
17+
sm push # short alias
18+
skills-manager push # full name
1919

20-
```bash
21-
"$SM" --version
20+
# Without installing — use the bundled wrapper script
21+
export SM="$HOME/.agents/skills/skills-manager/scripts/sm.sh"
22+
"$SM" push
2223
```
2324

24-
If installed globally (`npm install -g @tc9011/skills-manager`), you can use `skills-manager` directly instead of `"$SM"`.
25-
2625
Requires Node.js ≥ 20. [GitHub CLI](https://cli.github.com/) (`gh`) recommended for auth.
2726

2827
## Key Paths
2928

30-
| Path | Purpose |
31-
| ---------------------------- | ------------------------------------------------------- |
32-
| `~/.agents/` | Git repo root (push/pull target) |
33-
| `~/.agents/skills/` | Canonical skills directory |
29+
| Path | Purpose |
30+
|------|---------|
31+
| `~/.agents/` | Git repo root (push/pull target) |
32+
| `~/.agents/skills/` | Canonical skills directory |
3433
| `~/.agents/.skill-lock.json` | Lock file (**READ ONLY** — owned by vercel-labs/skills) |
3534

3635
## Authentication
3736

38-
Authentication is **optional**. If git already has credentials configured (SSH keys, macOS Keychain, `git credential-manager`, etc.), no extra setup is needed.
37+
Auth is **optional** — if git already has credentials (SSH keys, macOS Keychain, etc.), push/pull work without setup.
3938

40-
If git cannot authenticate on its own, the CLI will try these token sources in order:
39+
When git cannot authenticate, the CLI tries these sources in order:
4140

4241
1. `gh auth token` — GitHub CLI
4342
2. `$GITHUB_TOKEN` — environment variable
4443
3. `$GH_TOKEN` — environment variable
4544

46-
If push/pull fails with an auth error, guide the user to set up ONE of:
45+
If push fails with an auth error:
46+
- **Has `gh`**`gh auth login`
47+
- **No `gh`**`export GITHUB_TOKEN=ghp_your_token_here`
4748

48-
1. **Has `gh` CLI**`gh auth login`
49-
2. **No `gh` CLI**`export GITHUB_TOKEN=ghp_your_token_here`
49+
`link` never requires authentication.
5050

5151
## Commands
5252

@@ -55,82 +55,90 @@ If push/pull fails with an auth error, guide the user to set up ONE of:
5555
Commit and push `~/.agents/` to GitHub.
5656

5757
```bash
58-
"$SM" push # auto-generated commit message
59-
"$SM" push -m "add new skill" # custom message
58+
sm push # auto-generated commit message
59+
sm push -m "add new skill" # custom message
6060
```
6161

62-
First run auto-initializes git repo + prompts for remote. On conflict (remote ahead), rejects with instructions to pull first.
62+
First run auto-initializes git repo and prompts for a remote URL. On conflict (remote ahead of local), rejects with instructions to pull first.
6363

6464
### pull
6565

6666
Pull from GitHub. Auto-runs `link` afterward unless skipped.
6767

6868
```bash
69-
"$SM" pull --repo owner/name # specify repo
70-
"$SM" pull # use existing remote
71-
"$SM" pull --skip-link # pull only, don't auto-link
69+
sm pull --repo owner/name # first time — specify repo
70+
sm pull # subsequent runs — uses existing remote
71+
sm pull --skip-link # pull only, skip auto-link
7272
```
7373

7474
On rebase conflict, aborts and shows manual resolution steps.
7575

76-
### link (global)
76+
### link (global mode)
7777

7878
Read `.skill-lock.json`, create **relative** symlinks from each agent's global skills directory to `~/.agents/skills/`.
7979

8080
```bash
81-
"$SM" link # interactive multiselect
82-
"$SM" link --agents cursor opencode # non-interactive (skips prompt)
81+
sm link # interactive prompt
82+
sm link --agents cursor opencode # non-interactive, skip prompt
8383
```
8484

85-
When `--agents` is provided, the prompt is skipped entirely. Selection is remembered across runs.
85+
**Interactive prompt behavior:**
86+
87+
The agent selection uses a **searchable multiselect** with two sections:
88+
89+
1. **Locked section** — Universal agents (amp, cline, codex, cursor, gemini-cli, github-copilot, kimi-cli, opencode, replit, universal) are always included. They share `~/.agents/skills/` as their project path, so linking them is a no-op beyond the global symlink — they're locked to avoid confusion.
90+
91+
2. **Searchable list** — All 31 non-universal agents appear here. Type to filter by name. Pre-selection comes from (in priority order): last saved selection → `.skill-lock.json` → agents whose directory already exists on disk.
92+
93+
When `--agents` is provided, the prompt is skipped entirely. Selection is persisted to `~/.config/skills-manager/config.json` for the next run.
8694

8795
### link --project
8896

89-
Link or copy skills to current working directory. Three-step interactive flow (all skippable via flags):
97+
Link or copy skills to the **current working directory**. Three-step interactive flow:
9098

91-
1. **Select skills** (`--skills`) — choose which skills (none pre-selected)
92-
2. **Copy or symlink** (`--mode`) — copy (default, recommended) or absolute symlinks
93-
3. **Select agents** (`--agents`) — choose agents for project-level setup
99+
1. **Select skills** (`--skills`) — which skills to include (none pre-selected)
100+
2. **Copy or symlink** (`--mode`) — `copy` (default, recommended) or absolute `symlink`
101+
3. **Select agents** (`--agents`) — same searchable multiselect with locked universal section as global mode
94102

95103
```bash
96104
cd /path/to/project
97-
"$SM" link --project # interactive
98-
"$SM" link --project --agents cursor --skills my-skill --mode copy # non-interactive
105+
sm link --project # interactive
106+
sm link --project --agents cursor claude-code --skills my-skill --mode copy # non-interactive
99107
```
100108

101-
Agents sharing the same projectPath are deduplicated.
109+
Agents sharing the same `projectPath` are deduplicated — one copy/link operation per unique path.
102110

103111
## Common Workflows
104112

105-
### First-time setup (new machine)
113+
### First-time setup on a new machine
106114

107115
```bash
108-
"$SM" pull --repo owner/my-skills # clone + auto-link
116+
sm pull --repo owner/my-skills # clone + auto-link
109117
```
110118

111119
### Daily sync
112120

113121
```bash
114-
"$SM" pull # fetch latest + re-link
115-
"$SM" push # backup local changes
122+
sm pull # fetch latest + re-link
123+
sm push # backup local changes
116124
```
117125

118126
### Project-level skills
119127

120128
```bash
121129
cd /path/to/project
122-
"$SM" link --project
130+
sm link --project
123131
# Creates e.g. .agents/skills/, .claude/skills/ in CWD
124132
```
125133

126134
## Supported Agents (41)
127135

128-
- **10 universal** (share `.agents/skills` projectPath): amp, cline, codex, cursor, gemini-cli, github-copilot, kimi-cli, opencode, replit, universal
129-
- **31 non-universal** (agent-specific paths): claude-code (`.claude/skills`), windsurf (`.windsurf/skills`), trae (`.trae/skills`), roo (`.roo/skills`), etc.
136+
- **10 universal** (always locked in interactive prompts): amp, cline, codex, cursor, gemini-cli, github-copilot, kimi-cli, opencode, replit, universal
137+
- **31 non-universal** (appear in searchable list): claude-code, windsurf, trae, roo, augment, continue, goose, and more
130138

131139
## Constraints
132140

133-
- `.skill-lock.json` is READ ONLY — never modify it
141+
- `.skill-lock.json` is READ ONLY — never create, modify, or delete it
134142
- `~/.agents/` is the git repo root (not `~/.agents/skills/`)
135143
- Global link = relative symlinks; project link = absolute symlinks or copies
136144
- Auth tokens are transient in-memory only — never persisted to `.git/config`

0 commit comments

Comments
 (0)