详细分析 ▾
运行时依赖
安装命令
点击复制技能文档
GitHub Code 同步 技能
同步 code from GitHub repositories to Miaoda 平台 projects.
This 技能 fetches code from GitHub (using provided 凭证s and commit versions), then 生成s structured JSON instructions that can be sent to miaoda-应用-构建器 技能's chat API for accurate code 更新s.
🔄 Two-技能 Collaboration Architecture Overview
This 技能 (miaoda-应用-chat-同步) works to获取her with miaoda-应用-构建器 in a two-step 工作流:
┌─────────────────────┐ ┌──────────────────────┐ │ miaoda-应用- │ JSON │ miaoda-应用- │ │ chat-同步 │ ──────> │ 构建器 │ │ │ Code │ │ │ 1. Fetch from │ Data │ 2. 更新 Code │ │ GitHub │ │ via Chat API │ │ 3. 生成 JSON │ │ 3. 创建/Overwrite │ │ Instructions │ │ Files │ └─────────────────────┘ └──────────────────────┘
Why Two 技能s? Aspect Using Only miaoda-应用-构建器 Two-技能 Collaboration Accuracy 70-80% (natural language) 90-95% (structured JSON) File Completeness May miss files Guaranteed by JSON structure Control Hard to 验证 Easy to 验证 before 同步 Batch Processing Difficult Built-in support Best For Small edits, UI tweaks Full 同步, large 更新s Collaboration 工作流 Standard Flow User 请求 ↓ "同步 code from GitHub" / "更新 with latest code" ↓ Step 1: miaoda-应用-chat-同步 ├─ Clone 仓库 from GitHub ├─ Read all code files ├─ 生成 structured JSON instructions └─ 输出: JSON data with file contents ↓ Step 2: miaoda-应用-构建器 ├─ 接收 JSON instructions via chat ├─ 解析 file 列出 and contents ├─ 创建/overwrite each file └─ 输出: 更新d file 列出 for verification ↓ Complete! Code 同步ed to Miaoda 平台
Trigger Scenarios
Scenario 1: Direct 同步 Command
User says: "用秒哒更新代码" or "同步 code from GitHub" ↓ miaoda-应用-chat-同步 is triggered ↓ 生成s JSON structured template ↓ Pass JSON to miaoda-应用-构建器 for execution
Scenario 2: Large Codebase - Batch Processing
User says: "同步整个项目代码" or "更新 entire project" ↓ miaoda-应用-chat-同步 检测s large codebase (>50 files) ↓ Automatically splits into batches: ├─ Batch 1: Configuration files (.json, .yaml, .toml) ├─ Batch 2: Frontend code (src/.vue, src/.js) └─ Batch 3: Backend code (API/.py, 模型s/*.py) ↓ Each batch sent to miaoda-应用-构建器 sequentially
Scenario 3: Incremental 更新
User says: "只更新改动的文件" or "同步 only changed files" ↓ miaoda-应用-chat-同步 uses diff command ├─ Compare commits to find changed files └─ 生成 JSON for only modified files ↓ 发送 to miaoda-应用-构建器
Structured JSON Template 格式化 Standard Template
When miaoda-应用-chat-同步 processes code from GitHub, it 生成s the following JSON structure:
{ "action": "更新_ALL_FILES", "description": "Please 更新 all files in the project according to the following JSON data", "source": { "仓库": "https://github.com/username/repo", "branch": "mAIn", "commit": "abc123def456" }, "rules": [ "1. You must 更新 every file in the files array", "2. File content must match the content field exactly - do not modify or alter any code", "3. 创建 file if it doesn't exist, completely overwrite if it exists", "4. Do not skip any file from the 列出", "5. Preserve the exact file structure and paths", "6. After updating, 输出 a complete 列出 of all 更新d files for verification" ], "files": [ { "path": "package.json", "action": "创建_OR_OVERWRITE", "content": "{\n \"name\": \"my-应用\",\n ...\n}" }, { "path": "src/应用.vue", "action": "创建_OR_OVERWRITE", "content": "" } ] }
Template 组件s Field Type Description action String Always "更新_ALL_FILES" description String Human-readable instruction source Object GitHub source in格式化ion for 追踪ability source.仓库 String 仓库 URL source.branch String Git branch name source.commit String Commit 哈希 (8 chars) rules Array Execution rules that miaoda-应用-构建器 must follow files Array 列出 of files to 更新 files[].path String Relative file path files[].action String Always "创建_OR_OVERWRITE" files[].content String Complete file content Batch Template Example
For large projects, JSON is split into multiple batches:
Batch 1: Configuration
{ "action": "更新_ALL_FILES", "batch": "1/3", "description": "Batch 1: Configuration files", "files": [ {"path": "package.json", "action": "创建_OR_OVERWRITE", "content": "..."}, {"path": "tsconfig.json", "action": "创建_OR_OVERWRITE", "content": "..."} ] }
Batch 2: Frontend
{ "action": "更新_ALL_FILES", "batch": "2/3", "description": "Batch 2: Frontend source code", "files": [ {"path": "src/应用.vue", "action": "创建_OR