Agent skill
refresh-context
Update stale workspace context
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/refresh-context-daemn256-workspace-repo-templ
SKILL.md
Refresh Context
Uses Planner (primary) with Orchestrator support. Verify and update the workspace context file when it may be outdated. Scans the codebase for changes and reconciles with documented state.
Prerequisites: Existing workspace context file, access to codebase
Phase 1: Read Current Context
Review Existing State
- Read the existing workspace context file (
docs/workspace/context.md) - Summarize what it contains
- Note the last-updated timestamp
Output
## Context Anchors
- **Phase:** 1 — Read Current Context
## Current Context Summary
<summary of what the context file states>
- **Last updated:** <date if available>
- **Sections present:** <list>
## Next Step
Continue to codebase scan.
**Approval Required:** No
Phase 2: Scan Codebase
Detect Changes
- Look for new directories or modules
- Check for changed file patterns
- Review updated configuration
- Check for moved documentation
- Verify convention adherence
Output
## Context Anchors
- **Phase:** 2 — Scan Codebase
## Scan Results
<findings from codebase scan>
## Next Step
Continue to inconsistency report.
**Approval Required:** No
Phase 3: Report Inconsistencies
Compare and Present
- Compare current context against detected state
- List items that need updating, removal, or verification
- Highlight questions about ambiguous changes
Output
## Context Anchors
- **Phase:** 3 — Report Inconsistencies
## Detected Changes
| Item | Current State | Detected State | Action |
| ------ | ------------------- | ---------------- | ------------------------ |
| <item> | <what context says> | <what was found> | Update / Remove / Verify |
## Questions
- <ambiguous change needing human input>
## Next Step
Awaiting human input before making changes.
**Approval Required:** Yes
⛔ CHECKPOINT
STOP. Do not update the context file until human explicitly approves:
- Which items to update
- Which items to remove
- Answers to questions about ambiguous changes
Phase 4: Apply Updates
Update Context File
- Apply approved corrections
- Add new discoveries
- Remove obsolete content
- Update timestamp
Output
## Context Anchors
- **Phase:** 4 — Apply Updates
## Changes Applied
- Updated: <list>
- Added: <list>
- Removed: <list>
## Next Step
Context refreshed. No further action needed.
**Approval Required:** No
Staleness Indicators
Signs that workspace context might be stale:
- References files that no longer exist
- Mentions patterns not seen in recent code
- Lists stack components that have changed
- Documentation links are broken
- Conventions don't match observed code
Error Handling
| Error | Recovery |
|---|---|
| No workspace context file exists | Offer to create one via /setup-workspace |
| File has incompatible format | Note format issues, propose migration |
| Too many changes to review at once | Batch into sections, process incrementally |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?