Code Search Skill
Search for code definitions — functions, classes, interfaces, imports, and type definitions.
When to Use
Use codesearch for:
- Finding definitions: Locate where a function or class is defined
- Understanding structure: Map out interfaces and types
- Finding imports: See what a module exports or imports
- Language-aware search: Filter by programming language
Input Format
{
"query": "handleSubmit",
"path": "src",
"language": "ts"
}
Parameters
| Parameter |
Type |
Required |
Default |
Description |
query |
string |
Yes |
- |
Name or pattern to search for |
path |
string |
No |
. |
Directory to search in |
language |
string |
No |
auto |
Language: ts, js, py, go, rust, java |
Supported Languages
- TypeScript/JavaScript: function, class, interface, type, enum, const/let/var, import/export
- Python: def, class, import
- Go: func, type, struct, interface
- Rust: fn, struct, enum, trait, impl, mod
- Java: class, interface, enum, method definitions
Limitations
- Maximum 100 results
- Regex-based (not AST) — may have false positives
1---2name: codesearch3description: Search for code definitions (functions, classes, interfaces, imports)4---56# Code Search Skill78Search for code definitions — functions, classes, interfaces, imports, and type definitions.910## When to Use1112Use codesearch for:1314- **Finding definitions**: Locate where a function or class is defined15- **Understanding structure**: Map out interfaces and types16- **Finding imports**: See what a module exports or imports17- **Language-aware search**: Filter by programming language1819## Input Format2021```json22{23 "query": "handleSubmit",24 "path": "src",25 "language": "ts"26}27```2829### Parameters3031| Parameter | Type | Required | Default | Description |32|-----------|------|----------|---------|-------------|33| `query` | string | Yes | - | Name or pattern to search for |34| `path` | string | No | `.` | Directory to search in |35| `language` | string | No | auto | Language: ts, js, py, go, rust, java |3637## Supported Languages3839- **TypeScript/JavaScript**: function, class, interface, type, enum, const/let/var, import/export40- **Python**: def, class, import41- **Go**: func, type, struct, interface42- **Rust**: fn, struct, enum, trait, impl, mod43- **Java**: class, interface, enum, method definitions4445## Limitations4647- Maximum 100 results48- Regex-based (not AST) — may have false positives