Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

smalltalk-developer

БесплатноБез исполняемых скриптовНе проверен

Comprehensive Smalltalk (Pharo/Squeak) development workflow guide with AI-driven Tonel editing. Provides expertise in Tonel file format syntax (class…

mumezот mumez★ 17 звёзд на GitHub4 установки в других каталогах

Об этом скилле

Smalltalk Developer Workflow

Implement the standard workflow for Smalltalk (Pharo or Squeak) development using AI editors and the Tonel file format.

Prerequisites

Before starting development, ensure the environment is ready:

  • No project structure (no src/ or .project): Use smalltalk-dev:st-setup-project skill to create boilerplate
  • Smalltalk image not connected or session not initialized: Use smalltalk-dev:st-init skill to verify connection and set up environment

Core Development Cycle

The fundamental workflow for Smalltalk development consists of three steps that repeat:

1. Edit Tonel Files

Edit Tonel files directly in the AI editor. The AI editor is the single source of truth for code.

Key principle: All code changes happen in .st files, not in the Smalltalk image.

Tonel basics:

  • One class per .st file
  • File name matches class name
  • Each package directory contains package.st

For detailed Tonel syntax and examples, see Tonel Format Reference.

Follow the Coding Principles (intent-revealing names, clear responsibilities) and the Style Guide for idiomatic Smalltalk.

Refer to Implementation Patterns for common patterns (Singleton, Settings, etc.).

2. Import to the Smalltalk Image

Before importing, run lint to check code quality:

/st-lint src/MyPackage   # Check Smalltalk best practices

Then import the package into the running Smalltalk image using absolute paths:

mcp__smalltalk-interop__import_package: 'MyPackage' path: '/home/user/project/src'

Critical rules:

  • ✅ Lint before import - Check code quality first
  • ✅ Always use absolute paths (never relative)
  • ✅ Re-import after every change
  • ✅ Import packages in dependency order
  • ✅ Import test packages after main packages

3. Run Tests

After import, run tests to verify changes:

mcp__smalltalk-interop__run_class_test: 'MyClassTest'
mcp__smalltalk-interop__run_package_test: 'MyPackage-Tests'

If tests fail, return to step 1, fix the Tonel file, and repeat.

Essential Best Practices

Path Management

Always use absolute paths for imports:

✅ /home/user/myproject/src
❌ ./src
❌ ../myproject/src

Finding the source directory:

  1. Check .project file for srcDirectory field
  2. Common locations: src/, repositories/
  3. Construct full path: <project_root>/<srcDirectory>

See Best Practices Reference for details.

Package Dependencies

Check BaselineOf<ProjectName> to determine correct import order:

baseline: spec
    <baseline>
    spec for: #common do: [
        spec
            package: 'MyPackage-Core';
            package: 'MyPackage-Json' with: [
                spec requires: #('MyPackage-Core')
            ]
    ]

Import order: Dependencies first → MyPackage-Core → MyPackage-Json

See Best Practices: Dependencies for complete guide.

Import Timing

Re-import after every change - the Smalltalk image doesn't automatically reload files.

Standard sequence:

  1. Edit MyPackage/MyClass.st
  2. Import MyPackage
  3. Edit MyPackage-Tests/MyClassTest.st
  4. Import MyPackage-Tests
  5. Run tests

File Editing Philosophy

The AI editor is the source of truth:

  • ✅ Edit .st files → Import to the Smalltalk image
  • ❌ Edit in the Smalltalk image → Export to .st files

Use export_package only for:

  • Initial project setup
  • Emergency recovery
  • Exploring existing code

See Best Practices: File Editing for rationale.

Common Patterns

Pattern 1: Creating New Class

1. Ensure .project file exists in project root (create if missing - see Best Practices)
2. Create src/MyPackage/MyClass.st with class definition
3. import_package: 'MyPackage' path: '/absolute/path/src'
4. run_class_test: 'MyClassTest'

Pattern 2: Adding Methods

1. Read existing src/MyPackage/MyClass.st
2. Add new method to file
3. import_package: 'MyPackage' path: '/absolute/path/src'
4. run_class_test: 'MyClassTest'

Pattern 3: Multi-Package Development

1. Check BaselineOf for dependency order
2. Import packages in correct sequence
3. Import test packages last
4. Run comprehensive tests

Pattern 5: Renaming a Class

Renaming a class only in the Tonel file and importing leaves the old class in the Smalltalk image. Always rename in the Smalltalk image first, then import.

1. Rename the class in the Smalltalk image via eval:
   (OldClassName rename: 'NewClassName') printString

2. Update the Tonel filename and class name in the .st file

3. Import the package
   import_package: 'MyPackage' path: '/absolute/path/src'

Why? Tonel import creates or updates classes by

Полный SKILL.md на GitHub

Установить smalltalk-developer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/development-sessions.mdreferences/best-practices.mdreferences/coding-principles.mdreferences/patterns.mdreferences/style-guide.mdreferences/tonel-format.md

FAQ

Что делает скилл smalltalk-developer?

Comprehensive Smalltalk (Pharo/Squeak) development workflow guide with AI-driven Tonel editing. Provides expertise in Tonel file format syntax (class definitions with name, superclass, instVars, category, method categories, class comment placement), package structure (package.st placement, directory organization, BaselineOf dependencies), development workflow (Edit → Import → Test cycle with absolute paths, re-import timing, test execution), and Smalltalk best practices (CRC format documentation, method categorization conventions). Use when working with Pharo or Squeak Smalltalk projects, creating or editing Tonel .st files, organizing packages and dependencies, resolving import order issues, writing class comments, implementing standard Smalltalk development patterns (Singleton, Settings, etc.), or troubleshooting Tonel syntax.

Как установить скилл smalltalk-developer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл smalltalk-developer запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить smalltalk-developer с