Skip to content
Back to skills

Herdr Workflows

ASecurity

Local safeguards for Herdr linked worktrees and session recovery. Use alongside the herdr skill when creating or cleaning up a Herdr worktree, moving its changes back to the host checkout, diagnosing socket routing, or recovering the default session.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 24, 2026
businessshellgitapifrontend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add timmo001/skills --skill herdr-workflows --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Herdr Workflows?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Herdr Workflows
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/timmo001-herdr-workflows/badge)](https://www.skillsdirectory.com/skills/timmo001-herdr-workflows)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: herdr-workflows
license: Apache-2.0
compatibility: Requires Herdr, its CLI environment, Git for worktree transfers, and the separately installed herdr skill.
description: Local safeguards for Herdr linked worktrees and session recovery. Use alongside the herdr skill when creating or cleaning up a Herdr worktree, moving its changes back to the host checkout, diagnosing socket routing, or recovering the default session.
---

# Herdr Workflows

Load `herdr` for control and current CLI discovery. This companion covers recovery and preserving work when moving between checkouts; `session-coordination` owns assignments and collecting worker results.

## Recover Live Context

- Check the inherited `HERDR_SOCKET_PATH` before assuming the default server. Explicit session selection overrides that socket; use it only for the intended session. Recover an absent default server through `herdr session attach default`, not a manually launched `herdr server` process.
- Use targeted agent/pane get and list calls to recover known work. Use `herdr api snapshot` when topology across the session is genuinely needed. Live state establishes what exists, not who authorised or owns it.
- Get optional native session references from Herdr's `agent_session` fields and use the owning runtime's supported history/resume tools. When an agent has reported a resume command, Herdr reopens its exact session after a server restart. Check whether it has already restored before resuming manually.
- Herdr clears a self-reported agent once its pane returns to an idle shell. A missing reference is not evidence of lost work; read the agent output and current Git state.
- Pass a short continuation brief directly to the host agent. Use a durable handoff only when the work must survive beyond available session history.

## Create A Linked Worktree

Under Herdr, create worktrees with `herdr worktree create` (a new branch) or `herdr worktree open` (an existing branch), not raw `git worktree add`, so the checkout gets its own Herdr workspace the user can see and switch to. Pass `--no-focus` unless the user asked to switch, and `--path` when the directory name matters, such as a name a dev server derives a URL from. Read the new workspace and path from the JSON response, then continue in that path. Creating a worktree still needs the user's agreement.

## Clean Up A Review Worktree

When a review or check done in a linked worktree is finished (the findings are reported, and posted if that was asked for), clean it up without asking. The user won't want it back.

1. Stop the worktree's own dev servers and daemons from inside it, such as `dot ha stop` in a Home Assistant frontend worktree. Leave the host checkout's servers alone.
2. Check `git status` in the worktree. If it has changes or commits that exist nowhere else, stop and ask instead of removing it.
3. Remove it with `herdr worktree remove --workspace <id>`, then confirm Herdr and Git no longer list it.
4. Delete its local branch with `git branch -D` from the host, unless the branch is the user's own: their pull request, a branch they created, or one with commits that aren't on any remote.
5. Leave scratch files such as screenshots and drafts where they are, and report what was removed.

## Transfer A Linked Worktree

Herdr's `worktree.remove` removes the checkout and retains its branch. It does not merge or copy work. Closing a workspace and removing a checkout are different operations; consult the installed `herdr worktree` commands.

1. Identify source and host through Herdr and Git worktree metadata. The host is the primary non-linked checkout, whatever its branch is. Inspect staged, unstaged, and untracked changes in both. Coordinate outside the checkout that will be removed; moving a session label does not move its process or cwd.
2. Preserve the reviewed source outside that checkout before removal:
   - For committed work, verify the source branch and commits are reachable from the host repository.
   - For uncommitted work, reproduce it in the host or create a verified transfer file. Include untracked content and staging state; `git diff` alone is not a complete transfer. Compare content, not just filenames.
   - Preserve unrelated host changes. Stop on conflicts or missing content rather than resetting, restoring, or implicitly stashing to force the transfer.
3. Recheck both checkouts immediately before removal. Remove only the identified linked workspace through Herdr once every intended change is preserved. A force flag does not replace preservation or authorisation.
4. Verify Herdr and Git no longer list the removed checkout and its branch still exists. If continuing on that branch is requested, switch the host only when Git can preserve its current changes; stop if it cannot.
5. Confirm the host's branch, changed content, and staging state. Rerun checks only when the checkout or generated state could affect their result. Report the host path, preservation method, verification, and any unfinished work.

Reference: [Herdr socket and worktree contracts](https://herdr.dev/docs/socket-api/).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.