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

repl-server

Skill0 starsChanged 46 days agoMITView on GitHub

Stand up a Guile project with a socket REPL an agent can drive - guile3 --debug --listen on a per-project port, with a logging proxy on PORT+1. Use when starting or resuming work on a Guile/Scheme project, when you need to evaluate code rather than only read it, or when a claim about Guile behaviour needs checking against a running interpreter.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer guile3 when it exists.

    line 62
  2. Very specific:

    deprecated: Never write state next to the plugin itself: ${CLAUDE_PLUGIN_ROOT} moves on every update.

    line 78
  3. Very specific:

    A stale listener looks exactly like a broken new one: Check before you start; --status before --stop before debugging anything else.

    line 98

≈ “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

Start a Guile project with a REPL surface

The agent's hardest problems in a Lisp are mechanical (delimiters) and epistemic (stale state, unverified claims), not stylistic. This skill is about the epistemic half: having a running interpreter to check against, so "this works" is a measurement rather than a guess.

Get the runtime right first

On FreeBSD the binary is guile3 (also guile-3.0); bare guile may be 2.2.7. Under Homebrew on macOS it is guile. A tool that shells out to guile and gets 2.2.7 fails in ways that look like your code is wrong.

uname -a; whoami; hostname -s        # which machine is this, really
for b in guile guile3 guile-3.0; do
    command -v $b >/dev/null 2>&1 && printf '%-10s %s\n' "$b" "$($b --version | head -1)"
done

Prefer guile3 when it exists. sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-paths.sh does this and prints its choice.

Start it

GUILE_SKILL_DATA="${CLAUDE_PLUGIN_DATA}" sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-server.sh   # REPL on PORT, proxy on PORT+1
sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-server.sh --status  # what is actually listening
sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-server.sh --stop

State — transcripts and stderr — goes under ${CLAUDE_PLUGIN_DATA}/projects/<slug>/, the per-plugin directory Claude Code creates on first reference and keeps across plugin updates. That variable is substituted into this file when the skill loads; it is not in the Bash tool's environment, which is why it is passed in explicitly above. Without it the scripts fall back to ~/.guile-skill/, which is deprecated. Never write state next to the plugin itself: ${CLAUDE_PLUGIN_ROOT} moves on every update.

The port is derived from the working directory, so a project always gets the same one: 37000 + cksum(slug) mod 900, where the slug is the absolute path with every / and . replaced by -.

Rules that are not negotiable

  • --debug or the debug surfaces silently do nothing. Without it, ,trace (fib 4) prints no lines and raises no error — which reads as "this procedure makes no calls". Every start path here passes --debug.
  • Bind loopback only. A socket REPL is unauthenticated arbitrary code execution. Never 0.0.0.0, never a tunnel you forget about.
  • A derived port is not a reserved port. 37000 + cksum(slug) mod 900 separates projects by convention only: two can still collide, and something unrelated may already hold the number. Check what is actually listening before trusting it. This skill reads and writes local state only: it contacts no registry and no other service, and never sends your hostname, repo or working directory anywhere.
  • A stale listener looks exactly like a broken new one. Check before you start; --status before --stop before debugging anything else.

Then

Evaluate with the repl-eval skill. Read the transcript with repl-proxy.

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.