Find past records relevant to the current question in the AI session history already on this machine, and hand back two directly usable
things: ranked hits with stable identifiers (Project / Session / Message), and a passage of
original text around a hit. Building and repairing the index belongs to lov-ataru-indexing。
Triggers
Activate when
- "How did I fix this error last time?"
- "Find the record where session recovery was discussed."
- Help me recall what was decided about this module in an earlier session.
Do not activate when
- The user wants to "rebuild the index" or asks "is the index broken" — hand that to
lov-ataru-indexing。 - The user wants to find a symbol or file in the current codebase — use ordinary grep and file search; that is code retrieval, not session memory retrieval.
User Profile (cross-session)
skill.yaml declares user-profile/v1. At the start of each run it reads the shared user, brand,
workspace, preferences, and this Skill's skills.lov-search-chat namespace.
There are two records worth keeping long-term:records.ataru_bin(the path to the Ataru executable available on this machine) and
records.default_level(the user's preferred retrieval granularity). When the user states such a value directly, use
scripts/profile_store.py record to write it back and report the saved path. One-off
inputs such as search terms and project IDs are not written to the Profile. For the full contract see
references/user-profile.md。
Skill Group Composition
See references/skill-composition.md. This source is an
independent Single Skill, and between it and lov-ataru-indexing there is only an artifact-level handoff (index state).
Workflow (MANDATORY)
You MUST follow these steps in order.
Step 0: Resolve the binary, then confirm the index
export SKILL_DIR="$HOME/.claude/skills/lov-search-chat"
python3 "$SKILL_DIR/scripts/ataru_recall.py" index-status
The resolution order is --bin → ATARU_BIN → PATH → installed App bundle → a
local dev build found by searching upward from the current directory; each candidate is first run once with --version. Old versions below 0.41.3 do not recognize the index subcommand,
and will treat it as a desktop launch argumentopen a windowand never return.
search itself confirms the index first. When the index is not ready it fails with ATARU_INDEX_NOT_READY or
ATARU_INDEX_BUILDING and points to lov-ataru-indexing,will notreturn zero results—
"not found" and "index not built" must be two distinguishable answers. This Skill does not build the index for the user.
Step 1: Choose the level before querying
| level | One hit represents | When to use |
|---|---|---|
turn |
A single message | Default. To pinpoint a specific sentence, a specific error, a specific decision |
run |
One round from user request to answer | To see the full context of one exchange |
session |
The entire session | To find "which session was discussing this" |
project |
A project | To find out which project this topic mainly occurred in |
python3 "$SKILL_DIR/scripts/ataru_recall.py" search "会话恢复方案" --level turn --limit 10
When limiting to a project, use the equals form, because the project ID itself starts with a hyphen:
python3 "$SKILL_DIR/scripts/ataru_recall.py" search "索引没有更新" \
--level session --project-id=-Users-me-projects-app
The projectId / sessionId / messageId / lineNumber in a hit is a stable identifier and can be fed directly
to the next step.snippet is truncated to 600 characters by default; add --full。
Command-line retrieval only uses keyword mode:mode and requestedMode will both be keyword,
semanticAvailable is usually false. Do not promise users that the command line can get semantic or hybrid ranking,
and do not assert "this never happened in history" just because the keywords did not hit—try synonyms, try another level.
On a real corpus of tens of thousands of sessions, a single turn-level retrieval takes on the order of tens of seconds. Do not lower it for the sake of "failing fast"
--timeout。
Step 2: Read the original transcript around a hit
Ranking hits are only enough to locate, not enough to make a judgment. Once you have a candidate, read a passage of the original text around it:
python3 "$SKILL_DIR/scripts/ataru_recall.py" read \
--project-id=-Users-me-projects-app \
--session-id=<session uuid> \
--around=<message uuid or line number> \
--window 6
--window is the number of messages to keep on each side,--message-chars controls truncation of a single body (default 2000).
When --around is not passed, the last --window messages of the session are returned. When the given --around cannot be found in that session,
the script reports ATARU_MESSAGE_NOT_FOUND instead of silently returning some other position.
Step 3: Answer with citations, not with impressions
The answer must include things that can be traced back to the source: the session title, the timestamp, and when necessary the sessionId. Truncated
bodies must be stated as truncated. If retrieval does not hit, say it did not hit, and state which terms and which level were used —
do not fill historical gaps with guesses from the current context.
Dependencies
- Python 3.8+ (standard library only)
- Ataru 0.41.3 or newer installed locally, with the index ready
General feedback loop
When the user raises modification feedback during a Skill-driven task, before continuing with the current artifact you must perform:
- First determine whether the feedback is
task-specific(this time only) orreusable(reusable across tasks). task-specificonly modifies the current task, not the Skill.reusablefirst determine the scope: for domain rules, update the corresponding canonical Skill first; for rules that apply to all Skills, update the shared specification first.- After completing the rule update, versioning, lint, and distribution verification, then apply the modification to the current task.
reusablea modification invalidates previous "confirm", "continue", and "send it"; after completing the current artifact modification and reading it back, you must stop and wait for the user's next instruction, and must not automatically proceed to publishing, committing, or other external writes.