skill-tags 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -25
- package/bin/skill-tags.js +8 -6
- package/package.json +1 -1
- package/sync.sh +84 -35
package/README.md
CHANGED
|
@@ -30,8 +30,8 @@ If you're interested in contributing to Cursor Kits, please let me know!
|
|
|
30
30
|
## Quick Start
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
# Install
|
|
34
|
-
npm install -
|
|
33
|
+
# Install
|
|
34
|
+
npm install skill-tags -g
|
|
35
35
|
|
|
36
36
|
# Add the shell auto-trigger wrapper
|
|
37
37
|
skill-tags --setup
|
|
@@ -90,14 +90,10 @@ Copy and paste this into your Cursor agent to autoconfigure skill-tags:
|
|
|
90
90
|
```text
|
|
91
91
|
Install and configure the `skill-tags` package (npm: https://www.npmjs.com/package/skill-tags, github: https://github.com/steve-piece/skill-tags) for me.
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Once confirmed, use a terminal that runs outside the sandbox with full permissions to avoid permission errors during install. In Cursor, this means using a non-sandboxed terminal session if available (required_permissions: ["all"] if running via agent shell tools).
|
|
93
|
+
Use a terminal that runs outside the sandbox with full permissions to avoid permission errors during install. In Cursor, this means using a non-sandboxed terminal session if available (required_permissions: ["all"] if running via agent shell tools).
|
|
96
94
|
|
|
97
95
|
Steps to perform:
|
|
98
|
-
1. Install the package
|
|
99
|
-
- Global: `npm install -g skill-tags`
|
|
100
|
-
- Local: `npm install --save-dev skill-tags`
|
|
96
|
+
1. Install the package: `npm install skill-tags -g`
|
|
101
97
|
2. Run `skill-tags --setup` to install the `skills()` shell wrapper in my rc file (~/.zshrc or ~/.bash_profile)
|
|
102
98
|
3. Run `skill-tags` to perform an initial sync of all installed skills
|
|
103
99
|
4. Source my shell rc file or instruct me to do so manually
|
|
@@ -108,6 +104,7 @@ When complete, output a summary that includes:
|
|
|
108
104
|
- How the auto-trigger works: `skills add/remove <pkg>` now automatically syncs after every install/removal
|
|
109
105
|
- How to manually re-sync at any time: run `skill-tags`
|
|
110
106
|
- The total number of skills that were indexed
|
|
107
|
+
- (Optional) To create category-specific indexes for more focused context, run `skill-tags --categories`
|
|
111
108
|
```
|
|
112
109
|
|
|
113
110
|
</details>
|
|
@@ -119,21 +116,15 @@ When complete, output a summary that includes:
|
|
|
119
116
|
### Install via npm
|
|
120
117
|
|
|
121
118
|
```bash
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
# One-off run without installing
|
|
126
|
-
npx skill-tags
|
|
127
|
-
|
|
128
|
-
# Project devDependency (adds to package.json)
|
|
129
|
-
npm install --save-dev skill-tags
|
|
119
|
+
npm install skill-tags -g
|
|
120
|
+
skill-tags --setup
|
|
121
|
+
source ~/.zshrc
|
|
130
122
|
```
|
|
131
123
|
|
|
132
|
-
|
|
124
|
+
### One-off run (no install)
|
|
133
125
|
|
|
134
126
|
```bash
|
|
135
|
-
skill-tags
|
|
136
|
-
source ~/.zshrc
|
|
127
|
+
npx skill-tags
|
|
137
128
|
```
|
|
138
129
|
|
|
139
130
|
### Install via curl
|
|
@@ -166,12 +157,13 @@ skills add vercel-labs/agent-skills/vercel-react-best-practices
|
|
|
166
157
|
## CLI Reference
|
|
167
158
|
|
|
168
159
|
```bash
|
|
169
|
-
skill-tags
|
|
170
|
-
skill-tags --categories
|
|
171
|
-
skill-tags --setup
|
|
172
|
-
skill-tags --global-only # skip project-level skills
|
|
173
|
-
skill-tags --
|
|
174
|
-
skill-tags --
|
|
160
|
+
skill-tags # sync all skills, generate/update the command file
|
|
161
|
+
skill-tags --categories # open interactive category wizard (CRUD)
|
|
162
|
+
skill-tags --setup # install skills() shell wrapper in ~/.zshrc
|
|
163
|
+
skill-tags --global-only # skip project-level skills (.agents/skills in CWD)
|
|
164
|
+
skill-tags --project-only # scan only .agents/skills in CWD; write to .cursor/commands/skill-tags.md
|
|
165
|
+
skill-tags --version # print version
|
|
166
|
+
skill-tags --help # show usage
|
|
175
167
|
```
|
|
176
168
|
|
|
177
169
|
## Manual Sync
|
package/bin/skill-tags.js
CHANGED
|
@@ -38,12 +38,13 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
|
38
38
|
Usage: skill-tags [options]
|
|
39
39
|
|
|
40
40
|
Options:
|
|
41
|
-
(none)
|
|
42
|
-
--categories
|
|
43
|
-
--global-only
|
|
44
|
-
--
|
|
45
|
-
--
|
|
46
|
-
--
|
|
41
|
+
(none) Scan all skill sources and generate skill-tags.md
|
|
42
|
+
--categories Interactive category wizard (arrow keys + space to toggle)
|
|
43
|
+
--global-only Skip project-level skills (.agents/skills in CWD)
|
|
44
|
+
--project-only Scan only .agents/skills in CWD; write to .cursor/commands/skill-tags.md
|
|
45
|
+
--setup Install the skills() shell wrapper in your shell rc
|
|
46
|
+
--version, -v Print version
|
|
47
|
+
--help, -h Show this help
|
|
47
48
|
|
|
48
49
|
Skill sources (priority order):
|
|
49
50
|
~/.agents/skills/ skills installed via npx skills add
|
|
@@ -56,6 +57,7 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
|
56
57
|
Output:
|
|
57
58
|
~/.cursor/commands/skill-tags.md full index of all skills
|
|
58
59
|
~/.cursor/commands/skills-<category>.md generated by --categories
|
|
60
|
+
./.cursor/commands/skill-tags.md generated by --project-only
|
|
59
61
|
|
|
60
62
|
Config:
|
|
61
63
|
~/.cursor/skill-tags-categories.conf
|
package/package.json
CHANGED
package/sync.sh
CHANGED
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
set -euo pipefail
|
|
9
9
|
|
|
10
|
-
VERSION="1.2.
|
|
10
|
+
VERSION="1.2.1"
|
|
11
11
|
|
|
12
12
|
GLOBAL_COMMANDS_DIR="${HOME}/.cursor/commands"
|
|
13
13
|
OUTPUT_FILE="${GLOBAL_COMMANDS_DIR}/skill-tags.md"
|
|
14
14
|
CATEGORIES_CONFIG="${HOME}/.cursor/skill-tags-categories.conf"
|
|
15
|
+
PROJECT_COMMANDS_DIR="$(pwd)/.cursor/commands"
|
|
16
|
+
PROJECT_OUTPUT_FILE="${PROJECT_COMMANDS_DIR}/skill-tags.md"
|
|
15
17
|
|
|
16
18
|
# ─── Priority-ordered skill source directories ─────────────────────────────────
|
|
17
19
|
# Earlier entries take priority when the same skill name exists in multiple locations.
|
|
@@ -33,10 +35,12 @@ trap 'rm -f "$SKILLS_TEMP"; rm -rf "$SKILLS_META_DIR"' EXIT
|
|
|
33
35
|
# ─── Flags ─────────────────────────────────────────────────────────────────────
|
|
34
36
|
|
|
35
37
|
GLOBAL_ONLY=false
|
|
38
|
+
PROJECT_ONLY=false
|
|
36
39
|
|
|
37
40
|
for arg in "$@"; do
|
|
38
41
|
case "$arg" in
|
|
39
|
-
--global-only)
|
|
42
|
+
--global-only) GLOBAL_ONLY=true ;;
|
|
43
|
+
--project-only) PROJECT_ONLY=true ;;
|
|
40
44
|
esac
|
|
41
45
|
done
|
|
42
46
|
|
|
@@ -254,27 +258,72 @@ EOF
|
|
|
254
258
|
|
|
255
259
|
printf "\n skill-tags v%s — syncing skills\n\n" "$VERSION"
|
|
256
260
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
if [[ -d "$
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
if [[ "$PROJECT_ONLY" == "true" ]]; then
|
|
262
|
+
# ─── --project-only: scan only .agents/skills in CWD ────────────────────────
|
|
263
|
+
PROJECT_SKILLS_DIR="$(pwd)/.agents/skills"
|
|
264
|
+
|
|
265
|
+
if [[ ! -d "$PROJECT_SKILLS_DIR" ]]; then
|
|
266
|
+
printf " No project skills found at %s/.agents/skills\n\n" "$(pwd)"
|
|
267
|
+
exit 0
|
|
264
268
|
fi
|
|
265
|
-
done
|
|
266
269
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
log "Scanning project skills: ${PROJECT_SKILLS_DIR}"
|
|
271
|
+
scan_tree "$PROJECT_SKILLS_DIR"
|
|
272
|
+
|
|
273
|
+
OPENING="Assess the following project-level skills and apply any that are relevant to completing the user's request at the highest level of efficiency, quality, and completeness. When skills overlap in scope, assess the overlapping skills in greater detail and autonomously determine which is the best match for the project or the specific request — do not prompt the user to resolve overlaps.
|
|
274
|
+
|
|
275
|
+
CRITICAL REQUIREMENT: Before applying any skill, you MUST use the Read tool to read the full contents of the skill file at the provided path. Do not assume the skill's behavior from its title or description alone.
|
|
276
|
+
|
|
277
|
+
If operating in Plan Mode, explicitly include references to specific skills to use and (if applicable) subagents to utilize for efficient programming within the contents of the plan and the plan's TODOs.
|
|
278
|
+
|
|
279
|
+
Examples:
|
|
280
|
+
- \"Use the \`responsive-design/SKILL.md\` to apply advanced clamp-based responsiveness to the new navigation bar.\"
|
|
281
|
+
- \"Delegate to the \`frontend-designer\` subagent using \`ui-ux-pro-max/SKILL.md\` to build the polished component.\"
|
|
282
|
+
- \"Utilize \`supabase-postgres-best-practices/SKILL.md\` when designing the database schema for the user profiles.\""
|
|
283
|
+
|
|
284
|
+
mkdir -p "$PROJECT_COMMANDS_DIR"
|
|
285
|
+
|
|
286
|
+
is_update=false
|
|
287
|
+
[[ -f "$PROJECT_OUTPUT_FILE" ]] && is_update=true
|
|
288
|
+
|
|
289
|
+
cat > "$PROJECT_OUTPUT_FILE" <<EOF
|
|
290
|
+
# Skill Tags Command
|
|
291
|
+
|
|
292
|
+
<!-- Auto-generated by sync.sh (skill-tags) v${VERSION} — do not edit manually -->
|
|
293
|
+
|
|
294
|
+
${OPENING}
|
|
295
|
+
|
|
296
|
+
## Available Skills
|
|
297
|
+
$(cat "$SKILLS_TEMP")
|
|
298
|
+
EOF
|
|
299
|
+
|
|
300
|
+
printf "\n"
|
|
301
|
+
if [[ "$is_update" == "true" ]]; then
|
|
302
|
+
printf " ✓ Updated: .cursor/commands/skill-tags.md\n"
|
|
303
|
+
else
|
|
304
|
+
printf " ✓ Generated: .cursor/commands/skill-tags.md\n"
|
|
305
|
+
fi
|
|
306
|
+
printf " Skills: %d indexed\n" "$count_found"
|
|
307
|
+
printf "\n Tip: type @skill-tags.md in Cursor chat to load the project skills reference.\n\n"
|
|
272
308
|
|
|
273
|
-
|
|
309
|
+
else
|
|
310
|
+
# ─── Default: scan all sources ───────────────────────────────────────────────
|
|
311
|
+
|
|
312
|
+
for entry in "${GLOBAL_SKILL_SOURCES[@]}"; do
|
|
313
|
+
dir="${entry%%:*}"
|
|
314
|
+
label="${entry##*:}"
|
|
315
|
+
if [[ -d "$dir" ]]; then
|
|
316
|
+
log "Scanning ${label}: ${dir/#$HOME/~}"
|
|
317
|
+
scan_tree "$dir"
|
|
318
|
+
fi
|
|
319
|
+
done
|
|
274
320
|
|
|
275
|
-
|
|
321
|
+
if [[ "$GLOBAL_ONLY" == "false" && -d ".agents/skills" ]]; then
|
|
322
|
+
log "Scanning project skills: $(pwd)/.agents/skills"
|
|
323
|
+
scan_tree "$(pwd)/.agents/skills"
|
|
324
|
+
fi
|
|
276
325
|
|
|
277
|
-
OPENING="Assess the following skills available in this workspace and apply any that are relevant to completing the user's request at the highest level of efficiency, quality, and completeness. When skills overlap in scope, assess the overlapping skills in greater detail and autonomously determine which is the best match for the project or the specific request — do not prompt the user to resolve overlaps.
|
|
326
|
+
OPENING="Assess the following skills available in this workspace and apply any that are relevant to completing the user's request at the highest level of efficiency, quality, and completeness. When skills overlap in scope, assess the overlapping skills in greater detail and autonomously determine which is the best match for the project or the specific request — do not prompt the user to resolve overlaps.
|
|
278
327
|
|
|
279
328
|
CRITICAL REQUIREMENT: Before applying any skill, you MUST use the Read tool to read the full contents of the skill file at the provided path. Do not assume the skill's behavior from its title or description alone.
|
|
280
329
|
|
|
@@ -285,10 +334,12 @@ Examples:
|
|
|
285
334
|
- \"Delegate to the \`frontend-designer\` subagent using \`ui-ux-pro-max/SKILL.md\` to build the polished component.\"
|
|
286
335
|
- \"Utilize \`supabase-postgres-best-practices/SKILL.md\` when designing the database schema for the user profiles.\""
|
|
287
336
|
|
|
288
|
-
|
|
289
|
-
[[ -f "$OUTPUT_FILE" ]] && is_update=true
|
|
337
|
+
mkdir -p "$GLOBAL_COMMANDS_DIR"
|
|
290
338
|
|
|
291
|
-
|
|
339
|
+
is_update=false
|
|
340
|
+
[[ -f "$OUTPUT_FILE" ]] && is_update=true
|
|
341
|
+
|
|
342
|
+
cat > "$OUTPUT_FILE" <<EOF
|
|
292
343
|
# Skill Tags Command
|
|
293
344
|
|
|
294
345
|
<!-- Auto-generated by sync.sh (skill-tags) v${VERSION} — do not edit manually -->
|
|
@@ -299,20 +350,18 @@ ${OPENING}
|
|
|
299
350
|
$(cat "$SKILLS_TEMP")
|
|
300
351
|
EOF
|
|
301
352
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
generate_category_files
|
|
353
|
+
generate_category_files
|
|
305
354
|
|
|
306
|
-
|
|
355
|
+
printf "\n"
|
|
356
|
+
if [[ "$is_update" == "true" ]]; then
|
|
357
|
+
printf " ✓ Updated: %s\n" "${OUTPUT_FILE/#$HOME/~}"
|
|
358
|
+
else
|
|
359
|
+
printf " ✓ Generated: %s\n" "${OUTPUT_FILE/#$HOME/~}"
|
|
360
|
+
fi
|
|
361
|
+
printf " Skills: %d indexed\n" "$count_found"
|
|
362
|
+
if [[ $count_dupes -gt 0 ]]; then
|
|
363
|
+
printf " Duplicates: %d skipped (covered by higher-priority source)\n" "$count_dupes"
|
|
364
|
+
fi
|
|
365
|
+
printf "\n Tip: type @skill-tags.md in Cursor chat to load the full skills reference.\n\n"
|
|
307
366
|
|
|
308
|
-
printf "\n"
|
|
309
|
-
if [[ "$is_update" == "true" ]]; then
|
|
310
|
-
printf " ✓ Updated: %s\n" "${OUTPUT_FILE/#$HOME/~}"
|
|
311
|
-
else
|
|
312
|
-
printf " ✓ Generated: %s\n" "${OUTPUT_FILE/#$HOME/~}"
|
|
313
|
-
fi
|
|
314
|
-
printf " Skills: %d indexed\n" "$count_found"
|
|
315
|
-
if [[ $count_dupes -gt 0 ]]; then
|
|
316
|
-
printf " Duplicates: %d skipped (covered by higher-priority source)\n" "$count_dupes"
|
|
317
367
|
fi
|
|
318
|
-
printf "\n Tip: type @skill-tags.md in Cursor chat to load the full skills reference.\n\n"
|