agentleFS
dsp-drdsp-dr/guile-skills/skills/repl-proxy/SKILL.md

repl-proxy

Skill0 starsChanged 46 days agoMITView on GitHub

Record everything that passes through a Guile socket REPL by routing it via a logging proxy on PORT+1, with per-project rotated transcripts, and connect Emacs with Geiser through the same proxy. Use when you need a reviewable history of what was evaluated, when debugging why a REPL session behaved oddly, or when a human and an agent should share one traced session.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No error is raised.

    line 111

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

A transcript of what was actually evaluated

guile3 --listen=PORT gives you a REPL; nothing records what went through it. The proxy sits on PORT+1, forwards bytes verbatim, and tees a timestamped transcript. Connect to PORT+1 and the session is recorded; connect to PORT and it is not.

agent / Emacs ──▶ 127.0.0.1:PORT+1 (proxy) ──▶ 127.0.0.1:PORT (guile3 --debug --listen)
                          │
                          └──▶ ${CLAUDE_PLUGIN_DATA}/projects/<slug>/repl.log

Where transcripts go

Under ${CLAUDE_PLUGIN_DATA} — the per-plugin persistent directory, kept across updates — keyed on the working directory exactly as ~/.claude/projects/ is: every / and . becomes -. The variable is substituted into this file when the skill loads and is not in the Bash tool's environment, so it is passed to the scripts explicitly as GUILE_SKILL_DATA="${CLAUDE_PLUGIN_DATA}". The old ~/.guile-skill/ is deprecated and remains only as a fallback:

/home/dsp-dr/ghq/github.com/dsp-dr/guile-skills
  -> ${CLAUDE_PLUGIN_DATA}/projects/-home-dsp-dr-ghq-github-com-dsp-dr-guile-skills/repl.log

Rotated at 4 MiB, five generations, rotated between connections so no session is cut in half. Outside the repository on purpose: a transcript contains whatever was evaluated and must never become commit-adjacent.

Transcript format — -> is toward the REPL, <- is back:

;; connection 2 at 2026-09-26T16:59:16Z
-> 12:59:16.322 ,trace (fib 3)
<- 12:59:16.349 trace: |  (fib 3)
<- 12:59:16.349 trace: |  |  (fib 2)
-- 12:59:16.350 repl sent eof

Emacs + Geiser through the proxy

Point Geiser at the proxy port and the human's session is recorded too, so an agent reading the transcript can see what the person tried.

;; M-x geiser-connect, host 127.0.0.1, port PORT+1
;; No geiser-guile-binary: connecting does not start a Guile, so the binary is
;; irrelevant here -- and pinning one is the mistake emacs-setup exists to undo.

Geiser holds one connection open across many round-trips, unlike nc -N which half-closes after each. Both work, with three limits:

  • The proxy serves connections serially: while Geiser holds its connection, an agent's evaluation waits. Two at once needs two proxies.
  • An idle connection is closed after 300 seconds, so a Geiser session left alone for five minutes has to reconnect.
  • Geiser cannot interrupt an evaluation over a socket (interrupt-process needs a subprocess; Geiser 0.32 geiser-connection.el:269-273). A runaway evaluation from either side is stopped only by restarting the REPL.

Failure modes worth recognising

  • Empty transcript, no client output. Almost always a stale proxy from an earlier session still holding the port: pgrep -fl repl-proxy. The proxy now refuses to start with the errno instead of dying quietly, but an old one predating that fix will still be serving and writing to its own log.
  • ,trace produces nothing. The target REPL was started without --debug. No error is raised.
  • Non-UTF-8 chunks are logged as #<N non-utf8 bytes> rather than corrupting the transcript; the bytes are still forwarded unchanged.

Documentation

Full write-up, including the three binary names this probes across FreeBSD, Debian/Ubuntu and Homebrew: https://wal.sh/tools/plugins/guile-skills/ Source and issues: https://github.com/dsp-dr/guile-skills

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.