Smalltalk
Interact with live Smalltalk image (Cuis or Squeak). Use for evaluating Smalltalk code, browsing classes, viewing method source, defining classes/methods, querying hierarchy and categories.
Interact with live Smalltalk image (Cuis or Squeak). Use for evaluating Smalltalk code, browsing classes, viewing method source, defining classes/methods, querying hierarchy and categories.
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Execute Smalltalk code and browse live Squeak/Cuis images via MCP.
Get the ClaudeSmalltalk repo first:
git clone https://github.com/CorporateSmalltalkConsultingLtd/ClaudeSmalltalk.git
This repo contains:
MCP-Server-Squeak.st)SQUEAK-SETUP.md, CLAWDBOT-SETUP.md)clawdbot/)# Check setup python3 smalltalk.py --checkEvaluate code
python3 smalltalk.py evaluate "3 factorial" python3 smalltalk.py evaluate "Date today"
Browse a class
python3 smalltalk.py browse OrderedCollection
View method source (instance side)
python3 smalltalk.py method-source String asUppercase
View method source (class side)
python3 smalltalk.py method-source "MCPServer class" version python3 smalltalk.py method-source MCPServer version --class-side
List classes (with optional prefix filter)
python3 smalltalk.py list-classes Collection
Get class hierarchy
python3 smalltalk.py hierarchy OrderedCollection
Get subclasses
python3 smalltalk.py subclasses Collection
List all categories
python3 smalltalk.py list-categories
List classes in a category
python3 smalltalk.py classes-in-category "Collections-Sequenceable"
Define a new class
python3 smalltalk.py define-class "Object subclass: #Counter instanceVariableNames: 'count' classVariableNames: '' poolDictionaries: '' category: 'MyApp'"
Define a method
python3 smalltalk.py define-method Counter "increment count := (count ifNil: [0]) + 1. ^ count"
Delete a method
python3 smalltalk.py delete-method Counter increment
Delete a class
python3 smalltalk.py delete-class Counter
Stock image, ephemeral. Changes are discarded when daemon stops. User says: "load Smalltalk skill" or "invoke Smalltalk" — no special flags.
# Start playground daemon nohup python3 smalltalk-daemon.py start > /tmp/daemon.log 2>&1 &
User supplies their own image/changes pair. Changes persist across sessions. User says: "load Smalltalk skill in dev mode with ~/MyProject.image"
# Start dev daemon with custom image nohup python3 smalltalk-daemon.py start --dev --image ~/MyProject.image > /tmp/daemon.log 2>&1 &
Dev mode sets
SMALLTALK_DEV_MODE=1 so the MCP server keeps the .changes file
(instead of redirecting to /dev/null). The supplied image must have a matching
.changes file alongside it.
# Check status python3 smalltalk.py --daemon-statusStop daemon
python3 smalltalk-daemon.py stop
Restart in dev mode
python3 smalltalk-daemon.py restart --dev --image ~/MyProject.image
| Command | Description |
|---|---|
| Verify VM/image paths and dependencies |
| Check if daemon is running |
| Debug hung system (sends SIGUSR1, captures stack trace) |
| Execute Smalltalk code, return result |
| Get class metadata (superclass, ivars, instance and ) |
| View method source code (supports syntax or flag) |
| Create or modify a class |
| Add or update a method |
| Remove a method |
| Remove a class |
| List classes, optionally filtered |
| Get superclass chain |
| Get immediate subclasses |
| List all system categories |
| List classes in a category |
| Explain Smalltalk code (requires or ) |
| Fetch method from image and explain it (or use // to bypass daemon) |
| Audit method comment vs implementation (or use // to bypass daemon) |
| Audit all methods in a class (instance + class side) |
| Generate SUnit tests for methods and file into image |
| Variable | Description |
|---|---|
| Path to Squeak/Cuis VM executable |
| Path to Smalltalk image with MCP server |
| API key for Anthropic Claude (preferred for LLM tools) |
| Anthropic model (default: ) |
| API key for OpenAI (fallback for LLM tools) |
| OpenAI model (default: ) |
| Force LLM provider: or (auto-detected if not set) |
When Claude Code has a live Smalltalk image connected via MCP,
explain-method and audit-comment can use pre-fetched source code instead of requiring a running daemon. Use --source, --source-file, or --source-stdin to pass the method source directly:
# Inline source (fetched via MCP, passed on command line) python3 smalltalk.py explain-method SmallInteger + --source "+ aNumber <primitive: 1> ^ super + aNumber"Source from a file
python3 smalltalk.py audit-comment Integer factorial --source-file /tmp/factorial.st
Source piped via stdin
echo "printString ^ self printStringLimitedTo: 50000" | python3 smalltalk.py explain-method Object printString --source-stdin
The three source flags are mutually exclusive. When none is provided, the daemon is used as before.
The
generate-sunit command uses an LLM to generate SUnit test cases for Smalltalk methods and files them directly into the running image:
# Generate tests for a single method python3 smalltalk.py generate-sunit "String>>asUppercase"Generate tests for multiple methods
python3 smalltalk.py generate-sunit "Random>>next" "Random>>nextInt:" "Random>>seed:"
Generate tests for an entire class (all instance methods)
python3 smalltalk.py generate-sunit "OrderedCollection"
Generate tests for class-side methods
python3 smalltalk.py generate-sunit "Date class>>today"
Custom test class name
python3 smalltalk.py generate-sunit "String>>asUppercase" --class-name MyStringTests
Overwrite existing test class
python3 smalltalk.py generate-sunit "String>>asUppercase" --force
Run the generated tests
python3 smalltalk.py evaluate "StringGeneratedTest buildSuite run printString"
The generated TestCase uses standard SUnit assertions (
assert:, assert:equals:, deny:, should:raise:) and is filed into a GeneratedSUnit-* category.
saveImage intentionally excluded for safety--dev --image PATHNo automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.