# Auto Capture Claude Code

Claude Code adapter for the auto-capture skill.

- Repository: https://github.com/NateBJones-Projects/OB1 (4752 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add NateBJones-Projects/OB1 --skill auto-capture-claude-code -g -a claude-code -y`
Codex: `npx skills add NateBJones-Projects/OB1 --skill auto-capture-claude-code -g -a codex -y`
Cursor: `npx skills add NateBJones-Projects/OB1 --skill auto-capture-claude-code -g -a cursor -y`
Gemini CLI: `npx skills add NateBJones-Projects/OB1 --skill auto-capture-claude-code -g -a gemini-cli -y`

## Description

Claude Code adapter for the auto-capture skill. Extends auto-capture with automatic session-end hooks that capture transcripts to Open Brain without manual intervention. Use this when you want every meaningful Claude Code session to be preserved automatically, not just the ones where you remember to say "wrap up".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Auto-Capture: Claude Code Adapter

## Relationship to Upstream Skill

This adapter implements the session-end capture behavior defined by the upstream [auto-capture skill](../auto-capture/) by **Jared Irish**. The base skill is a behavioral protocol, it describes when and what to capture during interactive session closes. This adapter is the concrete Claude Code binding: a Stop-hook script that fires the same capture behavior automatically when a session ends without a verbal trigger. The upstream skill and this adapter are complementary; install both for full coverage.

## Problem

The base auto-capture skill requires a verbal trigger ("wrap up", "park this")
to fire. In practice, many Claude Code sessions end without that trigger, the user closes the terminal, hits Ctrl+C, or simply walks away. Those sessions
and their decisions are lost.

## What This Adapter Adds

This adapter uses Claude Code's hook system to run a capture script automatically
at session end. It complements the base auto-capture skill:

- **Base auto-capture** handles interactive session-close captures (ACT NOW items,
  session summaries) when the user explicitly wraps up.
- **This adapter** handles ambient capture when the session ends without an
  explicit trigger (terminal close, timeout, Ctrl+C).

Together they ensure no valuable session falls through the cracks.

## How It Works

1. Claude Code fires a `Stop` hook at session end, passing the transcript path
   and session metadata via stdin as JSON.
2. The hook script (`session-end-capture.mjs`) reads the transcript, filters out
   short or agent-only sessions, and formats the content.
3. The formatted transcript is POSTed to the Open Brain REST ingest endpoint
   (or smart-ingest edge function) for automatic thought extraction.
4. Failed captures are saved to a local retry queue and retried on subsequent
   session ends.

## Skip Heuristics

Not every session is worth capturing. The hook skips:

The rest: https://github.com/NateBJones-Projects/OB1/blob/HEAD/skills/auto-capture-claude-code/SKILL.md
