一键导入
repomix-context-skill
Use when an agent needs source code from the local repomix index under .terrain/agent/repomix.md (not committed; regenerate via Terrain scan).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when an agent needs source code from the local repomix index under .terrain/agent/repomix.md (not committed; regenerate via Terrain scan).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when a coding agent needs symbol relationships, callers, callees, or change impact. Guides CodeGraph CLI usage (not MCP).
Use when a coding agent needs project knowledge from Terrain .terrain/ assets. Guides layered reading of context, private knowledge, and repomix index.
Use when running shell commands that produce verbose output (git, test, build, lint, package managers, docker). Prefix with rtk to save 60-90% tokens. Terrain projects use explicit rtk prefix (no global hook).
| name | repomix-context-skill |
| description | Use when an agent needs source code from the local repomix index under .terrain/agent/repomix.md (not committed; regenerate via Terrain scan). |
| version | 1.3.0 |
Terrain stores a local repomix index at .terrain/agent/repomix.md (gitignored, fast to regenerate).
Read architecture first via terrain-knowledge-skill → .terrain/agent/context.md.
context.md.terrain/agent/meta.json (total_tokens, synced_at, top_files_by_tokens)# <rtk> = ~/.terrain/bin/rtk or bunx @terrain-ai/rtk (see rtk-skill)
<rtk> grep "struct ProjectOverview" .terrain/agent/repomix.md
<rtk> grep "### src/lib/api.ts" .terrain/agent/repomix.md
Or agent Grep limited to that path with tight patterns.### path/to/file sections only:
<rtk> read .terrain/agent/repomix.md -l aggressive
Then read the specific ### file block (line range), ≤150 lines per read.meta.json.synced_at is stale, ask user to run Terrain 重建源码索引 / scanSections look like:
### src/lib/foo.ts
\`\`\`typescript
... file content ...
\`\`\`
Grep for ### relative/path to jump to a file.
| File | Purpose |
|---|---|
.terrain/agent/repomix.md | Full indexed snapshot (local only) |
.terrain/agent/meta.json | Pack metrics |
.terrain/agent/context.md | Architecture (read first) |
repomix.md exists in gitcat / Read the entire repomix.md (can be 100k+ tokens)context.md and grep source for architecture questionsIf repomix.md is missing:
# bash / Git Bash — <terrain> = ~/.terrain/bin/terrain or bunx @terrain-ai/cli
if [ -x ~/.terrain/bin/terrain ] || [ -x ~/.terrain/bin/terrain.exe ]; then
~/.terrain/bin/terrain assets pack-agent .
else
bunx @terrain-ai/cli assets pack-agent .
fi
# or from repo root in Terrain UI: 重建源码索引
If neither ~/.terrain/bin/terrain nor bunx @terrain-ai/cli works, ask the user to install Terrain or run 重建源码索引 from the desktop app.
<rtk> prefix for grep/read on the pack file