File contents Workspace Indexer
自动维护 workspace 目录索引。
触发条件
用户说"更新 workspace 索引"
定期维护(建议在 HEARTBEAT.md 中配置每天检查一次)
工作流程
1. 搜索记忆
首先使用 memory_search 搜索每个目录的相关记忆,了解目录用途和历史。
2. 扫描目录
使用 exec 工具扫描 workspace 目录结构。
3. 智能递归
容器目录 (projects/、research/、skills/):进入查看子目录
项目根目录 (包含 .git、package.json、README 等标志文件):停止递归,直接索引
普通目录 :直接索引
4. 收集信息
对每个目录:
读取 README 或注释(如果有)
检查是否有运行中的服务或容器
不要深入分析项目内部文件
5. 生成索引
写入 WORKSPACE_INDEX.md,格式参考以下示例:
skills/my-custom-skill/
自定义技能,用于处理特定任务。包含 SKILL.md 和相关脚本。相关记忆:2026-01-15.md,搜索关键词:custom skill
projects/web-app/
Web 应用项目,使用 Node.js + React 构建。当前运行中,端口 3000。相关记忆:2026-02-01.md,搜索关键词:web app project
research/experiment-a/
实验性项目,用于测试新技术方案。包含 Docker 容器,容器 ID abc123,端口 8080。相关记忆:2026-02-10.md,搜索关键词:experiment a
old-project/
旧项目目录,已不再使用。包含 .git 仓库(50MB),总大小 200MB。状态:待清理
memory/
每日记忆目录,按日期存储原始对话日志(YYYY-MM-DD.md 格式)。MEMORY.md 是从这些日志中提炼的长期记忆
注意事项
只索引目录级别,不深入项目内部
描述要详细但精炼,包含:用途、运行状态、相关记忆文件、搜索关键词
标记废弃或待清理的项目
定期维护
建议在 HEARTBEAT.md 添加每天检查任务:
## Workspace 索引维护
每天检查 workspace 目录变化,如有新增或变更则更新索引
1 --- 2 name: workspace-indexer 3 description: 自动维护 workspace 目录索引。 4 --- 5
6 # Workspace Indexer
7
8 自动维护 workspace 目录索引。
9
10 ## 触发条件
11 - 用户说"更新 workspace 索引"
12 - 定期维护(建议在 HEARTBEAT.md 中配置每天检查一次)
13
14 ## 工作流程
15
16 ### 1. 搜索记忆
17 首先使用 `memory_search` 搜索每个目录的相关记忆,了解目录用途和历史。
18
19 ### 2. 扫描目录
20 使用 `exec` 工具扫描 workspace 目录结构。
21
22 ### 3. 智能递归
23 - **容器目录**(projects/、research/、skills/):进入查看子目录
24 - **项目根目录**(包含 .git、package.json、README 等标志文件):停止递归,直接索引
25 - **普通目录**:直接索引
26
27 ### 4. 收集信息
28 对每个目录:
29 - 读取 README 或注释(如果有)
30 - 检查是否有运行中的服务或容器
31 - 不要深入分析项目内部文件
32
33 ### 5. 生成索引
34 写入 `WORKSPACE_INDEX.md`,格式参考以下示例:
35
36 ---
37
38 - `skills/my-custom-skill/`
39 - 自定义技能,用于处理特定任务。包含 SKILL.md 和相关脚本。相关记忆:2026-01-15.md,搜索关键词:custom skill
40
41 ---
42
43 - `projects/web-app/`
44 - Web 应用项目,使用 Node.js + React 构建。当前运行中,端口 3000。相关记忆:2026-02-01.md,搜索关键词:web app project
45
46 ---
47
48 - `research/experiment-a/`
49 - 实验性项目,用于测试新技术方案。包含 Docker 容器,容器 ID abc123,端口 8080。相关记忆:2026-02-10.md,搜索关键词:experiment a
50
51 ---
52
53 - `old-project/`
54 - 旧项目目录,已不再使用。包含 .git 仓库(50MB),总大小 200MB。状态:待清理
55
56 ---
57
58 - `memory/`
59 - 每日记忆目录,按日期存储原始对话日志(YYYY-MM-DD.md 格式)。MEMORY.md 是从这些日志中提炼的长期记忆
60
61 ---
62
63 - `tmp/`
64 - 临时文件目录,存放测试脚本和临时数据
65
66 ---
67
68 ## 注意事项
69 - 只索引目录级别,不深入项目内部
70 - 描述要详细但精炼,包含:用途、运行状态、相关记忆文件、搜索关键词
71 - 标记废弃或待清理的项目
72
73 ## 定期维护
74 建议在 `HEARTBEAT.md` 添加每天检查任务:
75 ```
76 ## Workspace 索引维护
77 每天检查 workspace 目录变化,如有新增或变更则更新索引
78 ```
modbender/skill-library-mcp/tree/main/data/workspace-indexer commit f71d27ceea
Frequently asked questions How do I install the Workspace Indexer skill? Run npx skillmds add modbender/workspace-indexer in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Workspace Indexer skill do? 自动维护 workspace 目录索引。 It is listed under Coding & Dev Tools on SkillMD.
Is Workspace Indexer safe to use? This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Workspace Indexer? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Workspace Indexer free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Workspace Indexer? modbender (@modbender) published this skill. Their other Agent Skills are listed on their SkillMD profile.