context-sync
3
总安装量
3
周安装量
#62553
全站排名
安装命令
npx skills add https://github.com/kaiboo404/agent-skills-with-project-template --skill context-sync
Agent 安装分布
gemini-cli
3
github-copilot
3
codex
3
kimi-cli
3
opencode
3
amp
3
Skill 文档
Context Sync
Keeps .context/ files in sync with the actual codebase. Prevents context drift â the #1 failure mode of spec-driven development.
When to Use This Skill
- After installing or removing a dependency
- After creating new files or directories
- After completing a feature spec
- When starting a new session (validation mode)
Sync Rules
Dependency Changes â stack.md
When a dependency is added, removed, or upgraded:
- Read
.context/stack.md - Check if the change is already reflected
- If not, propose an update with: package name, purpose, version, and constraints
Trigger signals:
npm install,pip install,dotnet add,go getcommands- Changes to
package.json,requirements.txt,*.csproj,go.mod
New Files/Directories â architecture.md
When new files or directories are created outside the existing structure:
- Read
.context/architecture.md - Check if the new path fits an existing module
- If not, propose adding it to the directory structure section
Trigger signals:
mkdircommands- Creating files in previously empty directories
- Adding new top-level directories
Feature Completion â project.md
When a spec status changes to [x] Completed:
- Read
.context/project.md - Update the “Current Status” section to reflect the new capability
- Suggest moving the spec to
.context/specs/.archive/
Conventions Changes â conventions.md
When the team agrees on a new pattern during development:
- Read
.context/conventions.md - Propose adding the new convention with rationale
- Ensure it doesn’t conflict with existing conventions
Validation Mode
When activated at session start, perform a quick audit:
SYNC CHECK:
â
stack.md â matches package.json (last verified: {timestamp})
â
architecture â all src/ modules documented
â ï¸ project.md â 2 completed specs not yet reflected
â conventions â new pattern "useQuery hooks" found but not documented
Output Format
Always present sync suggestions as a clear diff:
### Suggested Update: stack.md
**Trigger:** `npm install @tanstack/react-query`
| Package | Purpose | Constraints |
|---|---|---|
| `@tanstack/react-query` | Server state management & caching | v5.x â do not downgrade, peer dep on React 18+ |
**Apply this update?** [Y/N]
Integration
This skill is designed to fire automatically after other skills complete. Skills that should trigger a sync check:
spec-lifecycle(on status change)architecture-guard(on new file creation)commit-conventions(on commit â optional)