Cursor plugin for AI-driven Smalltalk (Pharo) development.
Claude Code version is also available.
This plugin provides a minimal, practical toolkit for Smalltalk development using AI skills. It focuses on the essential workflow of editing Tonel files, importing them into Pharo, and running tests.
- Commands: Essential slash commands for import, test, eval, and validation
- Skills: AI-powered development workflow, debugging expertise, and documentation
- MCP Integration: Seamless connection to Pharo and validation servers
- Hooks: Automatic suggestions after file changes
The easiest way to use this plugin is to use the /st-buddy command:
# Start Smalltalk Buddy (once per session)
/st-buddy
# Then ask questions naturally
You: "I want to create a Person class with name and age"
AI: I'll help you create that! [Creates Tonel files and guides you through the process]
You: "How do I test this?"
AI: Let me run the tests for you... [Executes tests and shows results]
You: "The test failed, can you help?"
AI: I'll debug this... [Investigates, identifies issue, and fixes it]/st-buddy is your friendly development partner that:
- Understands what you want to do and routes to the right tools
- Guides you through development, testing, and debugging
- Helps you learn AI-assisted Smalltalk development
- Works naturally through conversation
- Run /st-buddy once at the start of your session
- Ask questions naturally about what you want to do
- AI implements and manages the workflow (editing Tonel, importing, testing)
- Review results and continue the conversation
- Iterate until you're satisfied
For experienced users who prefer direct commands, see Commands.md.
Install PharoSmalltalkInteropServer in your Pharo image.
Install Cursor from the official site.
# Install the plugin
/add-plugin smalltalk-devAfter installation, you should see the custom commands starting with /st-.
The plugin provides essential commands for Smalltalk development:
/st-buddy- Start your friendly Smalltalk development assistant (recommended starting point)/st-init- Load smalltalk-developer skill and explain workflow/st-setup-project- Set up Pharo project structure/st-eval- Execute Smalltalk code snippets/st-lint- Check code quality and best practices/st-import- Import Tonel packages to Pharo/st-export- Export packages from Pharo/st-test- Run SUnit tests/st-validate- Validate Tonel syntax
Most users should start with /st-buddy - it will guide you and use the other commands as needed.
For command details and advanced usage, see Commands.md.
The plugin includes specialized AI skills that activate automatically based on your needs:
- smalltalk-developer - Development workflow and best practices
- smalltalk-debugger - Error handling and debugging procedures
- smalltalk-usage-finder - Code usage exploration and analysis
- smalltalk-implementation-finder - Implementation discovery and patterns
- smalltalk-commenter - CRC-style class documentation generation
These skills work behind the scenes when you use /st-buddy, providing specialized knowledge for each task.
Automatically suggests class documentation improvements:
- Detects undocumented classes after file changes (occasionally, not every time)
- Generates CRC-style class comments
- Can be invoked directly:
/smalltalk-commenter
Works quietly in the background - you'll get occasional suggestions to improve documentation.
The plugin exposes all tools from both MCP servers:
pharo-interop (22 tools):
eval: Execute Smalltalk expressionsimport_package,export_package: Package managementrun_class_test,run_package_test: Test executionget_class_source,get_method_source: Code inspectionsearch_implementors,search_references: Code navigation- And more...
smalltalk-validator (5 tools):
validate_tonel_smalltalk_from_file: File validationvalidate_tonel_smalltalk: Content validationvalidate_smalltalk_method_body: Method validationlint_tonel_smalltalk_from_file: File lintinglint_tonel_smalltalk: Content linting
The plugin uses two MCP servers:
- pharo-interop: Communication with Pharo image
- smalltalk-validator: Tonel syntax validation
These are configured automatically via .mcp.json. You can customize the Pharo port:
export PHARO_SIS_PORT=8086 # default# Remove the plugin
/remove-plugin smalltalk-dev- Edit Tonel files (AI editor is the source of truth)
- Lint code with
/st-lintto check quality - Import to Pharo with absolute paths
- Test after every import
- Use
/st-lintbefore importing to catch issues early - Add class prefixes to avoid name collisions
- Keep methods focused (15 lines standard, 40 for UI/tests)
- Limit instance variables (max 10 per class)
- Access instance variables through methods, not directly
- Always use absolute paths for imports
- Import multiple packages individually
- AI editor is the source of truth (Tonel files)
- Avoid editing in Pharo directly
- Use
export_packageonly when necessary
- Re-import after every change
- Import main package before test package
- Don't forget to import test packages
- Run tests after every import
- Use
run_class_testfor specific classes - Use
run_package_testfor full packages
- Use
/st-evalfor quick partial execution - Capture both results and errors in Array
- Use
printStringfor object serialization - Debug step-by-step
Make sure PharoSmalltalkInteropServer is running:
SisServer current start.
SisServer current. "Should show running server"- Verify absolute path is correct
- Check that .st files are in correct directory
- Ensure package.st exists
- Check test error message
- Use
/st-validateto check syntax - Use
/st-evalto debug specific code - Fix in Tonel file
- Re-import and re-test
- Check Pharo Transcript for error messages
- Verify server port matches configuration:
SisServer teapotConfig - Try
/st-eval Smalltalk versionto test connection
smalltalk-dev-plugin-cursor/
├── .cursor-plugin/
│ └── plugin.json # Cursor plugin metadata, MCP server reference
├── mcp.json # MCP server configuration
├── assets/
│ └── logo.svg # Plugin logo
├── commands/
│ ├── st-buddy.md # /st-buddy - Friendly development assistant
│ ├── st-init.md # /st-init - Start development session
│ ├── st-setup-project.md # /st-setup-project - Project boilerplate
│ ├── st-eval.md # /st-eval - Execute Smalltalk code
│ ├── st-import.md # /st-import - Import Tonel packages
│ ├── st-export.md # /st-export - Export packages
│ ├── st-test.md # /st-test - Run SUnit tests
│ ├── st-lint.md # /st-lint - Check code quality
│ └── st-validate.md # /st-validate - Validate Tonel syntax
├── skills/
│ ├── smalltalk-commenter/
│ │ └── SKILL.md # Documentation specialist skill
│ ├── smalltalk-developer/
│ │ ├── SKILL.md # Development workflow
│ │ ├── examples/ # Development sessions
│ │ └── references/ # Best practices, Tonel format
│ ├── smalltalk-debugger/
│ │ ├── SKILL.md # Debugging techniques
│ │ ├── examples/ # Debug scenarios
│ │ └── references/ # Error patterns, inspection, UI debugging
│ ├── smalltalk-usage-finder/
│ │ ├── SKILL.md # Usage exploration
│ │ ├── examples/ # Usage scenarios
│ │ └── references/ # Usage analysis
│ └── smalltalk-implementation-finder/
│ ├── SKILL.md # Implementation analysis
│ ├── examples/ # Implementation scenarios
│ └── references/ # Implementation analysis
├── hooks/
│ └── hooks.json # PostToolUse hook configuration
├── scripts/
│ └── suggest-class-comment.sh # PostToolUse hook for documentation suggestions
├── doc/
│ └── Commands.md # Commands quick reference
├── README.md # This file
└── LICENSE
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test with Cursor
- Submit a pull request
MIT License - see LICENSE file for details
- MCP Servers:
- pharo-smalltalk-interop-mcp-server by mumez
- smalltalk-validator-mcp-server by mumez
- Cursor: Cursor
- Pharo: Pharo Project