home / skills / plurigrid / asi / guile
This skill helps you explore and run Guile Scheme concepts, evaluate expressions, and manage modules within a Python-driven workflow.
npx playbooks add skill plurigrid/asi --skill guileReview the files below or copy the command above to add this skill to your agents.
---
name: guile
description: GNU Scheme interpreter (67K lines info).
version: 1.0.0
---
# guile
GNU Scheme interpreter (67K lines info).
```bash
guile [options] [script [args]]
-L <dir> Add load path
-l <file> Load source
-e <func> Apply function
-c <expr> Evaluate expression
-s <script> Execute script
```
## REPL
```scheme
(define (factorial n)
(if (<= n 1) 1 (* n (factorial (- n 1)))))
(use-modules (ice-9 match))
(match '(1 2 3) ((a b c) (+ a b c)))
```
## Modules
```scheme
(use-modules (srfi srfi-1)) ; List library
(use-modules (ice-9 receive)) ; Multiple values
(use-modules (ice-9 format)) ; Formatted output
```
## Scientific Skill Interleaving
This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
### Graph Theory
- **networkx** [○] via bicomodule
- Universal graph hub
### Bibliography References
- `general`: 734 citations in bib.duckdb
## SDF Interleaving
This skill connects to **Software Design for Flexibility** (Hanson & Sussman, 2021):
### Primary Chapter: 5. Evaluation
**Concepts**: eval, apply, interpreter, environment
### GF(3) Balanced Triad
```
guile (−) + SDF.Ch5 (−) + [balancer] (−) = 0
```
**Skill Trit**: -1 (MINUS - verification)
### Secondary Chapters
- Ch4: Pattern Matching
### Connection Pattern
Evaluation interprets expressions. This skill processes or generates evaluable forms.
## Cat# Integration
This skill maps to **Cat# = Comod(P)** as a bicomodule in the equipment structure:
```
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
```
### GF(3) Naturality
The skill participates in triads satisfying:
```
(-1) + (0) + (+1) ≡ 0 (mod 3)
```
This ensures compositional coherence in the Cat# equipment structure.This skill provides an interface to the GNU Scheme (Guile) interpreter for evaluating Scheme code, running scripts, and interacting with modules and the REPL. It exposes common CLI options, REPL usage patterns, and module loading so you can embed or orchestrate Scheme evaluation from Python-based workflows. The skill is designed for scientific and programmatic workflows that need a lightweight Scheme evaluator integrated into larger systems.
The skill wraps Guile’s execution model: it can start a REPL, evaluate expressions, call functions, load source files, and add load paths. It supports common command-line flags (-L, -l, -e, -c, -s) and programmatic evaluation of Scheme forms. It also exposes idiomatic module loading (use-modules) so callers can import SRFIs and ice-9 libraries and receive results back into the host environment.
Can I call Guile functions from Python and get back native values?
Yes. Use the skill to evaluate expressions that return serializable values (numbers, strings, lists) and format them for exchange. For complex objects, serialize in Scheme first (e.g., with format) before passing.
Which common modules are available?
Common Guile modules include SRFI libraries (srfi-1), ice-9 helpers (receive, match, format). Availability depends on the Guile installation and any added load paths.
How do I run a script non-interactively?
Use the -s <script> flag to execute a script file, or -c <expr> to evaluate a single expression. Combine -L and -l to prepare the environment before execution.