mcpField
O
obelisk

obelisk

github.com/tommy0103Agent workflows1392 installsUpdated 1w ago
Repository

About obelisk

obelisk is a skill for retrieving local coding-agent history through the obelisk CLI. It guides agents through scoped searches, evidence checks, and concise synthesis of past sessions and saved memories.

Key features

  1. 01Scoped history retrieval
  2. 02Session and message search
  3. 03Saved-memory lookup and verification
  4. 04Bounded JavaScript query workflow
  5. 05Evidence-based synthesis

Use cases

  1. 01Finding prior decisions in coding sessions
  2. 02Checking a remembered conclusion against messages
  3. 03Reviewing work within a project or time range
  4. 04Preparing concise history-based responses

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tommy0103/obelisk-skill --skill obelisk

After installing, type/obeliskin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

package.json
references/
advanced-helpers.md
api-reference.md
memory-workflow.md
pitfalls.md
query-patterns.md
recap-patterns.md
recap-writing.md
retrieval-semantics.md
schema.md
references/recap/
overview.md
pattern1-cover.md
pattern2-thinking.md
pattern3-vibe.md
pattern4-workflow.md
pattern5-closing.md
writing1-cover.md
writing2-thinking.md
writing3-vibe.md
writing4-workflow.md
writing5-closing.md

Details

From the project README

obelisk

Retrieve local coding-agent history through the installed obelisk CLI. Write a bounded JS query, read its JSON result, then answer from evidence.

Retrieval workflow

  1. Choose the narrowest project, file, session, time range, or topic scope. Read the matching reference below before writing the query.
  2. Normally start a new task with overview({ limit: 6 }); skip orientation for an exact session ID, message UUID, or absolute file path. Overview is a navigation map, not evidence.
  3. Recall prior conclusions with memories() and verify against session evidence with search() or scoped helpers. Use English memory query terms. Expand selected hits with messages() rather than loading entire sessions.
  4. Group, deduplicate, and project inside the query. Return stable IDs and short snippets; keep synthesis JSON around 10k–12k characters when possible.
  5. Answer with concise evidence. Identify prior memories naturally when they influence the answer. Offer to save a durable, new conclusion; wait for approval before writing the memory file or changing memory records.

Treat is_invoking: true as your current session, not independent historical evidence. Ordinary conversation evidence uses visible, non-meta text; thinking and tool output have different evidentiary roles. Read retrieval semantics before querying those surfaces or superseded branches.

Run a query

Use a unique temporary directory so the query path cannot collide:

qdir=$(mktemp -d /tmp/obq.XXXXXX 2>/dev/null || { d="/tmp/obq.$$.$RANDOM"; mkdir "$d"; echo "$d"; })
qfile="$qdir/query.mjs"
cat > "$qfile" <<'JS'
const hits = search('auth fix', { limit: 5 });
return hits.map(h => ({
  session_id: h.session.id, uuid: h.message.uuid,
  content_type: h.message.content_type,
  snippet: h.message.text?.slice(0, 240),
}));
JS
obelisk --query "$qfile"

The CLI runs the file in an async wrapper; return emits JSON. Queries are read-only, with no filesystem or network access inside the script. For broad history, adapt the first-pass recipe in query patterns instead of this tiny keyword example.

For a quick keyword lookup:

obelisk --search "keyword" --nonce "obq-<unique-token-you-invent>"

Type a unique literal nonce: shell substitutions cannot identify the invocation in the transcript. Query-file identity resolves through its recorded path or script content.

Fresh index and permissions

A successful CLI invocation is required: it refreshes ~/.obelisk/obelisk.sqlite before retrieval. Never degrade to a stale, read-only index when refresh fails.

If the command fails with a write-permission error for ~/.obelisk (such as SQLITE_READONLY, EACCES, or EPERM), rerun the same command with sandbox_permissions: "require_escalated", or the host's equivalent write permission mechanism. If access is unavailable or denied, stop and report the blocker. Direct SQLite or JSONL reads do not substitute for a successful refresh.

Choose helpers

The default retrieval surface is:

HelperPurpose
overviewOrient to projects and recent entry points.
sessionsLocate sessions under structural filters.
searchFind message evidence by topic.
messagesRead one message, a bounded window, or a session interval (CLI 0.3.0+).
memoriesRecall previously saved conclusions.
summariesRead recorded session summaries.
sqlExpress joins or aggregations the other helpers cannot.

Specialized and legacy helpers remain callable; read their API contracts when needed. Check uncertain option names and row fields before relying on them.

Load references by task

Load only the references needed for the current task. Each reference owns its contracts or recipes; do not preload the whole directory.

Before doing thisRead
Broad synthesis, design history, progress summaries, ordinary weekly/monthly reviews, or what the user did, learned, decided, tried, or abandonedQuery patterns and retrieval semantics.
Scoped project/file/session searches, multi-step retrieval, correlation, or evidence classificationRetrieval semantics.
Choosing helper options, fields, paging, or specialized/legacy helpersAPI reference; for message expansion, the messages contract.
Writing raw SQLSchema before execution.
Saving, archiving, or updating memoryMemory workflow before writing files or running a mutation.
Workflow-specific retrievalAdvanced helpers.
Recovering from an error or resolving FTS, ordering, row-shape, or raw-record surprisesPitfalls.
Explicit /obelisk recap ...Recap overview before the first query, then follow its card-by-card disclosure.

Route to recap only when the first word after /obelisk is recap; ordinary weekly/monthly summaries do not select that workflow.

Approved memory changes run locally through a separate mutation entry point: obelisk --attune /tmp/register-memory.mjs. Retrieve the necessary IDs first with --query; --attune exposes only remember() and forget().

Comments

Markdown supported