ast-index
This skill should be used when the user asks to "find a class", "search for symbol", "find usages", "find implementations", "search codebase", "find file", "class hierarchy", "find callers", "module dependencies", "unused dependencies", "project map", "project conventions", "project structure", "what frameworks", "what architecture", "find Perl subs", "Perl exports", "find Python class", "Go struct", "Go interface", "find React component", "find TypeScript interface", "find Rust struct", "find Ruby class", "find C# controller", "find Dart class", "find Flutter widget", "find mixin", "find Scala trait", "find case class", "find object", "find PHP class", "find Laravel model", "find PHP trait", or needs fast code search in Android/Kotlin/Java, iOS/Swift/ObjC, Dart/Flutter, TypeScript/JavaScript, Rust, Ruby, C#, Scala, PHP, Perl, Python, Go, C++, or Protocol Buffers projects. Also triggered by mentions of "ast-index" CLI tool.
What this skill does
# ast-index - Code Search for Multi-Platform Projects Fast native Rust CLI for structural code search in Android/Kotlin/Java, iOS/Swift/ObjC, Dart/Flutter, TypeScript/JavaScript, Rust, Ruby, C#, Scala, PHP, Perl, Python, Go, C++, and Proto projects using SQLite + FTS5 index. ## Critical Rules **ALWAYS use ast-index FIRST for any code search task.** These rules are mandatory: 1. **ast-index is the PRIMARY search tool** — use it before grep, ripgrep, or Search tool 2. **DO NOT duplicate results** — if ast-index found usages/implementations, that IS the complete answer 3. **DO NOT run grep "for completeness"** after ast-index returns results 4. **Use grep/Search ONLY when:** - ast-index returns empty results - Searching for regex patterns (ast-index uses literal match) - Searching for string literals inside code (`"some text"`) - Searching in comments content **Why:** ast-index is 17-69x faster than grep (1-10ms vs 200ms-3s) and returns structured, accurate results. ## Prerequisites Install the CLI before use: ```bash brew tap defendend/ast-index brew install ast-index ``` Initialize index in project root: ```bash cd /path/to/project ast-index rebuild ``` The index is stored at `~/Library/Caches/ast-index/<project-hash>/index.db` (macOS) or `~/.cache/ast-index/<project-hash>/index.db` (Linux). Rebuild deletes the DB file entirely and creates a fresh index. ## Supported Projects | Platform | Languages | Module System | |----------|-----------|---------------| | Android/Java | Kotlin, Java | Gradle (build.gradle.kts), Maven (pom.xml) | | iOS | Swift, Objective-C | SPM (Package.swift) | | Web | TypeScript, JavaScript, React, Vue, Svelte | package.json | | Rust | Rust | Cargo.toml | | Ruby | Ruby, Rails, RSpec | Gemfile | | .NET | C#, ASP.NET, Unity | *.csproj | | Dart/Flutter | Dart | pubspec.yaml | | Scala | Scala | Bazel (WORKSPACE, BUILD) | | PHP | PHP | composer.json | | Perl | Perl | Makefile.PL, Build.PL | | Python | Python | None (*.py files) | | Go | Go | None (*.go files) | | Proto | Protocol Buffers (proto2/proto3) | None (*.proto files) | | WSDL | WSDL, XSD | None (*.wsdl, *.xsd files) | | C/C++ | C, C++ (JNI, uservices) | None (*.cpp, *.h, *.hpp files) | | Godot | GDScript | project.godot | | Mixed | All above | All | Project type is auto-detected by marker files (build.gradle.kts, Package.swift, Makefile.PL, etc.). Python, Go, Proto, WSDL, and C++ files are indexed alongside main project type. ## Core Commands ### Universal Search **`search`** - Perform universal search across files, symbols, and modules simultaneously. ```bash ast-index search "Payment" # Finds files, classes, functions matching "Payment" ast-index search "ViewModel" # Returns files, symbols, modules in ranked order ast-index search "Store" --fuzzy # Fuzzy: exact → prefix → contains matching ast-index search "Handler" --module "core/" # Search within a module ast-index search "UserService" # Find Java/Spring services ast-index search "@RestController" # Find Spring REST controllers (annotation search) ast-index search "@GetMapping" # Find GET endpoint mappings ``` ### File Search **`file`** - Find files by name pattern. ```bash ast-index file "Fragment.kt" # Find files ending with Fragment.kt ast-index file "ViewController" # Find iOS view controllers ``` ### Symbol Search **`symbol`** - Find symbols (classes, interfaces, functions, properties) by name. ```bash ast-index symbol "PaymentInteractor" # Find exact symbol ast-index symbol "Presenter" # Find all presenters ast-index symbol "Store" --fuzzy # Fuzzy: exact → prefix → contains matching ast-index symbol "Mapper" --in-file "payments/" --limit 10 # Scoped search ast-index symbol "@Service" # Find all @Service annotations ``` ### Class Search **`class`** - Find class, interface, or protocol definitions. ```bash ast-index class "BaseFragment" # Find Android base fragment ast-index class "UIViewController" # Find iOS view controller subclass ast-index class "Store" --fuzzy # Find all classes containing "Store" ast-index class "Repository" --module "features/payments" # Filter by module ast-index class "UserController" # Find Java/Spring controller class ``` ### Usage Search **`usages`** - Find all places where a symbol is used. Critical for refactoring. ```bash ast-index usages "PaymentRepository" # Find all usages of repository ast-index usages "onClick" # Find all click handler usages ast-index usages "fetchData" --in-file "src/api/" # Scoped to file path ast-index usages "Repository" --module "features/auth" --limit 100 ``` Performance: ~8ms for indexed symbols. ### Cross-References **`refs`** - Show cross-references for a symbol: definitions, imports, and usages in one view. ```bash ast-index refs "PaymentRepository" # Definitions + imports + usages ast-index refs "BaseFragment" --limit 10 # Limit results per section ``` ### Implementation Search **`implementations`** - Find all classes that extend or implement a given class/interface/protocol. Supports partial name matching with relevance ranking (exact → suffix → contains). ```bash ast-index implementations "BasePresenter" # Find all presenter implementations ast-index implementations "Repository" # Find repository implementations (exact match) ast-index implementations "Service" # Partial: finds UserService, PaymentService impls too ast-index implementations "ViewModel" --module "features/" # Scoped to module ``` ### Class Hierarchy **`hierarchy`** - Display complete class hierarchy tree. ```bash ast-index hierarchy "BaseFragment" # Show fragment inheritance tree ``` ### Caller Search **`callers`** - Find all places that call a specific function. ```bash ast-index callers "onClick" # Find all onClick calls ast-index callers "fetchUser" # Find API call sites ``` ### Call Tree **`call-tree`** - Show complete call hierarchy going UP (who calls the callers). Supports Kotlin, Java, Swift, Perl, ObjC. ```bash ast-index call-tree "processPayment" --depth 3 --limit 10 ast-index call-tree "getUsers" # Java: finds callers of getUsers() method ``` ### File Analysis **`imports`** - List all imports in a specific file. ```bash ast-index imports "path/to/File.kt" # Show Kotlin file imports ``` **`outline`** - Show all symbols defined in a file. Uses tree-sitter for accurate parsing of all supported languages. ```bash ast-index outline "PaymentFragment.kt" # Show Kotlin fragment structure ast-index outline "UserController.java" # Show Java controller methods ast-index outline "App.tsx" # Show TypeScript/React components and functions ast-index outline "handler.rs" # Show Rust structs, impls, functions ``` ### Code Quality **`todo`** - Find TODO/FIXME/HACK comments in code. ```bash ast-index todo # Find all TODO comments ast-index todo --limit 10 # Limit results ``` **`deprecated`** - Find @Deprecated annotations. ```bash ast-index deprecated # Find deprecated items ``` **`unused-symbols`** - Find potentially unused exported symbols. ```bash ast-index unused-symbols --module path/to/module # In specific module ast-index unused-symbols --export-only # Only exported (public) symbols ``` ### Git/Arc Integration **`changed`** - Show symbols changed in git/arc diff. Auto-detects VCS and base branch. ```bash ast-index changed # Auto: trunk (arc) or origin/main (git) ast-index changed --base main # Explicit base branch ast-index changed --base trunk # For arc projects ``` ### Public API **`api`** - Show public API of a module. Accepts module path or module name (dots converted to slashes). ```bash ast-index api "path/to/module" # By path ast-index api "module.name" # By module name (dots → slashes) ``` #
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.