search

$npx mdskill add ballred/obsidian-claude-pkm/search

Searches vault markdown files using Grep with directory grouping

  • Finds keyword matches in markdown files across the vault
  • Uses Grep, Glob, and Read tools without external dependencies
  • Filters results by file type and excludes hidden directories
  • Organizes matches by directory and displays line context

SKILL.md

.github/skills/searchView on GitHub ↗
---
name: search
description: Search vault content by keyword using Grep. Zero dependencies — works in any vault without indexes or plugins. Groups results by directory for easy scanning.
allowed-tools: Grep, Glob, Read
user-invocable: true
---

# Search Skill

Fast keyword search across all vault markdown files using the Grep tool. No indexes, no plugins, no setup — just structured search with directory grouping.

## Usage

```
/search <term>
```

Examples:
- `/search project planning`
- `/search weekly review`
- `/search TODO`

## How to Execute

When the user invokes `/search <term>`:

### Step 1: Search for the term

Use the **Grep** tool to search all `.md` files for the term:

```
Grep:
  pattern: <search term>
  glob: "*.md"
  output_mode: content
  -n: true
  -C: 1
```

Exclude hidden directories (`.claude/`, `.obsidian/`) and templates:

```
Grep:
  pattern: <search term>
  glob: "*.md"
  path: .
  output_mode: content
  -n: true
  -C: 1
```

Filter out results from `.claude/`, `.obsidian/`, and `Templates/` directories.

### Step 2: Group results by directory

Organise matches into sections by their parent directory:

- **Daily Notes/** — journal entries
- **Goals/** — goal and vision documents
- **Projects/** — project notes
- **Archives/** — archived content
- **Inbox/** — unprocessed items
- **(root)** — top-level notes

### Step 3: Present results

Format output as:

```markdown
## Search: "<term>"

### Daily Notes/
- **2024-01-15.md** (line 23): ...matching context...
- **2024-01-14.md** (line 8): ...matching context...

### Projects/
- **Project Alpha.md** (line 45): ...matching context...

### Goals/
- **2024 Goals.md** (line 12): ...matching context...

**Found X matches across Y files**
```

### Step 4: Suggest related content

After showing results, check if any matched files contain `[[wiki-links]]` to other notes. If so, briefly mention:

```
💡 Related notes mentioned in results: [[Note A]], [[Note B]]
```

## No Results

If no matches are found:
1. Suggest alternative search terms (synonyms, related words)
2. Offer to search with case-insensitive matching if the original search was case-sensitive
3. Suggest checking `Archives/` if not already included

## Tips

- Search is case-sensitive by default. Add `-i: true` to the Grep call for case-insensitive search
- Use regex patterns for advanced searches: `task.*complete`, `#tag-name`
- Combine with `/daily` to quickly find when something was mentioned

More from ballred/obsidian-claude-pkm

SkillDescription
adoptScaffold the PKM system onto an existing Obsidian vault. Scans your vault structure, maps folders interactively, and generates configuration — no template required.
check-linksFind broken wiki-links in the vault. Read-only analysis — scans for [[links]] and verifies target files exist. No writes, no dependencies.
dailyCreate daily notes and manage morning, midday, and evening routines. Structure daily planning, task review, and end-of-day reflection. Use for daily productivity routines or when asked to create today's note.
goal-trackingTrack progress toward 3-year, yearly, monthly, and weekly goals. Calculate completion percentages, surface stalled goals, connect daily tasks to objectives. Use for goal reviews and progress tracking.
monthlyMonthly review and planning. Roll up weekly reviews, check quarterly milestones, set next month's focus. Use at end of month or start of new month.
obsidian-vault-opsRead and write Obsidian vault files, manage wiki-links, process markdown with YAML frontmatter. Use when working with vault file operations, creating notes, or managing links.
projectCreate, track, and archive projects linked to goals. The bridge between goals and daily tasks. Use for project creation, status dashboards, and archiving completed work.
pushCommit and push vault changes to Git with smart commit messages. Auto-stages files, creates meaningful commits, and syncs with remote. Use after making vault changes or at end of day.
weeklyFacilitate weekly review process with reflection, goal alignment, and planning. Create review notes, analyze past week, plan next week. Use on Sundays or whenever doing weekly planning.