You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: templates/skills/bundled/skill-digester/SKILL.md
+59-4Lines changed: 59 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,28 @@
1
1
---
2
2
name: skill-digester
3
-
description: Reviews and improves another DeepCode skill's SKILL.md description field against the Agent Skills description-field rules. Use when the user asks to "digest" a skill, including requests like "digest the pdf skill" or "消化 pdf 技能".
3
+
description: Reviews and improves another DeepCode skill's SKILL.md description field, and guides Agent Skill installation into user or project .agents/skills roots. Use when the user asks to digest a skill, install an Agent Skill, install a skill to user/project scope, or says "消化技能" or "安装 agent skill".
4
4
---
5
5
6
6
# Skill Digester
7
7
8
-
Use this skill to review and optionally rewrite the `description` field of another DeepCode skill.
8
+
Use this skill for two related tasks:
9
+
10
+
- Review and optionally rewrite the `description` field of another DeepCode skill.
11
+
- Guide installation of an Agent Skill into an interoperable `.agents/skills` root.
9
12
10
13
## Interaction Rule
11
14
12
-
Whenever user input is needed, call the `AskUserQuestion` tool. Do not ask follow-up questions as plain assistant text. This includes missing skill names, language preference, duplicate matches, malformed frontmatter decisions, and whether to apply a recommended rewrite.
15
+
Whenever user input is needed, call the `AskUserQuestion` tool. Do not ask follow-up questions as plain assistant text. This includes missing skill names or paths, install scope, language preference, duplicate matches, malformed frontmatter decisions, and whether to apply a recommended rewrite.
13
16
14
17
## Workflow
15
18
19
+
First classify the request:
20
+
21
+
- If the user asks to install, add, copy, or place an Agent Skill, use the [Install Agent Skill Workflow](#install-agent-skill-workflow).
22
+
- Otherwise, use the [Digest Description Workflow](#digest-description-workflow).
23
+
24
+
## Digest Description Workflow
25
+
16
26
1. Identify the target skill from the user's request.
17
27
- If the user did not provide a skill name, use `AskUserQuestion` to ask for one.
18
28
- Locate the skill by running the bundled Node script from this skill directory:
@@ -82,6 +92,46 @@ Whenever user input is needed, call the `AskUserQuestion` tool. Do not ask follo
82
92
- Preserve body content exactly unless the user separately asks to edit it.
83
93
- After editing, report the source path, updated digest output path, and final description.
84
94
95
+
## Install Agent Skill Workflow
96
+
97
+
Use this workflow when the user asks to install an Agent Skill. Installation always writes to `.agents/skills`, not `.deepcode/skills`.
98
+
99
+
1. Identify the source skill directory.
100
+
- If the user provided an explicit file or directory path, resolve it:
101
+
- `~/...` relative to the user's home directory.
102
+
- `./...` relative to the current project root.
103
+
- Absolute paths as written.
104
+
- A `SKILL.md` path means its parent directory is the source skill directory.
105
+
- If the user provided a skill name instead of a path, locate it with `scripts/find-skill.js` using the same command and match rules as the digest workflow.
106
+
- If the user did not provide a skill name or path, use `AskUserQuestion` to ask for the source skill name or path.
107
+
- The source directory must contain `SKILL.md`. If it does not, report that the path is not an Agent Skill and ask for another source only if the user still wants to install.
108
+
109
+
2. Determine the installed skill folder name.
110
+
- Parse the source `SKILL.md` frontmatter.
111
+
- Use the trimmed frontmatter `name` when present.
112
+
- Otherwise use the source folder name with underscores converted to hyphens.
113
+
- Use that resolved name as the target folder name.
114
+
115
+
3. Ask exactly one installation scope question.
116
+
- Use `AskUserQuestion` to ask whether to install the skill at user level or project level.
- Copy the whole source skill directory, including `SKILL.md`, `references/`, `scripts/`, `templates/`, examples, assets, and other support files.
126
+
- Preserve file contents and relative paths exactly.
127
+
- Create the `.agents/skills` parent directory if needed.
128
+
- If the destination directory already exists, stop and report the conflict. Do not overwrite or merge files unless the user explicitly asks in a later message.
129
+
130
+
5. Report the result.
131
+
- Report the source directory and installation destination.
132
+
- Mention that the agent client may need to reload or restart before the installed skill appears.
133
+
- Do not digest, rewrite, or normalize the installed skill unless the user separately asks for that.
134
+
85
135
## AskUserQuestion Patterns
86
136
87
137
Use one question at a time unless two decisions are tightly coupled. Each question must include `options`; rely on the UI's `Other` option for free-form input.
@@ -96,6 +146,10 @@ Examples:
96
146
{"questions":[{"question":"How should I proceed with this description recommendation?","options":[{"label":"Apply change","description":"Update only the description field in the native digest output SKILL.md."},{"label":"Abandon change","description":"Leave the file unchanged."},{"label":"Discuss wording","description":"Continue refining the proposed description before editing."}]}]}
97
147
```
98
148
149
+
```json
150
+
{"questions":[{"question":"Where should I install this Agent Skill?","options":[{"label":"User-level","description":"Install to ~/.agents/skills so it is available across projects."},{"label":"Project-level","description":"Install to ./.agents/skills so it is available in this project."}]}]}
151
+
```
152
+
99
153
## Review Heuristics
100
154
101
155
A strong description is short, concrete, and activation-oriented. Prefer this pattern:
@@ -110,6 +164,7 @@ Avoid descriptions that are only generic labels, marketing copy, or internal imp
110
164
111
165
- Never modify a different skill with a similar name without asking.
112
166
- Never save the digested output under `.agents/skills`;`.agents/skills` is only a source root for digestion.
167
+
- Never save installed Agent Skills under `.deepcode/skills`; installation writes only to `.agents/skills`.
113
168
- Never move a skill between project and user level during digestion.
169
+
- Never overwrite or merge an existing installed skill directory unless the user explicitly asks after seeing the conflict.
114
170
- Never change the target skill's language preference after confirmation unless the user asks.
0 commit comments