Skip to content

Guide · Agent skill

How to use the Refocusing agent skill: setup and examples

Updated · written with AI from the project's own documentation and checked against our catalogue data

The Refocusing skill helps a long-running AI agent get back to the real goal after its conversation has been compacted or after a major change in the work. It is written for developers and teams using the OpenRig multi-agent system. This guide explains what the skill does, how to install it, how to ask for it in plain language, and what to check before you run it.

Refocusingmvschwarz/openrig · Apache-2.0

Quick start

  1. 1Download the ZIP. Get the refocusing skill ZIP from this page.
  2. 2Unzip into a skills folder. Extract it into ~/.claude/skills/ for all projects, or into .claude/skills/ inside one project.
  3. 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill.
  4. 4Confirm Python 3 and OpenRig are available. The script needs Python 3 and the OpenRig rig command with its daemon.
  5. 5Ask for a refocus in plain language. Request a check on the product goal after a long session or context compaction.
  6. 6Review the trace output. Check the topology and work notes the script reports, and note any gaps.

What the Refocusing skill makes the agent do

An agent skill is a folder with a SKILL.md file that tells an AI agent how to handle a particular kind of task. The refocusing skill is for the moment when a long session may have drifted. It tells the agent to re-check the outcome the person actually wants, not just the task it is currently doing.

To do this, the agent reads the current project structure and work trace, then reads the full source notes it needs before acting. The skill runs a bundled Python script, scripts/trace-to-root.py, which walks up the topology and work directory paths to gather that context. The skill also includes a short reference, references/refocus.md, with three questions: what the person is trying to get, whether the next action moves that, and what has been concluded without opening the relevant file or running the thing.

Install the Refocusing skill

Download the ZIP for the skill from this page. You can then install it in one of two ways.

For Claude Code, unzip the folder into your global skills directory at ~/.claude/skills/, or into a project's .claude/skills/ directory to limit it to one project.

In the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.

  • Global install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills

Trigger the skill with natural requests

The skill is invoked as refocusing, its frontmatter name. You do not need to type that exact word every time. The skill's description says it applies when a long-running agent may have lost the product outcome, when context was compacted, when work has crossed a major boundary, or when a fresh path-based trace is needed before the next consequential action.

Plain requests that match those situations work well. Ask the agent to check that it is still working toward the right outcome, or to re-ground itself after a long session.

  • "Check that you still understand what the user actually needs before you continue."
  • "Context was just compacted. Refocus on the product goal before the next change."
  • "We've finished the design phase. Trace the current work and confirm the next step serves the outcome."

Run the trace script safely

When the agent needs a new trace, it resolves the absolute path to the bundled script and runs it as one plain command from its current working directory. It does not change into the skill directory, because that can change the work node the trace infers.

The script accepts --trees with topology, work or both, and --depth with light or full. Light work traces include intent and note names. Full traces include the complete node and note bodies. The script finds topology.root and workspace.root with rig config get.

  • Requires Python 3 and the OpenRig CLI (the rig command) with its daemon running.
  • Uses no network access, according to the skill's listing.
  • Runs a local script, so it is unsuitable where running local Python scripts is restricted.
python3 "/absolute/path/to/refocusing/scripts/trace-to-root.py" --trees both --depth light

Know what the skill does not cover

The skill is not a restart, a wake-up, or a phase checkpoint. It is not for orienting a fresh session or waking an idle agent seat. Use it when a long session is drifting or when a managed restore needs current context.

During a managed restore, the agent should use the trace that arrived with the request rather than rerunning the script. A packet pointer, compact summary or truncated extract does not count as a full source read, so the agent should read the required notes with its file-read tool.

Tips for getting good results

Use the skill in OpenRig rigs where agents are working on a goal over many steps. If you know which work node or topology node is current, the skill can pass it in with --work-start or --topology-start, using its literal absolute path. Do not substitute the project root for a mission or slice node.

If the trace reports a missing chain file, treat that as evidence of a gap and say so. The skill does not follow pointers to invent a second parent.

  • Pass a known current node with --work-start or --topology-start.
  • Read full source notes when the next action depends on them.
  • Report any missing context instead of guessing.

What people use it for

  • Re-grounding an agent that has been working for hours in an OpenRig multi-agent session and has started drifting from the goal.
  • Refocusing an agent right after its conversation history was compacted.
  • Checking the next consequential action after work has moved from one phase to another.
  • Pulling a full path-based trace of topology and work notes before a major change.

Frequently asked questions

How do I install the refocusing agent skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.

What do I need to run the refocusing skill?

The skill needs Python 3 and the OpenRig CLI, which provides the rig command, along with its daemon. The script uses rig to read topology and workspace configuration. It does not need network access, according to the listing.

Is the refocusing skill free?

The skill is licensed under Apache-2.0. The source does not mention pricing, so check the repository for licence terms.

Can I use the refocusing skill outside OpenRig?

It is not designed for that. The script depends on the OpenRig rig command and its daemon, so in other projects it may fail or report gaps.

Why does the refocusing skill run a Python script?

The script, scripts/trace-to-root.py, walks the topology and work directory paths to collect context. Agents can run it directly with one plain command, and it reads the current project structure and work trace.

What should I use instead for a fresh session or an idle agent?

The skill says it does not cover fresh-session orientation or waking an idle agent seat, so use a different approach for those. Refocusing is meant for long sessions that have drifted or been compacted.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use the refocusing skill if you run long multi-agent sessions in OpenRig and see agents drifting from the goal, or if your team uses managed compaction or restores there. Pick something else if you work outside OpenRig, need fresh-session orientation, or cannot allow local Python scripts to run.

Download the skill