Agent skill

Session Sync

by catlog22 in catlog22/Claude-Code-Workflow

Quick-sync session work to specs/.md and project-tech.json. An agent skill from catlog22/Claude-Code-Workflow.

MITAuto-check: notes

Install Session Sync

skills CLI
$ npx skills add catlog22/Claude-Code-Workflow --skill session-sync -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install catlog22/Claude-Code-Workflow session-sync --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/session-sync .claude/skills/session-sync && rm -rf skills-src

Use ~/.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/

Facts

Skill name
session-sync
GitHub stars
2.1k
Token cost
~1.7k tokens
SKILL.md length
120 words
Files
1
Skills in repo
82
Repo updated
First seen
Licence
MIT

At a glance

Quick-sync session work to specs/.md and project-tech.json. An agent skill from catlog22/Claude-Code-Workflow.

  • Works in 5 steps: Gather Context → Extract Updates → Preview & Confirm → …
  • SKILL.md covers Usage, Process, Implementation and Error Handling, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Session Sync is an agent skill from catlog22/Claude-Code-Workflow. Quick-sync session work to specs/.md and project-tech.json

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: JSON-driven multi-agent cadence-team development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution. The licence is MIT.

Example prompts

  • “/session-sync”

Requirements

  • Pre-approved tools (allowed-tools): request_user_input, Read, Write, Edit, Bash, Glob, Grep

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Gather Context
  2. Extract Updates
  3. Preview & Confirm
  4. Write
  5. Confirm

What it can do on your machine

Read from SKILL.md and the folder at commit 07491b0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • request_user_input
    • Read
    • Write
    • Edit
    • Bash
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Session Sync loads about 1.7k tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 120 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~18
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: request_user_input, Read, Write, Edit, Bash, Glob, Grep

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from catlog22/Claude-Code-Workflow at commit 07491b0, republished under its MIT licence (© catlog22). 120 words, ~1,693 tokens.

Download SKILL.mdSave it as .claude/skills/session-sync/SKILL.md (or your agent's skills folder).
name
session-sync
description
Quick-sync session work to specs/*.md and project-tech.json
allowed-tools
request_user_input, Read, Write, Edit, Bash, Glob, Grep
argument-hint
[-y|--yes] ["what was done"]

Session Sync

One-shot update specs/*.md + project-tech.json from current session context.

Design: Scan context -> extract -> write. No interactive wizards.

Usage

bash
$session-sync                        # Sync with preview + confirmation
$session-sync -y                     # Auto-sync, skip confirmation
$session-sync "Added JWT auth flow"  # Sync with explicit summary
$session-sync -y "Fixed N+1 query"   # Auto-sync with summary

Process

Step 1: Gather Context
   |- git diff --stat HEAD~3..HEAD (recent changes)
   |- Active session folder (.workflow/.lite-plan/*) if exists
   +- User summary ($ARGUMENTS or auto-generate from git log)

Step 2: Extract Updates
   |- Guidelines: conventions / constraints / learnings
   +- Tech: development_index entry

Step 3: Preview & Confirm (skip if --yes)

Step 4: Write both files

Step 5: One-line confirmation

Implementation

Step 1: Gather Context
javascript
const AUTO_YES = "$ARGUMENTS".includes('--yes') || "$ARGUMENTS".includes('-y')
const userSummary = "$ARGUMENTS".replace(/--yes|-y/g, '').trim()

// Recent changes
const gitStat = Bash('git diff --stat HEAD~3..HEAD 2>/dev/null || git diff --stat HEAD 2>/dev/null')
const gitLog = Bash('git log --oneline -5')

// Active session (optional)
const sessionFolders = Glob('.workflow/.lite-plan/*/plan.json')
let sessionContext = null
if (sessionFolders.length > 0) {
  const latest = sessionFolders[sessionFolders.length - 1]
  sessionContext = JSON.parse(Read(latest))
}

// Build summary
const summary = userSummary
  || sessionContext?.summary
  || gitLog.split('\n')[0].replace(/^[a-f0-9]+ /, '')
Step 2: Extract Updates

Analyze context and produce two update payloads. Use LLM reasoning (current agent) -- no CLI calls.

javascript
// -- Guidelines extraction --
// Scan git diff + session for:
//   - New patterns adopted -> convention
//   - Restrictions discovered -> constraint
//   - Surprises / gotchas -> learning
//
// Output: array of { type, category, text }
// RULE: Only extract genuinely reusable insights. Skip trivial/obvious items.
// RULE: Deduplicate against existing guidelines before adding.

// Load existing specs via ccw spec load
const existingSpecs = Bash('ccw spec load --dimension specs 2>/dev/null || echo ""')
const guidelineUpdates = [] // populated by agent analysis

// -- Tech extraction --
// Build one development_index entry from session work

function detectCategory(text) {
  text = text.toLowerCase()
  if (/\b(fix|bug|error|crash)\b/.test(text)) return 'bugfix'
  if (/\b(refactor|cleanup|reorganize)\b/.test(text)) return 'refactor'
  if (/\b(doc|readme|comment)\b/.test(text)) return 'docs'
  if (/\b(add|new|create|implement)\b/.test(text)) return 'feature'
  return 'enhancement'
}

function detectSubFeature(gitStat) {
  // Most-changed directory from git diff --stat
  const dirs = gitStat.match(/\S+\//g) || []
  const counts = {}
  dirs.forEach(d => {
    const seg = d.split('/').filter(Boolean).slice(-2, -1)[0] || 'general'
    counts[seg] = (counts[seg] || 0) + 1
  })
  return Object.entries(counts).sort((a, b) => b[1] - a[1])[0]?.[0] || 'general'
}

const techEntry = {
  title: summary.slice(0, 60),
  sub_feature: detectSubFeature(gitStat),
  date: new Date().toISOString().split('T')[0],
  description: summary.slice(0, 100),
  status: 'completed',
  session_id: sessionContext ? sessionFolders[sessionFolders.length - 1].match(/lite-plan\/([^/]+)/)?.[1] : null
}
Step 3: Preview & Confirm
javascript
// Show preview
console.log(`
-- Sync Preview --

Guidelines (${guidelineUpdates.length} items):
${guidelineUpdates.map(g => `  [${g.type}/${g.category}] ${g.text}`).join('\n') || '  (none)'}

Tech [${detectCategory(summary)}]:
  ${techEntry.title}

Target files:
  .ccw/specs/*.md
  .workflow/project-tech.json
`)

if (!AUTO_YES) {
  const answer = functions.request_user_input({
    questions: [{
      header: "确认同步",
      id: "confirm_sync",
      question: "Apply these updates? (modify/skip items if needed)",
      options: [
        { label: "Apply(Recommended)", description: "Apply all extracted updates to specs and project-tech.json" },
        { label: "Cancel", description: "Abort sync, no changes made" }
      ]
    }]
  })  // BLOCKS (wait for user response)
  if (answer.answers.confirm_sync.answers[0] !== "Apply(Recommended)") {
    console.log('Sync cancelled.')
    return
  }
}
Step 4: Write
javascript
// -- Update specs/*.md --
// Uses .ccw/specs/ directory (same as frontend/backend spec-index-builder)
if (guidelineUpdates.length > 0) {
  // Map guideline types to spec files
  const specFileMap = {
    convention: '.ccw/specs/coding-conventions.md',
    constraint: '.ccw/specs/architecture-constraints.md',
    learning: '.ccw/specs/coding-conventions.md' // learnings appended to conventions
  }

  for (const g of guidelineUpdates) {
    const targetFile = specFileMap[g.type]
    const existing = Read(targetFile)
    const ruleText = g.type === 'learning'
      ? `- [${g.category}] ${g.text} (learned: ${new Date().toISOString().split('T')[0]})`
      : `- [${g.category}] ${g.text}`

    // Deduplicate: skip if text already in file
    if (!existing.includes(g.text)) {
      const newContent = existing.trimEnd() + '\n' + ruleText + '\n'
      Write(targetFile, newContent)
    }
  }

  // Rebuild spec index after writing
  Bash('ccw spec rebuild')
}

// -- Update project-tech.json --
const techPath = '.workflow/project-tech.json'
const tech = JSON.parse(Read(techPath))

if (!tech.development_index) {
  tech.development_index = { feature: [], enhancement: [], bugfix: [], refactor: [], docs: [] }
}

const category = detectCategory(summary)
tech.development_index[category].push(techEntry)
tech._metadata.last_updated = new Date().toISOString()

Write(techPath, JSON.stringify(tech, null, 2))
Step 5: Confirm
Synced: ${guidelineUpdates.length} guidelines + 1 tech entry [${category}]

Error Handling

ErrorResolution
File missingCreate scaffold (same as $spec-setup Step 4)
No git historyUse user summary or session context only
No meaningful updatesSkip guidelines, still add tech entry
Duplicate entrySkip silently (dedup check in Step 4)
  • $spec-setup - Initialize project with specs scaffold
  • $spec-add - Interactive wizard to create individual specs with scope selection
  • $workflow-plan - Start planning with initialized project context

© catlog22, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/session-sync of catlog22/Claude-Code-Workflow.

Open the folder on GitHubat commit 07491b0

Compare with similar skills

Session Sync 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.

Session Sync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Session Sync this skillcatlog22/Claude-Code-Workflow2.1k—~1.7kAutomated safety check: NotesMIT
Spec Writergarrytan/gstack136k—~14kAutomated safety check: NotesMIT
Quick Design SpecDonchitos/Claude-Code-Game-Studios26k—~2.9kAutomated safety check: PassMIT
Openspec Sync Specstsedio/tsed3.1k6 repos~3.9kAutomated safety check: PassMIT
Sync Specsnexu-io/nexu3.3k—~1.2kAutomated safety check: PassMIT
Write Tech Specbholmesdev/hubble.md1.5k—~1.1kAutomated safety check: NotesMIT

Similar skills

  • Spec Writer

    garrytan/gstack

    Converts a vague idea into a precise, executable spec in five phases, files it as an issue and can start an agent on it in a fresh worktree.

    136k GitHub stars~14k tokensUpdated today
    DevelopmentAuto-check: notes
  • Quick Design Spec

    Donchitos/Claude-Code-Game-Studios

    Writes a short design spec for small gameplay adjustments such as tuning, tweaks and minor additions, and redirects anything larger to a full design document.

    26k GitHub stars~2.9k tokensUpdated 8 days ago
    Game DevelopmentAuto-check passed
  • Sync delta specs from an OpenSpec change to main specs. An agent skill from tsedio/tsed.

    3.1k GitHub starsUsed in 6 repos~3.9k tokens
    Auto-check passed
  • Sync Specs

    nexu-io/nexu

    A skill your agent uses when code changes may have made documentation outdated, when reviewing docs for consistency, or when the user asks to sync or audit documentation.

    3.3k GitHub stars~1.2k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Write Tech Spec

    bholmesdev/hubble.md

    Write a TECH.md spec for a significant Hubble feature after researching the monorepo architecture.

    1.5k GitHub stars~1.1k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Spec

    garden-co/classic-jazz

    Implement features using Spec Driven Development (SDD) workflow.

    2.5k GitHub stars~1.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from catlog22/Claude-Code-Workflow

All 82 skills in this repo
  • Prompt Generator

    catlog22/Claude-Code-Workflow

    Generate or convert Claude Code prompt files — command orchestrators, skill files, agent role definitions, or style conversion of existing files.

    2.1k GitHub starsUsed in 1 repo~4.7k tokens
    Auto-check: notes
  • Ccw Help

    catlog22/Claude-Code-Workflow

    CCW command help system. An agent skill from catlog22/Claude-Code-Workflow.

    2.1k GitHub stars~2.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Team Ultra Analyze

    catlog22/Claude-Code-Workflow

    Deep collaborative analysis team skill. An agent skill from catlog22/Claude-Code-Workflow.

    2.1k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check: notes
  • Brainstorm

    catlog22/Claude-Code-Workflow

    Unified brainstorming skill with dual-mode operation — auto mode (framework generation, parallel multi-role analysis, cross-role synthesis) and single role analysis.

    2.1k GitHub stars~4.8k tokensUpdated 3 mo ago
    Auto-check: notes
  • Ccw Chain

    catlog22/Claude-Code-Workflow

    Chain-based CCW workflow orchestrator. An agent skill from catlog22/Claude-Code-Workflow.

    2.1k GitHub stars~1.1k tokensUpdated 3 mo ago
    Auto-check: notes
  • Delegation Check

    catlog22/Claude-Code-Workflow

    Check workflow delegation prompts against agent role definitions for content separation violations.

    2.1k GitHub stars~2.8k tokensUpdated 3 mo ago
    Auto-check: notes

Questions about Session Sync

What does Session Sync do?

Quick-sync session work to specs/.md and project-tech.json. An agent skill from catlog22/Claude-Code-Workflow. Session Sync is an agent skill from catlog22/Claude-Code-Workflow.

How do I install Session Sync in Claude Code?

Run `npx skills add catlog22/Claude-Code-Workflow --skill session-sync -a claude-code`. Or copy the skill folder (.codex/skills/session-sync in catlog22/Claude-Code-Workflow) into .claude/skills/session-sync in your project. Claude Code loads it when a task matches its description.

How do I install Session Sync in Codex?

Run `npx skills add catlog22/Claude-Code-Workflow --skill session-sync -a codex`. Or copy the skill folder (.codex/skills/session-sync in catlog22/Claude-Code-Workflow) into .agents/skills/session-sync in your project. Codex loads it when a task matches its description.

Can I use Session Sync in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add catlog22/Claude-Code-Workflow --skill session-sync -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/session-sync, .gemini/skills/session-sync, .github/skills/session-sync and .opencode/skills/session-sync in your project.

What does Session Sync need to run?

SKILL.md names no scripts, command-line tools or credentials: Session Sync is instructions for the agent only. Its frontmatter pre-approves these tools: request_user_input, Read, Write, Edit, Bash, Glob, Grep.

Does Session Sync access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Session Sync safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Session Sync use?

Session Sync is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Session Sync use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Session Sync?

Skills that share tags, products or a category with Session Sync: Spec Writer (garrytan/gstack, 136k stars), Quick Design Spec (Donchitos/Claude-Code-Game-Studios, 26k stars), Openspec Sync Specs (tsedio/tsed, 3.1k stars) and Sync Specs (nexu-io/nexu, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Session Sync?

catlog22 (a GitHub user) maintains it in catlog22/Claude-Code-Workflow, which has 2,130 GitHub stars. The repository holds 82 skills in this directory. The repository was last updated on June 18, 2026.

Source: catlog22/Claude-Code-Workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.