Add code search instructions to search skill and agents · Entire
Add code search instructions to search skill and agents
180c675→main·
evisdren·1w ago·3 files·+41 added/-10 removed
Code search (entire search --code) is now public, so the search skill and the entire-search subagent definitions should cover it: usage, repo scoping flags, checkpoint-filter incompatibilities, and query heuristics.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Changes
3
.claude/agents
- Mentire-search.md+4/-3
.codex/agents
- Mentire-search.toml+4/-3
skills/search
- MSKILL.md+33/-4
1
2
3
3
4
5
6
12 unmodified lines
19
20
21
22
23
22
23
24
25
26
---
name: entire-search
description: Search Entire checkpoint history and transcripts with `entire search --json`. Use proactively when the user asks about previous work, commits, sessions, prompts, or historical context in this repository.
description: Search Entire checkpoint history and transcripts with `entire search --json`, or code content across repositories with `entire search --code --json`. Use proactively when the user asks about previous work, commits, sessions, prompts, historical context in this repository, or where code lives in other repositories.
tools: Bash
model: haiku
---
12 unmodified lines
1. Turn the task into one or more focused `entire search --json` queries.
2. Always use machine-readable output via `entire search --json`.
3. Use inline filters like `author:`, `date:`, `branch:`, and `repo:` when they improve precision.
4. If results are broad, rerun `entire search --json` with a narrower query instead of switching tools.
5. Summarize the strongest matches with the relevant commit, session, file, and prompt details available in the results.
4. For code content searches across repositories, add `--code` and refine with `--repo`, `--all-repos`, `--limit`, or `--case-sensitive`. Do not combine `--author`, `--branch`, or `--date` with `--code`. Query with distinctive tokens like function names, error strings, or config keys.
5. If results are broad, rerun `entire search --json` with a narrower query instead of switching tools.
6. Summarize the strongest matches with the relevant commit, session, file, and prompt details available in the results.
Keep answers concise and evidence-based.
M.claude/agents/entire-search.md+4/-3
1
2
3
3
4
5
6
9 unmodified lines
16
17
18
19
20
19
20
21
22
23
24
# ENTIRE-MANAGED SEARCH SUBAGENT v1
name = "entire-search"
description = "Search Entire checkpoint history and transcripts with `entire search --json`. Use when the user asks about previous work, commits, sessions, prompts, or historical context in this repository."
description = "Search Entire checkpoint history and transcripts with `entire search --json`, or code content across repositories with `entire search --code --json`. Use when the user asks about previous work, commits, sessions, prompts, historical context in this repository, or where code lives in other repositories."
sandbox_mode = "read-only"
model_reasoning_effort = "medium"
developer_instructions = """
9 unmodified lines
Keep answers concise and evidence-based.
"""
M.codex/agents/entire-search.toml+4/-3
1
2
3
3
4
5
6
6
7
8
8
9
10
11
11 unmodified lines
23
24
25
26
27
27
28
29
30
31
25 unmodified lines
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
4 unmodified lines
94
95
96
97
98
99
---
name: search
description: Use when the user wants to find prior work, checkpoints, or agent conversations by topic, repo, branch, author, or recent time window
description: Use when the user wants to find prior work, checkpoints, or agent conversations by topic, repo, branch, author, or recent time window, or to search code content across repositories
---
# Search Checkpoints
# Search Checkpoints and Code
Use `entire search` to find relevant checkpoints before guessing from memory.
Use `entire search` to find relevant checkpoints before guessing from memory, or `entire search --code` to search code content across repositories.
## Response Format
11 unmodified lines
- The user asks things like "have we done this before?", "search past work", "find the previous implementation", or "look for checkpoints about X"
- You need prior context from another branch, repo, author, or recent time period
- You want likely matches first, then a deeper transcript read only for the best hit
- The user wants to find code across repositories they have access to, e.g. "where is X implemented?", "find usages of Y in our other repos" — use code search (`--code`)
Do not use this for the current active session. Use `session-handoff` for that.
Do not use this for the current active session. Use `session-handoff` for that. For searching files in the current working copy, prefer local tools (grep, ripgrep) over code search.
## Process
25 unmodified lines
entire explain --checkpoint <checkpoint-id> --raw-transcript --no-pager
```
## Code Search
Add `--code` to search code content instead of checkpoints:
```bash
entire search "<query>" --code --json
```
Scope and refine with flags:
```bash
entire search "<query>" --code --json --repo owner/name --limit 20 --case-sensitive
```
- By default results are scoped to the current repository; add `--all-repos` (or `repo:*`) to search every repo the user can access
- `--case-sensitive` only applies with `--code`
- `--limit` is the total result count for code search (not per page)
- `--author`, `--branch`, and `--date` are checkpoint filters — do not combine them with `--code`
- Present results as file paths with matching snippets; do not dump raw JSON unless asked
### Code Search Heuristics
- Search for distinctive tokens: function names, error strings, config keys — not natural-language descriptions
- Prefer exact identifiers over partial words; add `--case-sensitive` when the identifier casing matters (e.g. `HttpClient` vs `httpclient`)
- Scope with `--repo` when the user names a repo; otherwise start with the current repo and widen with `--all-repos` if nothing hits
- If a query is too broad, add a second distinctive term or increase specificity before raising `--limit`
## Search Heuristics
- Start with the user's domain terms, feature name, error text, file name, or ticket ID
4 unmodified lines
## Failure Modes
- If search says authentication is required, tell the user to run `entire login`
- If code search says it is not yet available, tell the user to update the Entire CLI to the latest version
- If there are no matches, say that clearly and mention the filters or query terms you tried
- If the user really wants the current session, switch to `session-handoff` instead of searching checkpoints
Mskills/search/SKILL.md+33/-4