Use this skill when user asks "with smalltalk-usage-finder", "how to use X class?", "show usage examples", "what is X responsible for?", "find examples of Y", "what does this class do?", "package overview", or needs to understand Smalltalk code usage patterns, class responsibilities, or API usage from existing implementations.
/plugin marketplace add mumez/smalltalk-dev-plugin/plugin install smalltalk-dev@smalltalk-dev-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples/usage-scenarios.mdreferences/usage-analysis.mdDiscover how Smalltalk classes, methods, and packages are used in practice through systematic analysis of documentation, examples, and real-world code.
Goal: Discover what a class does and its intended purpose.
Primary Tool: get_class_comment - The authoritative source for class responsibility.
Workflow:
1. Verify class name (if uncertain): search_classes_like(query)
2. Get class comment: get_class_comment(class_name)
3. Present responsibility clearly
Example:
search_classes_like("Point")
→ ["Point", "PointArray", ...]
get_class_comment("Point")
→ "I represent an x-y pair of numbers usually designating a location on the screen."
Best practice: Always start with the class comment - it's the authoritative documentation.
Goal: Learn how to use a class by examining real examples.
Primary Tools: search_references_to_class, get_method_source, list_methods
Workflow:
1. Check for example methods:
- list_methods(package) or search_methods_like("example")
- Filter for "exampleXXX" methods (class-side)
- get_method_source for each example
2. Find real-world usage:
- search_references_to_class(class_name)
- Get source for top 5-10 references
- Identify common patterns
3. Synthesize usage guide
Example methods convention:
examples categoryexampleSimple, example1, exampleWithDataGoal: Understand how a specific method is used in context.
Primary Tools: search_references, get_method_source
Challenge: Polymorphism - same method name in multiple classes.
Workflow:
1. Verify method exists: search_methods_like(method_name)
2. Find all references: search_references(method_name)
3. Filter by context:
- Get source for each reference
- Look for variable naming clues (e.g., "aPoint" → Point)
- Check type comments
4. Present usage with examples
Filtering by context:
aPoint → Point, dict → Dictionary"aPoint <Point>"arithmetic, accessing, etc.Goal: Understand package structure and purpose.
Primary Tools: list_classes, get_class_comment
Workflow:
1. List all classes: list_classes(package_name)
2. Get comments for key classes (top 10-20)
3. Identify class hierarchy and relationships
4. Find entry points (constructors, main classes)
5. Generate overview
Focus on:
Goal: Resolve unclear or partial class/method names.
Primary Tools: search_classes_like, search_methods_like
Workflow:
1. Fuzzy search: search_classes_like(partial_name)
2. If multiple matches: present options to user
3. Once identified: proceed with normal workflow
Example:
search_classes_like("Dict")
→ ["Dictionary", "IdentityDictionary", "SmallDictionary", ...]
Present options:
"Found 3 classes:
1. Dictionary - General key-value storage
2. IdentityDictionary - Identity comparison
3. SmallDictionary - Optimized for <10 elements
Which one?"
Class inspection:
get_class_comment('ClassName')
get_class_source('ClassName')
Method inspection:
get_method_source(class: 'ClassName' method: 'methodName' is_class_method: false)
Search tools:
search_references_to_class('ClassName')
search_references('methodName')
search_classes_like('partial')
search_methods_like('partial')
Package tools:
list_classes('PackageName')
list_methods('PackageName')
Use fuzzy search when uncertain:
✅ Good: search_classes_like('Dict') → confirm → proceed
❌ Bad: Assume Dict is valid class name
Focus on top 5-10 most relevant:
✅ Good: Analyze top 5 references ❌ Bad: Try to analyze all 500 references
Check for example methods first:
✅ Good: Search examples → if none, search references ❌ Bad: Immediately search all references
They are authoritative documentation:
✅ Good: Start with get_class_comment
❌ Bad: Ignore comments, only look at code
Show surrounding code, not just isolated lines:
✅ Good: Show full method with context ❌ Bad: Show only the single line with method call
Use context clues to filter:
✅ Good: Check variable names, method category ❌ Bad: Assume first match is correct
Ask user instead of guessing:
✅ Good: "Found 3 matches. Which one?" ❌ Bad: "Assuming you meant Stream..."
Problem: User says "Point" but means "PointArray"
Solution: Always verify with search_classes_like
Problem: 500 search results overwhelming Solution: Limit to top 10, filter by relevance
Problem: Same method in multiple classes Solution: Use variable names and context to filter
Problem: Only checking instance-side
Solution: Check class-side for exampleXXX methods
Problem: Just showing raw search results Solution: Analyze patterns and create usage guide
User: "How do I use Point?"
1. get_class_comment('Point')
→ "I represent x-y pair..."
2. search_methods_like('example')
→ Find: "Point class>>exampleGrid"
3. get_method_source (example)
→ Shows: x@y syntax
4. search_references_to_class('Point')
→ Top usages in Rectangle, Morph
5. Synthesize:
"Point is created with @: 100@200
Common operations: x, y, +, -, *
Example: center := (100@100 + 200@200) // 2"
User: "How to use distanceTo:?"
1. search_methods_like('distanceTo')
→ Multiple classes
2. search_references('distanceTo:')
→ Find usage examples
3. Filter by variable names:
- "aPoint distanceTo:" → Point class
- Context: geometric operations
4. get_method_source for Point version
5. Synthesize:
"Point>>distanceTo: calculates distance
Usage: point1 distanceTo: point2
Returns: Float (Euclidean distance)"
For complete analysis techniques and detailed scenarios, see:
Key workflow: Verify → Search → Inspect → Filter → Synthesize → Present
Analysis priorities:
Remember: The goal is understanding HOW to use code, not explaining implementation details.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.