Harness Engineering
10xChengTu/harness-engineering
Set up and improve harness engineering (AGENTS.md, docs/, lint rules, eval systems, project-level prompt engineering) for AI-agent-friendly codebases.
Re-grounds a long-running agent in the current product outcome by running a path-based trace to the root of its topology and work trees.
$ npx skills add mvschwarz/openrig --skill refocusing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mvschwarz/openrig refocusing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/refocusing .claude/skills/refocusing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "refocusing" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/refocusing into .claude/skills/refocusing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refocusing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/refocusingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mvschwarz/openrig --skill refocusing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mvschwarz/openrig refocusing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/refocusing .agents/skills/refocusing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "refocusing" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/refocusing into .agents/skills/refocusing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refocusing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mvschwarz/openrig --skill refocusing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mvschwarz/openrig refocusing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/refocusing .cursor/skills/refocusing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "refocusing" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/refocusing into .cursor/skills/refocusing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refocusing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mvschwarz/openrig.git --path packages/daemon/assets/plugins/openrig-core/skills/refocusing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mvschwarz/openrig --skill refocusing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mvschwarz/openrig refocusing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/refocusing .gemini/skills/refocusing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "refocusing" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/refocusing into .gemini/skills/refocusing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refocusing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mvschwarz/openrig refocusingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mvschwarz/openrig --skill refocusing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/refocusing .github/skills/refocusing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "refocusing" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/refocusing into .github/skills/refocusing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refocusing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mvschwarz/openrig --skill refocusing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mvschwarz/openrig refocusing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mvschwarz/openrig.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/daemon/assets/plugins/openrig-core/skills/refocusing .opencode/skills/refocusing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "refocusing" agent skill from https://github.com/mvschwarz/openrig/tree/main/packages/daemon/assets/plugins/openrig-core/skills/refocusing into .opencode/skills/refocusing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refocusing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
refocusingRe-grounds a long-running agent in the current product outcome by running a path-based trace to the root of its topology and work trees.
Refocus keeps a long session's earned expertise while re-grounding it in current intent. It is not a restart, wake-up or phase checkpoint. The agent runs the bundled `scripts/trace-to-root.py` instead of rebuilding the hierarchy from memory, choosing `--trees` (topology, work or both) for the context domains and `--depth` (light or full) for how much each node contributes.
Light work traces compose each node's intent and name notes, while full traces include the complete node and note bodies. The script resolves the topology and workspace roots with `rig config get`, and environment variables or `--*-start` options can supply the current node when it cannot be derived. `rig context work-install` lists the project's declared context, and a missing chain file is reported as a gap instead of being followed to invent a second parent. A reference file covers the automatic hook and its content ladder.
Read from SKILL.md and the folder at commit 1f69831. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Agent Refocusing loads about 864 tokens when it runs, and up to ~1.2k if it reads all its reference files. Until then it costs about 74 tokens; SKILL.md has 451 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from mvschwarz/openrig at commit 1f69831, republished under its Apache-2.0 licence (© mvschwarz). 451 words, ~864 tokens.
.claude/skills/refocusing/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Invoke the skill as refocusing, its frontmatter name. OpenRig seeds it in the
Claude and Codex global skill roots and includes selected plugin skills in managed
loadouts. Existing externally managed copies remain authoritative. If the harness
has not discovered it yet, read this installed skill file and run its script directly;
hook registration alone does not prove native skill discovery.
Refocus preserves a long session's earned expertise while re-grounding it in current intent and lived context. It is not a restart, wake, or phase checkpoint.
During an actionable managed restore, consume the current topology and work trace that actually arrived with the request. Do not rerun Python merely to duplicate it. If no current trace arrived, name that delivery gap. A packet pointer, compact summary or truncated extract is not a full source read. Use the native file-read tool for required notes and full sources, and complete the existing restore audit; partial file reads do not establish completed refocus or restoration.
For a new trace outside that delivered context, follow the command guidance below.
Resolve the bundled script's absolute path from the directory of this loaded skill.
Stay in your current working directory; do not cd into the skill directory, which
can change the inferred work node. Run the trace as one plain command, replacing
the example path with the actual absolute path written out in the tool call:
python3 "/absolute/path/to/refocusing/scripts/trace-to-root.py" --trees both --depth lightDo not combine this command with shell variables, environment assignments, command substitution, exit-status printing or file-reading loops. Read the named source files separately with the native read tool. Combined shell loops or variables can require native approval even when the intended operations are read-only; a plain command is not a guarantee that approval will never be needed.
For managed compaction, refocus during the restore request or its read-depth audit. The earlier acknowledgement-only boundary is not permission to restore.
Use --trees topology|work|both to select context domains and --depth light|full to control how
much each node contributes. Light work traces compose intent: and name notes; full traces include
the complete node and notes bodies. The script resolves topology.root and workspace.root with
rig config get. When a known current node must be supplied, pass --work-start or
--topology-start with its literal absolute path in the same plain command. Do not
substitute the project root for a mission or slice node and claim that mission was traced.
The trace walks the topology and work trees. For the project's own declared context (intent, context files,
skills), rig context work-install lists it; read what the next action needs.
Read references/refocus.md when changing the automatic hook or its content ladder. A missing chain file is evidence: report the gap and continue; never follow pointers to invent a second parent.
© mvschwarz, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (scripts, references) in packages/daemon/assets/plugins/openrig-core/skills/refocusing of mvschwarz/openrig.
Open the folder on GitHubat commit 1f69831
Agent Refocusing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Agent Refocusing this skillmvschwarz/openrig | 5.9k | — | ~864 | Automated safety check: Pass | Apache-2.0 | |
| Harness Engineering10xChengTu/harness-engineering | 102 | 1 repos | ~1k | Automated safety check: Pass | None | |
| Harness Long-Running Task LoopChachamaru127/claude-code-harness | 3.2k | — | ~2.3k | Automated safety check: Notes | MIT | |
| Loop Engineeringhuytieu/COG-second-brain | 1.3k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Session Handoffdavila7/claude-code-templates | 32k | 2 repos | ~1.6k | Automated safety check: Pass | MIT | |
| Harness Engineeringmagnus919/agent-skills | 113 | — | ~3.5k | Automated safety check: Pass | MIT |
10xChengTu/harness-engineering
Set up and improve harness engineering (AGENTS.md, docs/, lint rules, eval systems, project-level prompt engineering) for AI-agent-friendly codebases.
Chachamaru127/claude-code-harness
Repeats a long task as a series of scheduled wake-ups, each re-entering with fresh context and calling harness-work for one task per cycle.
huytieu/COG-second-brain
Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns.
davila7/claude-code-templates
Creates comprehensive handoff documents for seamless AI agent session transfers.
magnus919/agent-skills
Design, build, diagnose, and evolve agent harnesses: instructions, tools, execution environments, durable state, context management, verification, recovery, and bounded autonomous loops.
DenisSergeevitch/agents-best-practices
A skill your agent uses when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain.
mvschwarz/openrig
Walks an agent through upgrading the OpenRig CLI and daemon one observed step at a time, keeping live seats alive and reconciling managed plugin files.
mvschwarz/openrig
Helps set up a continuing agent software team for a real repository with OpenRig, choosing between manual work, queue handoffs and an explicit Workflow.
mvschwarz/openrig
Loads one section of a Markdown file by its path#h2-slug address with a bundled resolver script, for use outside OpenRig's context library.
mvschwarz/openrig
Separates a stable agent seat's identity from its changing occupant, and records honest, two-part provenance whenever one occupant replaces another.
mvschwarz/openrig
A skill your agent uses when addressing a registered remote OpenRig host, choosing its transport, or interpreting a cross-host result.
mvschwarz/openrig
A skill your agent uses when opening OpenRig fleet terminals as a herdr wall — turning a rig, pod, mission, slice, or saved view into live interactive agent tiles via rig terminal, watching another…
Categories
Re-grounds a long-running agent in the current product outcome by running a path-based trace to the root of its topology and work trees. Refocus keeps a long session's earned expertise while re-grounding it in current intent. It is not a restart, wake-up or phase checkpoint.
Agent Refocusing fits situations like: A long-running agent may have lost sight of the product outcome; context was compacted and the agent needs re-grounding; work crossed a major boundary and a fresh trace is needed before the next action.
Run `npx skills add mvschwarz/openrig --skill refocusing -a claude-code`. Or copy the skill folder (packages/daemon/assets/plugins/openrig-core/skills/refocusing in mvschwarz/openrig) into .claude/skills/refocusing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mvschwarz/openrig --skill refocusing -a codex`. Or copy the skill folder (packages/daemon/assets/plugins/openrig-core/skills/refocusing in mvschwarz/openrig) into .agents/skills/refocusing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mvschwarz/openrig --skill refocusing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refocusing, .gemini/skills/refocusing, .github/skills/refocusing and .opencode/skills/refocusing in your project.
Going by SKILL.md and its folder, Agent Refocusing needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3 to run `scripts/trace-to-root.py`; The OpenRig `rig` command-line tool.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Agent Refocusing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 864 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 290 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Agent Refocusing: Harness Engineering (10xChengTu/harness-engineering, 102 stars), Harness Long-Running Task Loop (Chachamaru127/claude-code-harness, 3.2k stars), Loop Engineering (huytieu/COG-second-brain, 1.3k stars) and Session Handoff (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mvschwarz (a GitHub user) maintains it in mvschwarz/openrig, which has 5,854 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 8, 2026.
Source: mvschwarz/openrig on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.