当用户需将代码提供给外部 AI(重构/分析/修复)时激活。自动收集代码、记录意图、生成上下文文档。支持增量合并。
Scanned 2/12/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: code-feeder
description: 当用户需将代码提供给外部 AI(重构/分析/修复)时激活。自动收集代码、记录意图、生成上下文文档。支持增量合并。
---
# Code Feeder Skill
**目标**:生成包含**用户意图**和**关键代码**的高质量 Markdown 文档。
**脚本路径**:`~/.claude/skills/code-feeder/scripts/` (若不存在则搜索 `code_collector.py`)
## 🧠 核心法则
1. **意图第一**:必须询问收集目的(如"重构登录"),并写入文档。
2. **精准采集**:根据意图挑选代码。小文件批量导入,大文件提取片段。
3. **闭环补全**:工具反馈"跳过"的文件,**必须**用 `--append` 模式提取关键片段补全。
## ⚙️ 模式决策
| 模式 | 标志 | 适用场景 | 关键参数 |
| :--- | :--- | :--- | :--- |
| **Batch** | `--mode batch` | 小文件/配置文件 | `--files f1 f2` |
| **Snippets** | `--mode snippets` | 大文件(>500KB)/特定函数 | `--target f1 --ranges [...]` |
| **Append** | `--append` | 补全漏掉的文件/增量更新 | (配合 Snippets 使用) |
## 📋 执行流程
### 1. 确认意图
若未提供,询问:"收集代码的具体目的是什么?关注哪些模块?"
### 2. 检测与规划
```bash
python {script_dir}/detect_project.py "{project_path}"
```
*根据输出忽略无关目录,聚焦核心文件。*
### 3. 执行收集
**A. 批量模式 (首选)**
```bash
python {script_dir}/code_collector.py "{project_path}" \
--mode batch --files src/main.py config.json ... \
--intent "{user_intent}" --output "ctx.md"
```
**B. 片段模式 (针对大文件/特定逻辑)**
*支持类型: `function`, `class`, `method`, `lines`*
```bash
python {script_dir}/code_collector.py "{project_path}" \
--mode snippets --target "src/heavy.js" \
--ranges '[{{"type":"function","name":"login"}}, {{"type":"lines","start":1,"end":50}}]' \
--intent "{user_intent}" --output "ctx.md"
```
### 4. 补全 (Critical)
检查输出中的 **"⚠️ 跳过的文件"**。若文件重要,**立即**用追加模式提取:
```bash
python {script_dir}/code_collector.py "{project_path}" \
--mode snippets --target "skipped_file.py" \
--ranges '[{{"type":"function","name":"core_logic"}}]' \
--output "ctx.md" --append
```
### 5. 审核与手动修补
**Read** 生成的文档,检查完整性与正确性:
- **关键缺失**:若工具无法提取(如复杂正则失效)但代码至关重要,**必须手动 Read 文件内容**,并按文件中同样的格式手动追加到对应区域的位置,并更新相关目录树和统计信息。
- **结构检查**:确认目录树和统计信息正常。
### 6. 交付
告知用户文档路径,并确认已包含意图和核心逻辑。
## ⚠️ 异常指南
- **二进制文件**:仅在文档中注明存在,不可读取。
- **提取失败**:若函数提取失败,降级使用 `lines` 行号范围提取。No comments yet. Be the first to comment!
Playbook for creating and editing uCoz landing pages via MCP tools (`templates_tool`, `ftp_tool`, `modules_tool`). Use for tasks such as: "build a landing page", "update the homepage as a landing page", "create a promo page on the homepage", "add a lead form / menu / SEO to the homepage". Homepage: `page_list`, `page_get`; first publish — `page_update` with full `page_tmpl`; HTML edits after generation — `patch_template` (module_id=2, template_id=1), not `update_template`. Activate the mail f...
Interact with the Paperclip control plane API to manage tasks, coordinate with other agents, and follow company governance. Use when you need to check assignments, update task status, delegate work, post comments, set up or manage routines (recurring scheduled tasks), or call any Paperclip API endpoint. Do NOT use for the actual domain work itself (writing code, research, etc.) — only for Paperclip coordination.
Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.
Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.
Run a single Terminal-Bench problem through Paperclip in a bounded, human-in-the-loop improvement cycle until the smoke passes, the board rejects the next fix, the iteration budget is exhausted, or a real blocker is named. Each iteration runs a bounded smoke against an isolated Paperclip App worktree, captures artifacts, diagnoses the exact stop point with `/diagnose-why-work-stopped`, requests board confirmation before any product fix, then reruns against the same worktree. Use whenever an i...