Skip to content

Commit f725737

Browse files
committed
feat: update bundled/skill-digester/SKILL.md
1 parent 92ccc25 commit f725737

1 file changed

Lines changed: 59 additions & 4 deletions

File tree

  • templates/skills/bundled/skill-digester

templates/skills/bundled/skill-digester/SKILL.md

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
---
22
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".
44
---
55

66
# Skill Digester
77

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.
912

1013
## Interaction Rule
1114

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.
1316

1417
## Workflow
1518

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+
1626
1. Identify the target skill from the user's request.
1727
- If the user did not provide a skill name, use `AskUserQuestion` to ask for one.
1828
- 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
8292
- Preserve body content exactly unless the user separately asks to edit it.
8393
- After editing, report the source path, updated digest output path, and final description.
8494

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.
117+
- Offer only these scope choices:
118+
- User-level install: `~/.agents/skills/<skill-name>/`
119+
- Project-level install: `./.agents/skills/<skill-name>/`
120+
- Do not ask any other installation preference before copying.
121+
122+
4. Copy the complete skill directory.
123+
- User-level destination: `~/.agents/skills/<skill-name>/`.
124+
- Project-level destination: `./.agents/skills/<skill-name>/`.
125+
- 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+
85135
## AskUserQuestion Patterns
86136
87137
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:
96146
{"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."}]}]}
97147
```
98148

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+
99153
## Review Heuristics
100154

101155
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
110164

111165
- Never modify a different skill with a similar name without asking.
112166
- 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`.
113168
- 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.
114170
- Never change the target skill's language preference after confirmation unless the user asks.
115-

0 commit comments

Comments
 (0)