From smalltalk-dev
Lints Tonel .st files for Smalltalk best practices before Pharo import, after editing for quality checks, or to diagnose style issues in packages.
How this skill is triggered — by the user, by Claude, or both
Slash command
/smalltalk-dev:st-lintThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Validate Tonel `.st` files for Smalltalk best practices before importing to Pharo.
Validate Tonel .st files for Smalltalk best practices before importing to Pharo.
/st-import — lint catches issues that would silently corrupt the image.st files — confirm no style regressionsBefore linting, verify required Tonel meta files exist:
| File | Location | Required |
|---|---|---|
.project | repo root | ✅ |
src/.properties | src/ directory | ✅ |
package.st | each package directory | ✅ |
If any are missing, warn the user, suggest /st-setup-project, and continue linting — lint results are still useful even when meta files are absent, since the linter operates on .st file syntax independently.
Expected src/.properties content:
{
#format : #tonel
}
.st FilesResolve the target to a list of absolute paths:
src/MyPackage/MyClass.st): use directly, skip if it is package.stsrc/MyPackage): Glob **/*.st, exclude package.stsrc): Glob **/*.st across all packages, exclude package.stAlways convert to absolute paths before passing to the MCP tool.
Call mcp__smalltalk-validator__lint_tonel_smalltalk_from_file with the absolute path, one file at a time.
Show a summary per file:
src/MyPackage/MyClass.st — ✅ clean
src/MyPackage/AnotherClass.st — ⚠️ 2 warnings
• [warning] Method #doSomething has no comment
• [warning] Temporary variable 'x' shadows outer scope
src/MyPackage/BrokenClass.st — ❌ 1 error
• [error] Syntax error near ']'
Exit status semantics:
| Result | Meaning | Action |
|---|---|---|
| 0 — clean | No issues | Proceed to import |
| 1 — warnings only | Style issues | Proceed to import, consider fixing |
| 2 — errors found | Syntax/structural errors | Fix before importing |
| Issue | Likely Cause | Fix |
|---|---|---|
Syntax error near '...' | Unclosed bracket/paren, missing period | Check the indicated line |
Method has no comment | Missing method comment | Add a brief comment |
Temporary variable shadows outer scope | Variable name collision | Rename the temp var |
Missing package.st | package.st not found | Create it: Package { #name : 'PkgName' } |
smalltalk-dev:st-setup-project — Create missing meta filessmalltalk-dev:smalltalk-developer — Full Edit → Lint → Import → Test workflownpx claudepluginhub mumez/smalltalk-dev-plugin --plugin smalltalk-devValidates Tonel .st file syntax before importing to Pharo. Use when suspecting syntax errors or after manual edits to ensure correctness.
Runs custom Python lints enforcing taste invariants like file size limits, naming conventions (snake_case Python, kebab-case YAML), function complexity, with agent-readable remediation instructions. Use when writing or reviewing code.
Enforces custom lints for file size limits, naming conventions (snake_case Python, kebab-case YAML/skills, PascalCase PowerShell), function complexity, and skill size with agent-readable remediation instructions. Use when writing, reviewing, or preparing code for PRs.