Enable Hyperspell Auto-Trace

A setup skill that configures a session-end hook to send conversation transcripts to Hyperspell. Hyperspell extracts reusable procedures and emotional context so agents can learn from earlier sessions.

In plain words
What is it for?
For configuring Hyperspell tracing, checking required tools and credentials, and enabling automatic memory extraction.
Why use it?
It automates session memory collection instead of requiring manual transcript handling.

Skill for Claude CodeCodex

Part of the setup plugin — 2 skills, 2 commands shipped together

Install

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.

agentmods
npx agentmods add skills/hyperspell/claude/tracing
Any agent
npx skills add hyperspell/claude --skill tracing
Clone the repo
git clone --depth 1 https://github.com/hyperspell/claude

Made for: Claude Code, Codex.

Or install setup, the plugin that ships this one along with the rest of its 2 skills, 2 commands.

Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,252 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
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 $0.00021 $0.01252
Opus 5 $0.00010 $0.00626
Sonnet 5 $0.00004 $0.00250
Haiku 4.5 $0.00002 $0.00125

Measured 3d ago against content hash 864649c83ea0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

Enable Hyperspell Auto-Trace scanned grade B with 2 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 3d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Read the existing `~/.claude/settings.json` file (create it if it doesn't exist).

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -X POST "${HYPERSPELL_API_URL}/trace/add" \
setup/skills/setup-hyperspell/tracing/SKILL.md · 175 lines

How it starts

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

Enable Hyperspell Auto-Trace

This skill configures a Claude Code SessionEnd hook that automatically sends your conversation transcripts to Hyperspell at the end of each session. Hyperspell extracts procedural memories and emotional context from these traces, so your agents can learn from past sessions.

Instructions

Step 1: Verify Prerequisites

Check that jq is installed:

which jq

If not found, display:

jq is required for the auto-trace hook. Install it with:
  brew install jq    (macOS)
  apt install jq     (Linux)

Wait for the user to install it before continuing.

Step 2: Get the API Key

When the user invoked this skill, they may have passed an API key as an argument: '$1'

If that string is blank or not a valid API key (should start with hs- or hs_), check:

  1. The current project's .env.local or .env for HYPERSPELL_API_KEY
  2. The user's shell profile (~/.zshrc, ~/.bashrc, ~/.zprofile) for an exported HYPERSPELL_API_KEY

If still not found, ask the user:

Please paste your Hyperspell API key. Get one at https://app.hyperspell.com/api-keys

Step 3: Get the User ID

Check the user's shell profile for HYPERSPELL_USER_ID. If not found, ask:

What user ID should traces be associated with? This can be your email or any identifier.

If the user doesn't have a preference, suggest using their system username (output of whoami).

Step 4: Ensure Environment Variables Are Exported

Check the user's primary shell profile (usually ~/.zshrc on macOS). If HYPERSPELL_API_KEY is not exported there, add it:

export HYPERSPELL_API_KEY="<the-api-key>"

Similarly for HYPERSPELL_USER_ID if the user provided a custom one.

Do not duplicate if the export already exists -- update the existing line instead.

Step 5: Create the Trace Script

Create the directory ~/.hyperspell/ if it doesn't exist, then write the following script to ~/.hyperspell/send-trace.sh:

#!/usr/bin/env bash
# Hyperspell Auto-Trace: Sends Claude Code session transcripts to Hyperspell
# for procedural memory and mood extraction.
#
# Invoked by a Claude Code SessionEnd hook. Reads hook JSON from stdin.

set -euo pipefail

INPUT=$(cat)

SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty')
TRANSCRIPT_PATH=$(echo "$INPUT" | jq -r '.transcript_path // empty')

if [ -z "$TRANSCRIPT_PATH" ] || [ ! -f "$TRANSCRIPT_PATH" ]; then
  exit 0
fi

if [ -z "$SESSION_ID" ]; then
  exit 0
fi

if [ -z "${HYPERSPELL_API_KEY:-}" ]; then
  exit 0
fi

HYPERSPELL_API_URL="${HYPERSPELL_API_URL:-https://api.hyperspell.com}"
HYPERSPELL_USER_ID="${HYPERSPELL_USER_ID:-$(whoami)}"

HISTORY=$(cat "$TRANSCRIPT_PATH")

PAYLOAD=$(jq -n \
  --arg session_id "$SESSION_ID" \
  --arg history "$HISTORY" \
  '{
    session_id: $session_id,
    history: $history,
    format: "openclaw",
    extract: ["procedure", "mood"]
  }')

curl -s -X POST "${HYPERSPELL_API_URL}/trace/add" \
  -H "Authorization: Bearer ${HYPERSPELL_API_KEY}" \
  -H "X-As-User: ${HYPERSPELL_USER_ID}" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD" \
  --max-time 30 \
  > /dev/null 2>&1 || true

exit 0

Read the full file on GitHub · 175 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. 3d ago First seen · 175 lines · 21 tokens per session scan B 864649c83ea0

Subscribe to this mod's changes

Enable Hyperspell Auto-Trace is a skill published in the GitHub repository hyperspell/claude (15 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 1,252 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens