semantic-intelligence

majiayu000's avatarfrom majiayu000

Use Miller's semantic search capabilities for conceptual code understanding. Activates when searching for concepts, cross-language patterns, business logic, or exploring unfamiliar code. Combines text and semantic search for optimal results.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 5, 2026⬇️1downloads

When & Why to Use This Skill

The Semantic Intelligence skill leverages Miller's advanced semantic search to enable conceptual code understanding and cross-language pattern discovery. Unlike traditional text-based search, it understands the intent and logic behind code, allowing developers to find business logic, trace execution flows across different programming languages, and explore unfamiliar codebases with high efficiency. This tool is essential for complex system analysis where keyword matching falls short.

Use Cases

  • Conceptual Code Search: Find specific business logic, such as 'authentication flows' or 'data validation,' even when you don't know the exact function names or variable strings.
  • Cross-Language Pattern Discovery: Identify how the same concept (e.g., 'error logging') is implemented across a polyglot codebase containing languages like Python, Rust, and Go.
  • Onboarding & Exploration: Rapidly understand the architecture of a new or legacy codebase by searching for high-level behaviors and tracing call paths across language boundaries.
  • Hybrid Search Optimization: Combine the speed of exact text matching with the depth of semantic understanding to ensure comprehensive results for complex debugging or refactoring tasks.
namesemantic-intelligence
descriptionUse Miller's semantic search capabilities for conceptual code understanding. Activates when searching for concepts, cross-language patterns, business logic, or exploring unfamiliar code. Combines text and semantic search for optimal results.
allowed-toolsmcp__miller__fast_search, mcp__miller__fast_explore, mcp__miller__trace_call_path, mcp__miller__get_symbols

Semantic Intelligence Skill

Activation Announcement

IMPORTANT: When this skill activates, ALWAYS start your response with:

🧠 **Semantic Intelligence Active**
Using conceptual code understanding for cross-language discovery...

This provides a visual indicator to the user that the skill is running.

Purpose

Leverage Miller's semantic understanding to find code by concept, not just keywords. Goes beyond text matching to understand what code does.

When to Activate

  • Searching for concepts ("authentication logic")
  • Finding cross-language patterns
  • Discovering business logic
  • Exploring unfamiliar codebases
  • When text search returns nothing
  • Understanding execution flows

Text Search (exact/wildcard matching):

fast_search({ query: "console.error", method: "text" })
-> Fast (<10ms)
-> Exact matches only
-> Misses variations ("logger.error", "print_error")

Semantic Search (conceptual understanding):

fast_search({ query: "error logging", method: "semantic" })
-> Slower (~100ms)
-> Finds concepts
-> Discovers: console.error, logger.error, logging.error, errorHandler
-> Cross-language: Python logging, Rust tracing, Go log

Hybrid Search (best of both):

fast_search({ query: "authentication", method: "hybrid" })
-> Runs text + semantic in parallel
-> Fuses results intelligently
-> Boosts symbols in BOTH searches
-> Optimal: ~150ms

When to Use Each Mode

Use Text Mode When:

  • Searching for specific API names
  • Finding exact strings
  • Speed critical (<10ms)
  • You know exact symbol name
Examples:
- "getUserData" -> find specific function
- "console.log" -> find exact API usage
- "import React" -> exact import statement
- "TODO: fix" -> exact comment

Use Semantic Mode When:

  • Searching for concepts
  • Cross-language patterns
  • Don't know exact names
  • Understanding what code does
Examples:
- "authentication logic" -> find ALL auth-related code
- "error handling" -> discover error patterns
- "database connections" -> find DB code (MySQL, Postgres, etc.)
- "payment processing" -> business logic discovery

Use Hybrid Mode When:

  • Not sure which mode is best
  • Want comprehensive results
  • Concept + exact matches both useful
Examples:
- "user authentication" -> concept + exact matches
- "API endpoints" -> finds routes, handlers, controllers
- "validation logic" -> semantic concept + exact validators

Search Strategy Decision Tree

Know exact symbol name?
  YES -> fast_search with method="text" or get_symbols with target
        -> <10ms, exact matches

Know exact API/string?
  YES -> fast_search({ method: "text" })
        -> <10ms, exact matches

Searching for concept/behavior?
  YES -> fast_search({ method: "semantic" })
        -> ~100ms, conceptual understanding

Not sure / want comprehensive?
  YES -> fast_search({ method: "hybrid" })
        -> ~150ms, text + semantic fused

Cross-Language Semantic Matching

Miller's Superpower: Finds similar code across languages

Example: Finding "user validation" across codebase

fast_search({
  query: "user input validation",
  method: "semantic",
  limit: 20
})

Results discovered:
- TypeScript: validateUser(input: UserInput)
- Python: def validate_user_input(data: dict)
- Rust: fn validate_user(user: &User) -> Result
- Go: func ValidateUserInput(input *UserInput) error

-> Same CONCEPT, different languages
-> Naming variants automatically understood

Why this works: Embeddings encode what code does, not just what it's called

Execution Flow Tracing (Cross-Language)

Unique capability: Trace calls across language boundaries

trace_call_path({
  symbol_name: "processPayment",
  direction: "downstream",
  max_depth: 3
})

Execution flow discovered:
TypeScript: processPayment()
  -> Rust: payment_processor::process()
    -> SQL: stored_proc_charge()

-> Semantic matching finds cross-language connections
-> No other tool does this

Key Behaviors

DO

  • Use semantic search for concepts and behaviors
  • Use text search for exact API/symbol names
  • Use hybrid when uncertain (comprehensive)
  • Trace execution flows cross-language
  • Combine multiple search modes for completeness

DON'T

  • Use semantic for exact symbol names (use text)
  • Use text search for concepts (misses variations)
  • Ignore hybrid mode (often best choice)
  • Skip cross-language tracing (unique capability)
  • Search without strategy (use decision tree)

Success Criteria

This skill succeeds when:

  • Concepts found across languages
  • Business logic discovered efficiently
  • Execution flows traced completely
  • Right search mode used for query type
  • Cross-language patterns identified
  • Unfamiliar code understood quickly