content/skills/developer-tools-integrations/skill-map/SKILL.md
Skill map viewer for locally installed skills. Detects the current CLI, resolves that platform's installed-skills root, and renders a stable ASCII overview of installed names, versions, triggerability, and grouping. Use when the user asks what skills are installed on this machine, wants a local skill map, or says '技能地图', '本机 skills', '我装了哪些 skill', 'local skill list', or 'installed skills'. Also use this skill to surface overlap and consolidation suggestions across installed skills — trigger on '哪些 skill 重复', '相似 skill', 'skill 整理', 'skill 去重', '技能瘦身', 'consolidate skills', 'duplicate skills', 'deduplicate skills', or 'similar installed skills'. Do not use it for installable catalogs, registries, or recommendations.
npx skillsauth add bahayonghang/my-claude-code-settings skill-mapInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
扫描当前机器上的已安装技能目录,生成一目了然的 ASCII 地图。
只面向安装后的技能目录:
~/.agents/skills)~/.codex/skills)不进入默认地图content/skills/)content/community-skills-registry/)当作 installable skill运行 Node CLI:
node "$SKILL_DIR/scripts/skill-map.mjs"
调试或测试时可用结构化 JSON:
node "$SKILL_DIR/scripts/skill-map.mjs" --json
node "$SKILL_DIR/scripts/skill-map.mjs" --platform codex
node "$SKILL_DIR/scripts/skill-map.mjs" --json --root ~/.claude/skills --root ~/.agents/skills
JSON 数据字段:
instance_idnameversioninvocabledescsource_categorygroup_keyinstall_root其中:
instance_id 是稳定实例标识,用来区分跨根目录的同名 skillsource_category 直接来自 top-level frontmatter category;缺失时输出空字符串group_key 仅基于 name + desc 的 token-aware 规则推断,用于地图分组desc 兼容单行与多行 frontmatter descriptionversion 时输出 -user_invocable 明确为真时输出 true,明确为假时输出 false,缺失时输出 nullinstall_root 用于说明该 skill 来自哪个本地安装根--platform <id> 用于显式覆盖当前 CLI 检测地图分组固定使用 group_key,不直接使用 frontmatter category。
目的:
category 表示技能来源元数据,如仓库目录分类group_key 表示地图里的展示语义分组developer-tools-integrations 这类来源分类误当成展示分类分组顺序固定如下:
◆ 认知与分析▲ 文档与表达■ 开发与实现● 工作流与集成★ 系统与维护· 未分类| 分组 | 图标 | 建议分组键 | 命中关键词示例 | 说明 |
|------|------|------------|----------------|------|
| 认知与分析 | ◆ | cognitive-analysis | analysis, research, reading, paper, study, learn, summary, interpret | 面向理解、分析、学习、信息提炼 |
| 文档与表达 | ▲ | document-expression | write, document, card, slide, screenshot, theme, format, presentation | 面向文档生成、卡片化、展示与内容包装 |
| 开发与实现 | ■ | development-implementation | code, build, debug, test, refactor, lint, api, script, git | 面向开发、调试、构建、工程执行 |
| 工作流与集成 | ● | workflow-integration | workflow, sync, web, browser, fetch, search, automation, integration | 面向联网、集成、自动化、协作流程 |
| 系统与维护 | ★ | system-maintenance | setup, install, installed, config, memory, inventory, map, deduplicate, cleanup | 面向安装配置、技能管理、维护与元能力 |
| 未分类 | · | uncategorized | 无命中 | frontmatter 与规则都无法判定时的兜底分组 |
约束:
未分类source_category 需要保留原值,但不得覆盖 group_key用 ASCII 方框图呈现,保持稳定、可重复的布局。
╔══════════════════════════════════════════════════════════╗
║ SKILL MAP · {N} skills installed ║
╠══════════════════════════════════════════════════════════╣
║ ║
║ ◆ 认知与分析 ║
║ +----------------------+-----------------------------+ ║
║ | paper/ v4.3.0 | 论文阅读与分析 | ║
║ | plain v4.0 | 好问题与类比解释 | ║
║ +----------------------+-----------------------------+ ║
║ ║
║ · 未分类 ║
║ +----------------------+-----------------------------+ ║
║ | mystery - | 无法根据元数据判断用途 | ║
║ +----------------------+-----------------------------+ ║
╠══════════════════════════════════════════════════════════╣
║ Total: 12 Invocable: 7 Groups: 5 ║
╚══════════════════════════════════════════════════════════╝
name → install_root → instance_id 稳定排序invocable = true 时在技能名后追加 /-desc 为空时显示 无描述No installed skills found under configured skill rootsTotal、Invocable、Unknown、Groups直接输出脚本生成的 ASCII 地图:
当用户想要清理重复 / 整理技能组合时启用。脚本只生成建议,不删除、不移动、不归档任何文件。
node "$SKILL_DIR/scripts/skill-map.mjs" --analyze
node "$SKILL_DIR/scripts/skill-map.mjs" --analyze --json
node "$SKILL_DIR/scripts/skill-map.mjs" --analyze --min-score 0.4
数据流:
--json 模式一样扫描本地 skill 根目录name + desc (+ tags) 做 CJK-aware 分词、去停用词|A ∩ B| / |A ∪ B|--min-score(默认 0.30)之下的 pair 被过滤likely-duplicate(≥ 0.75)— 疑似重复consider-merge(≥ 0.50)— 建议合并review(≥ 0.30)— 人工复查JSON 输出契约:
| 字段 | 类型 | 说明 |
|------|------|------|
| generated_at | ISO-8601 UTC | 生成时间 |
| threshold | number | 实际使用的阈值 |
| summary.total_skills | number | 扫描到的 skill 总数 |
| summary.clusters | number | 输出簇数量 |
| summary.skills_in_clusters | number | 进入簇的 skill 数 |
| summary.likely_duplicates / consider_merge / review | number | 各分档簇数 |
| clusters[].id | string | 稳定的簇 ID(例如 c1) |
| clusters[].action | enum | likely-duplicate / consider-merge / review |
| clusters[].max_score | number | 簇内最高 Jaccard 分数 |
| clusters[].members[] | object | instance_id / name / display_name / install_root / group_key |
| clusters[].shared_tokens | string[] | 最多 8 个共享 token,按频率排序 |
| clusters[].group_keys | string[] | 成员涉及的展示分组键(去重后) |
| clusters[].rationale | string | 同组 / 跨组 / 单 token 重合的解释语 |
| pairs[] | object[] | 全部通过阈值的 pair,包含左右实例 id / display name 及共享 token |
ASCII 报告输出契约:
╔╠╚ 边框风格likely-duplicate → consider-merge → review 顺序输出非空段No similar skills detected above threshold <n>Suggestions only — this tool never deletes, moves, or archives files.使用合约(交给 Claude 的部分):
满足以下条件才算完成:
scripts/skill-map.mjs --json 能输出合法 JSON 数组group_key、source_category、install_rootinstance_idgroup_key 只基于 name + desc 的 token-aware 规则推断,source_category 不覆盖它description 同时兼容单行与多行 frontmatter,且不会串入其它 frontmatter 字段version 缺失时为 -,user_invocable 缺失时为 nullscripts/skill-map.mjs --analyze --json 输出 generated_at / threshold / summary / clusters / pairs 字段--analyze 下的每个簇都必须包含 id / action / max_score / members / shared_tokens / group_keys / rationale--analyze 仍输出完整边框,并显示 No similar skills detected above threshold <n> 与不删除承诺development
Implement safe, behavior-preserving code refactors after inspecting the existing project. Use when the user asks to refactor code, split large files or modules, extract functions or methods, reduce duplicated logic, rename confusing classes/functions/variables, improve code comments, remove unused or dead code, or says 重构代码, 拆分模块, 提取方法, 减少重复代码, 优化命名, 优化注释, 删除未调用代码. For broad refactor requests, plan safe slices and wait for approval; for narrow scoped requests, directly implement the smallest verifiable slice.
development
Use only when the user explicitly asks for swarm, subagents, parallel agents, dynamic workflow, multi-agent orchestration, 多智能体编排, or when the task truly needs coordinated research plus implementation plus review plus verification packets. Do not use for ordinary code review, planning-only work, single-line bugfixes, routine audits, or migrations unless orchestration is requested or at least two independent workflow dimensions are present.
development
Run a code quality review focused on maintainability, structure, abstraction quality, file growth, branching complexity, boundary cleanliness, and refactoring opportunities. Use when the user asks for code quality review, code review, maintainability review, architecture quality review, PR code quality feedback, 代码质量审查, 代码质量 review, 可维护性审查, 架构质量审查, or review comments about code structure. Do not use for pure security review, formatting-only review, performance profiling, or implementation tasks unless the user also asks for a code quality review.
development
Plan-first brainstorming workflow that turns an idea into an approved Markdown implementation plan by default. Use when the user wants to brainstorm, design, scope, or plan a feature/spec before implementation. Spark explores project context, asks only blocking questions, writes the plan under the project root's .plannings/YYYY-MM-DD-feature-slug.md path, self-reviews it, and waits for user approval. Create an HTML or visual plan/spec only when the user explicitly asks for HTML, browser-viewable, or visual output; save the paired .html beside the Markdown plan.