smalltalkInteract with live Smalltalk image (Cuis or Squeak). Use for evaluating Smalltalk code, browsing classes, viewing method source, defining classes/methods, querying hierarchy and categories.
Install via ClawdBot CLI:
clawdbot install johnmci/smalltalkRequires:
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 --check
# Evaluate 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-status
# Stop daemon
python3 smalltalk-daemon.py stop
# Restart in dev mode
python3 smalltalk-daemon.py restart --dev --image ~/MyProject.image
| Command | Description |
|---------|-------------|
| --check | Verify VM/image paths and dependencies |
| --daemon-status | Check if daemon is running |
| --debug | Debug hung system (sends SIGUSR1, captures stack trace) |
| evaluate | Execute Smalltalk code, return result |
| browse | Get class metadata (superclass, ivars, instance methods and classMethods) |
| method-source | View method source code (supports "Class class" syntax or --class-side flag) |
| define-class | Create or modify a class |
| define-method | Add or update a method |
| delete-method | Remove a method |
| delete-class | Remove a class |
| list-classes [prefix] | List classes, optionally filtered |
| hierarchy | Get superclass chain |
| subclasses | Get immediate subclasses |
| list-categories | List all system categories |
| classes-in-category | List classes in a category |
| explain | Explain Smalltalk code (requires ANTHROPIC_API_KEY or OPENAI_API_KEY) |
| explain-method ] | Fetch method from image and explain it (or use --source/--source-file/--source-stdin to bypass daemon) |
| audit-comment ] | Audit method comment vs implementation (or use --source/--source-file/--source-stdin to bypass daemon) |
| audit-class | Audit all methods in a class (instance + class side) |
| generate-sunit | Generate SUnit tests for methods and file into image |
| Variable | Description |
|----------|-------------|
| SQUEAK_VM_PATH | Path to Squeak/Cuis VM executable |
| SQUEAK_IMAGE_PATH | Path to Smalltalk image with MCP server |
| ANTHROPIC_API_KEY | API key for Anthropic Claude (preferred for LLM tools) |
| ANTHROPIC_MODEL | Anthropic model (default: claude-opus-4-20250514) |
| OPENAI_API_KEY | API key for OpenAI (fallback for LLM tools) |
| OPENAI_MODEL | OpenAI model (default: gpt-4o) |
| LLM_PROVIDER | Force LLM provider: anthropic or openai (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 PATHGenerated Mar 1, 2026
Instructors use this skill to teach Smalltalk concepts in computer science courses, allowing students to evaluate code, browse class hierarchies, and define methods interactively. It supports hands-on learning with live images, making abstract OOP principles tangible.
Developers maintain and modernize legacy Smalltalk applications in industries like finance or manufacturing, using the skill to audit methods, generate tests, and refactor code without disrupting live systems. It enables safe exploration and updates in dev mode with persistent changes.
Teams integrate the skill with LLM tools to explain and audit Smalltalk code, leveraging explain-method and audit-comment commands for documentation and quality checks. This accelerates code reviews and onboarding in tech companies.
Researchers in academia or R&D use the skill to quickly prototype algorithms or simulations in Smalltalk, defining classes and methods on-the-fly. The playground mode allows experimentation without permanent changes, ideal for iterative design.
Offer specialized consulting for Smalltalk system migration, optimization, and training, using the skill to demonstrate solutions and automate audits. Revenue comes from hourly rates or project-based fees for clients in legacy-heavy industries.
Integrate the skill into a SaaS platform for code analysis and AI-assisted development, charging subscription fees for access to enhanced features like automated testing and LLM explanations. Targets small to medium-sized tech teams.
License the skill to educational institutions for use in programming courses, providing tailored support and curriculum materials. Revenue is generated through annual licenses or per-student fees, leveraging the skill's interactive capabilities.
đŦ Integration Tip
Set up environment variables like SQUEAK_VM_PATH and ANTHROPIC_API_KEY beforehand to streamline usage, and consider using dev mode for persistent changes in long-term projects.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).
Write, run, and manage unit, integration, and E2E tests across TypeScript, Python, and Swift using recommended frameworks.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.