據 AlphaMoat 統計,截至 2026-09,Smalltalk 累計下載 3,139 次、獲 0 個星標,在全部 5,078 個 AI 技能中排名第 3,629 位,在「開發程式設計」分類(577 個)中排名第 462 位。
| 平台 | 累計安裝 | 累計下載 | 星標 | 評論 |
|---|---|---|---|---|
| ClawHub ↗ | 104 | 3139 | - | 1 |
各平台的計數口徑不同,統計時間不一致。
功能包括求值程式碼、檢視類層級與方法原始碼、定義類或方法,也提供刪除方法/類的命令。預設 Playground 模式下變更是臨時的;Dev Mode 會保留變更。執行修改操作前應確認連線的 image、執行模式和目的碼。 LLM 命令可能向外部服務傳送原始碼;共享前須獲批准,持久修改前應備份。
資料釋出於 2026-10-29
以下是根據技能文件生成的示例,不代表實際執行結果。
2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。
| 月份 | 累計下載 | 環比 | 星標 |
|---|---|---|---|
| 2026-09 | 3139 | — | - |
| 2026-08 | 3066 | +2.9% | - |
| 2026-07 | 2979 | +7.2% | - |
| 2026-06 | 2780 | +3.8% | - |
| 2026-05 | 2677 | — | - |
| 2026-03 | 2185 | — | - |
以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。
---
name: smalltalk
version: 1.7.0
description: 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.
metadata: {"clawdbot":{"emoji":"💎","requires":{"bins":["python3","xvfb-run"]}}}
---
# Smalltalk Skill
Execute Smalltalk code and browse live Squeak/Cuis images via MCP.
## Prerequisites
**Get the ClaudeSmalltalk repo first:**
```bash
git clone https://github.com/CorporateSmalltalkConsultingLtd/ClaudeSmalltalk.git
```
This repo contains:
- MCP server code for Squeak (`MCP-Server-Squeak.st`)
- Setup documentation (`SQUEAK-SETUP.md`, `CLAWDBOT-SETUP.md`)
- This Clawdbot skill (`clawdbot/`)
## Setup
1. **Set up Squeak with MCP server** — see [SQUEAK-SETUP.md](https://github.com/CorporateSmalltalkConsultingLtd/ClaudeSmalltalk/blob/main/SQUEAK-SETUP.md)
2. **Configure Clawdbot** — see [CLAWDBOT-SETUP.md](https://github.com/CorporateSmalltalkConsultingLtd/ClaudeSmalltalk/blob/main/CLAWDBOT-SETUP.md)
## Usage
```bash
# 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
```
## Operating Modes
### Playground (Default)
Stock image, ephemeral. Changes are discarded when daemon stops.
User says: "load Smalltalk skill" or "invoke Smalltalk" — no special flags.
```bash
# Start playground daemon
nohup python3 smalltalk-daemon.py start > /tmp/daemon.log 2>&1 &
```
### Dev Mode
User supplies their own image/changes pair. Changes persist across sessions.
User says: "load Smalltalk skill in dev mode with ~/MyProject.image"
```bash
# 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.
### Common Commands
```bash
# 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
```
## Commands
| 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 <code>` | Execute Smalltalk code, return result |
| `browse <class>` | Get class metadata (superclass, ivars, instance `methods` and `classMethods`) |
| `method-source <class> <selector> [--class-side]` | View method source code (supports `"Class class"` syntax or `--class-side` flag) |
| `define-class <definition>` | Create or modify a class |
| `define-method <class> <source>` | Add or update a method |
| `delete-method <class> <selector>` | Remove a method |
| `delete-class <class>` | Remove a class |
| `list-classes [prefix]` | List classes, optionally filtered |
| `hierarchy <class>` | Get superclass chain |
| `subclasses <class>` | Get immediate subclasses |
| `list-categories` | List all system categories |
| `classes-in-category <cat>` | List classes in a category |
| `explain <code>` | Explain Smalltalk code (requires `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`) |
| `explain-method <class> <sel> [--class-side] [--source <code>]` | Fetch method from image and explain it (or use `--source`/`--source-file`/`--source-stdin` to bypass daemon) |
| `audit-comment <class> <sel> [--class-side] [--source <code>]` | Audit method comment vs implementation (or use `--source`/`--source-file`/`--source-stdin` to bypass daemon) |
| `audit-class <class>` | Audit all methods in a class (instance + class side) |
| `generate-sunit <targets> [--force] [--class-name <name>]` | Generate SUnit tests for methods and file into image |
## Environment Variables
| 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) |
## Using with Claude Code (MCP mode)
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:
```bash
# 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.
## Generating SUnit Tests
The `generate-sunit` command uses an LLM to generate SUnit test cases for Smalltalk methods and files them directly into the running image:
```bash
# 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.
## Notes
- Requires xvfb for headless operation on Linux servers
- Uses Squeak 6.0 MCP server (GUI stays responsive if display available)
- `saveImage` intentionally excluded for safety
- MCPServer version 7+ required (v7 adds class-side method support)
- Playground mode: ephemeral, .changes → /dev/null
- Dev mode: persistent, .changes kept, requires `--dev --image PATH`
用 gh 命令列工具檢視 GitHub 上的 PR 檢查、工作流執行與 API 查詢的技能。
聚合 16 個搜尋引擎、無需 API Key 的檢索技能。
用命令列直接列出、配置、授權並呼叫 MCP 服務與工具。
根據文字描述生成 Mermaid 圖表程式碼。
用受管 OAuth 訪問 YouTube Data API,檢索影片並管理頻道內容。
透過受管的 OAuth 連線訪問 GitHub REST API。
覆蓋規劃、實現、驗證與測試的編碼工作流技能。
整理 Docker 常用命令與容器工作流的技能。
資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。