| name | git-context |
| description | Store and manage coding context in git. Use when saving decisions, tracking tasks, planning complex work, or coordinating with other agents. Activates on mentions of "save context", "track task", "planning", or multi-agent coordination. |
git-context Skill
Use git ctx to persist context in git. Local by default, share with --shared.
Quick Reference
git ctx add --title "Title" -m "Content"
git ctx add --title "Title"
git ctx list
git ctx list --all
git ctx show <id>
git ctx edit <id>
git ctx rm <id>
git ctx search "query"
git ctx task add "Title"
git ctx task add "Title" -d "Description"
git ctx task list
git ctx task show <id>
git ctx task claim <id>
git ctx task done <id>
git ctx task comment <id> "message"
git ctx push
git ctx pull
--shared, -s
--all, -a
--json
When to Use
Save Context When:
- Making architecture decisions →
git ctx add --title "Why PostgreSQL"
- Discovering important information →
git ctx add --title "API rate limits"
- Ending a session →
git ctx add --title "Session handoff"
- Finding gotchas or bugs →
git ctx add --title "Bug: Auth edge case"
Use Tasks When:
- Breaking down complex work
- Coordinating with other agents
- Work needs tracking across sessions
Use Shared When:
- Context should sync with team/other machines
- Tasks are for multi-agent coordination
Planning Pattern (Manus-style)
For complex tasks, create a plan entry:
git ctx add --title "Plan: [Feature Name]" << 'EOF'
[One sentence describing success]
- [ ] Phase 1: Setup and planning
- [ ] Phase 2: Core implementation
- [ ] Phase 3: Testing
- [ ] Phase 4: Documentation
1. [Question to answer]
2. [Question to answer]
- (none yet)
- (none yet)
**Currently in Phase 1** - Planning
EOF
The Loop
-
Before each major decision → Re-read the plan
git ctx show <plan-id>
-
After each phase → Update the plan
git ctx edit <plan-id>
-
When you learn something → Save to separate entry
git ctx add --title "Notes: [Topic]"
This keeps goals in your attention window and builds knowledge.
Multi-Agent Workflow
As Team Lead
git ctx task add --shared "Implement auth" -d "JWT with refresh tokens"
git ctx task add --shared "Setup database" -d "PostgreSQL schema"
git ctx task add --shared "Write tests"
git ctx push
As Worker Agent
git ctx pull
git ctx task list --shared
git ctx task claim task-001
git ctx push
git ctx task comment task-001 "Using bcrypt for passwords"
git ctx task done task-001
git ctx push
Avoiding Conflicts
- Always pull before claiming
- Push immediately after claiming
- First to push wins
Session Handoff
At end of session:
git ctx add --title "Handoff: [Date]" << 'EOF'
- [What was done]
- [Current state]
- [What to do next]
- [Any issues]
EOF
Next session:
git ctx list
git ctx show <handoff-id>
Anti-Patterns
| Don't | Do Instead |
|---|
| Forget context between sessions | Save with git ctx add |
| Start complex work immediately | Create plan first |
| Claim tasks without pulling | Always git ctx pull first |
| Keep findings in head | Save to entries |
| Retry errors silently | Log errors in plan |
Storage
.git/
├── context/ ← LOCAL (private, never syncs)
│ ├── memory/
│ └── tasks/
└── refs/context/ ← SHARED (syncs with push/pull)
├── memory/
└── tasks/
Tips
- IDs are short - Use first 8 chars:
git ctx show abc12345
- Pipe content -
echo "text" | git ctx add --title "Note"
- Search is fast -
git ctx search "auth" finds all related
- JSON for scripts -
git ctx list --json | jq ...