shepherd
Autonomous pipeline monitor using sense-think-act loop. Watches snakemake/nextflow jobs, detects errors, applies fixes from memory, restarts on failure.
npx skills add majiayu000/claude-skill-registry --skill shepherd-genomewalker-cc-soul --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Tends long-running pipelines (snakemake, nextflow) using a sense-think-act loop. Detects errors, recalls fixes from memory, restarts automatically, checkpoints progress.
How it works
- Initialize: loads tools, checks for an existing task, determines whether to use an isolated session, creates a named pane, launches the pipeline in that pane, tails the pane, and starts a long-task record for tracking.
- Sense: reads new output from the pipeline pane, checks for idle state, searches for error patterns, and returns new_output, is_idle, errors, and a timestamp.
- Think: analyzes sensed data against known habits, checks for completion, attempts to recall fixes for errors, may apply a fix if available, otherwise restarts (up to a max) or escalates on repeated failures, or signals a stall.
- Act: executes the chosen decision, including completing a task, restarting the pipeline, applying a memory-based fix, escalating on errors, or checkpointing on stalls. Updates long-task records and optionally destroys isolated sessions on completion.
- Pattern libraries: provides detection and actions for common Snakemake and Nextflow patterns, linking specific errors to appropriate recovery steps.
- Resume protocol: supports resuming from a checkpoint by loading a snapshot, restoring session and pane states, and deciding whether to resume monitoring or restart the pipeline.
When to use it
Use when you need automated supervision of Snakemake/Nextflow pipelines, with automatic error handling, fixes from memory, and optional notifications. It supports starting in a dedicated session or using the current session.
What it can touch
- Zellij tools: create_named_pane, write_to_pane, tail_pane, wait_for_idle, search_pane, send_keys, read_pane
- Chitta tools: long_task_start, long_task_active, long_task_snapshot, long_task_event, long_task_complete, habit_match, recall, health_check, habit_strengthen
Caveats
- AUTO_FIX and NOTIFY are configurable flags in initialization; behavior relies on memory recalls and available fixes.
- Uses session isolation heuristics to decide whether to run in a dedicated session or current session.
- Escalation occurs after exceeding max restarts per configuration.
- Requires the underlying tools be present and accessible in the runtime environment.
# Shepherd - Autonomous Pipeline Monitor Tends long-running pipelines (snakemake, nextflow) using a sense-think-act loop. Detects errors, recalls fixes from memory, restarts automatically, checkpoints progress. ## Quick Commands ```bash /shepherd <command> [--interval=60] [--max-restarts=3] # Start monitoring /shepherd status # Check shepherd status /shepherd stop # Stop monitoring ``` ## Configuration | Flag | Default | Description | |------|---------|-------------| | `--interval` | 60 | Seconds between sense cycles | | `--max-restarts` | 3 | Max automatic restarts before escalating | | `--notify` | true | Send notifications on events | | `--auto-fix` | true | Attempt automatic fixes from memory | | `--session` | auto | Target session: "auto", "current", or session name | | `--isolate` | auto | Session isolation: "auto", "yes", "no" | ### Session Isolation Strategy When `--isolate=auto` (default), shepherd chooses based on task characteristics: | Condition | Isolation | Reason | |-----------|-----------|--------| | HPC/SLURM job | yes | Long-running, survives disconnects | | Remote SSH pipeline | yes | Needs persistent attachment | | Quick local task (<1h) | no | Tab isolation suf
- Quick Commands
- Configuration
- Session Isolation Strategy
- Initialize
- 1. Load Required Tools
- 2. Check for Existing Task
- 3. Determine Session Strategy
- 4. Create Named Pane and Launch Pipeline
- Sense-Think-Act Loop
- SENSE: Gather Pipeline State
- THINK: Analyze and Decide
- ACT: Execute Decision
- Pattern Libraries
- Snakemake Patterns
What does the shepherd skill do?
Autonomous pipeline monitor using sense-think-act loop. Watches snakemake/nextflow jobs, detects errors, applies fixes from memory, restarts on failure.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill shepherd-genomewalker-cc-soul --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
