mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
fix: improve skill installation to support multiple source formats and ensure target directory
This commit is contained in:
@@ -93,14 +93,25 @@ Do NOT create auxiliary documentation files:
|
|||||||
|
|
||||||
**Critical Rule**: Only create files that the agent will actually execute (scripts) or that are too large for SKILL.md (references). Documentation, examples, and guides ALL belong in SKILL.md.
|
**Critical Rule**: Only create files that the agent will actually execute (scripts) or that are too large for SKILL.md (references). Documentation, examples, and guides ALL belong in SKILL.md.
|
||||||
|
|
||||||
## Installing a Skill from URL
|
## Installing a Skill
|
||||||
|
|
||||||
1. Fetch the URL content (curl or web_fetch tool)
|
Install target directory: `<workspace>/skills/<name>/` (the `<workspace>` is from the "工作空间" section).
|
||||||
|
|
||||||
|
### Step 1 — Obtain skill content
|
||||||
|
|
||||||
|
| Source | Action |
|
||||||
|
|---|---|
|
||||||
|
| URL (single file) | Fetch content via curl or web_fetch |
|
||||||
|
| URL (zip/archive) | Download and extract to a temp directory |
|
||||||
|
| Local file (SKILL.md) | Read directly |
|
||||||
|
| Local archive (zip) | Extract to a temp directory |
|
||||||
|
|
||||||
|
### Step 2 — Identify and install
|
||||||
|
|
||||||
|
1. Locate the SKILL.md (may be at top level or inside a subdirectory)
|
||||||
2. Extract `name` from YAML frontmatter
|
2. Extract `name` from YAML frontmatter
|
||||||
3. Create directory `<workspace>/skills/<name>/` and save content as `SKILL.md`
|
3. Copy the **entire skill directory** (SKILL.md and all sibling files/folders such as `references/`, `scripts/`, `assets/`, etc.) into `<workspace>/skills/<name>/`
|
||||||
4. Check the saved SKILL.md for an installation/setup section — if it defines additional steps (e.g., downloading scripts, installing dependencies), execute them; otherwise installation is complete
|
4. If an install/setup file exists (e.g. INSTALL.md), follow its instructions — the final result must still end up in `<workspace>/skills/<name>/`
|
||||||
|
|
||||||
The `<workspace>` is the working directory from the "工作空间" section.
|
|
||||||
|
|
||||||
## Skill Creation Process (from scratch)
|
## Skill Creation Process (from scratch)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user