skill-guide 0.2.0
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/CHANGELOG.md +45 -0
- package/CONTRIBUTING.md +51 -0
- package/LICENSE +21 -0
- package/README.md +236 -0
- package/SKILL.md +266 -0
- package/agents/openai.yaml +8 -0
- package/bin/skill-guide +4 -0
- package/demo-categories.png +0 -0
- package/demo-cover.png +0 -0
- package/demo-highlights.png +0 -0
- package/demo-reference.png +0 -0
- package/demo.gif +0 -0
- package/demo.html +1861 -0
- package/package.json +63 -0
- package/scan-skills.js +580 -0
- package/skill-guide.js +782 -0
- package/social-preview.png +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to skill-guide will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.0] - 2026-05-15
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Deterministic `skill-guide` CLI for direct `npx skill-guide --open` usage.
|
|
12
|
+
- `--doctor` diagnostics for Node.js, Codex home, skill counts, and source breakdown.
|
|
13
|
+
- `--format json` for raw scanner output from the main CLI.
|
|
14
|
+
- `--lang zh` built-in Chinese UI labels with `LABELS.zh` map.
|
|
15
|
+
- Agent-side full translation for any language (ja, ko, fr, de, es, etc.) — SKILL.md workflow step 6.
|
|
16
|
+
- Language auto-detection from user input (Chinese, Japanese, Korean, and others).
|
|
17
|
+
- Markdown rendering in HTML output with smart truncation for long sections.
|
|
18
|
+
- `data-i18n` attributes on all translatable HTML elements.
|
|
19
|
+
- GitHub Actions test and Pages workflows.
|
|
20
|
+
- Regenerated Agent Skills demo screenshots, demo GIF, and social preview image.
|
|
21
|
+
- Codex skill discovery from `~/.codex/skills`, `$CODEX_HOME/skills`, and Codex plugin cache.
|
|
22
|
+
- OpenAI/Codex UI metadata in `agents/openai.yaml`.
|
|
23
|
+
- Cross-platform Agent Skills positioning and Codex install instructions.
|
|
24
|
+
- Scanner tests for Codex sources and cache isolation.
|
|
25
|
+
- Scanner tests for multiline descriptions, quoted values, lists, and duplicate source labels.
|
|
26
|
+
- Translation tests: Chinese label rendering, English preservation, section/summary translation.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- `SKILL.md` now delegates HTML generation to the deterministic CLI, with the old scanner-driven instructions as fallback.
|
|
30
|
+
- Cache files are now scoped to the active scan roots, avoiding stale results when switching between Claude Code and Codex environments.
|
|
31
|
+
- Translation generalized from Chinese-only to any language — agent translates both `data-i18n` content and plain text.
|
|
32
|
+
|
|
33
|
+
## [0.1.0] - 2026-05-15
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- `scan-skills.js` — zero-dependency Node.js scanner with 4 modes (`--list`, `--skill`, `--search`, `--full`)
|
|
37
|
+
- `SKILL.md` — Claude Code skill definition with HTML generation rules for 4 interaction modes
|
|
38
|
+
- Auto-categorization into 9 categories (testing, design, security, documentation, automation, deployment, code-quality, development, other)
|
|
39
|
+
- Three-layer data extraction: frontmatter metadata, section summaries, key paragraphs
|
|
40
|
+
- 5-minute cache with `--refresh` override
|
|
41
|
+
- Symlink-aware directory scanning
|
|
42
|
+
- Bilingual output (auto-detect Chinese/English from user input)
|
|
43
|
+
- `README.md` with install instructions and architecture overview
|
|
44
|
+
- `LICENSE` (MIT)
|
|
45
|
+
- `CONTRIBUTING.md`
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Contributing to skill-guide
|
|
2
|
+
|
|
3
|
+
Thanks for your interest! Here's how to contribute.
|
|
4
|
+
|
|
5
|
+
## Bug Reports
|
|
6
|
+
|
|
7
|
+
Open an issue with:
|
|
8
|
+
- What you expected to happen
|
|
9
|
+
- What actually happened
|
|
10
|
+
- Your OS and Node.js version (`node --version`)
|
|
11
|
+
- The scanner output if relevant (`node scan-skills.js --list 2>&1`)
|
|
12
|
+
- Doctor output (`node skill-guide.js --doctor`)
|
|
13
|
+
|
|
14
|
+
## Feature Requests
|
|
15
|
+
|
|
16
|
+
Open an issue describing the use case. Good requests explain **who** needs it and **why**, not just what.
|
|
17
|
+
|
|
18
|
+
## Pull Requests
|
|
19
|
+
|
|
20
|
+
1. Fork the repo
|
|
21
|
+
2. Create a branch: `git checkout -b feat/your-feature`
|
|
22
|
+
3. Make changes — keep the zero-dependency constraint
|
|
23
|
+
4. Test: `npm test` (runs syntax checks, unit tests, and scanner smoke tests)
|
|
24
|
+
5. Commit with conventional commits: `feat:`, `fix:`, `docs:`
|
|
25
|
+
6. Open a PR
|
|
26
|
+
|
|
27
|
+
## Constraints
|
|
28
|
+
|
|
29
|
+
- **Zero npm dependencies** — only Node.js built-ins (`fs`, `path`, `os`, `crypto`, `child_process`)
|
|
30
|
+
- **Single-file scanner** — `scan-skills.js` stays as one file
|
|
31
|
+
- **SKILL.md format** — must follow Claude Code skill frontmatter conventions
|
|
32
|
+
- **No external network calls** — scanner reads local files only
|
|
33
|
+
|
|
34
|
+
## Development
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Run the full test suite
|
|
38
|
+
npm test
|
|
39
|
+
|
|
40
|
+
# Test the scanner
|
|
41
|
+
node scan-skills.js --list
|
|
42
|
+
node scan-skills.js --skill investigate
|
|
43
|
+
node scan-skills.js --search security
|
|
44
|
+
node scan-skills.js --full
|
|
45
|
+
node scan-skills.js --refresh --list
|
|
46
|
+
|
|
47
|
+
# Test the CLI
|
|
48
|
+
node skill-guide.js --open
|
|
49
|
+
node skill-guide.js --lang zh --open
|
|
50
|
+
node skill-guide.js --doctor
|
|
51
|
+
```
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 skill-guide contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://img.shields.io/badge/Zero%20Dependencies-Node.js-6ee7b7?style=flat-square" />
|
|
3
|
+
<img src="https://img.shields.io/badge/Output-HTML%20Slides-f0abfc?style=flat-square" />
|
|
4
|
+
<img src="https://img.shields.io/badge/Platform-Claude%20Code%20%7C%20Codex%20%7C%20cc--switch-818cf8?style=flat-square" />
|
|
5
|
+
<img src="https://img.shields.io/github/actions/workflow/status/gtskevin/skill-guide/test.yml?branch=main&style=flat-square&label=tests" />
|
|
6
|
+
<img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" />
|
|
7
|
+
<img src="https://img.shields.io/badge/Language-Any%20%F0%9F%8C%90-7dd3fc?style=flat-square" />
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<img src="demo.gif" alt="skill-guide demo — npx skill-guide --open generates HTML slides" width="760" />
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
> **200+ agent skills installed but you only use 3?**
|
|
15
|
+
> One command scans everything — Claude Code, Codex, cc-switch, plugins — and generates a beautiful slide deck so you actually know what you have.
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://gtskevin.github.io/skill-guide/"><strong>Live Demo</strong></a>
|
|
19
|
+
·
|
|
20
|
+
<a href="#quick-start">Try it now</a>
|
|
21
|
+
·
|
|
22
|
+
<a href="#install-methods">Install</a>
|
|
23
|
+
·
|
|
24
|
+
<a href="#how-it-works">How it works</a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx skill-guide --open # ← that's it. HTML slides open in your browser.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## What it does
|
|
32
|
+
|
|
33
|
+
skill-guide reads every skill from Claude Code, Codex, `~/.cc-switch/skills/`, and plugin marketplaces, then generates a polished slide deck you can view in any browser.
|
|
34
|
+
|
|
35
|
+
**4 modes:**
|
|
36
|
+
|
|
37
|
+
| Mode | Command | Output |
|
|
38
|
+
|------|---------|--------|
|
|
39
|
+
| **Discovery** | `/skill-guide` or `npx skill-guide --open` | Stats, category map, highlights, quick reference |
|
|
40
|
+
| **Deep-dive** | `/skill-guide investigate` or `npx skill-guide --skill investigate --open` | How it works, when to use, limitations, triggers |
|
|
41
|
+
| **Tool-selection** | "Which skill for security?" | Ranked recommendations with comparison |
|
|
42
|
+
| **Full manual** | `/skill-guide all` or `npx skill-guide --full --open` | One page per skill, complete reference |
|
|
43
|
+
| **Doctor** | `npx skill-guide --doctor` | Environment and source diagnostics |
|
|
44
|
+
|
|
45
|
+
## Platform Support
|
|
46
|
+
|
|
47
|
+
| Platform | Status | Scanned paths |
|
|
48
|
+
|----------|--------|---------------|
|
|
49
|
+
| **Claude Code** | Supported | `~/.claude/skills`, `~/.claude/plugins/marketplaces` |
|
|
50
|
+
| **Codex** | Supported | `~/.codex/skills`, `$CODEX_HOME/skills`, Codex plugin cache |
|
|
51
|
+
| **OpenAI system skills** | Supported | `$CODEX_HOME/skills/.system` as a separate source |
|
|
52
|
+
| **cc-switch** | Supported | `~/.cc-switch/skills` |
|
|
53
|
+
| **Agent Skills** | Compatible | Standard `SKILL.md` skill folders |
|
|
54
|
+
|
|
55
|
+
## Screenshots
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
<table>
|
|
60
|
+
<tr>
|
|
61
|
+
<td><img src="demo-cover.png" alt="Cover slide" width="400" /></td>
|
|
62
|
+
<td><img src="demo-categories.png" alt="Category map" width="400" /></td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<td align="center"><em>Cover — total count & sources</em></td>
|
|
66
|
+
<td align="center"><em>Category map — grouped cards</em></td>
|
|
67
|
+
</tr>
|
|
68
|
+
<tr>
|
|
69
|
+
<td><img src="demo-highlights.png" alt="Top picks" width="400" /></td>
|
|
70
|
+
<td><img src="demo-reference.png" alt="Quick reference" width="400" /></td>
|
|
71
|
+
</tr>
|
|
72
|
+
<tr>
|
|
73
|
+
<td align="center"><em>Top picks — best skills</em></td>
|
|
74
|
+
<td align="center"><em>Quick reference table</em></td>
|
|
75
|
+
</tr>
|
|
76
|
+
</table>
|
|
77
|
+
|
|
78
|
+
## Quick Start
|
|
79
|
+
|
|
80
|
+
**1. Try instantly** — no install needed:
|
|
81
|
+
```bash
|
|
82
|
+
npx skill-guide --open
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**2. Install for Claude Code:**
|
|
86
|
+
```bash
|
|
87
|
+
npx skills add gtskevin/skill-guide
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**3. Use it** — type `/skill-guide` in Claude Code, or use the CLI:
|
|
91
|
+
```bash
|
|
92
|
+
npx skill-guide --open # Discover all skills
|
|
93
|
+
npx skill-guide --search security --open # Find skills for a task
|
|
94
|
+
npx skill-guide --skill tdd --open # Deep-dive one skill
|
|
95
|
+
npx skill-guide --full --open # Generate a full manual
|
|
96
|
+
npx skill-guide --doctor # Diagnose your setup
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Install Methods
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Claude Code: npx skills (recommended)
|
|
103
|
+
npx skills add gtskevin/skill-guide
|
|
104
|
+
|
|
105
|
+
# Claude Code: manual symlink
|
|
106
|
+
git clone https://github.com/gtskevin/skill-guide.git
|
|
107
|
+
ln -s $(pwd)/skill-guide ~/.claude/skills/skill-guide
|
|
108
|
+
|
|
109
|
+
# Claude Code: direct download
|
|
110
|
+
mkdir -p ~/.claude/skills/skill-guide
|
|
111
|
+
curl -sL https://github.com/gtskevin/skill-guide/archive/refs/heads/main.tar.gz | tar xz --strip-components=1 -C ~/.claude/skills/skill-guide
|
|
112
|
+
|
|
113
|
+
# Codex: manual symlink
|
|
114
|
+
git clone https://github.com/gtskevin/skill-guide.git
|
|
115
|
+
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
116
|
+
ln -s "$(pwd)/skill-guide" "${CODEX_HOME:-$HOME/.codex}/skills/skill-guide"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Usage Examples
|
|
120
|
+
|
|
121
|
+
### Run as a CLI
|
|
122
|
+
```bash
|
|
123
|
+
npx skill-guide --open
|
|
124
|
+
npx skill-guide --search security --open
|
|
125
|
+
npx skill-guide --skill test-driven-development --open
|
|
126
|
+
npx skill-guide --format json
|
|
127
|
+
npx skill-guide --doctor
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Discover all your skills
|
|
131
|
+
```
|
|
132
|
+
/skill-guide
|
|
133
|
+
```
|
|
134
|
+
Or say: "What skills do I have?" / "帮我看看我有哪些技能"
|
|
135
|
+
|
|
136
|
+
In Codex, you can also say: "What Codex skills do I have?"
|
|
137
|
+
|
|
138
|
+
### Deep-dive one skill
|
|
139
|
+
```
|
|
140
|
+
/skill-guide investigate
|
|
141
|
+
```
|
|
142
|
+
Or say: "Tell me about the TDD skill" / "介绍一下 investigate 技能"
|
|
143
|
+
|
|
144
|
+
### Find the right skill
|
|
145
|
+
```
|
|
146
|
+
Which skill should I use for code review?
|
|
147
|
+
```
|
|
148
|
+
Or: "帮我推荐一个做测试的技能"
|
|
149
|
+
|
|
150
|
+
### Generate a full manual
|
|
151
|
+
```
|
|
152
|
+
/skill-guide all
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## How it works
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
skill-guide/
|
|
159
|
+
├── SKILL.md # Skill definition + HTML generation rules
|
|
160
|
+
├── agents/openai.yaml # Codex/OpenAI skill UI metadata
|
|
161
|
+
├── skill-guide.js # Deterministic CLI + HTML generator
|
|
162
|
+
├── scan-skills.js # Zero-dependency Node.js scanner
|
|
163
|
+
├── demo.html # Demo presentation (this is what you see above)
|
|
164
|
+
└── LICENSE # MIT
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
1. `scan-skills.js` scans Claude Code, Codex, cc-switch, and plugin skill directories; parses YAML frontmatter; extracts sections and key paragraphs
|
|
168
|
+
2. `skill-guide.js` turns scanner JSON into deterministic HTML slides with scroll-snap navigation, keyboard controls, and animations
|
|
169
|
+
3. `SKILL.md` lets Claude Code and Codex invoke the same CLI from natural language
|
|
170
|
+
4. Output opens in your browser — zero config, zero dependencies
|
|
171
|
+
|
|
172
|
+
### Scanner modes
|
|
173
|
+
|
|
174
|
+
| Flag | Purpose | Data |
|
|
175
|
+
|------|---------|------|
|
|
176
|
+
| `--list` | Discovery | Name + description + category |
|
|
177
|
+
| `--skill <name>` | Deep-dive | Full metadata + sections + key paragraphs |
|
|
178
|
+
| `--search <query>` | Recommendations | Matching skills with full data |
|
|
179
|
+
| `--full` | Complete manual | All skills with full data |
|
|
180
|
+
| `--refresh` | Force re-scan | Ignores 5-min cache |
|
|
181
|
+
|
|
182
|
+
### CLI flags
|
|
183
|
+
|
|
184
|
+
| Flag | Purpose |
|
|
185
|
+
|------|---------|
|
|
186
|
+
| `--open` | Open the generated HTML in your browser |
|
|
187
|
+
| `--output <file>` | Save HTML to a specific path |
|
|
188
|
+
| `--format html,json` | Choose HTML slides or raw scanner JSON |
|
|
189
|
+
| `--search <query>` | Generate recommendations for a task |
|
|
190
|
+
| `--skill <name>` | Generate a deep-dive for one skill |
|
|
191
|
+
| `--full` | Generate a complete manual |
|
|
192
|
+
| `--lang <code>` | UI language (en, zh, or any — auto-translated) |
|
|
193
|
+
| `--doctor` | Check paths, sources, and scan counts |
|
|
194
|
+
|
|
195
|
+
### Doctor checks
|
|
196
|
+
|
|
197
|
+
`npx skill-guide --doctor` reports Node.js version, Claude Code and Codex skill paths, source counts, duplicate skill names, malformed skill files, and suggested install paths.
|
|
198
|
+
|
|
199
|
+
### Auto-categorization
|
|
200
|
+
|
|
201
|
+
Skills are automatically sorted into 9 categories: `testing`, `design`, `security`, `documentation`, `automation`, `deployment`, `code-quality`, `development`, `other`.
|
|
202
|
+
|
|
203
|
+
## Language Support
|
|
204
|
+
|
|
205
|
+
Automatic — ask in any language, get output in that language. No configuration needed.
|
|
206
|
+
|
|
207
|
+
- **English** — default
|
|
208
|
+
- **Chinese** — built-in (`--lang zh`)
|
|
209
|
+
- **Japanese, Korean, French, German, Spanish, ...** — agent-side translation (works in Claude Code and Codex)
|
|
210
|
+
|
|
211
|
+
## Why skill-guide?
|
|
212
|
+
|
|
213
|
+
- **The only skill that maps your skills** — scans Claude Code, Codex, cc-switch, and plugin sources in one visual overview
|
|
214
|
+
- **Zero dependencies** — pure Node.js with `fs`, `path`, `os`. No `npm install` needed
|
|
215
|
+
- **Beautiful output** — scroll-snap slides with keyboard nav, animations, and responsive design
|
|
216
|
+
- **Any language** — ask in Chinese, get Chinese. Ask in Japanese, get Japanese. Auto-detected.
|
|
217
|
+
- **Smart caching** — 5-minute TTL so repeated queries are instant
|
|
218
|
+
- **5 seconds to "wow"** — `npx skill-guide --open` is all you need
|
|
219
|
+
|
|
220
|
+
## Contributing
|
|
221
|
+
|
|
222
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
223
|
+
|
|
224
|
+
## Roadmap
|
|
225
|
+
|
|
226
|
+
- [ ] `--share` — generate a shareable standalone HTML or Markdown summary
|
|
227
|
+
- [ ] Gemini CLI skill scanning (`~/.gemini/skills`)
|
|
228
|
+
- [ ] `--diff` — show recently added/removed skills since last scan
|
|
229
|
+
- [ ] `--export markdown` — output a Markdown table for pasting into issues and docs
|
|
230
|
+
- [ ] Skill health scores based on frontmatter completeness
|
|
231
|
+
|
|
232
|
+
Have an idea? [Open a feature request](https://github.com/gtskevin/skill-guide/issues/new?template=feature_request.yml).
|
|
233
|
+
|
|
234
|
+
## License
|
|
235
|
+
|
|
236
|
+
MIT
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-guide
|
|
3
|
+
description: |
|
|
4
|
+
Discover, understand, compare, and choose from installed Agent Skills across
|
|
5
|
+
Claude Code, Codex, local skill folders, and plugin marketplaces. Generates
|
|
6
|
+
HTML slide presentations with skill overviews, deep-dives, and tool
|
|
7
|
+
recommendations. Use when user says "skill-guide", asks what skills they
|
|
8
|
+
have, wants to explore Claude Code or Codex skills, asks "tell me about
|
|
9
|
+
a skill", "which skill for X", "help me understand my skills", or wants to
|
|
10
|
+
map installed agent capabilities.
|
|
11
|
+
allowed-tools:
|
|
12
|
+
- Bash
|
|
13
|
+
- Read
|
|
14
|
+
- Write
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Skill Guide
|
|
18
|
+
|
|
19
|
+
## 1. When to Use
|
|
20
|
+
|
|
21
|
+
Activate this skill when the user wants to explore, discover, compare, or learn about their installed Agent Skills across Claude Code, Codex, local skill folders, and plugin marketplaces. The output is a polished HTML slide presentation opened in the browser.
|
|
22
|
+
|
|
23
|
+
**Trigger conditions:**
|
|
24
|
+
- User types `/skill-guide` (bare or with arguments)
|
|
25
|
+
- User asks "what skills do I have", "show me my skills", "what Codex skills do I have"
|
|
26
|
+
- User asks about a specific skill: "tell me about frontend-slides"
|
|
27
|
+
- User describes a task and wants to know which skill fits: "which skill for code review"
|
|
28
|
+
- User says "help me understand my skills"
|
|
29
|
+
|
|
30
|
+
## 2. Mode Detection
|
|
31
|
+
|
|
32
|
+
Determine the mode from user input:
|
|
33
|
+
|
|
34
|
+
| User Input | Mode | Scanner Flag |
|
|
35
|
+
|------------|------|-------------|
|
|
36
|
+
| `/skill-guide` (bare, no args) | discovery | `--list` |
|
|
37
|
+
| `/skill-guide <name>` or "tell me about <name>" | deep-dive | `--skill <name>` |
|
|
38
|
+
| Task description or "which skill for X" | tool-selection | `--search <query>` |
|
|
39
|
+
| `/skill-guide all` | full-manual | `--full` |
|
|
40
|
+
|
|
41
|
+
**Resolution rules (apply in order):**
|
|
42
|
+
1. If argument is "all" (case-insensitive) -> full-manual mode
|
|
43
|
+
2. If argument exactly matches a known skill name -> deep-dive mode
|
|
44
|
+
3. If argument contains verbs (e.g., "review", "build", "test") or question words ("which", "what", "how") -> tool-selection mode
|
|
45
|
+
4. If bare `/skill-guide` with no argument -> discovery mode
|
|
46
|
+
|
|
47
|
+
## 3. Workflow
|
|
48
|
+
|
|
49
|
+
Follow these steps exactly:
|
|
50
|
+
|
|
51
|
+
1. **Determine mode** from user input using the rules in section 2.
|
|
52
|
+
2. **Detect language**: Determine the user's language from their input.
|
|
53
|
+
- Chinese: input contains Chinese characters → lang = `zh`
|
|
54
|
+
- Japanese: input contains Japanese characters (`/[あ-んア-ンヶッ]/` or hiragana/katakana) → lang = `ja`
|
|
55
|
+
- Korean: input contains Hangul (`/[가-힣]/`) → lang = `ko`
|
|
56
|
+
- Any other non-English language: if the user writes in a language other than English, detect it and set lang accordingly (e.g., `fr`, `de`, `es`, `pt`, `ru`, etc.)
|
|
57
|
+
- English or cannot determine: lang = `en` (default, no translation needed)
|
|
58
|
+
3. **Run the deterministic CLI**: `node <skill-dir>/skill-guide.js <flag> [args] [--lang <lang>]`, where `<skill-dir>` is the directory containing this SKILL.md file.
|
|
59
|
+
- If lang is `en`, add `--open` to the CLI command (open directly, no translation needed).
|
|
60
|
+
- If lang is NOT `en`, do NOT add `--open` (translation happens before opening).
|
|
61
|
+
4. Map modes to CLI flags:
|
|
62
|
+
- Discovery: `node <skill-dir>/skill-guide.js`
|
|
63
|
+
- Deep-dive: `node <skill-dir>/skill-guide.js --skill <name>`
|
|
64
|
+
- Tool-selection: `node <skill-dir>/skill-guide.js --search "<query>"`
|
|
65
|
+
- Full manual: `node <skill-dir>/skill-guide.js --full`
|
|
66
|
+
- Diagnostics: `node <skill-dir>/skill-guide.js --doctor`
|
|
67
|
+
Append `--lang <lang>` to any command when a non-English language is detected.
|
|
68
|
+
5. If `skill-guide.js` is unavailable, fall back to running `scan-skills.js` and generating HTML using the rules below.
|
|
69
|
+
6. **Post-translate for non-English languages** (when lang is NOT `en`):
|
|
70
|
+
After the CLI generates the HTML file, perform a full translation pass:
|
|
71
|
+
a. Read the generated HTML file.
|
|
72
|
+
b. Translate ALL English text content inside elements with `data-i18n` attributes, AND all UI label text (headings, kicker, subtitle, section headers like "运作原理", "何时使用", etc.) to the user's detected language.
|
|
73
|
+
- The `data-i18n` attributes mark translatable content: `desc` (descriptions), `section-title` (step/section titles), `section-body` (step/section content), `how-it-works`, `when-to-use`, `limitations`.
|
|
74
|
+
- Also translate any other visible text: cover titles, category names, stats labels, navigation text, and any Chinese/English UI labels already in the HTML.
|
|
75
|
+
- Preserve ALL HTML tags, CSS classes, JavaScript, attribute names, and document structure exactly as-is.
|
|
76
|
+
- Only translate the **text content** between tags — never modify tag names, attributes, CSS, or JavaScript.
|
|
77
|
+
- Do NOT translate: content inside `<code>` tags, skill names, tool names, CSS property values, JavaScript code.
|
|
78
|
+
- Translate naturally as a fluent native speaker would write it — not word-by-word. Adapt sentence structure for natural readability in the target language.
|
|
79
|
+
- Keep markdown-derived formatting: `<strong>` stays `<strong>`, `<code>` stays `<code>`, `<blockquote>` stays `<blockquote>`.
|
|
80
|
+
c. Write the translated HTML back to the same file path using the Write tool.
|
|
81
|
+
d. Open the file in the browser: `open <filepath>` (macOS) or equivalent.
|
|
82
|
+
e. Report completion to the user with a brief summary in their language.
|
|
83
|
+
7. **English mode**: When lang is `en`, add `--open` to the CLI command directly and skip step 6.
|
|
84
|
+
|
|
85
|
+
## 4. HTML Generation Rules
|
|
86
|
+
|
|
87
|
+
### Technical Requirements
|
|
88
|
+
|
|
89
|
+
- Single-file HTML with all CSS and JS inlined. Zero external dependencies.
|
|
90
|
+
- Full-screen scroll-snap slides:
|
|
91
|
+
```css
|
|
92
|
+
.slide {
|
|
93
|
+
height: 100vh;
|
|
94
|
+
height: 100dvh;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
scroll-snap-align: start;
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
- CSS custom properties with `clamp()` for responsive sizing.
|
|
100
|
+
- Keyboard navigation (arrow keys), scroll wheel, and touch swipe.
|
|
101
|
+
- IntersectionObserver for entrance animations: elements with class `.rv` get class `.v` added when visible.
|
|
102
|
+
- Navigation dots on the right side.
|
|
103
|
+
- Progress bar at the top.
|
|
104
|
+
- Page number: bottom-right corner as `<div class="sn-txt">N/total</div>`.
|
|
105
|
+
- `@media (prefers-reduced-motion: reduce)` disables animations.
|
|
106
|
+
- Every slide MUST fit within the viewport. If content overflows, split into multiple slides.
|
|
107
|
+
|
|
108
|
+
### Color Theme CSS Variables
|
|
109
|
+
|
|
110
|
+
```css
|
|
111
|
+
:root {
|
|
112
|
+
--bg: #eef2ff;
|
|
113
|
+
--card: #fff;
|
|
114
|
+
--cs: 0 4px 20px rgba(100,100,180,0.07);
|
|
115
|
+
--t: #1e293b;
|
|
116
|
+
--ts2: #64748b;
|
|
117
|
+
--ab: #818cf8;
|
|
118
|
+
--ap: #f0abfc;
|
|
119
|
+
--am: #6ee7b7;
|
|
120
|
+
--ao: #fdba74;
|
|
121
|
+
--ay: #fde047;
|
|
122
|
+
--al: #c4b5fd;
|
|
123
|
+
--ar: #fda4af;
|
|
124
|
+
--as: #7dd3fc;
|
|
125
|
+
--r: clamp(10px,1.8vw,18px);
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Each slide gets a subtle gradient background and decorative blurred circles (pseudo-elements with `filter: blur(80px)`, low opacity, positioned absolutely) for atmosphere.
|
|
130
|
+
|
|
131
|
+
### Per-Mode Page Structure
|
|
132
|
+
|
|
133
|
+
#### Discovery Mode (4 pages)
|
|
134
|
+
|
|
135
|
+
**Page 1 - Cover:**
|
|
136
|
+
- Title: If scanner sources include both Claude and Codex, use "Your Agent Skills" (EN) or "你的 Agent Skills 技能库" (ZH). If only Claude sources are present, use "Your Claude Code Skills" / "你的 Claude Code 技能库". If only Codex sources are present, use "Your Codex Skills" / "你的 Codex 技能库".
|
|
137
|
+
- Subtitle: total skill count + per-source breakdown (e.g., "12 Claude skills, 8 Codex skills, 20 plugin skills")
|
|
138
|
+
- Decorative background with gradient and blurred circles
|
|
139
|
+
|
|
140
|
+
**Page 2 - Category Map:**
|
|
141
|
+
- Group skills by their `category` field
|
|
142
|
+
- 3-column card grid
|
|
143
|
+
- Each card shows: skill name, 1-line description, category badge (colored pill)
|
|
144
|
+
- Use distinct accent colors per category for visual separation
|
|
145
|
+
|
|
146
|
+
**Page 3 - Highlights:**
|
|
147
|
+
- Top 5-8 most versatile skills (ranked by number of triggers or multiple sources)
|
|
148
|
+
- Each highlight: skill name + full description + trigger words as small badges
|
|
149
|
+
- Use a prominent card layout with the accent color
|
|
150
|
+
|
|
151
|
+
**Page 4 - Quick Reference:**
|
|
152
|
+
- Table with columns: Name | Description | Triggers | Category
|
|
153
|
+
- Compact rows, alternating background for readability
|
|
154
|
+
- Sticky header if content is long
|
|
155
|
+
|
|
156
|
+
#### Deep-dive Mode (1-3 pages per skill)
|
|
157
|
+
|
|
158
|
+
**Page 1 - Overview:**
|
|
159
|
+
- Large skill name as title
|
|
160
|
+
- Full description as subtitle
|
|
161
|
+
- Category badge (colored pill)
|
|
162
|
+
- Source badge (showing where the skill comes from)
|
|
163
|
+
- List of `allowedTools` as code-styled tags
|
|
164
|
+
|
|
165
|
+
**Page 2 - How It Works:**
|
|
166
|
+
- Render `sections` array as a numbered step flow with circle numbers (1, 2, 3...)
|
|
167
|
+
- If `howItWorks` field exists, render it as a detail/expandable box
|
|
168
|
+
- Use connecting lines or arrows between steps for flow visualization
|
|
169
|
+
|
|
170
|
+
**Page 3 - When to Use:**
|
|
171
|
+
- `whenToUse` items as green "Use when..." tags
|
|
172
|
+
- `limitations` items as orange "Caution" tags
|
|
173
|
+
- `triggers` as keyword badges in a separate section
|
|
174
|
+
- If Page 2 + Page 3 content combined is short enough for one slide, merge them
|
|
175
|
+
|
|
176
|
+
#### Tool-selection Mode (2-3 pages)
|
|
177
|
+
|
|
178
|
+
**Page 1 - Match Results:**
|
|
179
|
+
- User's task description displayed as a quote/callout
|
|
180
|
+
- Matched skills ranked by relevance (count of trigger matches + description keyword overlap)
|
|
181
|
+
- Each match shows: name, relevance score, top matching triggers
|
|
182
|
+
|
|
183
|
+
**Page 2 - Side-by-side Comparison:**
|
|
184
|
+
- Top 2-3 matches in a comparison layout
|
|
185
|
+
- Columns: Feature | Skill A | Skill B | Skill C
|
|
186
|
+
- Rows: Description, Triggers, When to Use, Limitations, Tools
|
|
187
|
+
|
|
188
|
+
**Page 3 - Workflow Suggestion:**
|
|
189
|
+
- Flow diagram showing how skills can combine: Skill A -> Skill B -> Result
|
|
190
|
+
- Use CSS-only arrows between skill boxes
|
|
191
|
+
- Brief explanation of why this combination works
|
|
192
|
+
|
|
193
|
+
#### Full Manual Mode
|
|
194
|
+
|
|
195
|
+
**Page 1 - Cover:**
|
|
196
|
+
- Title: "Complete Skill Manual" / "完整技能手册"
|
|
197
|
+
- Total skill count + source breakdown
|
|
198
|
+
|
|
199
|
+
**Page 2 - Category Index:**
|
|
200
|
+
- Category names with skill count per category
|
|
201
|
+
- Clickable/visual index layout
|
|
202
|
+
|
|
203
|
+
**One page per skill (compact format):**
|
|
204
|
+
- Skill name as heading
|
|
205
|
+
- 2-line description
|
|
206
|
+
- Trigger words as badges
|
|
207
|
+
- When-to-use summary (1-2 lines)
|
|
208
|
+
- Keep each skill to one page maximum
|
|
209
|
+
|
|
210
|
+
**Last page - Quick Reference Table:**
|
|
211
|
+
- Same as Discovery Page 4 but covering all skills
|
|
212
|
+
|
|
213
|
+
**Overflow protection:** If total skills > 30, warn the user before generating: "This will produce N pages. Continue?" Then proceed only after confirmation.
|
|
214
|
+
|
|
215
|
+
### Content Mapping from JSON
|
|
216
|
+
|
|
217
|
+
Map scanner JSON fields to HTML content:
|
|
218
|
+
|
|
219
|
+
| JSON Field | HTML Section |
|
|
220
|
+
|-----------|-------------|
|
|
221
|
+
| `name` + `description` | Slide title, subtitle, card header |
|
|
222
|
+
| `howItWorks` | "How it works" detail box |
|
|
223
|
+
| `sections` | Numbered step flow |
|
|
224
|
+
| `whenToUse` + `triggers` | "When to use" tags + trigger keyword list |
|
|
225
|
+
| `limitations` | "Limitations" caution area |
|
|
226
|
+
| `allowedTools` | Tools list (collapsible, for advanced users) |
|
|
227
|
+
| `category` | Category badge, used for grouping and coloring |
|
|
228
|
+
| `source` | Source badge showing origin |
|
|
229
|
+
|
|
230
|
+
### Language Handling
|
|
231
|
+
|
|
232
|
+
The CLI uses `--lang zh` for Chinese labels as a built-in default. For any other language, the agent-side translation step (workflow step 6) handles ALL UI labels and content translation. The agent translates everything — both `data-i18n` marked content and any other visible text (headings, kicker, stats labels, etc.) — to the detected target language.
|
|
233
|
+
|
|
234
|
+
The CLI's built-in Chinese label map is used as a starting point when `--lang zh` is passed. For all other languages, the CLI generates English labels and the agent translates them.
|
|
235
|
+
|
|
236
|
+
| English Label | Chinese Label (built-in) |
|
|
237
|
+
|--------------|---------------|
|
|
238
|
+
| Your Agent Skills | 你的 Agent Skills 技能库 |
|
|
239
|
+
| Your Claude Code Skills | 你的 Claude Code 技能库 |
|
|
240
|
+
| Your Codex Skills | 你的 Codex 技能库 |
|
|
241
|
+
| Category Map | 分类概览 |
|
|
242
|
+
| Highlights | 精选推荐 |
|
|
243
|
+
| Quick Reference | 快速参考 |
|
|
244
|
+
| How It Works | 运作原理 |
|
|
245
|
+
| When to Use | 何时使用 |
|
|
246
|
+
| Limitations | 使用限制 |
|
|
247
|
+
| Triggers | 触发词 |
|
|
248
|
+
| Complete Skill Manual | 完整技能手册 |
|
|
249
|
+
| Match Results | 匹配结果 |
|
|
250
|
+
| Comparison | 对比分析 |
|
|
251
|
+
| Workflow Suggestion | 工作流建议 |
|
|
252
|
+
| Use when... | 适用场景... |
|
|
253
|
+
| Caution | 注意 |
|
|
254
|
+
| Tools | 工具列表 |
|
|
255
|
+
| Source | 来源 |
|
|
256
|
+
| Category | 分类 |
|
|
257
|
+
|
|
258
|
+
For all other languages (Japanese, Korean, French, German, etc.), the agent translates these labels as part of step 6.
|
|
259
|
+
|
|
260
|
+
## 5. Anti-Patterns
|
|
261
|
+
|
|
262
|
+
- **Never fabricate skill descriptions.** Only use data returned by the scanner. If the scanner returns empty or fails, show an error slide instead of guessing.
|
|
263
|
+
- **Never skip running the scanner.** The scanner is the sole source of truth for installed skills.
|
|
264
|
+
- **Never generate more than 30 pages without asking.** Prompt the user first.
|
|
265
|
+
- **Never include skills without a name.** Skip malformed entries and log a warning to console.
|
|
266
|
+
- **Never hard-code skill lists.** Always derive from scanner output at generation time.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Skill Guide"
|
|
3
|
+
short_description: "Visual map of installed Agent Skills"
|
|
4
|
+
brand_color: "#818CF8"
|
|
5
|
+
default_prompt: "Use $skill-guide to show my installed Agent Skills and recommend which ones fit my current work."
|
|
6
|
+
|
|
7
|
+
policy:
|
|
8
|
+
allow_implicit_invocation: true
|
package/bin/skill-guide
ADDED
|
Binary file
|
package/demo-cover.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/demo.gif
ADDED
|
Binary file
|