基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/joshka0/foxctl --skill code-retrieval命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Protocol for participant agents in transport-first rooms: join, check membership, handle inbox/tasks, reply durably, and escalate.
Operate inside an existing foxctl room: orient from status or inbox, manage tasks correctly, escalate, and close with durable updates.
Run durable multi-agent rooms with transport-first delivery, participant state, room tasks, and optional tmux or zellij viewers.
| name | code-retrieval |
| description | Code retrieval funnel for intelligent code search, context extraction, and editing |
This skill describes the retrieval funnel for finding and editing code in foxctl. The funnel provides a structured approach to code discovery that balances breadth (semantic search) with precision (symbol-aware extraction).
Auto-activates when:
┌─────────────────────────────────────────────────────────────┐
│ RETRIEVAL FUNNEL │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. SEMANTIC FILE INDEX (optional, if available) │
│ └─ Broad file-level search by embedding similarity │
│ Input: natural language question │
│ Output: ranked list of candidate files │
│ │
│ 2. SYMBOL SEARCH (code.symbol_search) │
│ └─ Symbol-aware search using indexed AST data │
│ Input: question + optional symbol_hint │
│ Output: ranked symbols with file paths, kinds │
│ │
│ 3. SWE GREP (code.swe_grep) │
│ └─ Extract high-signal snippets from candidates │
│ Input: question + candidate_files from step 2 │
│ Output: relevant code snippets with line ranges │
│ │
│ 4. STRUCTURED EDIT │
│ ├─ edit.apply_patch: simple text replacement │
│ └─ edit.apply_structured_diff: multi-hunk diffs │
│ │
└─────────────────────────────────────────────────────────────┘
| Task | Tool | When to Use |
|---|---|---|
| Find relevant symbols | code.symbol_search | Starting point for any code task |
| Extract code context | code.swe_grep | After symbol search, before editing |
| Pattern matching | code.search | Known regex patterns, grep-style search |
| Simple edits | edit.apply_patch | Single-location text replacement |
| Complex refactors | edit.apply_structured_diff | Multi-hunk changes, structured diffs |
1. code.symbol_search(question="How does user authentication work?")
→ Returns: [{file: "auth/login.go", symbol_id: "Login", kind: "function"}]
2. code.swe_grep(question="authentication flow", candidate_files=[...])
→ Returns: [{file: "auth/login.go", start_line: 10, end_line: 45, preview: "..."}]
3. fs.read_file(path="auth/login.go")
→ Full file content for detailed analysis
4. edit.apply_patch(path="auth/login.go", old_text="...", new_text="...")
→ Apply the change