ai-agent-skills 1.2.3 → 1.6.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 +2 -1
- package/cli.js +94 -33
- package/package.json +1 -1
- package/skills/ask-questions-if-underspecified/SKILL.md +81 -0
- package/skills.json +17 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
|
-
<img src="https://img.shields.io/badge/skills-
|
|
13
|
+
<img src="https://img.shields.io/badge/skills-40-blue?style=flat-square" alt="Skills" />
|
|
14
14
|
<img src="https://img.shields.io/badge/agents-10+-green?style=flat-square" alt="Compatible Agents" />
|
|
15
15
|
<img src="https://img.shields.io/badge/license-MIT-brightgreen?style=flat-square" alt="License" />
|
|
16
16
|
<img src="https://img.shields.io/npm/v/ai-agent-skills?style=flat-square&color=red" alt="npm" />
|
|
@@ -109,6 +109,7 @@ Works with **Claude Code**, **Cursor**, **Amp**, **VS Code**, **GitHub Copilot**
|
|
|
109
109
|
### Productivity
|
|
110
110
|
| Skill | Description |
|
|
111
111
|
|-------|-------------|
|
|
112
|
+
| `ask-questions-if-underspecified` | Clarify requirements before implementing |
|
|
112
113
|
| `doc-coauthoring` | Co-author docs, proposals, specs with structured workflow |
|
|
113
114
|
| `job-application` | Cover letters and applications using your CV |
|
|
114
115
|
| `qa-regression` | Automated regression testing with Playwright |
|
package/cli.js
CHANGED
|
@@ -143,10 +143,14 @@ function getAvailableSkills() {
|
|
|
143
143
|
|
|
144
144
|
function parseArgs(args) {
|
|
145
145
|
const config = loadConfig();
|
|
146
|
+
const validAgents = Object.keys(AGENT_PATHS);
|
|
147
|
+
const defaultAgent = config.defaultAgent || 'claude';
|
|
148
|
+
|
|
146
149
|
const result = {
|
|
147
150
|
command: null,
|
|
148
151
|
param: null,
|
|
149
|
-
|
|
152
|
+
agents: [], // New: array of agents
|
|
153
|
+
allAgents: false, // New: --all-agents flag
|
|
150
154
|
installed: false,
|
|
151
155
|
all: false,
|
|
152
156
|
dryRun: false,
|
|
@@ -154,17 +158,33 @@ function parseArgs(args) {
|
|
|
154
158
|
category: null
|
|
155
159
|
};
|
|
156
160
|
|
|
157
|
-
const validAgents = Object.keys(AGENT_PATHS);
|
|
158
|
-
|
|
159
161
|
for (let i = 0; i < args.length; i++) {
|
|
160
162
|
const arg = args[i];
|
|
161
163
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
// --agents claude,cursor,codex (multiple agents)
|
|
165
|
+
if (arg === '--agents') {
|
|
166
|
+
const value = args[i + 1] || '';
|
|
167
|
+
value.split(',').forEach(a => {
|
|
168
|
+
const agent = a.trim();
|
|
169
|
+
if (validAgents.includes(agent) && !result.agents.includes(agent)) {
|
|
170
|
+
result.agents.push(agent);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
i++;
|
|
174
|
+
}
|
|
175
|
+
// --agent cursor (single agent, backward compatible)
|
|
176
|
+
else if (arg === '--agent' || arg === '-a') {
|
|
177
|
+
let agentValue = args[i + 1] || defaultAgent;
|
|
164
178
|
agentValue = agentValue.replace(/^-+/, '');
|
|
165
|
-
|
|
179
|
+
if (validAgents.includes(agentValue) && !result.agents.includes(agentValue)) {
|
|
180
|
+
result.agents.push(agentValue);
|
|
181
|
+
}
|
|
166
182
|
i++;
|
|
167
183
|
}
|
|
184
|
+
// --all-agents (install to all known agents)
|
|
185
|
+
else if (arg === '--all-agents') {
|
|
186
|
+
result.allAgents = true;
|
|
187
|
+
}
|
|
168
188
|
else if (arg === '--installed' || arg === '-i') {
|
|
169
189
|
result.installed = true;
|
|
170
190
|
}
|
|
@@ -185,7 +205,9 @@ function parseArgs(args) {
|
|
|
185
205
|
else if (arg.startsWith('--')) {
|
|
186
206
|
const potentialAgent = arg.replace(/^--/, '');
|
|
187
207
|
if (validAgents.includes(potentialAgent)) {
|
|
188
|
-
result.
|
|
208
|
+
if (!result.agents.includes(potentialAgent)) {
|
|
209
|
+
result.agents.push(potentialAgent);
|
|
210
|
+
}
|
|
189
211
|
} else if (!result.command) {
|
|
190
212
|
result.command = arg;
|
|
191
213
|
}
|
|
@@ -197,6 +219,17 @@ function parseArgs(args) {
|
|
|
197
219
|
}
|
|
198
220
|
}
|
|
199
221
|
|
|
222
|
+
// Resolve final agents list
|
|
223
|
+
if (result.allAgents) {
|
|
224
|
+
result.agents = [...validAgents];
|
|
225
|
+
} else if (result.agents.length === 0) {
|
|
226
|
+
// Use config agents or default
|
|
227
|
+
const configAgents = config.agents && config.agents.length > 0
|
|
228
|
+
? config.agents.filter(a => validAgents.includes(a))
|
|
229
|
+
: [];
|
|
230
|
+
result.agents = configAgents.length > 0 ? configAgents : [defaultAgent];
|
|
231
|
+
}
|
|
232
|
+
|
|
200
233
|
return result;
|
|
201
234
|
}
|
|
202
235
|
|
|
@@ -1036,12 +1069,14 @@ ${colors.bold}Commands:${colors.reset}
|
|
|
1036
1069
|
${colors.green}help${colors.reset} Show this help
|
|
1037
1070
|
|
|
1038
1071
|
${colors.bold}Options:${colors.reset}
|
|
1039
|
-
${colors.cyan}--agent <name>${colors.reset}
|
|
1040
|
-
${colors.cyan}--
|
|
1041
|
-
${colors.cyan}--
|
|
1042
|
-
${colors.cyan}--
|
|
1043
|
-
${colors.cyan}--
|
|
1044
|
-
${colors.cyan}--
|
|
1072
|
+
${colors.cyan}--agent <name>${colors.reset} Target single agent (default: claude)
|
|
1073
|
+
${colors.cyan}--agents <list>${colors.reset} Target multiple agents (comma-separated)
|
|
1074
|
+
${colors.cyan}--all-agents${colors.reset} Target ALL known agents at once
|
|
1075
|
+
${colors.cyan}--installed${colors.reset} Show only installed skills (with list)
|
|
1076
|
+
${colors.cyan}--dry-run, -n${colors.reset} Preview changes without applying
|
|
1077
|
+
${colors.cyan}--category <c>${colors.reset} Filter by category
|
|
1078
|
+
${colors.cyan}--all${colors.reset} Apply to all (with update)
|
|
1079
|
+
${colors.cyan}--version, -v${colors.reset} Show version number
|
|
1045
1080
|
|
|
1046
1081
|
${colors.bold}Agents:${colors.reset}
|
|
1047
1082
|
${colors.cyan}claude${colors.reset} (default) ~/.claude/skills/
|
|
@@ -1065,6 +1100,8 @@ ${colors.bold}Examples:${colors.reset}
|
|
|
1065
1100
|
npx ai-agent-skills install anthropics/skills/pdf # Install specific skill from GitHub
|
|
1066
1101
|
npx ai-agent-skills install ./my-skill # Install from local path
|
|
1067
1102
|
npx ai-agent-skills install pdf --agent cursor # Install for Cursor
|
|
1103
|
+
npx ai-agent-skills install pdf --agents claude,cursor # Install for multiple agents
|
|
1104
|
+
npx ai-agent-skills install pdf --all-agents # Install for ALL agents
|
|
1068
1105
|
npx ai-agent-skills install pdf --dry-run # Preview install
|
|
1069
1106
|
npx ai-agent-skills list --category development
|
|
1070
1107
|
npx ai-agent-skills search testing
|
|
@@ -1127,21 +1164,32 @@ function showConfig() {
|
|
|
1127
1164
|
log(`${colors.dim}File: ${CONFIG_FILE}${colors.reset}\n`);
|
|
1128
1165
|
|
|
1129
1166
|
log(`${colors.bold}defaultAgent:${colors.reset} ${config.defaultAgent || 'claude'}`);
|
|
1167
|
+
log(`${colors.bold}agents:${colors.reset} ${config.agents ? config.agents.join(', ') : '(not set, uses defaultAgent)'}`);
|
|
1130
1168
|
log(`${colors.bold}autoUpdate:${colors.reset} ${config.autoUpdate || false}`);
|
|
1131
1169
|
|
|
1132
|
-
log(`\n${colors.dim}
|
|
1170
|
+
log(`\n${colors.dim}Set default agents: npx ai-agent-skills config --agents claude,cursor${colors.reset}`);
|
|
1133
1171
|
}
|
|
1134
1172
|
|
|
1135
1173
|
function setConfig(key, value) {
|
|
1136
1174
|
const config = loadConfig();
|
|
1175
|
+
const validAgents = Object.keys(AGENT_PATHS);
|
|
1137
1176
|
|
|
1138
1177
|
if (key === 'default-agent' || key === 'defaultAgent') {
|
|
1139
1178
|
if (!AGENT_PATHS[value]) {
|
|
1140
1179
|
error(`Invalid agent: ${value}`);
|
|
1141
|
-
log(`Valid agents: ${
|
|
1180
|
+
log(`Valid agents: ${validAgents.join(', ')}`);
|
|
1142
1181
|
return false;
|
|
1143
1182
|
}
|
|
1144
1183
|
config.defaultAgent = value;
|
|
1184
|
+
} else if (key === 'agents') {
|
|
1185
|
+
// Parse comma-separated agents list
|
|
1186
|
+
const agentsList = value.split(',').map(a => a.trim()).filter(a => validAgents.includes(a));
|
|
1187
|
+
if (agentsList.length === 0) {
|
|
1188
|
+
error(`No valid agents in: ${value}`);
|
|
1189
|
+
log(`Valid agents: ${validAgents.join(', ')}`);
|
|
1190
|
+
return false;
|
|
1191
|
+
}
|
|
1192
|
+
config.agents = agentsList;
|
|
1145
1193
|
} else if (key === 'auto-update' || key === 'autoUpdate') {
|
|
1146
1194
|
config.autoUpdate = value === 'true' || value === true;
|
|
1147
1195
|
} else {
|
|
@@ -1159,7 +1207,7 @@ function setConfig(key, value) {
|
|
|
1159
1207
|
// ============ MAIN CLI ============
|
|
1160
1208
|
|
|
1161
1209
|
const args = process.argv.slice(2);
|
|
1162
|
-
const { command, param,
|
|
1210
|
+
const { command, param, agents, installed, dryRun, category, tags, all } = parseArgs(args);
|
|
1163
1211
|
|
|
1164
1212
|
// Handle config commands specially
|
|
1165
1213
|
if (command === 'config') {
|
|
@@ -1184,13 +1232,16 @@ if (command === 'config') {
|
|
|
1184
1232
|
switch (command || 'help') {
|
|
1185
1233
|
case 'browse':
|
|
1186
1234
|
case 'b':
|
|
1187
|
-
browseSkills(
|
|
1235
|
+
browseSkills(agents[0]);
|
|
1188
1236
|
break;
|
|
1189
1237
|
|
|
1190
1238
|
case 'list':
|
|
1191
1239
|
case 'ls':
|
|
1192
1240
|
if (installed) {
|
|
1193
|
-
|
|
1241
|
+
for (let i = 0; i < agents.length; i++) {
|
|
1242
|
+
if (i > 0) log('');
|
|
1243
|
+
listInstalledSkills(agents[i]);
|
|
1244
|
+
}
|
|
1194
1245
|
} else {
|
|
1195
1246
|
listSkills(category, tags);
|
|
1196
1247
|
}
|
|
@@ -1201,16 +1252,18 @@ switch (command || 'help') {
|
|
|
1201
1252
|
case 'add':
|
|
1202
1253
|
if (!param) {
|
|
1203
1254
|
error('Please specify a skill name, GitHub repo, or local path.');
|
|
1204
|
-
log('Usage: npx ai-agent-skills install <
|
|
1255
|
+
log('Usage: npx ai-agent-skills install <name> [--agents claude,cursor] [--all-agents]');
|
|
1205
1256
|
process.exit(1);
|
|
1206
1257
|
}
|
|
1207
|
-
//
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1258
|
+
// Install to all specified agents
|
|
1259
|
+
for (const agent of agents) {
|
|
1260
|
+
if (isLocalPath(param)) {
|
|
1261
|
+
installFromLocalPath(param, agent, dryRun);
|
|
1262
|
+
} else if (isGitHubUrl(param)) {
|
|
1263
|
+
installFromGitHub(param, agent, dryRun);
|
|
1264
|
+
} else {
|
|
1265
|
+
installSkill(param, agent, dryRun);
|
|
1266
|
+
}
|
|
1214
1267
|
}
|
|
1215
1268
|
break;
|
|
1216
1269
|
|
|
@@ -1219,23 +1272,29 @@ switch (command || 'help') {
|
|
|
1219
1272
|
case 'rm':
|
|
1220
1273
|
if (!param) {
|
|
1221
1274
|
error('Please specify a skill name.');
|
|
1222
|
-
log('Usage: npx ai-agent-skills uninstall <
|
|
1275
|
+
log('Usage: npx ai-agent-skills uninstall <name> [--agents claude,cursor]');
|
|
1223
1276
|
process.exit(1);
|
|
1224
1277
|
}
|
|
1225
|
-
|
|
1278
|
+
for (const agent of agents) {
|
|
1279
|
+
uninstallSkill(param, agent, dryRun);
|
|
1280
|
+
}
|
|
1226
1281
|
break;
|
|
1227
1282
|
|
|
1228
1283
|
case 'update':
|
|
1229
1284
|
case 'upgrade':
|
|
1230
1285
|
if (all) {
|
|
1231
|
-
|
|
1286
|
+
for (const agent of agents) {
|
|
1287
|
+
updateAllSkills(agent, dryRun);
|
|
1288
|
+
}
|
|
1232
1289
|
} else if (!param) {
|
|
1233
1290
|
error('Please specify a skill name or use --all.');
|
|
1234
|
-
log('Usage: npx ai-agent-skills update <
|
|
1235
|
-
log(' npx ai-agent-skills update --all [--
|
|
1291
|
+
log('Usage: npx ai-agent-skills update <name> [--agents claude,cursor]');
|
|
1292
|
+
log(' npx ai-agent-skills update --all [--agents claude,cursor]');
|
|
1236
1293
|
process.exit(1);
|
|
1237
1294
|
} else {
|
|
1238
|
-
|
|
1295
|
+
for (const agent of agents) {
|
|
1296
|
+
updateSkill(param, agent, dryRun);
|
|
1297
|
+
}
|
|
1239
1298
|
}
|
|
1240
1299
|
break;
|
|
1241
1300
|
|
|
@@ -1276,7 +1335,9 @@ switch (command || 'help') {
|
|
|
1276
1335
|
default:
|
|
1277
1336
|
// If command looks like a skill name, try to install it
|
|
1278
1337
|
if (getAvailableSkills().includes(command)) {
|
|
1279
|
-
|
|
1338
|
+
for (const agent of agents) {
|
|
1339
|
+
installSkill(command, agent, dryRun);
|
|
1340
|
+
}
|
|
1280
1341
|
} else {
|
|
1281
1342
|
error(`Unknown command: ${command}`);
|
|
1282
1343
|
showHelp();
|
package/package.json
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ask-questions-if-underspecified
|
|
3
|
+
description: Clarify requirements before implementing. Do not use automatically, only when invoked explicitly.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Ask Questions If Underspecified
|
|
7
|
+
|
|
8
|
+
## Goal
|
|
9
|
+
|
|
10
|
+
Ask the minimum set of clarifying questions needed to avoid wrong work; do not start implementing until the must-have questions are answered (or the user explicitly approves proceeding with stated assumptions).
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
### 1) Decide whether the request is underspecified
|
|
15
|
+
|
|
16
|
+
Treat a request as underspecified if after exploring how to perform the work, some or all of the following are not clear:
|
|
17
|
+
- Define the objective (what should change vs stay the same)
|
|
18
|
+
- Define "done" (acceptance criteria, examples, edge cases)
|
|
19
|
+
- Define scope (which files/components/users are in/out)
|
|
20
|
+
- Define constraints (compatibility, performance, style, deps, time)
|
|
21
|
+
- Identify environment (language/runtime versions, OS, build/test runner)
|
|
22
|
+
- Clarify safety/reversibility (data migration, rollout/rollback, risk)
|
|
23
|
+
|
|
24
|
+
If multiple plausible interpretations exist, assume it is underspecified.
|
|
25
|
+
|
|
26
|
+
### 2) Ask must-have questions first (keep it small)
|
|
27
|
+
|
|
28
|
+
Ask 1-5 questions in the first pass. Prefer questions that eliminate whole branches of work.
|
|
29
|
+
|
|
30
|
+
Make questions easy to answer:
|
|
31
|
+
- Optimize for scannability (short, numbered questions; avoid paragraphs)
|
|
32
|
+
- Offer multiple-choice options when possible
|
|
33
|
+
- Suggest reasonable defaults when appropriate (mark them clearly as the default/recommended choice; bold the recommended choice in the list, or if you present options in a code block, put a bold "Recommended" line immediately above the block and also tag defaults inside the block)
|
|
34
|
+
- Include a fast-path response (e.g., reply `defaults` to accept all recommended/default choices)
|
|
35
|
+
- Include a low-friction "not sure" option when helpful (e.g., "Not sure - use default")
|
|
36
|
+
- Separate "Need to know" from "Nice to know" if that reduces friction
|
|
37
|
+
- Structure options so the user can respond with compact decisions (e.g., `1b 2a 3c`); restate the chosen options in plain language to confirm
|
|
38
|
+
|
|
39
|
+
### 3) Pause before acting
|
|
40
|
+
|
|
41
|
+
Until must-have answers arrive:
|
|
42
|
+
- Do not run commands, edit files, or produce a detailed plan that depends on unknowns
|
|
43
|
+
- Do perform a clearly labeled, low-risk discovery step only if it does not commit you to a direction (e.g., inspect repo structure, read relevant config files)
|
|
44
|
+
|
|
45
|
+
If the user explicitly asks you to proceed without answers:
|
|
46
|
+
- State your assumptions as a short numbered list
|
|
47
|
+
- Ask for confirmation; proceed only after they confirm or correct them
|
|
48
|
+
|
|
49
|
+
### 4) Confirm interpretation, then proceed
|
|
50
|
+
|
|
51
|
+
Once you have answers, restate the requirements in 1-3 sentences (including key constraints and what success looks like), then start work.
|
|
52
|
+
|
|
53
|
+
## Question templates
|
|
54
|
+
|
|
55
|
+
- "Before I start, I need: (1) ..., (2) ..., (3) .... If you don't care about (2), I will assume ...."
|
|
56
|
+
- "Which of these should it be? A) ... B) ... C) ... (pick one)"
|
|
57
|
+
- "What would you consider 'done'? For example: ..."
|
|
58
|
+
- "Any constraints I must follow (versions, performance, style, deps)? If none, I will target the existing project defaults."
|
|
59
|
+
- Use numbered questions with lettered options and a clear reply format
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
1) Scope?
|
|
63
|
+
a) Minimal change (default)
|
|
64
|
+
b) Refactor while touching the area
|
|
65
|
+
c) Not sure - use default
|
|
66
|
+
2) Compatibility target?
|
|
67
|
+
a) Current project defaults (default)
|
|
68
|
+
b) Also support older versions: <specify>
|
|
69
|
+
c) Not sure - use default
|
|
70
|
+
|
|
71
|
+
Reply with: defaults (or 1a 2a)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Anti-patterns
|
|
75
|
+
|
|
76
|
+
- Don't ask questions you can answer with a quick, low-risk discovery read (e.g., configs, existing patterns, docs).
|
|
77
|
+
- Don't ask open-ended questions if a tight multiple-choice or yes/no would eliminate ambiguity faster.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
*Originally created by [@thsottiaux](https://x.com/thsottiaux)*
|
package/skills.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.2.2",
|
|
3
|
-
"updated": "
|
|
4
|
-
"total":
|
|
3
|
+
"updated": "2026-01-01T00:00:00Z",
|
|
4
|
+
"total": 40,
|
|
5
5
|
"skills": [
|
|
6
6
|
{
|
|
7
7
|
"name": "frontend-design",
|
|
@@ -315,6 +315,20 @@
|
|
|
315
315
|
"featured": true,
|
|
316
316
|
"verified": true
|
|
317
317
|
},
|
|
318
|
+
{
|
|
319
|
+
"name": "ask-questions-if-underspecified",
|
|
320
|
+
"description": "Clarify requirements before implementing. Ask 1-5 must-have questions to avoid wrong work. Use when requests are ambiguous, have multiple valid interpretations, or lack key details like scope, constraints, or acceptance criteria.",
|
|
321
|
+
"category": "productivity",
|
|
322
|
+
"author": "thsottiaux",
|
|
323
|
+
"source": "skillcreatorai/Ai-Agent-Skills",
|
|
324
|
+
"license": "MIT",
|
|
325
|
+
"path": "skills/ask-questions-if-underspecified",
|
|
326
|
+
"tags": ["clarification", "requirements", "workflow", "codex"],
|
|
327
|
+
"stars": 100,
|
|
328
|
+
"downloads": 0,
|
|
329
|
+
"featured": true,
|
|
330
|
+
"verified": true
|
|
331
|
+
},
|
|
318
332
|
{
|
|
319
333
|
"name": "artifacts-builder",
|
|
320
334
|
"description": "Create elaborate HTML artifacts using React, Tailwind CSS, and shadcn/ui. Use for building interactive web components and demos.",
|
|
@@ -540,7 +554,7 @@
|
|
|
540
554
|
"id": "productivity",
|
|
541
555
|
"name": "Productivity",
|
|
542
556
|
"description": "Productivity and workflow skills",
|
|
543
|
-
"count":
|
|
557
|
+
"count": 12
|
|
544
558
|
}
|
|
545
559
|
]
|
|
546
560
|
}
|