Beads Task Memory
gastownhall/beads
Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.
Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.
$ npx skills add slopus/happy --skill sessions -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install slopus/happy sessions --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/slopus/happy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/sessions .claude/skills/sessions && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "sessions" agent skill from https://github.com/slopus/happy/tree/main/.agents/skills/sessions into .claude/skills/sessions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sessions", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/slopus/happy/tree/main/.agents/skills/sessionsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add slopus/happy --skill sessions -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install slopus/happy sessions --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/slopus/happy.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/sessions .agents/skills/sessions && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "sessions" agent skill from https://github.com/slopus/happy/tree/main/.agents/skills/sessions into .agents/skills/sessions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sessions", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add slopus/happy --skill sessions -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install slopus/happy sessions --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/slopus/happy.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/sessions .cursor/skills/sessions && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "sessions" agent skill from https://github.com/slopus/happy/tree/main/.agents/skills/sessions into .cursor/skills/sessions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sessions", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/slopus/happy.git --path .agents/skills/sessions--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add slopus/happy --skill sessions -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install slopus/happy sessions --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/slopus/happy.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/sessions .gemini/skills/sessions && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "sessions" agent skill from https://github.com/slopus/happy/tree/main/.agents/skills/sessions into .gemini/skills/sessions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sessions", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install slopus/happy sessionsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add slopus/happy --skill sessions -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/slopus/happy.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/sessions .github/skills/sessions && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "sessions" agent skill from https://github.com/slopus/happy/tree/main/.agents/skills/sessions into .github/skills/sessions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sessions", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add slopus/happy --skill sessions -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install slopus/happy sessions --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/slopus/happy.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/sessions .opencode/skills/sessions && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "sessions" agent skill from https://github.com/slopus/happy/tree/main/.agents/skills/sessions into .opencode/skills/sessions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sessions", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
sessionsSearches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.
Questions about earlier coding-agent work, such as what was tried before, how a problem was investigated or what happened recently, are what this skill answers. It runs as /ce-sessions with an optional question or topic, and it pre-resolves the current git branch and repository name to narrow down which sessions to look at. It also applies when you refer to previous attempts without using the word sessions.
Session files can run to several megabytes, so the skill never loads them whole. It calls bundled scripts to discover sessions and to extract metadata, errors and a skeleton of each conversation, then reasons over that filtered output and passes the synthesis to a subagent.
Guardrails keep the result safe to share: tool inputs and outputs are summarized rather than quoted, thinking blocks are left out, the current session is skipped, credentials and personal remarks stay out of the summary, and access errors are reported at once instead of being retried.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 7ea7017. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 4 files in scripts/ (Python and Shell), which the agent can run.
Shell commands in SKILL.md call:
python3gitbashFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Session History Search loads about 3.1k tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 1,486 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from slopus/happy at commit 7ea7017, republished under its MIT licence (© slopus). 1,486 words, ~3,130 tokens.
.claude/skills/sessions/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Search session history across Claude Code, Codex, and Cursor and synthesize findings about what was worked on, tried, decided, or learned in prior sessions.
/ce-sessions [question or topic]
/ce-sessionsGit branch (pre-resolved): !git rev-parse --abbrev-ref HEAD 2>/dev/null || true
If the line above resolved to a plain branch name (like feat/my-branch), use it for branch filtering and pass it to the synthesis subagent. If it still contains a backtick command string or is empty, derive the branch at runtime instead.
Repo name (pre-resolved): !basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || true
If the line above resolved to a plain repo folder name, use it for session discovery. Otherwise derive at runtime.
The current year is 2026. Use this when interpreting session timestamps.
These rules apply at all times during orchestration and synthesis.
If no question argument is provided, ask what the user wants to know about their session history. Use the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded), request_user_input in Codex, ask_user in Gemini, ask_user in Pi (requires the pi-ask-user extension). Fall back to asking in plain text only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip the question.
Infer a time range from the user's question. Start narrow; widen only if a narrow scan finds nothing relevant.
| Signal | Initial scan window |
|---|---|
| "today", "this morning" | 1 day |
| "recently", "last few days", "this week", or no time signal | 7 days |
| "last few weeks", "this month" | 30 days |
| "last few months", broad feature history | 90 days |
Claude Code retains session history for ~30 days by default. Wider windows may find nothing on Claude Code unless the user has extended retention.
Run the discovery + metadata pipeline (preserving the null-delimited xargs hardening that lets extract-metadata.py run in batch mode):
bash scripts/discover-sessions.sh <repo> <days> | tr '\n' '\0' | xargs -0 python3 scripts/extract-metadata.py --cwd-filter <repo>Each output line is a JSON object describing a session (platform, file, size, ts, session, plus platform-specific fields). The final _meta line carries files_processed and parse_errors.
If the inventory's _meta line shows files_processed: 0, return "no relevant prior sessions" and stop.
If parse_errors > 0, note that some sessions could not be parsed and proceed with what was returned.
To narrow the platform set, add --platform claude, --platform codex, or --platform cursor to the discover-sessions.sh invocation. Default to all three.
Apply these filters in order to pick the sessions worth deep-diving:
Branch filter (Claude Code only). Keep sessions where branch == dispatch_branch exactly, or where the branch name contains a keyword from the question's topic (e.g., a question about "auth middleware" matches branches feat/auth-fix, chore/auth-refactor). Codex sessions don't carry gitBranch — skip this filter for them.
If the branch filter returned zero sessions, or you're processing Codex sessions:
auth,middleware,session,token (or similar).--keyword K1,K2,... appended to the extract-metadata.py invocation. The script returns sessions with non-zero match_count plus per-keyword counts.files_matched: 0, return "no relevant prior sessions" and stop. Do not extract anything.files_matched > 0, treat those sessions as candidates. Rank by match_count, break ties by per-keyword counts.Drop sessions outside the scan window. Use last_ts when available, fall back to ts. Discard sessions where both fall before the window start.
Exclude the current session — its conversation history is already available to the caller.
Apply the deep-dive cap. Take at most 5 sessions total across all platforms. Narrow by branch-match → match_count → file size > 30KB → recency.
Proceed only if at least one session remains after filtering. Otherwise return "no relevant prior sessions" and stop.
Note: gitBranch is captured at the first user message only. A session that began on main and did substantive work on a feature branch via mid-session git checkout records branch: "main". Branch-match returning nothing is not conclusive evidence — that's why the keyword-filter fallback in step 2 is required.
Create a per-run throwaway scratch directory:
SCRATCH=$(mktemp -d -t ce-sessions-XXXXXX)Capture the absolute path; thread it into Step 5 and Step 6. The OS handles cleanup on session end; an explicit rm -rf "$SCRATCH" at the end of Step 7 is harmless and makes intent explicit.
For each selected session, run the skeleton extractor with --output so content writes directly to the scratch file — extraction bytes never round-trip through the orchestrator's tool results:
python3 scripts/extract-skeleton.py --output "$SCRATCH/<session-id>.skeleton.txt" < <session-file>Stdout receives only a one-line JSON status ({"_meta": true, "wrote": "...", "bytes": N, ...}). Capture bytes and parse_errors from each status line.
Conditional tail-extract — if a skeleton terminates mid-investigation (last visible turn is a tool call with no resolution, or the assistant is mid-debugging without a conclusion), re-extract with a tail shape:
python3 scripts/extract-skeleton.py --output "$SCRATCH/<session-id>.skeleton.tail.txt" < <session-file>(The skeleton script does not accept a tail:N cap directly; if a tail-only view is needed, post-process the scratch file in shell with tail -n 50 after extraction. Use this only when the head output suggests the session was truncated mid-investigation.)
Conditional errors-mode — for sessions where investigation dead-ends are likely valuable:
python3 scripts/extract-errors.py --output "$SCRATCH/<session-id>.errors.txt" < <session-file>Use selectively — only when understanding what went wrong adds value. Cursor agent transcripts don't log tool results, so errors-mode produces nothing for Cursor sessions.
Dispatch the ce-session-historian subagent via the platform's subagent primitive (Agent in Claude Code, spawn_agent in Codex, subagent in Pi via the pi-subagents extension). Omit the mode parameter so the user's configured permission settings apply. Run on the mid-tier model (e.g., model: "sonnet" in Claude Code) — the synthesizer doesn't need frontier reasoning.
The dispatch prompt is the agent's input contract. Pass these fields:
problem_topic — one sentence naming the concrete question. Lift from the user's argument or, if missing, from the answer to the no-arg prompt.scratch_dir — absolute path to $SCRATCH.sessions — an array of objects, one per extracted session, each with:path — absolute path to the skeleton file (and optionally errors_path for the errors file when extracted)platform — claude, codex, or cursorbranch — git branch when present (Claude Code only)cwd — working directory when present (Codex only)ts and last_ts — session timestampsmatch_count and keyword_matches — when keyword filtering was usedoutput_schema — the structure the agent's response should follow. Default schema:Structure your response with these sections (omit any with no findings):
- What was tried before
- What didn't work
- Key decisions
- Related contextce-compound) supplies a schema in the skill argument, pass it through verbatim.Example dispatch shape:
Synthesize findings from these prior sessions:
Problem topic: <one-line topic>
Sessions to read (paths in $SCRATCH):
1. /tmp/ce-sessions-XXXX/abc123.skeleton.txt
platform=claude branch=feat/auth-fix ts=2026-05-01
2. /tmp/ce-sessions-XXXX/def456.skeleton.txt errors=/tmp/ce-sessions-XXXX/def456.errors.txt
platform=codex cwd=/Users/.../my-project ts=2026-05-03
...
Output schema:
- What was tried before
- What didn't work
- Key decisions
- Related context
Filter rule: only surface findings directly relevant to this specific problem.
Ignore unrelated work from the same sessions or branches.The agent reads each path via the platform's native file-read tool and returns prose findings. Bulk extraction content lives only in the agent's subagent context — the orchestrator's working state stays at file paths plus small inventory metadata.
Return the synthesizer's output text to the caller verbatim. If discovery or keyword filtering returned zero sessions (Step 2 or Step 3), return the literal string no relevant prior sessions instead.
Optionally clean up scratch:
rm -rf "$SCRATCH"The OS handles cleanup eventually regardless; the explicit cleanup is for readers who expect it.
When the caller (typically a user typing /ce-sessions, or another skill invoking ce-sessions via the platform's skill-invocation primitive) does not specify an output format, include a brief header noting what was searched:
**Sessions searched**: [count] ([N] Claude Code, [N] Codex, [N] Cursor) | [date range]Then the synthesizer's prose findings. When the caller supplies a schema, honor it verbatim and omit the default header.
Stop as soon as a complete answer is available. A confident "no relevant prior sessions" within seconds is a complete answer; do not extend the search to fill time. The structural caps in Step 3 (max 5 sessions deep-dived) and Step 5 (conditional tail/errors extraction) bound runtime by construction.
If the discovery pipeline fails (e.g., unreadable home directory, permission failure), surface the error to the caller. Do not substitute git log, file listings, or other sources — this skill's contract is session metadata and synthesis.
If extraction --output write fails (disk full, permission), surface a clear error and do not dispatch the synthesizer with partial paths.
If _meta reports parse_errors > 0 from any script, note partial extraction in the dispatch prompt and proceed; the synthesizer flags partial in findings.
© slopus, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (scripts) in .agents/skills/sessions of slopus/happy.
Open the folder on GitHubat commit 7ea7017
Session History Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Session History Search this skillslopus/happy | 24k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Beads Task Memorygastownhall/beads | 28k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Session Handoff Writercodewhale-hq/Codewhale | 41k | — | ~1.2k | Automated safety check: Pass | MIT | |
| File-Based Planning in ArabicOthmanAdi/planning-with-files | 27k | — | ~3.2k | Automated safety check: Notes | MIT | |
| Context Savegarrytan/gstack | 136k | — | ~9.7k | Automated safety check: Notes | MIT | |
| Gccdavila7/claude-code-templates | 32k | — | ~1.6k | Automated safety check: Pass | MIT |
gastownhall/beads
Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.
codewhale-hq/Codewhale
Writes a compact handoff note from real git and CI state so the next session or a teammate can pick up the work without rebuilding the context.
OthmanAdi/planning-with-files
Arabic edition of a file-based planning skill that keeps task_plan.md, findings.md and progress.md on disk so multi-step agent work survives lost context.
garrytan/gstack
Captures git state, decisions made and remaining work so that a later session can resume the task without losing context.
davila7/claude-code-templates
Git Context Controller (GCC) - Manages agent memory as a versioned file system under .GCC/.
aAAaqwq/AGI-Super-Team
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot.
slopus/happy
Drives a real browser from the shell with the agent-browser CLI: open pages, snapshot elements by ref, click, fill and extract, for testing web flows.
slopus/happy
Traces how an action moves through your code and draws it as a compact ASCII tree: functions called, payload types, state changes and components that re-render.
slopus/happy
Local development guide for the Happy pnpm monorepo: install, build, test and run the CLI, server, Expo app and Tauri desktop packages.
slopus/happy
Queries live Prometheus metrics and manages Grafana dashboards as code for Happy's infrastructure, using the grafanactl CLI and the Grafana datasource proxy API.
slopus/happy
Tests interactive CLI and TUI programs with Microsoft's tui-test, driving prompts, arrow keys and screen output in a real pseudo-terminal.
slopus/happy
Walks you through releasing a component of the Happy monorepo (CLI, mobile, web or server) from a clean local main that matches origin/main.
Works with
Categories
Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs. Questions about earlier coding-agent work, such as what was tried before, how a problem was investigated or what happened recently, are what this skill answers. It runs as /ce-sessions with an optional question or topic, and it pre-resolves the current git branch and repository name to narrow down which sessions to look at.
Session History Search fits situations like: recalling what you tried on a bug in an earlier agent session; reviewing what happened on this branch over the past few days; checking what earlier Codex or Cursor sessions decided about a design question.
Run `npx skills add slopus/happy --skill sessions -a claude-code`. Or copy the skill folder (.agents/skills/sessions in slopus/happy) into .claude/skills/sessions in your project. Claude Code loads it when a task matches its description.
Run `npx skills add slopus/happy --skill sessions -a codex`. Or copy the skill folder (.agents/skills/sessions in slopus/happy) into .agents/skills/sessions in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add slopus/happy --skill sessions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sessions, .gemini/skills/sessions, .github/skills/sessions and .opencode/skills/sessions in your project.
Going by SKILL.md and its folder, Session History Search needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (python3, git and bash). Our summary lists: Bash and Python for the bundled extraction scripts; Local session history from Claude Code, Codex or Cursor.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Session History Search is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Session History Search: Beads Task Memory (gastownhall/beads, 28k stars), Session Handoff Writer (codewhale-hq/Codewhale, 41k stars), File-Based Planning in Arabic (OthmanAdi/planning-with-files, 27k stars) and Context Save (garrytan/gstack, 136k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
slopus (a GitHub organization) maintains it in slopus/happy, which has 24,039 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 7, 2026.
Source: slopus/happy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.