用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill sync-context命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | sync-context |
| description | | Use when this capability is needed. |
Analyzes codebase and intelligently updates .github/copilot-instructions.md with current project context.
/sync-context # Full analysis and update
/sync-context --section agents # Update specific section
/sync-context --dry-run # Preview changes without saving
# 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
# 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
# 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
# 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)
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} |
{Auto-generated from Glob scans}
{project}/
├── src/
│ ├── {folders discovered}
├── tests/
├── .github/
│ ├── agents/
│ ├── kb/
│ ├── sdd/
│ ├── skills/
│ └── storage/
{Auto-generated from agents/ folder}
| 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} |
{Auto-generated from detected patterns}
| Pattern | Usage | Example File |
|---|---|---|
| {pattern} | {where used} | {file path} |
{Auto-generated from commands/ folder}
| Command | Purpose |
|---|---|
| /build-feature | Full SDD pipeline |
| /memory | Save session insights |
| {command} | {purpose} |
{Auto-generated from .env.example, config files}
| Variable | Purpose |
|---|---|
| {var} | {purpose} |
{Auto-generated from settings}
| MCP Server | Purpose |
|---|---|
| context7-mcp | Library documentation |
| exa | Code context search |
| {mcp} | {purpose} |
{Manual: Project-specific dates}
{Auto-generated from structure}
---
## 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
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
| 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 |
After running, manually update:
# 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.