repl-eval
Skill0 starsChanged 46 days agoMITView on GitHub
Evaluate Scheme in a running Guile REPL over its socket, and use tracing, breakpoints, macro expansion and profiling from it. Use whenever a claim about Guile code should be checked by running it - before asserting an API exists, after editing a module, or when asked what shape a recursion has.
In this repository3 other files it gives its agents.
- emacs-setupSkill
- repl-proxySkill
- repl-serverSkill
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
- Distinctive: line 73
Do not conclude the variable is unbound.
≈ “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.
Files
Evaluate before you assert
The failure this prevents is claiming success without running anything — the second most-policed anti-pattern across 75 close-read Clojure skills, and identical in Guile. The socket REPL is what makes "verified" checkable.
sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-eval.sh '(+ 1 1)' # => $1 = 2
sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-eval.sh '(use-modules (my mod)) (my-proc 3)'
echo '(assoc-ref my-alist "k")' | sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-eval.sh
sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-eval.sh --raw ',trace (fib 4)' # keep banner and prompt
sh ${CLAUDE_SKILL_DIR}/scripts/guile-repl-eval.sh --direct '(+ 1 1)' # bypass the proxy, no logOutput is stripped of the eight-line banner and the trailing prompt, so what you read back is the value.
What the REPL gives you beyond eval
| Ask | Meta-command | Answers |
| what shape is this process? | ,trace FORM | indented call tree with arguments and returns |
| how does it grow? | ,time FORM | real, run and GC time separately |
| where does the time go? | ,profile FORM | flat profile, self and cumulative |
| what did the macro expander do? | ,expand FORM | expanded source |
| what did the optimiser do? | ,optimize FORM | partially evaluated source |
| what bytecode? | ,disassemble PROC | VM instructions |
| stop here | ,break PROC then ,bt | breakpoint, backtrace |
Traps that will mislead you
,profileon a fast form printsNo samples recorded.It is a sampling profiler with nothing to sample, not a broken profiler. Use a workload of at least ~0.5 s.,localsreports only variables that are still live. At a,break(procedure entry) nothing is live yet, so it says "No local variables"; after,stepan argument already used shows as_. Read arguments from,btor,frame, or,upinto the caller (Guile 3.0.10system/vm/frame.scm:213-301). Do not conclude the variable is unbound.,localscan crash the whole REPL. Measured on Guile 3.0.10 (Homebrew, macOS): after an error inside aletwhose binding holds an unboxed number,,upthen,localsprinted one variable and the process died with SIGSEGV (status 139). Everyone attached to that REPL, a Geiser session included, loses it. Prefer,btand,frameon a shared REPL.- Connections share one Guile image. Each connection gets its own REPL loop,
but top-level definitions go into the shared
(guile-user)module, and the$Nhistory keeps counting across connections. Measured on 0.4.0:(define x 42)on one connection, thenxon the next, returned42, through the proxy and on the raw port alike. So adefinefrom an agent lands in the human's Geiser session too. Clean up what you define, or work inside your own module. A new connection does not reload a changed module; see the next point. - Reload after editing. A module already loaded does not pick up file
changes:
(reload-module (resolve-module '(my mod))). Redefining a record type or a GOOPS class leaves existing instances on the old definition. - There is no linter.
guild3 compile -W 3 -o /tmp/x.go file.scmgives warnings, and that is the whole story — no clj-kondo equivalent exists. Never instruct anyone to "run the linter". (-o /dev/nullalways fails:guildrenames a temp file into place.)
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
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
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.

