# Workspace Search

> 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: `patricio0312rev/workspace-search` (Agent Skill)
- Install (CLI): `npx skillmds@latest add patricio0312rev/workspace-search`
- Raw SKILL.md: https://api.skillmd.com/api/skills/patricio0312rev/workspace-search/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: patricio0312rev (https://skillmd.com/u/patricio0312rev)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/patricio0312rev/workspace-search

---


# 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:

```bash
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

