penberg

Agentutils — Development skill for Claude Code

Development community

Small UNIX tools for letting a coding agent, or anything else you would rather not trust with your files, work on a directory.

How to install Agentutils

This entry records only its repository, not the path inside it, so there is no exact command to give. Open penberg/agentutils and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agentutils does

Small UNIX tools for letting a coding agent, or anything else you would rather not trust with your files, work on a directory.

Alternatives in Development

  • Agent Skill — A Claude Code plugin marketplace containing the ast-grep skill for powerful structural code search using Abstr 851 ★
  • Agentsys — This automates everything else · 14 plugins · 43 agents · 30 skills · for Claude Code, OpenCode, Codex 655 ★
  • Write Teaching Chapter — Write bilingual (CN+EN) Claude Code source code teaching chapters 386 ★

README

agentutils

Small UNIX tools for letting a coding agent, or anything else you would rather not trust with your files, work on a directory:

  • fsfork forks a directory: it makes a copy-on-write clone of it, and prints where it is.
  • confine runs a command in a fork of the working directory, or in a directory, that may write only there, and cannot read secrets.
  • fsdiff shows what changed in a fork since it was made, as a patch.

Each does one thing. `confine` forks as `fsfork` does, and `fsdiff` knows where a fork's base is; otherwise none knows about the others. They keep no state: a fork is a directory, its path is its name, and `ls`, `rm` and `git` do the rest.

![fsfork forks a repository, rm -rf * in confine empties the fork, and fsdiff shows the deletions, while the repository keeps its files](.github/assets/demo.gif)

Usage

Run Claude Code in a fork of the directory, where it may write nothing else:

cd ~/src/turso
confine -w ~/.claude claude

`confine` forks the directory to `~/src/turso.1`, says so, and runs Claude Code in the fork. `-w ~/.claude` lets it save its sessions and settings. With `--rm`, the fork is removed when Claude Code exits; with `-d dir`, there is no fork, and Claude Code runs in `dir` itself.

When it is done, see what it changed, apply the changes, and remove the fork:

fsdiff ../turso.1
fsdiff ../turso.1 | git apply
rm -rf ../turso.1 ../.turso.1.base

Meanwhile, you can keep working in `~/src/turso`, and run more forks side by side: `turso.2`, `turso.3`, and so on. `ls -d ../turso.*` lists them.

Each command has a man page: [`fsfork.1`](cmd/fsfork/fsfork.1), [`confine.1`](cmd/confine/confine.1), and [`fsdiff.1`](cmd/fsdiff/fsdiff.1) (`man ./cmd/fsfork/fsfork.1`).

Install

make install

This builds the commands and installs them in `~/.local/bin`, and their man pages in `~/.local/share/man`. To install them elsewhere, set `PREFIX`; in `/usr/local`, that may need `make && sudo