将复杂的用户请求分解为可执行的子任务,识别所需能力,在 skills.sh 上搜索现有技能,并在无解决方案时创建新技能。适用于复杂多步骤请求、自动化工作流程或需要将大型任务分解为可管理部分的场景。
This skill helps decompose complex user requests into executable subtasks, identify required capabilities for each task, search for existing skills from the open skills ecosystem, and automatically create new skills when no existing solution is available.
text
User Request → Task Decomposition → Capability Identification → Skill Search → Gap Analysis → Skill Creation → Execution Plan
When receiving a user request, follow these steps:
Analyze the request to identify:
Example analysis:
text
User Input: "Help me get email summaries every morning and send them to Slack"
Analysis:
- Core objective: Automated email digest delivery to Slack
- Domains: Email access, content summarization, messaging
- Trigger: Scheduled (daily morning)
Break down the complex task into minimal executable units:
yaml
Task Decomposition:
- task_id: 1
name: "Access and retrieve email list"
type: "data_retrieval"
input: "Email credentials/session"
output: "List of emails with metadata"
dependencies: []
- task_id: 2
name: "Extract key information from emails"
type: "data_extraction"
input: "Email list"
output: "Structured email data"
dependencies: [1]
- task_id: 3
name: "Generate email summary"
type: "content_generation"
input: "Structured email data"
output: "Formatted summary text"
dependencies: [2]
- task_id: 4
name: "Send message to Slack"
type: "message_delivery"
input: "Summary text, Slack webhook/token"
output: "Delivery confirmation"
dependencies: [3]
- task_id: 5
name: "Configure scheduled execution"
type: "scheduling"
input: "Workflow script, schedule config"
output: "Active scheduled job"
dependencies: [4]
Map each subtask to a capability type from the universal capability taxonomy.
CapabilityDescriptionSearch Keywordsbrowser_automationWeb navigation, interaction, scrapingbrowser, selenium, puppeteer, playwright, scrapeweb_searchInternet search and information retrievalsearch, google, bing, duckduckgoapi_integrationThird-party API communicationapi, rest, graphql, webhook, {service-name}data_extractionParse and extract structured dataparse, extract, scrape, ocr, pdfdata_transformationConvert, clean, transform datatransform, convert, format, clean, etlcontent_generationCreate text, images, or other contentgenerate, write, create, summarize, translatefile_operationsRead, write, manipulate filesfile, read, write, csv, excel, json, pdfmessage_deliverySend notifications or messagesnotify, send, email, slack, discord, telegramschedulingTime-based task executionschedule, cron, timer, daily, weeklyauthenticationIdentity and access managementauth, oauth, login, token, credentialsdatabase_operationsDatabase CRUD operationsdatabase, sql, mongodb, query, storecode_executionRun scripts or programsexecute, run, script, shell, pythonversion_controlGit and code repository operationsgit, github, gitlab, commit, pr, reviewtestingAutomated testing and QAtest, jest, pytest, e2e, unitdeploymentApplication deployment and CI/CDdeploy, docker, kubernetes, ci-cd, releasemonitoringSystem and application monitoringmonitor, alert, log, metrics, health
For each subtask:
Example:
yaml
Task: "Send message to Slack"
Capability: message_delivery
Search Keywords: ["slack", "notification", "message", "webhook"]
Use the Skills CLI to search for existing skills at https://skills.sh/
For each capability need, search using relevant keywords:
bash
# Search for skills matching the capability
npx skills find <keyword>
# Examples:
npx skills find slack notification
npx skills find browser automation
npx skills find pdf extract
npx skills find github api
When results are returned:
text
Install with npx skills add <owner/repo@skill>
owner/repo@skill-name
└ https://skills.sh/owner/repo/skill-name
Evaluate each result for:
yaml
Capability Mapping:
- task_id: 1
capability: browser_automation
search_query: "browser email automation"
found_skills:
- name: "anthropic/claude-skills@browser-use"
url: "https://skills.sh/anthropic/claude-skills/browser-use"
match_score: high
recommendation: "Install browser-use skill"
- task_id: 4
capability: message_delivery
search_query: "slack notification"
found_skills: []
recommendation: "Create new skill: slack-notification"
Identify tasks without matching skills:
These capabilities are typically handled by the agent's native abilities:
content_generation - LLM's native text generationdata_transformation - Basic data manipulation via codecode_execution - Direct script executionscheduling - System-level cron/scheduler configurationFor capabilities without built-in support, determine:
When no existing skill matches a required capability, create a new skill.
markdown
---
name: {skill-name}
description: {Clear description of what the skill does and when to use it. Written in third person.}
---
# {Skill Title}
{Brief introduction explaining the skill's purpose.}
## When to Use
{Describe scenarios when this skill should be triggered.}
## Prerequisites
{List any required installations, configurations, or credentials.}
## Usage
{Detailed usage instructions with examples.}
### Basic Usage
```bash
{Basic command or code example}
{More complex examples and options.}
{Any configuration options or environment variables.}
{Step-by-step example with code.}
{Common issues and solutions.}
text
### Initialize New Skill
```bash
# Create skill using the skills CLI
npx skills init <skill-name>
# Or manually create the structure:
# skill-name/
# ├── SKILL.md (required)
# ├── scripts/ (optional)
# ├── references/ (optional)
# └── assets/ (optional)
Compile all information into a structured execution plan:
yaml
Execution Plan:
title: "{Task Description}"
prerequisites:
- "{Prerequisite 1}"
- "{Prerequisite 2}"
skills_to_install:
- skill: "owner/repo@skill-name"
command: "npx skills add owner/repo@skill-name -g -y"
url: "https://skills.sh/owner/repo/skill-name"
skills_to_create:
- name: "{new-skill-name}"
capability: "{capability_type}"
description: "{What it does}"
execution_steps:
- step: 1
task: "{Task name}"
skill: "{skill-name | built-in}"
action: "{Specific action to take}"
- step: 2
task: "{Task name}"
skill: "{skill-name | built-in}"
action: "{Specific action to take}"
verification:
- "{How to verify step 1 succeeded}"
- "{How to verify step 2 succeeded}"
Each subtask should be the minimal executable unit with clear input and output.
Minimize dependencies between tasks to allow parallel execution where possible.
Each task should have a clear way to verify successful completion.
Identify reusable patterns and prefer creating general-purpose skills.
Each task should do one thing well.
Present the decomposition results in a structured format:
text
════════════════════════════════════════════════════════════════
📋 TASK DECOMPOSITION REPORT
════════════════════════════════════════════════════════════════
🎯 Original Request:
{User's original request}
────────────────────────────────────────────────────────────────
📊 SUBTASKS
────────────────────────────────────────────────────────────────
┌─────┬────────────────────────┬───────────────────┬───────────┐
│ ID │ Task │ Capability │ Status │
├─────┼────────────────────────┼───────────────────┼───────────┤
│ 1 │ {task name} │ {capability} │ Found │
│ 2 │ {task name} │ {capability} │ Built-in │
│ 3 │ {task name} │ {capability} │ Create │
└─────┴────────────────────────┴───────────────────┴───────────┘
────────────────────────────────────────────────────────────────
🔍 SKILL SEARCH RESULTS
────────────────────────────────────────────────────────────────
Task 1: {task name}
Search: npx skills find {keywords}
Found: owner/repo@skill-name
URL: https://skills.sh/owner/repo/skill-name
Task 3: {task name}
Search: npx skills find {keywords}
Found: No matching skills
Action: Create new skill
────────────────────────────────────────────────────────────────
🛠️ SKILLS TO CREATE
────────────────────────────────────────────────────────────────
1. {skill-name}
Capability: {capability_type}
Description: {what it does}
────────────────────────────────────────────────────────────────
📝 EXECUTION PLAN
────────────────────────────────────────────────────────────────
Prerequisites:
• {prerequisite 1}
• {prerequisite 2}
Steps:
1. {action} using {skill}
2. {action} using {skill}
3. {action} using {skill}
════════════════════════════════════════════════════════════════
User Request:
text
Create a workflow that monitors GitHub issues, summarizes new issues, and posts notifications to Discord
Decomposition:
yaml
Subtasks:
1. Monitor GitHub repository for new issues
Capability: api_integration
Search: "npx skills find github issues"
2. Extract issue content and metadata
Capability: data_extraction
Status: Built-in (code)
3. Generate issue summary
Capability: content_generation
Status: Built-in (LLM)
4. Send notification to Discord
Capability: message_delivery
Search: "npx skills find discord notification"
5. Configure webhook or polling trigger
Capability: scheduling
Status: Built-in (system)
User Request:
text
Search for AI research papers, download PDFs, extract key findings, and save to Notion
Decomposition:
yaml
Subtasks:
1. Search for AI research papers
Capability: web_search
Search: "npx skills find academic search"
2. Download PDF files
Capability: browser_automation
Search: "npx skills find browser download"
3. Extract text from PDFs
Capability: data_extraction
Search: "npx skills find pdf extract"
4. Generate summaries of key findings
Capability: content_generation
Status: Built-in (LLM)
5. Save to Notion database
Capability: api_integration
Search: "npx skills find notion"
This skill works in conjunction with the find-skills skill for discovering existing solutions:
bash
# Search the skills ecosystem
npx skills find <query>
# Install a discovered skill
npx skills add <owner/repo@skill> -g -y
# Browse all available skills
# Visit: https://skills.sh/