smalltalk-implementation-finder
БесплатноБез исполняемых скриптовНе проверенMethod implementation finder and analyzer for Smalltalk (Pharo/Squeak). Provides expertise in discovering implementors across class hierarchies…
Об этом скилле
Smalltalk Implementation Finder
Find and analyze method implementations across class hierarchies to understand abstract methods, implementation patterns, and assess refactoring opportunities.
Purpose
Use this skill to:
- Learn implementation idioms by studying existing code
- Assess refactoring impact before making changes
- Discover implementation patterns across class hierarchies
- Find duplicate implementations that could be consolidated
- Understand subclass responsibilities for abstract methods
Core Workflow
1. Find implementors → search_implementors(method_name)
2. Get source code → get_method_source(class, method)
3. Analyze patterns → Compare implementations
4. Apply learnings → Use discovered idioms in your code
Primary Use Cases
1. Learning Implementation Idioms
When to use: Implementing a method for the first time and want to follow conventions.
Quick workflow:
1. search_implementors("methodName")
2. Sample 5-10 well-known classes
3. get_method_source for each
4. Identify common pattern
5. Apply to your implementation
Common idioms:
hash→ Combine fields withbitXor:initialize→ Callsuper initializefirst=→ Check class equality, then compare fieldsprintOn:→ Use class identifier + element printing
Example: Learning hash implementation
Point>>hash → "^ x hash bitXor: y hash"
Association>>hash → "^ key hash bitXor: value hash"
Pattern: field1 hash bitXor: field2 hash
2. Assessing Refactoring Impact
When to use: Planning to change a method signature or refactor implementations.
Quick workflow:
1. Count implementors: search_implementors(method)
2. Count references: search_references(method)
3. Assess impact: Low (<5 impl, <20 refs) / Medium (5-20, 20-100) / High (20+, 100+)
4. Decide: Proceed / Add new method / Don't change
Example: Changing at:put:
Implementors: 50+ classes
References: 500+ call sites
Impact: VERY HIGH
Decision: Don't change. Add new method instead.
3. Finding Duplicate Code
When to use: Suspect multiple classes have identical implementations.
Quick workflow:
1. Find implementors in same hierarchy
2. Get source for each
3. Compare for duplicates
4. Refactor identical code to superclass
Example: Consolidating isEmpty
Array>>isEmpty → "^ self size = 0"
Set>>isEmpty → "^ self size = 0"
OrderedCollection>>isEmpty → "^ self size = 0"
Action: Pull up to Collection superclass
4. Understanding Abstract Methods
When to use: Encountering self subclassResponsibility and need to see concrete implementations.
Quick workflow:
1. Check abstract definition in superclass
2. Find all implementors
3. Study 3-5 concrete implementations
4. Understand expected behavior
Example: Understanding Collection>>do:
Collection>>do: → "self subclassResponsibility"
Array>>do: → "1 to: self size do: [:i | aBlock value: (self at: i)]"
LinkedList>>do: → "[node notNil] whileTrue: [aBlock value: node value. ...]"
Understanding: Each uses its own iteration strategy
5. Narrowing Usage Search
When to use: Finding references to a specific class's implementation, not all implementations.
Quick workflow:
1. Find implementors
2. Find all references
3. Filter by receiver type/context
4. Focus on relevant usage
Example: Finding Collection>>select: usage (not Dictionary>>select:)
Implementors: [Collection, Dictionary, Interval, ...]
References: 1000+ call sites
Filter by variable context:
"myArray select: [...]" → Collection implementation
"myDict select: [...]" → Dictionary implementation
MCP Tools
search_implementors
mcp__smalltalk-interop__search_implementors: 'methodName'
Returns all classes implementing the method.
get_method_source
mcp__smalltalk-interop__get_method_source: class: 'ClassName' method: 'methodName'
Gets source code for a specific implementation.
eval (for hierarchy exploration)
mcp__smalltalk-interop__eval: 'Collection allSubclasses'
Useful for scoping analysis to specific hierarchies.
search_references
mcp__smalltalk-interop__search_references: 'methodName'
Finds all senders (combines well with implementor analysis).
Quick Reference
| Goal | Tools | Pattern |
|---|---|---|
| Learn idiom | search_implementors → get_method_source | Sample 5-10, identify pattern |
| Assess impact | search_implementors + search_references | Count both, assess risk |
| Find duplicates | search_implementors → get_method_source | Compare, find identical |
| Narrow usage | search_implementors → search_references | Filter by receiver type |
Best Practices
✅ Do
- Scope by hierarchy: Focus on relevant class hierarchies using
eval("ClassA allSubclasses") - Sample wisely: Choose well-known, well-implemented classes (Array, Dictionary, Point)
- Count first: Get overview be
Установить smalltalk-implementation-finder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл smalltalk-implementation-finder?
Method implementation finder and analyzer for Smalltalk (Pharo/Squeak). Provides expertise in discovering implementors across class hierarchies (search_implementors), analyzing implementation patterns, learning coding idioms from existing implementations, assessing refactoring impact (counting implementors and references), finding duplicate code for consolidation, understanding abstract method implementations (subclassResponsibility), and tracing method overrides through inheritance chains. Use when analyzing method implementations across classes, learning implementation idioms, assessing refactoring risk before changes, finding duplicate implementations for consolidation, understanding how abstract methods are implemented in concrete classes, or tracing which classes override specific methods.
Как установить скилл smalltalk-implementation-finder?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл smalltalk-implementation-finder запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic