Agent skill
type-flow
Trace how types flow through a function — parameters, transformations, and return types. Use when the user asks what types a function accepts or returns, how data transforms through a pipeline, or wants to understand type conversions in a code path.
Install this agent skill to your Project
npx add-skill https://github.com/anortham/julie/tree/main/.claude/skills/type-flow
SKILL.md
Type Flow
Trace how types flow through a function by analyzing type signatures, transformations, and conversions.
Process
Step 1: Deep Dive the Function
deep_dive(symbol="<function>", depth="full")
Extract the function signature, body, and type information.
If deep_dive returns the wrong symbol, use context_file to disambiguate:
deep_dive(symbol="<function>", depth="full", context_file="<partial_file_path>")
Step 2: Map the Type Pipeline
Trace each type from input to output:
- Input types: What are the parameter types?
- Transformations: Where does a type convert to another?
- Conversion methods (Rust:
.into(),From::from(); JS/TS: type assertions; Python: constructors) - Method calls that return different types
- Destructuring / pattern matching / spread operators
- Conversion methods (Rust:
- Intermediate types: What types exist between input and output?
- Output type: What does the function return?
Step 3: Find Type Definitions
For any non-obvious type, look it up with a quick definition search:
fast_search(query="<TypeName>", search_target="definitions")
Or for a deeper look at the type's structure:
deep_dive(symbol="<TypeName>", depth="overview")
To see how a type is used across the codebase:
fast_refs(symbol="<TypeName>", reference_kind="type_usage", limit=10)
Step 4: Report
Function: <name>
Type Flow:
Input:
self: &JulieServerHandler
params: FastSearchTool { query: String, limit: Option<u32> }
Pipeline:
1. FastSearchTool → extract query: String, limit: Option<u32>
2. String → tantivy::Query (via QueryParser::parse_query)
3. Query → Vec<(DocAddress, f32)> (via Searcher::search)
4. DocAddress → TantivyDocument (via Searcher::doc)
5. TantivyDocument → Symbol (via database lookup)
6. Vec<Symbol> → String (via format_results)
7. String → CallToolResult (via CallToolResult::text_content)
Output:
Result<CallToolResult> — MCP response wrapper
Key Type Definitions:
- FastSearchTool: src/tools/search.rs:15 (tool parameter struct)
- CallToolResult: rmcp crate (MCP protocol response)
- Symbol: src/extractors/mod.rs (code symbol representation)
Complexity: Medium (4 type transformations)
Important Notes
- Follow error propagation — Rust's
?, JS/TStry/catch, Pythonraise— these change the effective type in the success path - Generic types: Note type parameters (e.g.,
Vec<T>where T matters) - Trait objects:
dyn Traitorimpl Trait— note what concrete types are used - Closures: Types of closure parameters are often inferred, state what they are
- Reference workspaces: Pass
workspace: "<workspace_id>"to all tool calls when analyzing a non-primary workspace
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
logic-flow
Explain a function's logic step-by-step by analyzing its implementation and call graph. Use when the user asks "how does this work", "walk me through this", or wants to understand control flow and decision points.
metrics
Show Julie operational metrics -- session stats, tool usage, context efficiency, and historical trends. Use when the user asks about Julie's performance, how it's doing, how much context was saved, or wants a metrics/stats report.
architecture
Generate an architecture overview — key entry points, module map, dependency flow, and suggested reading order. Use when the user is new to a codebase, asks "how does this work?", wants an architecture overview, or needs onboarding documentation.
dependency-graph
Show module dependencies by analyzing imports, exports, and cross-references. Use when the user asks what a file imports, what depends on a module, or wants to see dependency structure.
search-debug
Diagnose why a search returns unexpected results — analyze scoring factors, tokenization, and index health for dogfooding Julie's search quality. Use when a Julie search misses an expected symbol, returns wrong results, ranks something surprisingly low, or when investigating search quality issues during development.
impact-analysis
Didn't find tool you were looking for?