⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v1.3.0

vicem

rakkunn@rakkunn⭐ 7 stars· last commit 2d ago· 0 open issues

Zero-dependency AI Agent Context Baton & Diet Suite. Use this skill when handing off coding tasks between AI agents (Claude Code, OpenAI Codex, Antigravity IDE, Cursor, VS Code, Gemini CLI, Web AI), compacting bloated sessions (Context Rot Rescue), or rehydrating skeletonized functions from .vicem/ledger.json.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐ 7 on GitHubGitHub ↗

New / niche

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Vicem — Diet the Context, Pass the Baton

Hit Claude Code's 5-hour quota mid-feature? Or watching Cursor / Codex slow to a crawl after 150k tokens of context rot?

Vicem compacts your active coding session by 80–92% net effective tokens (Measured Eval — via deterministic AST code skeletonization with [pure] / [effects: ...] tags + SHA-256-checked, secret-redacted MCP rehydration) and hands off a hardened .vicem/BATON.md across Claude Code, Cursor, Codex CLI, Gemini CLI, Windsurf, Antigravity IDE, and Web AI in 3 seconds — with 0 npm dependencies and 0 network calls.

⭐ Tip: Click Star (top-right) to bookmark this repo for the next time your coding agent hits a 5-hour quota limit or context rot.


⚡ 10-Second Quick Start (npx — Zero Install)

1. Run the Local Handoff GUI or Pass a Baton Immediately

# Launch the local Handoff GUI (3-step guided handoff, preview confirmation & manual recovery)
npx -y vicem-cli gui

# Or pack a compressed baton from your current repo & hand off in 1 command
npx -y vicem-cli codex
npx -y vicem-cli claude
npx -y vicem-cli cursor

# Or auto-configure global `vicem` CLI + MCP servers across all installed agents
npx -y vicem-cli setup

2. Add as an Agent Skill & MCP Server in 1 Line (Claude Code / Codex / Cursor)

# Install the Agent Skill globally (Claude Code, Cursor, Codex, Antigravity, Windsurf)
npx skills add RAKKUNN/vicem -g

# Claude Code MCP Server
claude mcp add vicem -- npx -y vicem-cli mcp

# OpenAI Codex CLI MCP Server
codex mcp add vicem -- npx -y vicem-cli mcp

Add to ~/.cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json, or claude_desktop_config.json:

{
  "mcpServers": {
    "vicem": {
      "command": "npx",
      "args": ["-y", "vicem-cli", "mcp"]
    }
  }
}

Visual Overview

  1. Review your work (01 · Source conversation): Select the active project and source conversation, and inspect or edit the extracted handoff goal.
  2. Choose a destination (02 · Choose a destination): Pick the target agent (Claude Code, OpenAI Codex, Cursor, Antigravity, Gemini CLI, Windsurf, VS Code, Web Chat) and delivery action (Open the app, Open in terminal, or Prepare handoff only).
  3. Review and hand off (03 · Review handoff): Inspect the exact .vicem/BATON.md summary before anything is written or launched. If automatic launch is unavailable, copy the saved BATON.md path, shell continuation command, and start prompt directly from the recovery panel.
$ npx -y vicem-cli codex

  ╭─ VICEM CONTEXT BATON & DIET RECEIPT ──────────────────────────────────╮
  │ Source Session : Claude Code (sess-9f3a2c · 42 turns harvested)       │
  │ Context Diet   : 184,200 tok ($2.76) ──► 14,800 tok ($0.22) [-91.9%]  │
  │ Code Skeletons : 18 files compressed (31 bodies indexed in ledger)    │
  │ Security Guard : 2 secrets redacted (OPENAI_KEY, AWS_ACCESS_KEY)      │
  │ Relay Target   : OpenAI Codex CLI (interactive TTY handoff ready)     │
  ╰───────────────────────────────────────────────────────────────────────╯
[OK] [Vicem] Baton written to .vicem/BATON.md (182ms). Launching codex...

How Side-Effect-Tagged AST Skeletonization + MCP Rehydration Works

Instead of lossy LLM summarization that forgets exact type contracts or hides side effects, Vicem keeps all imports, types, and signatures intact inside .vicem/BATON.md, annotates every elided body with deterministic AST purity & side-effect tags ([pure] vs [effects: fs-write, proc, net, state, fs-read, throws, async] with 1-hop intra-file propagation), and indexes raw bodies in .vicem/ledger.json:

// What the receiving agent sees in .vicem/BATON.md (disk file untouched):
export interface JwtPayload { sub: string; exp: number; role: 'admin' | 'user'; }
export function normalizeBearerHeader(rawHeader: string): string { /* ... [pure] */ }
export async function verifySessionToken(rawToken: string, secret: string): Promise<JwtPayload> { /* ... [effects: fs-read, throws, async] */ }

When the receiving agent actually needs to edit verifySessionToken, it calls the MCP tool vicem_rehydrate("src/auth.ts", "verifySessionToken") (optionally with include_callees: true) for SHA-256-checked, secret-redacted AST rehydration on demand — while .vicem/metrics.json (vicem stats) tracks your live Skeleton Cache Hit Rate (CHR) and Net Token Reduction (NTR) (see full benchmark & break-even curve).

Pipeline StageBefore Vicem (Raw Session)After Vicem Baton & Diet (v1.3.0)Measured Impact
1. Session Handoff40+ turns of raw JSONL / SQLite history locked in one toolExtracts Goal, Done, Failed Attempts, Immediate NEXT & git diff into .vicem/BATON.md< 3s handoff across 12+ CLI, IDE & Web AI agents
2. Side-Effect AST SkeletonizerFull source files with unchanged function bodies (~59,100 tok)Signatures + [pure] / [effects: ...] tags + 1-hop call graph; bodies in `.vicem/

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • .agents/skills/vicem/SKILL.md2.7 KB678ed75bbd30upstream ↗
    ---
    name: vicem
    description: Zero-dependency AI Agent Context Baton & Diet Suite. Use this skill when handing off coding tasks between AI agents (Claude Code, OpenAI Codex, Antigravity IDE, Cursor, VS Code, Gemini CLI, Web AI), compacting bloated sessions (Context Rot Rescue), or rehydrating skeletonized functions from .vicem/ledger.json.
    ---
    
    # Vicem (`vicem.mjs`) — Universal Agent Baton & Diet Skill
    
    Vicem packages the active project state, git diff, task progress, and compressed code skeletons into a bookended U-Shaped Attention Baton (`.vicem/BATON.md`), redacts secrets (`‹REDACTED:PROVIDER:HASH4›`), and hands off or compacts sessions in a single command.
    
    ## 1. Receiving a Baton (Mandatory Rules for Target Agents)
    
    1. **Read `.vicem/BATON.md` First:**
       - **Zone 1 (Top Primacy Zone):** Read `## 1. Goal` and `## 2. Immediate NEXT` first.
       - **Zone 2 (Middle Evidence Zone):** Review `## 3. Done`, `## 4. Work Evidence (Git Diff & Slimmed Logs)`, and `## 5. Architectural Context (Code Skeletons)`.
       - **Zone 3 (Bottom Recency Anchor):** Begin immediately from **Immediate NEXT #1**.
    2. **NEVER Write Skeleton Placeholders to Disk (`SkeletonWriteGuard`):**
       - Functions `>= 12` lines in Section 5 have their bodies replaced with `/* ... */` or `pass` to save tokens.
       - **Strictly Forbidden:** Never write `{ ... }`, `/* ... */`, `⋮`, or `‹REDACTED:...›` tokens into real source files.
       - **How to Rehydrate:** Call MCP tool `vicem_rehydrate(file_path, symbol_name)` (or read the original file directly) before modifying a skeletonized function.
    
    ## 2. Daily Zero-Flag Commands
    
    ```bash
    # Auto-detect active session and pass baton to recommended target
    node vicem.mjs
    
    # Hand off to a specific CLI, IDE, or Web AI target
    node vicem.mjs codex
    node vicem.mjs claude
    node vicem.mjs ide
    node vicem.mjs web
    
    # Compact current bloated session (Context Rot Rescue)
    node vicem.mjs self
    
    # Return baton to previous agent & auto-unmount temporary rule files
    node vicem.mjs back
    
    # Restore pre-handoff file snapshot or roll back session
    node vicem.mjs rollback
    
    # Install idempotent Git pre-commit safety guard hook
    node vicem.mjs init
    
    # Run <50ms zero-spawn environment & agent storage diagnostics
    node vicem.mjs doctor
    
    # Apply Web AI clipboard reply safely (2-Phase Guard + SmartPatchApplier)
    node vicem.mjs land
    ```
    
    ## 3. MCP Tools Provided (`node vicem.mjs mcp`)
    
    - `vicem_create_baton`: Build `.vicem/BATON.md` with 4-stage Context Diet and 3-tier Secret Redaction.
    - `vicem_read_baton`: Read `.vicem/BATON.md` and check `StalenessDriftGuard` (`git HEAD` drift).
    - `vicem_rehydrate(file_path, symbol_name)`: Retrieve omitted raw function/method bodies from `.vicem/ledger.json`.
    - `vicem_check_guard`: Verify diffs against `SkeletonWriteGuard` and `SecretCommitGuard`.
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/rakkunn-vicem-agents-skills-vicem.md

// REPO STATS

7 stars
0 open issues
Last commit: 2d ago