search-prompts

search-prompts is a command for Claude Code from letitbk/claude-academic-setup. It costs 0 tokens per session (1,371 once invoked), scanned A, original, MIT.

A Claude Code command that searches your previous conversations for a word or phrase you provide. It searches both the main conversation database and project-specific history files.

In plain words
What is it for?
Use it to look up past prompts, implementation ideas, debugging notes, or project discussions across your Claude Code history.
Why use it?
It helps you find earlier prompts, decisions, and useful discussions without manually opening old conversations one by one.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/YOUR_USERNAME/.claude.json.

Good fit Use it to look up past prompts, implementation ideas, debugging notes, or project discussions across your Claude Code history.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for search-prompts

README.md
[![agentmods](https://agentmods.dev/badge/commands/letitbk/claude-academic-setup/search-prompts/github.svg)](https://agentmods.dev/commands/letitbk/claude-academic-setup/search-prompts)
Your own site
<a href="https://agentmods.dev/commands/letitbk/claude-academic-setup/search-prompts"><img src="https://agentmods.dev/badge/commands/letitbk/claude-academic-setup/search-prompts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for search-prompts

Your own site · 80×15
<a href="https://agentmods.dev/commands/letitbk/claude-academic-setup/search-prompts"><img src="https://agentmods.dev/badge/commands/letitbk/claude-academic-setup/search-prompts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,371 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01371
Opus 5 $0.00000 $0.00685
Sonnet 5 $0.00000 $0.00274
Haiku 4.5 $0.00000 $0.00137

Measured 10d ago against content hash 156bd2ec1c7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

search-prompts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/search-prompts.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Search across all your Claude Code conversation history for: $ARGUMENTS

Search through your Claude Code conversation history using multiple methods to find relevant prompts, discussions, and insights.

Database Search (SQLite)

First, search the main conversation database:

# Search user messages for keywords
sqlite3 ~/.claude/__store.db "
SELECT 
    b.session_id,
    datetime(b.timestamp, 'unixepoch') as date,
    substr(u.message, 1, 100) as preview
FROM user_messages u 
JOIN base_messages b ON u.uuid = b.uuid 
WHERE u.message LIKE '%$ARGUMENTS%' 
ORDER BY b.timestamp DESC 
LIMIT 10;"

Project History Search (JSON)

Search through project-specific conversation history:

import json
import re
from datetime import datetime

def search_project_history(search_term):
    try:
        with open('/Users/YOUR_USERNAME/.claude.json', 'r') as f:
            data = json.load(f)
        
        results = []
        if 'projects' in data:
            for project_path, project_data in data['projects'].items():
                if 'history' in project_data:
                    for i, item in enumerate(project_data['history']):
                        text = ""
                        if isinstance(item, dict) and 'display' in item:
                            text = item['display']
                        elif isinstance(item, str):
                            text = item
                        
                        if search_term.lower() in text.lower():
                            results.append({
                                'project': project_path.split('/')[-1],
                                'index': i,
                                'text': text[:200] + "..." if len(text) > 200 else text,
                                'relevance': text.lower().count(search_term.lower())
                            })
        
        # Sort by relevance
        results.sort(key=lambda x: x['relevance'], reverse=True)
        return results[:15]  # Top 15 results
    
    except Exception as e:
        return [{'error': f"Search failed: {e}"}]

# Execute search
results = search_project_history("$ARGUMENTS")
for result in results:
    if 'error' in result:
        print(f"❌ {result['error']}")
    else:
        print(f"📁 Project: {result['project']}")
        print(f"🔢 Relevance: {result['relevance']} matches")
        print(f"💬 Text: {result['text']}")
        print("---")

Read the full file on GitHub · 204 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 204 lines · 0 tokens per session scan A 156bd2ec1c7e

Subscribe to this mod's changes

search-prompts is a command published in the GitHub repository letitbk/claude-academic-setup (44 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,371 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.