Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/matt1398/claude-devtools/markdown-search-logicgit clone --depth 1 https://github.com/matt1398/claude-devtoolsWrote 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.
[](https://agentmods.dev/commands/matt1398/claude-devtools/markdown-search-logic)<a href="https://agentmods.dev/commands/matt1398/claude-devtools/markdown-search-logic"><img src="https://agentmods.dev/badge/commands/matt1398/claude-devtools/markdown-search-logic.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00043 | $0.01314 |
| Opus 5 | $0.00022 | $0.00657 |
| Sonnet 5 | $0.00009 | $0.00263 |
| Haiku 4.5 | $0.00004 | $0.00131 |
Grade A, and why
claude-devtools:markdown-search 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Markdown Search Logic
How in-session and cross-session markdown search works end-to-end.
Scope
Current in-session search intentionally covers:
- User message markdown text
- AI
lastOutputtext markdown
Current in-session search intentionally excludes:
- System items
- Tool result text blocks
- Thinking/subagent/internal display items
Primary source files:
src/renderer/components/search/SearchBar.tsxsrc/renderer/store/slices/conversationSlice.tssrc/renderer/components/chat/ChatHistory.tsxsrc/renderer/components/chat/searchHighlightUtils.tssrc/shared/utils/markdownTextSearch.tssrc/main/services/discovery/SessionSearcher.ts
Core Data Model
SearchMatch (renderer store) in src/renderer/store/types.ts:
itemId: chat group id (user-*,ai-*)itemType:user | aimatchIndexInItem: 0-based index inside one searchable itemglobalIndex: 0-based index across all matchesdisplayItemId: optional (lastOutputfor AI output)
Important distinction:
matchIndexInItemis local to one item.currentSearchIndexis global position in the search result list.
Pipeline Overview
1) Query input and initial match generation
SearchBar updates the query with tab-scoped conversation data:
setSearchQuery(query, conversation)insrc/renderer/components/search/SearchBar.tsx
setSearchQuery in src/renderer/store/slices/conversationSlice.ts:
- Scans conversation items
- Uses
findMarkdownSearchMatches(shared parser logic) per searchable item - Builds initial
searchMatches,searchResultCount,currentSearchIndex
2) Rendering highlights
Search highlighting is rendered in markdown component trees through:
createSearchContext(...)insrc/renderer/components/chat/searchHighlightUtils.tshighlightSearchInChildren(...)insrc/renderer/components/chat/searchHighlightUtils.ts
Each rendered highlight mark includes:
data-search-item-iddata-search-match-indexdata-search-result(currentormatch)
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.
- 4d ago First seen · 180 lines · 43 tokens per session scan A 303cad546167
claude-devtools:markdown-search is a command published in the GitHub repository matt1398/claude-devtools (3,892 stars, last pushed 3mo ago), licensed MIT. It adds 43 tokens to every session and 1,314 once invoked, about $0.0002 per session on Opus 5. 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.
Other commands, from other repositories
add-agent
引导新增一个 Agent 适配器。用法 /add-agent.
superpowers-execute
Execute the current GSD phase plan with Superpowers instead of gsd-execute-phase.
deps-age
Analyze dependency freshness and maintenance activity.
setup
Diagnose-first project setup with state machine — scans, confirms, interviews, writes.
scan
Scan AWS account for cost optimization.
issue
Template Category: Action Prompt Level: 3 (Conditional).