cartography by alvinunreal/oh-my-opencode-slim
npx skills add https://github.com/alvinunreal/oh-my-opencode-slim --skill cartography你通过创建层次化的代码地图来帮助用户理解和映射代码仓库。
首先,检查仓库根目录下是否存在 .slim/cartography.json。
如果它存在:跳转到步骤 3(检测变更)- 无需重新初始化。
如果它不存在:继续步骤 2(初始化)。
src/**/*.ts、package.json 等。**/*.test.ts、、、广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
**/*.spec.tstests/**__tests__/**docs/**、*.md(如果需要,根目录的 README.md 除外)、LICENSEnode_modules/**、dist/**、build/**、*.min.js.gitignorepython3 ~/.config/opencode/skills/cartography/scripts/cartographer.py init \
--root ./ \
--include "src/**/*.ts" \
--exclude "**/*.test.ts" --exclude "dist/**" --exclude "node_modules/**"
这将创建:
.slim/cartography.json - 用于变更检测的文件和文件夹哈希值codemap.md 文件codemap.md 文件。python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py changes \
--root ./
codemap.md。python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py update \
--root ./
一旦所有特定目录都被映射,协调器必须创建或更新根目录的 codemap.md。此文件作为任何代理或人员进入仓库的主入口点。
package.json、index.ts、plugin.json)以及项目的整体目的。codemap.md 的文件夹,提取其职责摘要,并将其包含在根地图的表格或列表中。在此工作流程中,探索者被授予对 codemap.md 文件的写入权限。使用精确的技术术语来记录实现:
示例代码地图:
# src/agents/
## 职责
定义代理个性并管理其配置生命周期。
## 设计
每个代理都是一个提示词 + 权限集。配置系统使用:
- 默认提示词(orchestrator.ts, explorer.ts 等)
- 来自 ~/.config/opencode/oh-my-opencode-slim.json 的用户覆盖
- 用于技能/MCP 访问控制的权限通配符
## 流程
1. 插件加载 → 调用 getAgentConfigs()
2. 读取用户配置预设
3. 将默认值与覆盖值合并
4. 应用权限规则(通配符扩展)
5. 将代理配置返回给 OpenCode
## 集成
- 使用者:主插件(src/index.ts)
- 依赖项:配置加载器、技能注册表
示例根代码地图(总览):
# 仓库总览:oh-my-opencode-slim
## 项目职责
一个用于 OpenCode 的高性能、低延迟代理编排插件,专注于专门的子代理委派和后台任务管理。
## 系统入口点
- `src/index.ts`:插件初始化和 OpenCode 集成。
- `package.json`:依赖项清单和构建脚本。
- `oh-my-opencode-slim.json`:用户配置模式。
## 目录地图(聚合)
| 目录 | 职责摘要 | 详细地图 |
|-----------|------------------------|--------------|
| `src/agents/` | 定义代理个性(协调器、探索者)并管理模型路由。 | [查看地图](src/agents/codemap.md) |
| `src/features/` | tmux 集成、后台任务生成和会话状态的核心逻辑。 | [查看地图](src/features/codemap.md) |
| `src/config/` | 实现配置加载管道和环境变量注入。 | [查看地图](src/config/codemap.md) |
每周安装数
174
仓库
GitHub 星标数
2.0K
首次出现
2026年1月27日
安全审计
安装于
opencode171
gemini-cli44
github-copilot44
codex43
kimi-cli38
amp38
You help users understand and map repositories by creating hierarchical codemaps.
First, check if.slim/cartography.json exists in the repo root.
If it exists : Skip to Step 3 (Detect Changes) - no need to re-initialize.
If it doesn't exist : Continue to Step 2 (Initialize).
src/**/*.ts, package.json, etc.**/*.test.ts, **/*.spec.ts, tests/**, __tests__/**docs/**, *.md (except root README.md if needed), LICENSEnode_modules/**, dist/**, build/**, .gitignore automaticallypython3 ~/.config/opencode/skills/cartography/scripts/cartographer.py init \
--root ./ \
--include "src/**/*.ts" \
--exclude "**/*.test.ts" --exclude "dist/**" --exclude "node_modules/**"
This creates:
.slim/cartography.json - File and folder hashes for change detectioncodemap.md files in all relevant subdirectoriescodemap.md file.python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py changes \
--root ./
2. Review the output - It shows:
* Added files
* Removed files
* Modified files
* Affected folders
3. Only update affected codemaps - Spawn one explorer per affected folder to update its codemap.md.
python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py update \
--root ./
Once all specific directories are mapped, the Orchestrator must create or update the root codemap.md. This file serves as the Master Entry Point for any agent or human entering the repository.
package.json, index.ts, plugin.json) and the project's overall purpose.codemap.md, extract its Responsibility summary and include it in a table or list in the root map.Explorers are granted write permissions for codemap.md files during this workflow. Use precise technical terminology to document the implementation:
Example codemap:
# src/agents/
## Responsibility
Defines agent personalities and manages their configuration lifecycle.
## Design
Each agent is a prompt + permission set. Config system uses:
- Default prompts (orchestrator.ts, explorer.ts, etc.)
- User overrides from ~/.config/opencode/oh-my-opencode-slim.json
- Permission wildcards for skill/MCP access control
## Flow
1. Plugin loads → calls getAgentConfigs()
2. Reads user config preset
3. Merges defaults with overrides
4. Applies permission rules (wildcard expansion)
5. Returns agent configs to OpenCode
## Integration
- Consumed by: Main plugin (src/index.ts)
- Depends on: Config loader, skills registry
Example Root Codemap (Atlas) :
# Repository Atlas: oh-my-opencode-slim
## Project Responsibility
A high-performance, low-latency agent orchestration plugin for OpenCode, focusing on specialized sub-agent delegation and background task management.
## System Entry Points
- `src/index.ts`: Plugin initialization and OpenCode integration.
- `package.json`: Dependency manifest and build scripts.
- `oh-my-opencode-slim.json`: User configuration schema.
## Directory Map (Aggregated)
| Directory | Responsibility Summary | Detailed Map |
|-----------|------------------------|--------------|
| `src/agents/` | Defines agent personalities (Orchestrator, Explorer) and manages model routing. | [View Map](src/agents/codemap.md) |
| `src/features/` | Core logic for tmux integration, background task spawning, and session state. | [View Map](src/features/codemap.md) |
| `src/config/` | Implements the configuration loading pipeline and environment variable injection. | [View Map](src/config/codemap.md) |
Weekly Installs
174
Repository
GitHub Stars
2.0K
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode171
gemini-cli44
github-copilot44
codex43
kimi-cli38
amp38
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
140,500 周安装
*.min.js