From smalltalk-dev
Evaluates Smalltalk expressions in Pharo via MCP for verifying object states, incremental debugging, connection checks, and quick experiments.
How this skill is triggered — by the user, by Claude, or both
Slash command
/smalltalk-dev:st-evalThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Evaluate arbitrary Smalltalk expressions in the running Pharo image via `mcp__smalltalk-interop__eval`.
Evaluate arbitrary Smalltalk expressions in the running Pharo image via mcp__smalltalk-interop__eval.
Always use printString — MCP returns serialized output. Raw objects cause errors or unreadable results:
✅ MyClass new doSomething printString
✅ collection printString
❌ MyClass new doSomething
Wrap risky code in on:do: — Uncaught errors in eval crash the MCP call with no useful message:
| result |
result := Array new: 2.
[ result at: 1 put: (riskyOperation) printString ]
on: Error do: [:ex | result at: 2 put: ex description].
^ result
Use fork for blocking operations — Code that opens a dialog or blocks the image will cause the MCP call to hang indefinitely. Detach it:
[ <blocking expression> ] fork.
^ 'started'
Smalltalk version
| step1 step2 |
step1 := objA computeStep1.
step2 := step1 processStep2.
^ { 'step1' -> step1 printString. 'step2' -> step2 printString } asDictionary printString
{
'class' -> obj class name.
'value' -> obj printString.
'size' -> obj size printString
} asDictionary printString
collection ifEmpty: ['empty'] ifNotEmpty: [:col | col first printString]
| result |
result := Array new: 2.
[
| obj |
obj := MyClass new name: 'Test'.
result at: 1 put: obj process printString.
] on: Error do: [:ex |
result at: 2 put: ex description
].
^ result
| Symptom | Cause | Fix |
|---|---|---|
| MCP call hangs / no response | Blocking operation (dialog, modal, infinite loop) | Wrap in fork |
Error: cannot serialize | Returning raw object | Add printString |
| Debugger window opened in Pharo | Uncaught error triggered Pharo debugger | Close debugger in Pharo, then re-eval with on:do: |
MessageNotUnderstood | Method doesn't exist or typo | Check with mcp__smalltalk-interop__search_implementors |
smalltalk-dev:smalltalk-debugger — Systematic debugging workflow using evalsmalltalk-dev:st-init — Verify Pharo connection if eval fails unexpectedlynpx claudepluginhub mumez/smalltalk-dev-plugin --plugin smalltalk-devSystematically debugs Pharo Smalltalk code via error diagnosis, incremental evaluation, intermediate value inspection, and stack trace analysis. Use for test failures, exceptions, timeouts, or hung operations.
Manages AI pair programming sessions with driver/navigator roles, TDD, real-time code review, and quality verification. Invoke when collaborating on code with role-based workflows.
Investigates unfamiliar codebases or problems using the Coordinate Remote Viewing protocol: clearing assumptions before gathering staged observations and managing premature conclusions.