运维同步
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- Docker
- 底层运行要求
- Node.js · Python · Docker
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: sync-context
description: | Use when this capability is needed. Analyzes codebase and intelligently updates .github/copilo…
category: AI 智能
runtime: Node.js / Python / Docker
---
# sync-context 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Usage / What It Does / Analysis Process”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Usage / What It Does / Analysis Process”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、读取环境变量、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/sync-context`、`/build-feature`、`/memory`、`/help` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令、读取环境变量。
先用一个小任务确认它会围绕“Usage / What It Does / Analysis Process”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: sync-context
description: | Use when this capability is needed. Analyzes codebase and intelligently updates .github/copilo…
category: AI 智能
source: tomevault-io/skills-registry
---
# sync-context
## 什么时候使用
- 把「同步」相关任务沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Usage / What It Does / Analysis Process」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "sync-context" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Usage / What It Does / Analysis Process
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Node.js / Python / Docker | 读取文件、写入/修改文件、执行终端命令、读取环境变量 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Sync Context Command
Analyzes codebase and intelligently updates .github/copilot-instructions.md with current project context.
Usage
/sync-context # Full analysis and update
/sync-context --section agents # Update specific section
/sync-context --dry-run # Preview changes without saving
What It Does
- Analyzes current codebase structure
- Extracts patterns, conventions, and architecture
- Merges with existing copilot-instructions.md content
- Preserves manual customizations
- Updates sections that need refresh
Analysis Process
Step 1: Scan Codebase Structure
# Discover project structure
Glob("**/*.py") # Python files
Glob("**/*.ts") # TypeScript files
Glob("**/package.json") # Node projects
Glob("**/pyproject.toml") # Python projects
Glob("**/Dockerfile") # Container configs
Glob("**/*.tf") # Terraform
Step 2: Extract Patterns
# Code patterns
Grep("@dataclass") # Dataclass usage
Grep("class.*Parser") # Parser patterns
Grep("def test_") # Test patterns
Grep("async def") # Async patterns
# Architecture patterns
Grep("from src") # Import structure
Grep("@router") # API patterns
Grep("@lambda_handler") # Lambda patterns
Step 3: Analyze Agents
# List available agents
Glob(".github/agents/*.agent.md")
# Categorize by name prefix
- workflow-* → SDD pipeline agents (brainstorm, define, design, build, ship, iterate)
- architect-* → System design (schema, pipeline, lakehouse, genai, the-planner)
- cloud-* → AWS, GCP, CI/CD, deployment agents
- fabric-* → Microsoft Fabric specialists
- python-* → Code review, clean, document, prompt engineering
- test-* → Testing, data quality, data contracts
- de-* → Data engineering: Spark, dbt, Airflow, Lakeflow, streaming, SQL
- dev-* → Codebase explorer, meeting analyst, prompt crafter
Step 4: Merge Updates
# Sections to update
- Project Structure (from scan)
- Coding Standards (from patterns)
- Agent Usage (from agent analysis)
- Commands (from commands/)
- Environment (from config files)
# Sections to preserve
- Project Context (manual)
- Core Mission (manual)
- Important Dates (manual)
- Getting Help (manual)
copilot-instructions.md Template
Generated .github/copilot-instructions.md follows this structure:
# {Project Name}
## Project Context
{Manual: What this project does and why}
---
## Architecture Overview
{Auto-generated from codebase scan}
```text
{Data flow diagram}
| Stage | Technology | Purpose |
|---|---|---|
| {stage} | {tech} | {purpose} |
Project Structure
{Auto-generated from Glob scans}
{project}/
├── src/
│ ├── {folders discovered}
├── tests/
├── .github/
│ ├── agents/
│ ├── kb/
│ ├── sdd/
│ ├── skills/
│ └── storage/
Agent Usage Guidelines
{Auto-generated from agents/ folder}
Available Agents by Category
| Category | Agents | Use When |
|---|---|---|
| Workflow | brainstorm-agent, define-agent, ... | Building features with SDD |
| Code Quality | python-code-reviewer, test-generator, ... | Improving code |
| {category} | {agents} | {trigger} |
Coding Standards
{Auto-generated from detected patterns}
Language: {Python/TypeScript/etc}
- Version: {detected from config}
- Style: {detected patterns}
- Testing: {detected framework}
Detected Patterns
| Pattern | Usage | Example File |
|---|---|---|
| {pattern} | {where used} | {file path} |
Commands
{Auto-generated from commands/ folder}
| Command | Purpose |
|---|---|
| /build-feature | Full SDD pipeline |
| /memory | Save session insights |
| {command} | {purpose} |
Environment Variables
{Auto-generated from .env.example, config files}
| Variable | Purpose |
|---|---|
| {var} | {purpose} |
MCP Tools Available
{Auto-generated from settings}
| MCP Server | Purpose |
|---|---|
| context7-mcp | Library documentation |
| exa | Code context search |
| {mcp} | {purpose} |
Important Dates
{Manual: Project-specific dates}
Getting Help
{Auto-generated from structure}
- Documentation: Start with relevant docs
- Agents: Review .github/agents/
- Commands: Use /help for available commands
---
## Section Update Rules
| Section | Source | Update Mode |
| ------- | ------ | ----------- |
| Project Context | Manual | Preserve |
| Architecture | Codebase scan | Replace |
| Project Structure | Glob patterns | Replace |
| Agent Usage | agents/ folder | Replace |
| Coding Standards | Pattern detection | Merge |
| Commands | commands/ folder | Replace |
| Environment | Config files | Merge |
| MCP Tools | settings.json | Replace |
| Important Dates | Manual | Preserve |
| Getting Help | Structure | Replace |
**Replace**: Fully regenerate from source
**Merge**: Add new, preserve custom
**Preserve**: Never auto-modify
---
## Execution Flow
```text
1. Read existing .github/copilot-instructions.md
│
▼
2. Parse into sections
│
▼
3. Analyze codebase (parallel)
├── Glob for structure
├── Grep for patterns
├── Read config files
└── List agents/commands
│
▼
4. Generate new sections
│
▼
5. Apply update rules
├── Replace auto sections
├── Merge semi-auto sections
└── Preserve manual sections
│
▼
6. Validate (dry-run or save)
│
▼
7. Write updated .github/copilot-instructions.md
Example Output
UPDATE .github/copilot-instructions.md
━━━━━━━━━━━━━━━━
Analyzing codebase...
✓ Found 47 Python files
✓ Found 12 test files
✓ Found 28 agents
✓ Found 8 commands
Detected patterns:
✓ Dataclass pattern (15 usages)
✓ Parser pattern (4 files)
✓ Generator pattern (8 usages)
Section updates:
• Architecture: UPDATED (new components detected)
• Project Structure: UPDATED (3 new folders)
• Agent Usage: UPDATED (2 new agents)
• Coding Standards: MERGED (1 new pattern)
• Commands: UPDATED (1 new command)
• Project Context: PRESERVED (manual content)
━━━━━━━━━━━━━━━━
.github/copilot-instructions.md updated successfully
Flags
| Flag | Description |
|---|---|
--dry-run |
Preview changes without saving |
--section {name} |
Update only specific section |
--force |
Replace all sections (ignores preserve rules) |
--verbose |
Show detailed analysis |
Best Practices
When to Run
- After adding new agents or commands
- After significant architecture changes
- After adding new file types
- When onboarding new team members
What to Customize
After running, manually update:
- Project Context - Add business context
- Important Dates - Add milestone dates
- Architecture - Add business-specific details
- Coding Standards - Add team conventions
Version Control
# Review changes before committing
git diff .github/copilot-instructions.md
# Commit with context
git add .github/copilot-instructions.md
git commit -m "chore: update copilot-instructions.md with latest project structure"
Source: Arthur1511/agentspec-copilot — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核