mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
Adds the ck (Context Keeper) skill — deterministic Node.js scripts that give Claude Code persistent, per-project memory across sessions. Architecture: - commands/ — 8 Node.js scripts handle all command logic (init, save, resume, info, list, forget, migrate, shared). Claude calls scripts and displays output — no LLM interpretation of command logic. - hooks/session-start.mjs — injects ~100 token compact summary on session start (not kilobytes). Detects unsaved sessions, git activity since last save, goal mismatch vs CLAUDE.md. - context.json as source of truth — CONTEXT.md is generated from it. Full session history, session IDs, git activity per save. Commands: /ck:init /ck:save /ck:resume /ck:info /ck:list /ck:forget /ck:migrate Source: https://github.com/sreedhargs89/context-keeper Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
650 B
JavaScript
25 lines
650 B
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* ck — Context Keeper v2
|
|
* info.mjs — quick read-only context snapshot
|
|
*
|
|
* Usage: node info.mjs [name|number]
|
|
* stdout: compact info block
|
|
* exit 0: success exit 1: not found
|
|
*/
|
|
|
|
import { resolveContext, renderInfoBlock } from './shared.mjs';
|
|
|
|
const arg = process.argv[2];
|
|
const cwd = process.env.PWD || process.cwd();
|
|
|
|
const resolved = resolveContext(arg, cwd);
|
|
if (!resolved) {
|
|
const hint = arg ? `No project matching "${arg}".` : 'This directory is not registered.';
|
|
console.log(`${hint} Run /ck:init to register it.`);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('');
|
|
console.log(renderInfoBlock(resolved.context));
|