henrygoldsmith07-wq/Claude-Code / .claude/skills/sync-claude-sessions
sync-claude-sessions
VerifiedDigest recent local Claude Code CLI history into /raw/sessions and index recurring mistakes in /wiki. Use when syncing session data or as part of /data-ingestion.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.3 KB |
SKILL.md
View on GitHub---
name: sync-claude-sessions
description: 'Digest recent local Claude Code CLI history into /raw/sessions and index recurring mistakes in /wiki. Use when syncing session data or as part of /data-ingestion.'
---
# Sync Claude Sessions
Pipeline skill: turn recent Claude Code session transcripts into indexed
knowledge. Runs standalone or as step 1 of `/data-ingestion`.
## Process
1. **Find the last sync point.** Read `raw/sessions/.last-sync` (a single ISO
timestamp). If missing, default to 14 days ago.
2. **Locate session data.** Claude Code stores transcripts under
`~/.claude/projects/<project-slug>/*.jsonl`. List files modified after the
last sync point.
- **Cloud fallback**: in a fresh remote container (scheduled routine runs),
that directory is missing or holds only this session — the owner's desktop
CLI history is unreachable there. Do NOT report "nothing new"; instead
digest the *current* session so far (its task, outcome, mistakes,
corrections) as the sole entry, and state in the report that full local
history syncs only when this skill runs on the desktop.
- If there is genuinely nothing to digest (no history AND no meaningful
current-session activity), record that and skip to step 6.
3. **Digest, don't dump.** For each new/updated session, extract only:
- Date, project, one-line task description
- Outcome (succeeded / abandoned / partial)
- Mistakes or repeated corrections (user re-explaining, reverted edits,
failed commands retried)
- Skill opportunities (workflows done manually 2+ times that could become
a skill or command)
Use `jq`/`grep` to pull user messages and tool errors rather than reading
whole transcripts into context.
4. **Write the digest.** Append one file:
`raw/sessions/YYYY-MM-DD_session-digest.md` with a section per session.
Never copy secrets, tokens, or credentials out of transcripts.
5. **Index.** Add a row to the **Session Digests** table in `wiki/index.md`
summarizing the recurring mistakes and skill opportunities found.
6. **Update the sync point.** Write the current ISO timestamp to
`raw/sessions/.last-sync`.
7. **Report.** Sessions processed, top recurring mistake, top skill
opportunity. If run from `/data-ingestion`, keep this to 3 lines.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |