2026-05-30 03:21:35 +08:00
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".github/assets/obelisk-wordmark-d.svg">
<img src=".github/assets/obelisk-wordmark-l2.svg" alt="Obelisk" width="540">
</picture>
2026-05-30 03:27:03 +08:00
[](https://github.com/tommy0103/obelisk/stargazers)
[](https://github.com/tommy0103/obelisk/releases)
2026-06-15 02:48:04 +08:00
[](LICENSE)
2026-05-30 03:27:03 +08:00
2026-06-15 02:38:04 +08:00
Every past session, subagent, and workflow -- queryable by your agent, browsable by you.
2026-05-30 04:57:06 +08:00
2026-05-30 03:53:16 +08:00
</div>
2026-05-30 03:21:35 +08:00
<br />
2026-06-15 02:38:04 +08:00
## Two sides of the same index
2026-05-30 03:21:35 +08:00
2026-06-15 02:38:04 +08:00
Obelisk has two sides that share one SQLite index:
2026-05-30 04:57:06 +08:00
2026-06-15 02:38:04 +08:00
**Skill side** — a Claude Code skill that lets the agent search and query its own session history. The agent writes JS queries, runs them locally, answers in plain language.
2026-05-30 04:57:06 +08:00
2026-06-15 02:38:04 +08:00
**App side** — an Electron desktop app for humans to browse sessions, manage memories, view usage stats, and see weekly recap cards.
2026-05-30 04:57:06 +08:00
2026-06-15 02:38:04 +08:00
Both read from the same `~/.claude/obelisk.sqlite` database. The skill indexes; the app watches and renders.
2026-05-30 04:57:06 +08:00
2026-06-15 02:38:04 +08:00
## Skill: agent-first retrieval
2026-05-30 03:21:35 +08:00
2026-06-15 02:48:04 +08:00
<div align="center">
<img src=".github/assets/demo.png" alt="Obelisk App" width="720">
</div>
You can use obelisk like:
2026-05-30 03:21:35 +08:00
```
2026-05-30 04:57:06 +08:00
/obelisk 上次 auth bug 最后到底改了哪些文件,为什么这么改
/obelisk 这个文件最近在哪些 sessions 里被反复修改
/obelisk 找出最近失败的 tool calls,它们分别发生在哪些任务里
/obelisk 那个 review workflow 的 subagents 各自结论是什么
2026-06-15 02:38:04 +08:00
/obelisk recap this week
2026-05-30 03:21:35 +08:00
```
2026-06-15 02:38:04 +08:00
### Install
2026-05-30 03:21:35 +08:00
2026-06-15 02:48:04 +08:00
2026-05-30 03:21:35 +08:00
```bash
npx skills add tommy0103/obelisk
```
2026-06-15 02:38:04 +08:00
Or manually: copy the skill into `.claude/skills/obelisk/` .
2026-05-30 03:21:35 +08:00
2026-06-15 02:38:04 +08:00
### How it works
2026-05-30 03:21:35 +08:00
```
You ask a question
↓
Agent writes a JS query against the SQLite index
↓
Runs it via node runtime.mjs --query <script>
↓
2026-06-15 02:38:04 +08:00
Reads the JSON result, answers in natural language
2026-05-30 03:21:35 +08:00
```
2026-06-15 02:38:04 +08:00
Core API: `search()` , `context()` , `sql()` , plus structured helpers (`sessions` , `memories` , `summaries` , `workflows` , `failures` , `fileHistory` , etc).
2026-06-15 02:25:21 +08:00
2026-06-15 02:38:04 +08:00
### Memory layer
2026-06-10 02:05:27 +08:00
2026-06-15 02:38:04 +08:00
When a retrieval produces a conclusion worth keeping, the agent proposes a markdown memory file. After user approval, it registers the file with `runtime.mjs --remember` . Memories are recalled via `memories()` in future sessions — a synthesis cache, not a replacement for raw evidence.
2026-05-30 04:57:06 +08:00
2026-06-15 02:38:04 +08:00
## App: A surface for human
2026-05-30 03:21:35 +08:00
2026-06-15 02:38:04 +08:00
A companion desktop app for browsing what the skill indexes.
2026-05-30 03:21:35 +08:00
2026-06-15 02:38:04 +08:00
<div align="center">
<img src=".github/assets/app-screenshot.png" alt="Obelisk App" width="720">
</div>
2026-05-30 03:21:35 +08:00
2026-06-15 02:38:04 +08:00
- **Sessions** — browse all sessions with search, project filtering, readable tool calls (diffs, terminal output, file viewers)
- **Memory** — list and detail views for registered memory files
- **Activity** — GitHub-style heatmap, weekly/cumulative token charts
- **Recap** — shareable weekly/monthly recap cards with archetype theming
- **Settings** — data source configuration, auto-refresh, rebuild index
2026-05-30 03:21:35 +08:00
2026-06-15 02:38:04 +08:00
macOS only. Download from [Releases ](https://github.com/tommy0103/obelisk/releases ).
2026-05-30 03:21:35 +08:00
2026-05-30 04:57:06 +08:00
## What gets indexed
| Layer | Source | What's captured |
|-------|--------|----------------|
| **Sessions** | `<project>/<sessionId>.jsonl` | Title, project, timestamps, git branch |
| **Messages** | user + assistant turns | Full text, model, token usage, parent chain |
2026-06-15 02:38:04 +08:00
| **Tool calls** | every tool invocation | Tool name, input, file paths |
2026-05-30 04:57:06 +08:00
| **Subagents** | `subagents/agent-<id>.jsonl` | Agent type, description, full conversation |
2026-06-15 02:38:04 +08:00
| **Workflows** | `workflows/wf_<runId>.json` | Script, result, agent count |
| **Workflow agents** | `subagents/workflows/wf_<runId>/` | Per-agent transcripts |
| **Memories** | registered markdown files | Conclusions linked to source sessions |
2026-05-30 04:57:06 +08:00
2026-06-15 02:38:04 +08:00
Full-text search via FTS5 covers all layers.
2026-05-30 04:57:06 +08:00
2026-05-30 03:21:35 +08:00
## Structure
```
2026-06-15 02:38:04 +08:00
scripts/ # Skill runtime (zero npm deps, Node 22 built-in sqlite)
├── schema.sql # Executable SQLite schema
├── runtime.mjs # Indexer + query runtime
├── db.mjs # Schema init, migrations
├── indexer.mjs # JSONL discovery + incremental indexing
└── query.mjs # Query API (search, sessions, memories, etc)
references/ # Agent-readable docs (progressive disclosure)
├── schema.md
├── query-patterns.md
├── retrieval-semantics.md
├── recap-patterns.md
├── recap/ # Per-card pattern + writing references
└── pitfalls.md
SKILL.md # Skill definition + API + retrieval strategy
2026-05-30 03:21:35 +08:00
```
2026-05-30 04:57:06 +08:00
## Implementation Notes
2026-05-30 03:21:35 +08:00
2026-06-15 02:38:04 +08:00
- Index rebuilds incrementally — only new/modified JSONL files are re-parsed
- Skill side uses Node 22 built-in `node:sqlite` ; zero npm dependencies
- `~/.obelisk/recap/` watched for new recap JSON files (agent writes, app renders)
2026-05-30 03:21:35 +08:00
---
## License
2026-06-15 02:48:04 +08:00
AGPL-3.0 @tommy0103