Docs Plugins
Auld for Claude Code
Use Claude Code hooks to recall memory before each prompt and save a session summary at the end — or connect the MCP server.
#Option A: hooks
A prompt-submit hook runs a script whose output is added to Claude’s context. Save the script, make it executable, and register it.
~/.claude/hooks/auld-recall.sh
#!/usr/bin/env bash
# auld-recall.sh — print relevant memory for the prompt on stdin (used as a prompt hook)
set -euo pipefail
PROMPT=$(jq -r '.prompt // empty')
[ -z "$PROMPT" ] && exit 0
curl -sf -X POST "$AULD_API_BASE/v1/recall" \
-H "Authorization: Bearer $AULD_API_KEY" -H "Content-Type: application/json" \
-d "$(jq -n --arg q "$PROMPT" --arg v "$AULD_VIEWER" --argjson t "${AULD_RECALL_TOKENS:-1500}" \
'{query:$q, viewer:$v, maxTokens:$t}')" \
| jq -r '"Relevant project memory:\n" + ([.memories[] | "- \(.text) (\(.sources[0].title), \(.validFrom[0:10]))"] | join("\n"))'.claude/settings.json
{
"hooks": {
"UserPromptSubmit": [
{ "hooks": [ { "type": "command", "command": "~/.claude/hooks/auld-recall.sh" } ] }
]
}
}#Saving a session summary
Add a session-end hook that posts a summary you write (or that your script extracts from the transcript) as a record with visibility set to your team audience. Keep AULD_CAPTURE=explicit if you prefer to save only on request.
#Option B: MCP
Register the server
claude mcp add --transport http auld https://YOUR-AULD-HOST/mcp \
--header "Authorization: Bearer $AULD_MCP_TOKEN"#Tell Claude when to use it
CLAUDE.md
## Memory
Before answering questions about past decisions in this repo, call the auld recall tool.
When we agree on a convention, offer to remember it.#Notes
- Hook format and event names follow Claude Code’s hooks documentation; check it for your version.
- The script needs
jqandcurl.
Illustrative interface example · replace the host and key placeholders