foliko 1.1.85 → 1.1.87
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/.env.example +56 -56
- package/cli/src/ui/chat-ui-old.js +1 -1
- package/cli/src/ui/chat-ui.js +2 -2
- package/cli/src/utils/markdown.js +27 -30
- package/package.json +1 -1
- package/plugins/extension-executor-plugin.js +1 -1
- package/skills/find-skills/SKILL.md +133 -133
- package/src/capabilities/skill-manager.js +5 -5
- package/website_v2/styles/animations.css +7 -7
package/.env.example
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
# ========== AI Configuration ==========
|
|
2
|
-
# 最大输出 tokens(影响 AI 回复长度)
|
|
3
|
-
MAX_OUTPUT_TOKENS=8192
|
|
4
|
-
# AI Provider: minimax, deepseek, openai, anthropic 等
|
|
5
|
-
FOLIKO_PROVIDER=minimax
|
|
6
|
-
|
|
7
|
-
# AI Model(如果未设置,使用 provider 默认值)
|
|
8
|
-
# MiniMax: MiniMax-M2.7
|
|
9
|
-
# DeepSeek: deepseek-chat, deepseek-coder 等
|
|
10
|
-
FOLIKO_MODEL=MiniMax-M2.7
|
|
11
|
-
|
|
12
|
-
# API Base URL(如果未设置,使用 provider 默认值)
|
|
13
|
-
# MiniMax: https://api.minimaxi.com/v1
|
|
14
|
-
# DeepSeek: https://api.deepseek.com/v1
|
|
15
|
-
FOLIKO_BASE_URL=https://api.minimaxi.com/v1
|
|
16
|
-
|
|
17
|
-
# API Key(通用,如果未设置则尝试 provider 专用 key)
|
|
18
|
-
FOLIKO_API_KEY=sk-your-api-key
|
|
19
|
-
|
|
20
|
-
# Provider 专用 API Key(可选,如果 FOLIKO_API_KEY 未设置则使用这些)
|
|
21
|
-
DEEPSEEK_API_KEY=sk-your-deepseek-api-key
|
|
22
|
-
MINIMAX_API_KEY=sk-your-minimax-api-key
|
|
23
|
-
|
|
24
|
-
# ========== Email Configuration ==========
|
|
25
|
-
# SMTP Settings (for sending emails)
|
|
26
|
-
SMTP_HOST=smtp.gmail.com
|
|
27
|
-
SMTP_PORT=587
|
|
28
|
-
SMTP_SECURE=false
|
|
29
|
-
SMTP_USER=your-email@gmail.com
|
|
30
|
-
SMTP_PASS=your-app-password
|
|
31
|
-
|
|
32
|
-
# IMAP Settings (for reading emails)
|
|
33
|
-
IMAP_HOST=imap.gmail.com
|
|
34
|
-
IMAP_PORT=993
|
|
35
|
-
IMAP_USER=your-email@gmail.com
|
|
36
|
-
IMAP_PASS=your-app-password
|
|
37
|
-
|
|
38
|
-
# Default sender email address
|
|
39
|
-
FROM_EMAIL=your-email@gmail.com
|
|
40
|
-
|
|
41
|
-
# ========== Telegram Bot (optional) ==========
|
|
42
|
-
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
|
|
43
|
-
|
|
44
|
-
# ========== Feishu Bot (optional) ==========
|
|
45
|
-
FEISHU_APP_ID=cli_xxxxxxxxxxx
|
|
46
|
-
FEISHU_APP_SECRET=app_secret
|
|
47
|
-
|
|
48
|
-
# ========== Web Server (optional) ==========
|
|
49
|
-
# Web 服务端口,默认 8088
|
|
50
|
-
WEB_PORT=3000
|
|
51
|
-
|
|
52
|
-
# Web 服务主机,默认 127.0.0.1
|
|
53
|
-
WEB_HOST=127.0.0.1
|
|
54
|
-
|
|
55
|
-
# 公网访问的 base URL(用于生成 webhook URL 等),不设置则使用 host:port,最好部署在docker中可以暴露自定义域名
|
|
56
|
-
WEB_BASE_URL=https://your-domain.com
|
|
1
|
+
# ========== AI Configuration ==========
|
|
2
|
+
# 最大输出 tokens(影响 AI 回复长度)
|
|
3
|
+
MAX_OUTPUT_TOKENS=8192
|
|
4
|
+
# AI Provider: minimax, deepseek, openai, anthropic 等
|
|
5
|
+
FOLIKO_PROVIDER=minimax
|
|
6
|
+
|
|
7
|
+
# AI Model(如果未设置,使用 provider 默认值)
|
|
8
|
+
# MiniMax: MiniMax-M2.7
|
|
9
|
+
# DeepSeek: deepseek-chat, deepseek-coder 等
|
|
10
|
+
FOLIKO_MODEL=MiniMax-M2.7
|
|
11
|
+
|
|
12
|
+
# API Base URL(如果未设置,使用 provider 默认值)
|
|
13
|
+
# MiniMax: https://api.minimaxi.com/v1
|
|
14
|
+
# DeepSeek: https://api.deepseek.com/v1
|
|
15
|
+
FOLIKO_BASE_URL=https://api.minimaxi.com/v1
|
|
16
|
+
|
|
17
|
+
# API Key(通用,如果未设置则尝试 provider 专用 key)
|
|
18
|
+
FOLIKO_API_KEY=sk-your-api-key
|
|
19
|
+
|
|
20
|
+
# Provider 专用 API Key(可选,如果 FOLIKO_API_KEY 未设置则使用这些)
|
|
21
|
+
DEEPSEEK_API_KEY=sk-your-deepseek-api-key
|
|
22
|
+
MINIMAX_API_KEY=sk-your-minimax-api-key
|
|
23
|
+
|
|
24
|
+
# ========== Email Configuration ==========
|
|
25
|
+
# SMTP Settings (for sending emails)
|
|
26
|
+
SMTP_HOST=smtp.gmail.com
|
|
27
|
+
SMTP_PORT=587
|
|
28
|
+
SMTP_SECURE=false
|
|
29
|
+
SMTP_USER=your-email@gmail.com
|
|
30
|
+
SMTP_PASS=your-app-password
|
|
31
|
+
|
|
32
|
+
# IMAP Settings (for reading emails)
|
|
33
|
+
IMAP_HOST=imap.gmail.com
|
|
34
|
+
IMAP_PORT=993
|
|
35
|
+
IMAP_USER=your-email@gmail.com
|
|
36
|
+
IMAP_PASS=your-app-password
|
|
37
|
+
|
|
38
|
+
# Default sender email address
|
|
39
|
+
FROM_EMAIL=your-email@gmail.com
|
|
40
|
+
|
|
41
|
+
# ========== Telegram Bot (optional) ==========
|
|
42
|
+
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
|
|
43
|
+
|
|
44
|
+
# ========== Feishu Bot (optional) ==========
|
|
45
|
+
FEISHU_APP_ID=cli_xxxxxxxxxxx
|
|
46
|
+
FEISHU_APP_SECRET=app_secret
|
|
47
|
+
|
|
48
|
+
# ========== Web Server (optional) ==========
|
|
49
|
+
# Web 服务端口,默认 8088
|
|
50
|
+
WEB_PORT=3000
|
|
51
|
+
|
|
52
|
+
# Web 服务主机,默认 127.0.0.1
|
|
53
|
+
WEB_HOST=127.0.0.1
|
|
54
|
+
|
|
55
|
+
# 公网访问的 base URL(用于生成 webhook URL 等),不设置则使用 host:port,最好部署在docker中可以暴露自定义域名
|
|
56
|
+
WEB_BASE_URL=https://your-domain.com
|
|
@@ -175,7 +175,7 @@ class ChatUI {
|
|
|
175
175
|
const result = await this.agent.framework.executeTool('ext_call', {
|
|
176
176
|
plugin: 'skill',
|
|
177
177
|
tool: cmdName,
|
|
178
|
-
args: {
|
|
178
|
+
args: { command: cmdArgs }
|
|
179
179
|
});
|
|
180
180
|
if (result.success !== false) {
|
|
181
181
|
console.log(colored(`[指令] ${cmdName}`, GREEN));
|
package/cli/src/ui/chat-ui.js
CHANGED
|
@@ -376,7 +376,7 @@ class ChatUI {
|
|
|
376
376
|
const result = await this.agent.framework.executeTool('ext_call', {
|
|
377
377
|
plugin: 'skill',
|
|
378
378
|
tool: cmdName,
|
|
379
|
-
args: {
|
|
379
|
+
args: { command: cmdArgs }
|
|
380
380
|
});
|
|
381
381
|
if (result.success !== false) {
|
|
382
382
|
this.create_message(`${colored('[指令] '+cmdName, CYAN)}\n\n ${result.data || result}\n`, chalk.green('● '));
|
|
@@ -549,7 +549,7 @@ class ChatUI {
|
|
|
549
549
|
if (!this._lineBuffer) return;
|
|
550
550
|
|
|
551
551
|
// 渲染剩余的 partial line(没有 \n 结尾的尾部文字)
|
|
552
|
-
const rendered =
|
|
552
|
+
const rendered = renderLine(this._lineBuffer, this._renderState, true);
|
|
553
553
|
if (!this._currentBotMessage) {
|
|
554
554
|
this._currentBotMessage = this.create_message(rendered, colored('● ', GREEN), true);
|
|
555
555
|
} else {
|
|
@@ -94,42 +94,39 @@ function renderInline(text) {
|
|
|
94
94
|
return result;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
function renderStreamThink(text) {
|
|
98
|
+
const GRAY = DIM;
|
|
99
|
+
const RESET = CLEAR;
|
|
100
|
+
|
|
101
|
+
let result = '';
|
|
102
|
+
let inThink = false;
|
|
103
|
+
let i = 0;
|
|
104
|
+
|
|
105
|
+
while (i < text.length) {
|
|
106
|
+
if (text.startsWith('<think>', i)) {
|
|
107
|
+
result += GRAY + '<think>';
|
|
108
|
+
inThink = true;
|
|
109
|
+
i += 7;
|
|
110
|
+
} else if (text.startsWith('</think>', i)) {
|
|
111
|
+
result += '</think>' + RESET;
|
|
112
|
+
inThink = false;
|
|
113
|
+
i += 8;
|
|
114
|
+
} else {
|
|
115
|
+
result += text[i];
|
|
116
|
+
i++;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
|
|
97
123
|
function renderThink(line, state = { inThink: false }, thinking) {
|
|
98
124
|
// 处理只有开始标签的情况(line = "<think>" 这样单独一行)
|
|
99
125
|
// 这种情况在流式输出时很常见
|
|
100
|
-
if (line === '<think>' || line === '<think>\n') {
|
|
101
|
-
state.inThink = true;
|
|
102
|
-
return STYLES.think.prefix + line;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
126
|
let result = line;
|
|
106
127
|
|
|
107
128
|
// 匹配 <think>...</think> 以及可能的跨行情况
|
|
108
|
-
result =
|
|
109
|
-
// 去掉 content 中的空行(保留最多一个换行)
|
|
110
|
-
const compressed = content.replace(/\n+/g, '\n').replace(/^\n|\n$/g, '');
|
|
111
|
-
const prefix = result.indexOf('<think>') > 0 ? '\n' : "";
|
|
112
|
-
return prefix + STYLES.think.prefix + '<think>' + compressed + '</think>' + STYLES.think.suffix;
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
// 处理未闭合的 think 标签 - 更新状态
|
|
116
|
-
if (result.includes('<think>') && !result.includes('</think>')) {
|
|
117
|
-
state.inThink = true;
|
|
118
|
-
}
|
|
119
|
-
if (result.includes('</think>')) {
|
|
120
|
-
state.inThink = false;
|
|
121
|
-
// 如果只有 </think> 标签(没有开始标签)
|
|
122
|
-
if (!result.includes('<think>')) {
|
|
123
|
-
return STYLES.think.prefix + line + STYLES.think.suffix;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// 处理未闭合的 think 标签(开始但没结束)
|
|
128
|
-
if (state.inThink && !result.includes('<think>')) {
|
|
129
|
-
// 去掉空行
|
|
130
|
-
const compressed = result.replace(/\n+/g, '\n').replace(/^\n|\n$/g, '');
|
|
131
|
-
result = STYLES.think.prefix + compressed + STYLES.think.suffix;
|
|
132
|
-
}
|
|
129
|
+
result = renderStreamThink(line)
|
|
133
130
|
|
|
134
131
|
return thinking ? result : renderInline(result);
|
|
135
132
|
}
|
package/package.json
CHANGED
|
@@ -607,7 +607,7 @@ class ExtensionExecutorPlugin extends Plugin {
|
|
|
607
607
|
const result = await this._framework.executeTool('ext_call', {
|
|
608
608
|
plugin: 'skill',
|
|
609
609
|
tool: command,
|
|
610
|
-
args: { args }
|
|
610
|
+
args: { command: args }
|
|
611
611
|
});
|
|
612
612
|
return result.success !== false ? result : null;
|
|
613
613
|
} catch (err) {
|
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: find-skills
|
|
3
|
-
description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Find Skills
|
|
7
|
-
|
|
8
|
-
This skill helps you discover and install skills from the open agent skills ecosystem.
|
|
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 might be a common task with an existing skill
|
|
15
|
-
- Says "find a skill for X" or "is there a skill for X"
|
|
16
|
-
- Asks "can you do X" where X is a specialized capability
|
|
17
|
-
- Expresses interest in extending agent capabilities
|
|
18
|
-
- Wants to search for tools, templates, or workflows
|
|
19
|
-
- Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
|
|
20
|
-
|
|
21
|
-
## What is the Skills CLI?
|
|
22
|
-
|
|
23
|
-
The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
|
|
24
|
-
|
|
25
|
-
**Key commands:**
|
|
26
|
-
|
|
27
|
-
- `npx skills find [query]` - Search for skills interactively or by keyword
|
|
28
|
-
- `npx skills add <package>` - Install a skill from GitHub or other sources
|
|
29
|
-
- `npx skills check` - Check for skill updates
|
|
30
|
-
- `npx skills update` - Update all installed skills
|
|
31
|
-
|
|
32
|
-
**Browse skills at:** https://skills.sh/
|
|
33
|
-
|
|
34
|
-
## How to Help Users Find Skills
|
|
35
|
-
|
|
36
|
-
### Step 1: Understand What They Need
|
|
37
|
-
|
|
38
|
-
When a user asks for help with something, identify:
|
|
39
|
-
|
|
40
|
-
1. The domain (e.g., React, testing, design, deployment)
|
|
41
|
-
2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
|
|
42
|
-
3. Whether this is a common enough task that a skill likely exists
|
|
43
|
-
|
|
44
|
-
### Step 2: Search for Skills
|
|
45
|
-
|
|
46
|
-
Run the find command with a relevant query:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npx skills find [query]
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
For example:
|
|
53
|
-
|
|
54
|
-
- User asks "how do I make my React app faster?" → `npx skills find react performance`
|
|
55
|
-
- User asks "can you help me with PR reviews?" → `npx skills find pr review`
|
|
56
|
-
- User asks "I need to create a changelog" → `npx skills find changelog`
|
|
57
|
-
|
|
58
|
-
The command will return results like:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
Install with npx skills add <owner/repo@skill>
|
|
62
|
-
|
|
63
|
-
vercel-labs/agent-skills@vercel-react-best-practices
|
|
64
|
-
└ https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Step 3: Present Options to the User
|
|
68
|
-
|
|
69
|
-
When you find relevant skills, present them to the user with:
|
|
70
|
-
|
|
71
|
-
1. The skill name and what it does
|
|
72
|
-
2. The install command they can run
|
|
73
|
-
3. A link to learn more at skills.sh
|
|
74
|
-
|
|
75
|
-
Example response:
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
I found a skill that might help! The "vercel-react-best-practices" skill provides
|
|
79
|
-
React and Next.js performance optimization guidelines from Vercel Engineering.
|
|
80
|
-
|
|
81
|
-
To install it:
|
|
82
|
-
npx skills add vercel-labs/agent-skills@vercel-react-best-practices
|
|
83
|
-
|
|
84
|
-
Learn more: https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Step 4: Offer to Install
|
|
88
|
-
|
|
89
|
-
If the user wants to proceed, you can install the skill for them:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
npx skills add <owner/repo@skill> -g -y
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
|
|
96
|
-
|
|
97
|
-
## Common Skill Categories
|
|
98
|
-
|
|
99
|
-
When searching, consider these common categories:
|
|
100
|
-
|
|
101
|
-
| Category | Example Queries |
|
|
102
|
-
| --------------- | ---------------------------------------- |
|
|
103
|
-
| Web Development | react, nextjs, typescript, css, tailwind |
|
|
104
|
-
| Testing | testing, jest, playwright, e2e |
|
|
105
|
-
| DevOps | deploy, docker, kubernetes, ci-cd |
|
|
106
|
-
| Documentation | docs, readme, changelog, api-docs |
|
|
107
|
-
| Code Quality | review, lint, refactor, best-practices |
|
|
108
|
-
| Design | ui, ux, design-system, accessibility |
|
|
109
|
-
| Productivity | workflow, automation, git |
|
|
110
|
-
|
|
111
|
-
## Tips for Effective Searches
|
|
112
|
-
|
|
113
|
-
1. **Use specific keywords**: "react testing" is better than just "testing"
|
|
114
|
-
2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
|
|
115
|
-
3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
|
|
116
|
-
|
|
117
|
-
## When No Skills Are Found
|
|
118
|
-
|
|
119
|
-
If no relevant skills exist:
|
|
120
|
-
|
|
121
|
-
1. Acknowledge that no existing skill was found
|
|
122
|
-
2. Offer to help with the task directly using your general capabilities
|
|
123
|
-
3. Suggest the user could create their own skill with `npx skills init`
|
|
124
|
-
|
|
125
|
-
Example:
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
I searched for skills related to "xyz" but didn't find any matches.
|
|
129
|
-
I can still help you with this task directly! Would you like me to proceed?
|
|
130
|
-
|
|
131
|
-
If this is something you do often, you could create your own skill:
|
|
132
|
-
npx skills init my-xyz-skill
|
|
133
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: find-skills
|
|
3
|
+
description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Find Skills
|
|
7
|
+
|
|
8
|
+
This skill helps you discover and install skills from the open agent skills ecosystem.
|
|
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 might be a common task with an existing skill
|
|
15
|
+
- Says "find a skill for X" or "is there a skill for X"
|
|
16
|
+
- Asks "can you do X" where X is a specialized capability
|
|
17
|
+
- Expresses interest in extending agent capabilities
|
|
18
|
+
- Wants to search for tools, templates, or workflows
|
|
19
|
+
- Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
|
|
20
|
+
|
|
21
|
+
## What is the Skills CLI?
|
|
22
|
+
|
|
23
|
+
The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
|
|
24
|
+
|
|
25
|
+
**Key commands:**
|
|
26
|
+
|
|
27
|
+
- `npx skills find [query]` - Search for skills interactively or by keyword
|
|
28
|
+
- `npx skills add <package>` - Install a skill from GitHub or other sources
|
|
29
|
+
- `npx skills check` - Check for skill updates
|
|
30
|
+
- `npx skills update` - Update all installed skills
|
|
31
|
+
|
|
32
|
+
**Browse skills at:** https://skills.sh/
|
|
33
|
+
|
|
34
|
+
## How to Help Users Find Skills
|
|
35
|
+
|
|
36
|
+
### Step 1: Understand What They Need
|
|
37
|
+
|
|
38
|
+
When a user asks for help with something, identify:
|
|
39
|
+
|
|
40
|
+
1. The domain (e.g., React, testing, design, deployment)
|
|
41
|
+
2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
|
|
42
|
+
3. Whether this is a common enough task that a skill likely exists
|
|
43
|
+
|
|
44
|
+
### Step 2: Search for Skills
|
|
45
|
+
|
|
46
|
+
Run the find command with a relevant query:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx skills find [query]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For example:
|
|
53
|
+
|
|
54
|
+
- User asks "how do I make my React app faster?" → `npx skills find react performance`
|
|
55
|
+
- User asks "can you help me with PR reviews?" → `npx skills find pr review`
|
|
56
|
+
- User asks "I need to create a changelog" → `npx skills find changelog`
|
|
57
|
+
|
|
58
|
+
The command will return results like:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Install with npx skills add <owner/repo@skill>
|
|
62
|
+
|
|
63
|
+
vercel-labs/agent-skills@vercel-react-best-practices
|
|
64
|
+
└ https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Step 3: Present Options to the User
|
|
68
|
+
|
|
69
|
+
When you find relevant skills, present them to the user with:
|
|
70
|
+
|
|
71
|
+
1. The skill name and what it does
|
|
72
|
+
2. The install command they can run
|
|
73
|
+
3. A link to learn more at skills.sh
|
|
74
|
+
|
|
75
|
+
Example response:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
I found a skill that might help! The "vercel-react-best-practices" skill provides
|
|
79
|
+
React and Next.js performance optimization guidelines from Vercel Engineering.
|
|
80
|
+
|
|
81
|
+
To install it:
|
|
82
|
+
npx skills add vercel-labs/agent-skills@vercel-react-best-practices
|
|
83
|
+
|
|
84
|
+
Learn more: https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Step 4: Offer to Install
|
|
88
|
+
|
|
89
|
+
If the user wants to proceed, you can install the skill for them:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx skills add <owner/repo@skill> -g -y
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
|
|
96
|
+
|
|
97
|
+
## Common Skill Categories
|
|
98
|
+
|
|
99
|
+
When searching, consider these common categories:
|
|
100
|
+
|
|
101
|
+
| Category | Example Queries |
|
|
102
|
+
| --------------- | ---------------------------------------- |
|
|
103
|
+
| Web Development | react, nextjs, typescript, css, tailwind |
|
|
104
|
+
| Testing | testing, jest, playwright, e2e |
|
|
105
|
+
| DevOps | deploy, docker, kubernetes, ci-cd |
|
|
106
|
+
| Documentation | docs, readme, changelog, api-docs |
|
|
107
|
+
| Code Quality | review, lint, refactor, best-practices |
|
|
108
|
+
| Design | ui, ux, design-system, accessibility |
|
|
109
|
+
| Productivity | workflow, automation, git |
|
|
110
|
+
|
|
111
|
+
## Tips for Effective Searches
|
|
112
|
+
|
|
113
|
+
1. **Use specific keywords**: "react testing" is better than just "testing"
|
|
114
|
+
2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
|
|
115
|
+
3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
|
|
116
|
+
|
|
117
|
+
## When No Skills Are Found
|
|
118
|
+
|
|
119
|
+
If no relevant skills exist:
|
|
120
|
+
|
|
121
|
+
1. Acknowledge that no existing skill was found
|
|
122
|
+
2. Offer to help with the task directly using your general capabilities
|
|
123
|
+
3. Suggest the user could create their own skill with `npx skills init`
|
|
124
|
+
|
|
125
|
+
Example:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
I searched for skills related to "xyz" but didn't find any matches.
|
|
129
|
+
I can still help you with this task directly! Would you like me to proceed?
|
|
130
|
+
|
|
131
|
+
If this is something you do often, you could create your own skill:
|
|
132
|
+
npx skills init my-xyz-skill
|
|
133
|
+
```
|
|
@@ -239,7 +239,7 @@ class Skill {
|
|
|
239
239
|
name: fullName,
|
|
240
240
|
description: cmd.description || `Skill command: ${fullName}`,
|
|
241
241
|
inputSchema: z.object({
|
|
242
|
-
|
|
242
|
+
command: z.string().optional().describe('命令行'),
|
|
243
243
|
}),
|
|
244
244
|
_options: cmd.options || null, // 保存 options 信息用于提示词生成
|
|
245
245
|
execute: async (toolArgs, framework) => {
|
|
@@ -250,9 +250,9 @@ class Skill {
|
|
|
250
250
|
cwd: process.cwd(), // 工作目录,用于路径解析
|
|
251
251
|
};
|
|
252
252
|
// 支持 argumentParser 先解析参数
|
|
253
|
-
let parsedArgs = toolArgs.
|
|
253
|
+
let parsedArgs = toolArgs.command || '';
|
|
254
254
|
if (typeof argumentParser === 'function') {
|
|
255
|
-
parsedArgs = argumentParser(toolArgs.
|
|
255
|
+
parsedArgs = argumentParser(toolArgs.command || '');
|
|
256
256
|
}
|
|
257
257
|
return await handler(parsedArgs, ctx);
|
|
258
258
|
},
|
|
@@ -478,7 +478,7 @@ class SkillManagerPlugin extends Plugin {
|
|
|
478
478
|
lines.push(`ext_call({`);
|
|
479
479
|
lines.push(` plugin: "skill",`);
|
|
480
480
|
lines.push(` tool: "${name}:<命令名>",`);
|
|
481
|
-
lines.push(` args: {
|
|
481
|
+
lines.push(` args: { command: "<命令行>" }`);
|
|
482
482
|
lines.push(`})`);
|
|
483
483
|
lines.push('```');
|
|
484
484
|
lines.push('');
|
|
@@ -498,7 +498,7 @@ class SkillManagerPlugin extends Plugin {
|
|
|
498
498
|
lines.push('');
|
|
499
499
|
lines.push('**示例:**');
|
|
500
500
|
for (const c of toolsBySkill[name]) {
|
|
501
|
-
lines.push(`- 调用 \`ext_call({ plugin: "skill", tool: "${name}:${c.name}", args: {
|
|
501
|
+
lines.push(`- 调用 \`ext_call({ plugin: "skill", tool: "${name}:${c.name}", args: { command: "<命令行>" } })\``);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
lines.push('');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* Foliko v2 - Animations */
|
|
2
|
-
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
|
|
3
|
-
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
4
|
-
@keyframes glow { 0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); } 50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); } }
|
|
5
|
-
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
|
|
6
|
-
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
|
|
7
|
-
.reveal.visible { opacity: 1; transform: translateY(0); }
|
|
1
|
+
/* Foliko v2 - Animations */
|
|
2
|
+
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
|
|
3
|
+
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
4
|
+
@keyframes glow { 0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); } 50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); } }
|
|
5
|
+
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
|
|
6
|
+
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
|
|
7
|
+
.reveal.visible { opacity: 1; transform: translateY(0); }
|
|
8
8
|
|