skills/extract-agent-sessions/SKILL.md
Recover, export, or summarize recent human and assistant conversations from local agent session stores while excluding tool calls, reasoning, system injection, copied parent history, and subagent noise. Use for recent-session inventories, clean conversation recovery, or topic summaries from tree-shaped `.claude` and rollout-shaped `.codex` JSONL stores on Linux or macOS.
npx skillsauth add shareai-lab/shareai-skills extract-agent-sessionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill as a storage map and decision guide, not as a stable parser. Treat all local session layouts as unversioned implementation details. Inspect the files that exist now, adapt shell commands to their observed shape, and fail closed when the shape is ambiguous.
Do not create or install a persistent extraction script. Compose one-off commands from the current filesystem and shell capabilities.
S1 and S2. Do not display prompt
previews, project names, working directories, complete IDs, or absolute paths by
default. Truncation is not redaction.Choose one mode before reading conversation bodies:
“Lossless” means lossless relative to persisted visible text. Preserve a stored
placeholder such as [Pasted Content ...] or [Image #1] in private-full mode, but
state that the externalized body is unavailable.
Resolve the current user's home directory without guessing another user's account. This version supports Linux and macOS hosts:
Read references/session-layouts.md for the relevant store family before selecting identity or message fields.
Interpret “recent two days” as a rolling 48-hour interval unless the user asks for
calendar days. Capture one [start, end] snapshot and apply both bounds throughout
the scan so new writes do not move the reported window.
Use history or visible-message timestamps for discussion recency. Use file size and mtime only to detect active writes or prioritize fallback inspection; never treat mtime as the conversation time.
Inspect keys and timestamp units before filtering the small history indexes. Keep only the latest in-window entry per session ID in a private candidate map. Display anonymous aliases and metadata only.
History is a discovery index, not canonical conversation text. It can contain slash commands, local shell commands, or abbreviated pasted content.
Resolve transcripts only for selected candidates. Constrain every path to an approved data root, reject symlinks and unsafe IDs, and compare basenames exactly.
For tree-shaped stores, accept only root-level project transcripts and exclude
every subagents/ descendant. For rollout-shaped stores, inspect the first
projected session_meta before reading later records; reject explicit subagents
before they can contribute copied parent history.
Project only key names, value types, role/type enums, content-block type names, and
counts. Do not print IDs, paths, timestamps, or text values. Collapse unrecognized
enum strings to an unknown-string marker, then compare the fingerprint to the
observed patterns in the reference.
If required identity, parent-link, human, or assistant fields are absent or have an unknown combination, stop content extraction and report schema drift. Do not guess which channel contains human-visible text.
For a tree-shaped transcript, reconstruct the active UUID path before reading text. Use both physical and logical parent links so compacted history remains connected. If the active branch cannot be proven, report the ambiguity instead of merging sibling branches.
For a rollout-shaped transcript, preserve canonical human messages and assistant output text. Preserve visible progress and final text in private-full mode, but do not duplicate mirror events. Use lifecycle records only for state.
Store attachment presence and counts by default. Preserve local attachment paths or data only when the user explicitly requests a private full export.
Inspect counts first. For a topic summary, load every selected human message and the final answer for each completed turn. Add visible progress only when a turn has no final answer, is open/aborted, or the store does not label final answers.
Keep the complete filtered timeline on disk for private-full mode; do not load all of it into model context merely to produce themes.
Compare source identity, size, and modification time before and after extraction. If the source changed, discard the artifact and retry once after it settles. Treat a malformed middle record as corruption; retry an incomplete last line only when the source was actively changing.
Report aliases, exact UTC window, root-session count, command-only exclusions, subagent exclusions, state, schema warnings, branch/compact ambiguity, and missing externalized content. Keep original paths and stable IDs only in a private manifest when needed for local traceability.
Remove temporary artifacts unless the user explicitly chose a private export path.
development
Transform an AI agent into a tasteful, disciplined development partner. Not just a code generator, but a collaborator with professional standards, transparent decision-making, and craftsmanship. Use for any development task: building features, fixing bugs, designing systems, refactoring. The human provides vision and decisions. The agent provides execution with taste and discipline.
testing
Evaluate Agent Skill design quality against official specifications and best practices. Use when reviewing, auditing, or improving SKILL.md files and skill packages. Provides multi-dimensional scoring and actionable improvement suggestions.
development
Create platform-native content that resonates with each community's culture. Use when adapting technical content for WeChat, Hacker News, Reddit, Medium, Twitter/X, Dev.to, or LinkedIn. Transforms generic writing into content that feels written BY that community, not AT them.
tools
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI system" (2) want to understand agent architecture, agentic patterns, or autonomous AI (3) need help with capabilities, subagents, planning, or skill mechanisms (4) ask about Claude Code, Cursor, or similar agent internals (5) want to build agents for business, research, creative, or operational tasks Keywords: agent, assistant, autonomous, workflow, tool use, multi-step, orchestration