
Refocusing
Re-grounds a long-running AI agent in current product intent and project context after drift or compaction.
- Repository
- mvschwarz/openrig
- Stars
- 8,553
- Licence
- Apache-2.0
- Files
- 3 files
What it does
When an AI agent has been working for a long time, it can lose sight of the real goal, especially after its conversation history is compacted or work crosses a major boundary. This skill tells the agent to refresh its understanding by reading the current project structure and work trace, then reading the full source notes it needs before acting. It is designed for the OpenRig multi-agent system, where it runs a bundled Python script that walks up the topology and work directory paths to gather context.
Great for
- Developers running long multi-agent sessions in OpenRig who see agents drifting from the goal
- Teams using managed context restores or compaction in OpenRig rigs
Skip it if
- Fresh-session orientation or waking an idle agent, which the skill explicitly says it does not cover
- Projects outside OpenRig, since the script depends on the OpenRig 'rig' command and its daemon; it may simply fail or report gaps there
- Environments where running local Python scripts is restricted, since the skill executes a bundled script
Try asking
- “Refocus on the product outcome before we start the next consequential step in this mission”
- “Run a light trace of the topology and work tree so I know what the current slice is for”
- “My context was compacted; re-ground yourself in the current intent before continuing”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 3 original files, the Apache-2.0 licence and an attribution note.
refocusing.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip refocusing.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip refocusing.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Use the plain single command the skill specifies; combining it with shell variables or loops may trigger approval prompts.
- Review the script before first use, since it executes on your machine and reads project context files.
- Pass --work-start or --topology-start with the exact node path when you know which node is current, rather than assuming the project root.
What's inside
- references/refocus.md
- scripts/trace-to-root.py
- SKILL.md
Redistributed unmodified from mvschwarz/openrig under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.