Skip to content

Commit 343828b

Browse files
authored
add skills:find-skills-combo (#141)
1 parent 754d272 commit 343828b

2 files changed

Lines changed: 341 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ _del
6060

6161
# Resume / intermediate output
6262
/resume
63+
64+
#skills
65+
.agents

skills/find-skills-combo/SKILL.md

Lines changed: 338 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,338 @@
1+
---
2+
name: find-skills-combo
3+
description: Discover and recommend **combinations** of agent skills to complete complex, multi-faceted tasks. Provides two recommendation strategies — **Maximum Quality** (best skill per subtask) and **Minimum Dependencies** (fewest installs). Use this skill whenever the user wants to find skills, asks "how do I do X", "find a skill for X", or describes a task that likely requires multiple capabilities working together. Also use when the user mentions composing workflows, building pipelines, or needs help across several domains at once — even if they only say "find me a skill". This skill supersedes simple single-skill search by decomposing the task into subtasks and assembling an optimal skill portfolio.
4+
---
5+
6+
# Find Skills Combo
7+
8+
Discover and install **skill combinations** from the open agent skills ecosystem. Unlike single-skill search, this skill decomposes complex tasks into subtasks, searches for candidates per subtask, evaluates coverage, and recommends two strategies: **Maximum Quality** (best skill per subtask, highest output quality) and **Minimum Dependencies** (fewest installs, lean setup). Users pick the strategy that fits their priorities.
9+
10+
## When to Use This Skill
11+
12+
Use this skill when the user:
13+
14+
- Asks "how do I do X" where X involves multiple capabilities or domains
15+
- Says "find a skill for X" or "is there a skill for X"
16+
- Describes a task that spans several concerns (e.g., "build a quarterly report with charts, risk analysis, and executive summary")
17+
- Wants to compose a workflow from multiple skills
18+
- Asks "can you do X" where X is a complex, multi-step task
19+
- Expresses interest in extending agent capabilities for a non-trivial project
20+
21+
**Fallback**: If the task is genuinely single-domain and simple (one clear capability), skip the decomposition — run a single `npx skills find` query, present results, and offer to install. Don't over-engineer simple requests.
22+
23+
## What is the Skills CLI?
24+
25+
The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem.
26+
27+
**Key commands:**
28+
29+
- `npx skills find [query]` — Search for skills by keyword
30+
- `npx skills add <package>` — Install a skill from GitHub or other sources
31+
- `npx skills add <package> -g -y` — Install globally, skip confirmation
32+
- `npx skills check` — Check for skill updates
33+
- `npx skills update` — Update all installed skills
34+
35+
**Browse skills at:** https://skills.sh/
36+
37+
---
38+
39+
## The 5-Phase Pipeline
40+
41+
For complex tasks, follow all five phases in order. For simple tasks, see the Fallback section above.
42+
43+
### Phase 1: Task Decomposition
44+
45+
Break the user's request into independent subtasks. Each subtask represents a distinct capability needed to complete the overall task.
46+
47+
**Step 1: Extract Task-Specific Constraints**
48+
49+
Before decomposing, scan the user's request for **task-specific constraints** — these are requirements that narrow the problem space and must be preserved in the subtasks. Look for:
50+
51+
- **Domain-specific terminology**: Jargon, proper nouns, named standards, or specialized vocabulary the user explicitly uses (e.g., "WCAG 2.1 AA compliance", "GAAP reporting", "OpenAPI 3.1 spec"). These terms signal that generic skills won't suffice — the subtask must target this exact domain.
52+
- **Scenario constraints**: Environmental or contextual restrictions (e.g., "offline-only", "must run in CI", "single-page app with no backend", "monorepo with pnpm workspaces"). These filter out skills that technically do the right thing but in the wrong context.
53+
- **Format / output requirements**: Specific file formats, templates, or delivery formats (e.g., "output as PDF", "Helm chart", "Jupyter notebook", "Markdown with Mermaid diagrams").
54+
- **Toolchain lock-ins**: Explicit technology choices the user has already committed to (e.g., "using Svelte, not React", "PostgreSQL only", "must integrate with our existing FastAPI backend").
55+
56+
Collect these into a **Constraints List** — a flat list of non-negotiable requirements extracted verbatim (or near-verbatim) from the user's request. Every subtask you create must trace back to at least one constraint, and no constraint should be orphaned.
57+
58+
**Step 2: Decompose into Subtasks**
59+
60+
1. Read the user's request carefully. Identify every distinct outcome or deliverable they need.
61+
2. Group related outcomes into subtasks. Each subtask should be a "capability unit" — something one skill could plausibly handle.
62+
3. Write a short completion criterion for each subtask so you know what "covered" means later.
63+
4. **Attach relevant constraints** from the Constraints List to each subtask. A subtask without any attached constraint is likely too generic — refine it. A constraint not attached to any subtask is a gap — either create a subtask for it or fold it into an existing one.
64+
65+
**Constraints:**
66+
67+
- Aim for 2–7 subtasks. Fewer than 2 means the task is simple — use the fallback. More than 7 means you're splitting too fine — merge related items.
68+
- Each subtask needs a clear boundary. If two subtasks always require the same skill, merge them.
69+
- **Preserve the user's own words**: When a subtask maps to a domain-specific term the user used, keep that term in the subtask description and completion criteria — don't paraphrase it into a generic synonym. This ensures Phase 2 keyword generation stays precise.
70+
71+
**Output format** (present this to the user for confirmation):
72+
73+
Constraints List:
74+
- C1: `[verbatim constraint from user]`
75+
- C2: `[verbatim constraint from user]`
76+
- ...
77+
78+
| ID | Subtask | Completion Criteria | Constraints |
79+
|----|---------|---------------------|-------------|
80+
| S1 | ... | ... | C1, C3 |
81+
| S2 | ... | ... | C2 |
82+
83+
Before proceeding to Phase 2, briefly show the user the decomposition and constraints list: "I've identified N constraints and broken this into M subtasks — does this look right?" If they want to adjust, iterate. Don't spend too long here — a reasonable decomposition is better than a perfect one.
84+
85+
### Phase 2: Precision-Focused Search
86+
87+
For each subtask, the goal is **precision over recall** — find the skills that most closely match the subtask's specific requirements, not just loosely related ones.
88+
89+
**Step 1: Subtask Intent Analysis**
90+
91+
Before generating keywords, write a one-sentence **intent statement** for each subtask that captures:
92+
- The **specific action** (e.g., "generate", "analyze", "validate", not vague terms like "handle" or "process")
93+
- The **domain object** (e.g., "Sharpe ratio", "Docker container", "React component")
94+
- The **expected output format** (e.g., "a chart", "a score", "a config file")
95+
- The **attached constraints from Phase 1** — weave the user's domain-specific terms and scenario restrictions directly into the intent statement
96+
97+
This intent statement is the anchor for keyword generation — every keyword group must map back to it. Constraints ensure the intent stays grounded in the user's actual context rather than drifting to generic descriptions.
98+
99+
| ID | Subtask | Constraints | Intent Statement |
100+
|----|---------|-------------|-----------------|
101+
| S1 | ... | C1, C3 | "Calculate portfolio risk metrics (Sharpe, beta, drawdown) under GAAP standards and output a summary table" |
102+
| S2 | ... | C2 | "Generate interactive Mermaid-based charts from time-series data in a Svelte SPA" |
103+
104+
**Step 2: Keyword Generation (Precision-First)**
105+
106+
For each subtask, generate 2–3 keyword groups using different precision levels:
107+
108+
- **Exact-match keywords**: Use the most specific terms from the intent statement — tool names, metric names, framework names, file formats. These find skills purpose-built for the subtask. (e.g., `sharpe ratio beta drawdown calculator`)
109+
- **Functional-match keywords**: Describe the capability at one level of abstraction higher — what the skill *does* rather than what it *is*. These catch skills that solve the same problem with different terminology. (e.g., `portfolio risk analysis metrics`)
110+
- **Domain-match keywords** (only if exact + functional return < 3 results): Broaden to the domain level as a safety net. (e.g., `quantitative finance`)
111+
112+
**Priority rule**: Always run exact-match first. Only fall back to broader keywords if the precise search returns too few results (< 3 candidates).
113+
114+
**Step 3: Search Execution**
115+
116+
1. Build a keyword plan table with precision level annotated:
117+
118+
| Subtask | Exact-Match | Functional-Match | Domain-Match (if needed) |
119+
|---------|-------------|------------------|--------------------------|
120+
| S1 | `sharpe ratio beta drawdown` | `portfolio risk metrics` | `quantitative finance` |
121+
| S2 | `interactive chart time-series dashboard` | `data visualization web` ||
122+
123+
2. Run all exact-match searches in parallel first:
124+
125+
```bash
126+
npx skills find "<exact-match-keywords>"
127+
```
128+
129+
3. Check result counts. For any subtask with < 3 candidates from exact-match, run the functional-match search. If still < 3, run domain-match.
130+
131+
4. Merge and deduplicate results. For each candidate, record:
132+
- Which subtask found it
133+
- Which precision level matched (exact > functional > domain)
134+
- The skill's self-described purpose (from search output)
135+
136+
**Step 4: Relevance Pre-Filter**
137+
138+
Before passing candidates to Phase 3, do a quick relevance check per candidate:
139+
140+
1. Re-read the candidate's one-line description from the search output.
141+
2. Compare it against the subtask's intent statement.
142+
3. **Keep** if the description shares at least one specific term (tool name, metric, framework) with the intent statement, OR if it describes the same functional capability.
143+
4. **Drop** if the connection is only at the domain level (e.g., a skill about "financial news aggregation" found via domain-match for a "risk metrics" subtask).
144+
145+
Keep the top 3–5 candidates per subtask after filtering. Fewer but more precise candidates produce better evaluations in Phase 3.
146+
147+
### Phase 3: Candidate Evaluation
148+
149+
Build a **Subtask × Candidate** coverage matrix with two extra columns for combination planning.
150+
151+
**For each candidate skill:**
152+
153+
1. Look up its description on skills.sh or read its SKILL.md if installed.
154+
2. Rate its relevance to each subtask as **High**, **Medium**, or **Low**:
155+
- **High** — The skill directly addresses this subtask with dedicated features or workflows
156+
- **Medium** — The skill partially covers this subtask or addresses it as a secondary concern
157+
- **Low** — The skill has minimal or no relevance to this subtask
158+
3. Write a one-line justification for each rating.
159+
4. Compute two additional metrics per candidate:
160+
- **Breadth** — Count of subtasks where the skill rates High or Medium (higher = more versatile, valuable for minimum-dependency strategy)
161+
- **Peak** — Count of subtasks where the skill is the top-rated candidate (higher = more irreplaceable, valuable for best-effect strategy)
162+
163+
**Output the matrix:**
164+
165+
| Candidate | S1 | S2 | S3 | Breadth | Peak |
166+
|-----------|----|----|-----|---------|------|
167+
| Skill A | High: ... | Low | High: ... | 2 | 1 |
168+
| Skill B | Medium: ... | High: ... | Low | 2 | 1 |
169+
| Skill C | Low | High: ... | Medium: ... | 2 | 1 |
170+
| Skill D | Low | Low | High: ... | 1 | 1 |
171+
172+
**Pruning**: Drop candidates that are Low across all subtasks — they are noise.
173+
174+
### Phase 4: Dual-Strategy Planning
175+
176+
Produce exactly **two** recommended strategies targeting different user priorities.
177+
178+
---
179+
180+
**Strategy A — Maximum Quality (追求最强效果)**
181+
182+
Goal: Every subtask gets its best-fit skill. Accept more installs to maximize output quality.
183+
184+
Algorithm:
185+
1. For each subtask, pick the candidate with the highest rating (use Peak column to break ties — prefer skills that are uniquely best at something).
186+
2. If multiple candidates tie at High for a subtask, prefer the one with higher community popularity or more recent maintenance.
187+
3. List all selected skills (may include one skill per subtask if they're all different).
188+
189+
This strategy is for users who want the highest-quality result and don't mind installing several skills.
190+
191+
**Strategy B — Minimum Dependencies (最少外部依赖)**
192+
193+
Goal: Cover all subtasks with as few skills as possible. Accept Medium coverage where it avoids adding an extra skill.
194+
195+
Algorithm:
196+
1. Sort candidates by Breadth descending (most versatile first).
197+
2. Greedily select: pick the highest-Breadth skill, mark its High/Medium subtasks as covered, repeat until all subtasks are covered.
198+
3. If a subtask can only reach Medium coverage with the greedy set but has a dedicated High-coverage skill, do NOT add that skill — keep the set minimal. Only flag the trade-off.
199+
4. Target ceiling: if the task has N subtasks, this strategy should ideally use ≤ ⌈N/2⌉ skills.
200+
201+
This strategy is for users who want to keep their environment lean and are comfortable with "good enough" coverage on some subtasks.
202+
203+
---
204+
205+
**For both strategies, document:**
206+
207+
- Which skills are included and total install count
208+
- A subtask → skill mapping table
209+
- A one-sentence rationale
210+
- A quality delta summary: where Strategy B trades quality for fewer installs compared to Strategy A
211+
212+
**Coverage gap check**: If any subtask has no High or Medium candidate in either strategy, flag it: "⚠ Subtask SX has no strong skill coverage — you may need to handle this manually or create a custom skill."
213+
214+
**Conflict detection**: If two skills in Strategy A overlap significantly on the same subtask, note it: "Skills X and Y both cover S2 — you only need one; keeping the higher-rated one."
215+
216+
### Phase 5: Present Results
217+
218+
Structure the final output with these sections:
219+
220+
---
221+
222+
**1. Task Decomposition Summary**
223+
224+
Show the subtask table from Phase 1 (brief, since the user already confirmed it).
225+
226+
**2. Side-by-Side Comparison**
227+
228+
Start with a quick comparison table so the user can choose a strategy immediately:
229+
230+
```
231+
| | Strategy A: Maximum Quality | Strategy B: Minimum Dependencies |
232+
|---|---|---|
233+
| Skills to install | N skills | M skills |
234+
| All-High coverage | X of Y subtasks | P of Y subtasks |
235+
| Trade-offs | More installs | Some subtasks at Medium |
236+
| Best for | Critical/production tasks | Quick exploration, lean setup |
237+
```
238+
239+
**3. Strategy A — Maximum Quality (Recommended for critical tasks)**
240+
241+
```
242+
Every subtask gets its best-fit skill for the highest-quality output.
243+
244+
| Subtask | Handled By | Coverage |
245+
|---------|-----------|----------|
246+
| S1 | skill-name-a | High |
247+
| S2 | skill-name-b | High |
248+
| S3 | skill-name-c | High |
249+
250+
### Install (N skills)
251+
​```bash
252+
npx skills add owner/repo@skill-a -g -y
253+
npx skills add owner/repo@skill-b -g -y
254+
npx skills add owner/repo@skill-c -g -y
255+
​```
256+
```
257+
258+
**4. Strategy B — Minimum Dependencies (Recommended for lean setup)**
259+
260+
```
261+
Cover all subtasks with the fewest skills possible.
262+
263+
| Subtask | Handled By | Coverage | vs Strategy A |
264+
|---------|-----------|----------|---------------|
265+
| S1 | skill-name-a | High | Same |
266+
| S2 | skill-name-a | Medium | ↓ High → Medium |
267+
| S3 | skill-name-a | Medium | ↓ High → Medium |
268+
269+
### Install (M skills)
270+
​```bash
271+
npx skills add owner/repo@skill-a -g -y
272+
​```
273+
```
274+
275+
The `vs Strategy A` column makes the trade-off transparent — users see exactly what they give up by installing fewer skills.
276+
277+
**5. Coverage Gaps & Risks**
278+
279+
- List any subtasks without strong coverage in either strategy
280+
- Suggest workarounds (manual steps, creating a custom skill with `npx skills init`)
281+
- If Strategy B downgrades a subtask from High to Medium, briefly explain the practical impact
282+
283+
**6. Next Steps**
284+
285+
Ask the user:
286+
- "Which strategy do you prefer — Maximum Quality or Minimum Dependencies?"
287+
- "Want me to install your chosen strategy now?"
288+
- "Want me to search deeper for any specific subtask?"
289+
- "Want to adjust the decomposition?"
290+
291+
---
292+
293+
## Fallback: Simple Single-Skill Search
294+
295+
When the task is straightforward (single domain, one clear capability):
296+
297+
1. Run `npx skills find [query]` with 1–2 relevant keyword sets
298+
2. Present the top 2–3 results with name, description, and install command
299+
3. Offer to install
300+
301+
This is the same behavior as the basic find-skills workflow — no decomposition needed.
302+
303+
## Common Skill Categories
304+
305+
When generating keywords, draw from these domains:
306+
307+
| Category | Example Keywords |
308+
|----------|-----------------|
309+
| Web Development | react, nextjs, typescript, css, tailwind |
310+
| Testing | testing, jest, playwright, e2e |
311+
| DevOps | deploy, docker, kubernetes, ci-cd |
312+
| Documentation | docs, readme, changelog, api-docs |
313+
| Code Quality | review, lint, refactor, best-practices |
314+
| Design | ui, ux, design-system, accessibility |
315+
| Data & Analytics | data, visualization, charts, analysis |
316+
| Finance | portfolio, trading, risk, investment |
317+
| Productivity | workflow, automation, git |
318+
319+
## Tips
320+
321+
1. **Precision beats recall**: 3 highly relevant candidates are more useful than 10 loosely related ones. Always start with the most specific keywords and only broaden if needed.
322+
2. **Intent statements are your anchor**: A good intent statement in Phase 2 prevents keyword drift. If your keywords don't map back to the intent, they're too broad.
323+
3. **Parallel search matters**: Running all keyword groups simultaneously saves significant time. Use subagents when available.
324+
4. **Don't over-decompose**: 3–5 subtasks is the sweet spot for most tasks. More than that creates noise.
325+
5. **Skills.sh is your friend**: When evaluating candidates, quickly check `https://skills.sh/<owner>/<repo>/<skill-name>` for descriptions.
326+
6. **User confirmation at Phase 1 is critical**: A wrong decomposition cascades into bad search and bad recommendations. Take 30 seconds to verify.
327+
7. **Always present both strategies**: Users have different priorities — some want the best possible result, others want a lean setup. Let them choose.
328+
8. **Make the trade-off explicit**: The `vs Strategy A` column in Strategy B is the most important part of the output. It turns an abstract choice into a concrete comparison.
329+
9. **Breadth and Peak drive strategy selection**: High-Breadth skills are MVPs for Strategy B (minimum dependencies); High-Peak skills are essential for Strategy A (maximum quality). Computing both in Phase 3 makes Phase 4 mechanical.
330+
331+
## When No Skills Are Found
332+
333+
If a subtask has no relevant skills:
334+
335+
1. Flag it in the coverage gaps section
336+
2. Offer to help with that subtask directly using general capabilities
337+
3. Suggest the user create a custom skill: `npx skills init my-custom-skill`
338+
4. If the entire task has no skills at all, acknowledge it honestly and pivot to direct assistance

0 commit comments

Comments
 (0)