Skip to content
Back to skills

Src

ASecurity

Herdr shows spaces, tabs and panes. herdr-core (`hc`) runs their terminals and keeps them alive when the window closes. Use `herdr-app` only to change what the person sees. For starting, reading, messaging, waiting on or cleaning up agents and programs, read `hc --skill` and use hc. Your terminal address is `$HC_TERMINAL_ID`; it is not a pane ID.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
developmentjavascriptrustgojavashellbashapi

Works with

  • cursor
  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 28, 2026

npx -y skills add ruchira-edirisinghe/zendr --skill src --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Src?

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

Security grade badge for Src
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ruchira-edirisinghe-src/badge)](https://www.skillsdirectory.com/skills/ruchira-edirisinghe-src)

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
# herdr-app: drive the person's window

Herdr shows spaces, tabs and panes. herdr-core (`hc`) runs their terminals
and keeps them alive when the window closes. Use `herdr-app` only to change
what the person sees. For starting, reading, messaging, waiting on or cleaning
up agents and programs, read `hc --skill` and use hc.
Your terminal address is `$HC_TERMINAL_ID`; it is not a pane ID.

## Inspect before acting

```sh
herdr-app ls          # spaces > tabs > terminals, including pane IDs
herdr-app status      # current layout, focus, overlays, zoom and file/mod errors
herdr-app commands    # available commands, arguments and descriptions
```

`ls` and `status` talk to the running window, not a new app. `commands`
prints the built-in command list even without an open window. Do not launch bare
`herdr-app` to inspect it: that opens or raises the window. Do not stop,
signal or restart the person's app or core. A window closing does not kill
its terminals.

`app.check_updates` checks for newer releases. Settings reports "Up to date"
only after a successful check; on failure, check the connection and retry.
Package-managed cores are checked but updated through their package manager.
Dismiss a core update error with its × or `overlay.close {id:"core-update-error"}`;
it stays dismissed until the error changes or the update recovers.

## Show something when asked

New spaces and tabs are shown immediately: only create them when asked.
To start one the person will look at later without moving them there, pass
`--focus false`:

```sh
herdr-app do space.new --name eng-123 --folder ~/code/app/eng-123 --argv '["claude"]' --task "Implement ENG-123" --focus false
```

Pick an explicit, useful name for every new space and tab; don't rely on
default names. Use IDs from `ls` rather than guessing or acting on the wrong
focused pane.
Tabs opened from the + agent menu are unnamed. `ls` lists their position
even when the tab bar shows the program or its session title.

```sh
herdr-app do space.new --name api --folder /path/to/api
herdr-app do tab.new --name "fix login" --argv '["claude"]' --task "Look at the login bug"
herdr-app do pane.split --direction right --pane p12
herdr-app do agent.focus --terminal t7
herdr-app do agent.select --index 3
```

`agent.select` uses the same navigation order as `agent.next` (1 = first).
In `keys.json`, `agent.select:3` selects the third agent in that order.

For a remote space:

```sh
herdr-app do space.new --name "remote api" --machine vps --folder /srv/api
```

The folder is on that machine; tabs and splits in the space stay there.
New-space keys and clicks follow the focused space's machine. Script commands
without `--machine` still use this computer; `--machine ''` explicitly chooses it.
The agent menu checks and starts agents in the remote Unix user's
login/interactive shell (sh, bash, zsh, dash, ksh or fish), including its
configured PATH. Other shells keep the sh launcher.
`terminal.open --folder /path --place down` starts the split in that folder,
including when `--argv` supplies a program. Without `--folder`, it follows the
focused terminal's folder. If an inherited local folder was deleted, new spaces,
tabs and splits retry in that machine's home. An explicit invalid folder
still fails.
`hc machine ls` lists machines. Use `hc run --on vps ...`, `hc exec --on vps ...`
and `hc file ... --on vps ...` for remote work, not your local file tools.

`do` accepts `--key value` arguments (JSON for arrays/objects) or one JSON
object. Unknown argument names fail and list valid names. Target IDs (`id`,
`pane`, `space`, `target`, `terminal`) must be strings; other non-null types fail before
the current-target default can apply. Null keeps its omitted-argument meaning.
Use `commands` to confirm the command's exact shape:

```sh
herdr-app do pane.split '{"direction":"right","pane":"p12"}'
```

`pane.swap {pane?, direction | target}` trades the places of `pane` (default:
the focused one) and its neighbor in a direction, or `target`, another pane of
the same tab. Give `direction` or `target`, not both. Focus stays with the same pane:

```sh
herdr-app do pane.swap '{"pane":"p12","target":"p14"}'
```

`terminal.send_key {keys, terminal?}` sends one key such as `ctrl-b` in keys.json
syntax. It defaults to the focused terminal, requires an attached view, and uses
the program's current keyboard mode and the same connection as typing.

`terminal.select_all {terminal?}` selects a terminal's whole screen and scrollback,
ready for `terminal.copy`. Without a target it follows keyboard focus. In vim and
other alternate-screen apps, it selects only that screen. Cmd+A runs it on macOS;
Linux and Windows have no default, so Ctrl+A stays with the shell.

`terminal.select {terminal?, at?: {row, col} | "cursor", to?: {row, col}, mode?: "cell" | "word" | "line"}`
replaces the selection, at the program cursor by default. Cells are zero-based and rows
count from the oldest retained history through the active screen. With `to`, the view
follows the exact moving end. Line mode with `to` covers whole screen rows, including blank
and soft-wrapped rows. Without `to`, word and line act like double and triple click.
`terminal.adjust_selection {terminal?, direction}` moves
the inclusive moving end and follows it in the view: left, right, up, down, page_up,
page_down, home, end, line_start, line_end. It fails without a selection.
`terminal.clear_selection {terminal?}` clears it; `terminal.copy` copies the focused terminal's selection.
These add no default keys or built-in copy mode. Mods read the inclusive selection
endpoints from `focused().selection` or `terminals()`; null means none (or no
attached view). Use `selection.end` as a copy-mode cursor. Selection facts update
when the selection changes, without refreshing readers on ordinary terminal output.
A copy-mode mod can read an attached view with `terminalRows(terminal, from, count)`.
It returns up to 128 rows at a time in the same coordinate space as the selection,
with cell text, wide-character flags, and soft-wrap boundaries.

`terminal.search` opens a find bar in the focused terminal. It searches that
terminal's screen and scrollback; Enter and Shift-Enter move between matches,
Escape closes the bar while its find field has focus, and each terminal keeps its own query (reopening selects it, so typing replaces it).
Clicking the terminal while the bar is open puts typing, including Escape, back in the program; the bar and its matches stay.

It prints the created IDs (for example `{ "pane": "...", "terminal": "..." }`)
or `{ "error": "..." }` and exits 1. Read the result, then inspect `ls` or
`status` to confirm. Commands invoked by an agent never open a missing-argument
dialog: supply all required arguments. A successful launch reply means the
terminal was created, not that its program started correctly. If it exits
with a nonzero code within two seconds, the window shows an error toast with
the exit code and last output lines.

A terminal started with hc opts into the window with `herdr.space=<id>`.
`herdr.tab=<id>` chooses its tab; without it, Herdr creates a tab in that space.
Workers without a label or a pane stay hidden. Do not add labels just to run a
background worker. Use app commands when the user wants to see a new tab or
split, hc for orchestration that need not change the screen.

Closing a pane, tab or space ends the terminals in it. Core ends their dependent
children and keeps children started with `--outlive-parent` running. On cores
older than 0.1.13, Herdr also ends hidden children when closing. `terminal.kill`
always follows the sub-agent tree. Both walks stop at children with a pane or a
`herdr.space` label. Core still applies parent-lifetime rules to every exit.

## Customize layouts, keys, or mods

First read `~/.config/herdr-app/AGENTS.md` (or `$HERDR_APP_HOME/AGENTS.md` if
set). It is the installed guide to settings, layouts, commands and mods.
Read the generated `.d.ts` files beside it for full API details; do not edit
those files or the generated guide. The app rewrites them on start.

- `terminal_line_height` (default 1, 0.8..2) adjusts terminal rows;
  `terminal_cell_width` (default 1, 0.8..2) adjusts terminal columns;
  `terminal_scroll_speed` (default 1, 0.1..5) adjusts wheel and trackpad
  scrolling, including mouse reports. Set them in settings.json or the
  layout's look; the layout wins.
- Home defaults to `~/.config/herdr-app`; `HERDR_APP_HOME` selects another.
- `worktrees.directory` in settings.json sets the shipped New worktree destination,
  e.g. `{"worktrees":{"directory":"~/Developer/worktrees"}}`. Default:
  `~/.herdr/worktrees`; checkouts use `<directory>/<repo>/<branch>` (slashes in
  branches become dashes). Use an absolute path or `~` / `~/...`, resolved on the
  space's machine. Read on dialog open; existing checkouts stay put. No clones
  needed, and the app does not read the TUI's config.toml.
- Mods live in `mods/<name>/` with `main.js` for a view or `link.js` for
  Ctrl/Cmd-clicked terminal links. They are trusted JavaScript with command
  and network access. `mod.json` declares link rules. A personal layout's
  root `link_handlers` array selects the mods and their order. An optional
  `palette` list in `mod.json` adds named actions to the command palette.
  `"focusable": true` in `mod.json` lets `pane.go` move onto a copy; it receives
  `"focus"` from `nextCommand()` and focuses its own keyboard handle.
- A mod's `watchFolder(dir)` promise has `cancel()`; cancel it when the folder
  is no longer shown. It resolves with `[]` and releases only that call.
- Shipped mods belong to Herdr: duplicate with `mod.clone` before editing.
  Shipped layouts likewise use `layout.clone` for a personal copy.
  Discover required arguments with `herdr-app commands`.
- `InputState`, `TextareaState` and `EditorState` use `focus()` to take the
  keyboard and `blur()` to hand it back to Herdr. `release()` frees the state.
- Save to reload. A broken save keeps the old version running and reports
  an error in `status`; a still-working screen is not proof the edit worked.
- Make only the requested change. Don't touch unrelated mods or settings.
- To pause streaming or polling while the window is hidden, check
  `window()?.visible` in the timer and stop when false (`window()` is null
  during `herdr-app check`). Read it in `render` and restart when true. See
  `herdr.d.ts` for platform differences.
- Use theme colors. Do not retain a mod's `cx` across callbacks; each
  callback receives its own. Native animations, not redraw timers, keep
  the window cheap to run. Root `on_size_change((size, cx) => …)` reports
  logical pixels after layout, including resizes without pointer movement.
  For a drag that leaves its element, use `on_window_mouse_move` and
  `on_window_mouse_up` on a plain layout element. The installed guide covers
  cancellation when the pointer returns without the held button.
  Optional `View.close(cx)` gets one bounded final call; start cleanup there,
  not in an earlier task. The installed guide explains its 250 ms quit budget
  and which cleanup commands go out before shutdown.

After every mod change:

```sh
herdr-app check ~/.config/herdr-app/mods/<name>
herdr-app status
herdr-app shot /tmp/mod.png   # then look at the picture
```

`check` loads and renders the mod's view if it has one. It validates link rules.
For mods with link rules and standalone link mods, it checks the `handleLink`
export in `link.js` without running the module.
It exits nonzero with the exact error. Its shared state starts empty and stays
in memory, leaving shared.json untouched. Its `init()` still runs: import
`checking` from `"herdr"` and guard
process side effects with `if (checking()) return;`. It is true throughout a
check and false in a live window; `exec`, `hc` and `writeTextFile` still run
and warn during checks. Never call a mod done without a passing check.
Then confirm it is shown correctly in the running window with `shot`; don't claim a visual
check you haven't made.

`herdr-app shot [file.png]` saves the window's current frame and prints its
absolute path (default: `herdr-shot.png` in your current folder). It is the
app's own rendering at full pixel size: terminals, images, overlays and
floats included, even when the window is covered or minimized. No screen
capture or permissions. It needs a running window that has drawn a frame;
`HERDR_APP_HOME` selects the window, as for `status`.

## Problems and safety

If Herdr misbehaves, `herdr-app feedback "<what happened>"` drafts a report.
The person reviews and sends it; it does not silently send feedback.

Never experiment with pointer/key automation on the person's real display.
When developing the app on Linux, its `scripts/sandbox` provides an isolated
home, core and display: `up`, `do`, `status`, `shot`, then `down` when done.
Never stop a server or session you didn't start.

Files in this skill

  • SKILL.md11.9 KB
  • badge.rs1.3 KB
  • bench.rs3.6 KB
  • commands.rs18 KB
  • control.rs9.1 KB
  • core_bin.rs25.2 KB
  • core_bin/cli_link.rs4 KB
  • feedback.rs9 KB
  • files.rs43.5 KB
  • hc.rs37.8 KB
  • keys.rs19.2 KB
  • keys/shipped/v0.1.12-keys.json2.1 KB
  • keys/shipped/v0.1.15-keys.macos.json2.1 KB
  • keys/shipped/v0.1.4-keys.json2 KB
  • keys/shipped/v0.1.4-keys.macos.json2.1 KB
  • keys/shipped/v0.1.5-keys.json2.1 KB
  • keys/shipped/v0.1.5-keys.macos.json2.1 KB
  • layout.rs47.2 KB
  • layout_sync.rs15.5 KB
  • links.rs48.4 KB

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 development →

Comments

Loading comments…

Newsletter

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