| name | workspace-search |
| description | Search for patterns across all projects in the workspace with results grouped by project. Use when user says "search across projects", "find in all repos", or "grep workspace". |
Skill: Workspace Search
Description
Search for patterns across all projects in the workspace. Results are grouped by project.
Arguments
<query> - The search pattern (supports regex)
--type <ext> - Filter by file type (e.g., --type ts)
--files - Show only file names, not content
Instructions
When the user wants to search across projects:
Step 1: Get Search Query
Parse the search query from the command arguments.
Step 2: Identify Projects
Get all cloned projects from the workspace configuration.
Step 3: Execute Search
For each project, run a search using ripgrep (rg) or grep:
rg "$query" "$project_path" --heading --line-number
Step 4: Format Results
Group results by project:
š Searching for "TODO" across workspace...
š api (12 matches)
src/controllers/auth.ts:45: // TODO: Add rate limiting
src/services/email.ts:23: // TODO: Use template engine
src/middleware/auth.ts:78: // TODO: Implement refresh tokens
š admin (5 matches)
src/components/Dashboard.tsx:34: {/* TODO: Add loading state */}
src/hooks/useAuth.ts:12: // TODO: Handle token expiry
š homepage (0 matches)
Summary:
⢠Total matches: 17
⢠Projects searched: 3
Options
- File type filter:
/workspaces:search "TODO" --type ts - Only TypeScript files
- Files only:
/workspaces:search "config" --files - Show only file paths