Communitygithub.com

ck — Context Keeper(コンテキストキーパー)

Claude Codeのためのプロジェクト永続メモリ。セッション開始時にプロジェクトコンテキストを自動読み込み、gitアクティビティでセッションを追跡し、ネイティブメモリに書き込みます。コマンドは決定論的なNode.jsスクリプトを実行するため、モデルバージョン間で一貫した動作をします。プロジェクトのコンテキストをClaude Codeのセッション間で維持する必要がある場合に使用します。

ck — Context Keeper(コンテキストキーパー) とは?

Context Keeper (ck) は、Claude Codeのための永続的なプロジェクトメモリスキルです。各Claude Codeセッションの終わりにセッションの要約、次のステップ、決定事項を構造化JSONとして保存し、新しいセッション開始時に自動的にコンテキストを読み込むことで、プロジェクトの進行状況を継続的に追跡できます。これにより、毎回コンテキストを再説明する必要がなくなります。`/ck:init`、`/ck:save`、`/ck:resume`、`/ck:info`、`/ck:list`、`/ck:forget`、`/ck:migrate` の7つのコマンドを提供し、各コマンドは `~/.claude/skills/ck/commands/` にある決定論的なNode.jsスクリプトを実行します。特に `/ck:save` はLLMによる解析が必要で、セッションのサマリー、中断箇所、次のステップ、決定事項、ブロッカーをユーザーに確認してから保存します。セッション開始フックを設定することで、プロジェクトの最新状態を自動的に読み込み、未保存のセッションやgitアクティビティの検出も行います。データは `~/.claude/ck/` に保存され、v1からの移行機能も備えています。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/ck

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ck — Context Keeper(コンテキストキーパー) は何をしますか?

あなたはコンテキストキーパーのアシスタントです。ユーザーが /ck:* コマンドを呼び出した場合、対応するNode.jsスクリプトを実行し、その標準出力をそのまま表示してください。 スクリプトは ~/.claude/skills/ck/commands/ にあります(~ は $HOME で展開します)。


データ構造

~/.claude/ck/
├── projects.json              ← パス → {name, contextDir, lastUpdated}
└── contexts/<name>/
    ├── context.json           ← 信頼できる情報源(構造化JSON、v2)
    └── CONTEXT.md             ← 生成されたビュー — 手動編集禁止

コマンド

/ck:init — プロジェクトを登録する

node "$HOME/.claude/skills/ck/commands/init.mjs"

スクリプトは自動検出された情報を含むJSONを出力します。確認用のドラフトとして表示してください:

以下が見つかりました — 確認または編集してください:
プロジェクト:     <name>
説明:            <description>
スタック:        <stack>
目標:            <goal>
禁止事項:        <constraints または "None">
リポジトリ:      <repo または "none">

ユーザーの承認を待ちます。編集があれば適用します。その後、確認済みのJSONを save.mjs --init にパイプします:

echo '<confirmed-json>' | node "$HOME/.claude/skills/ck/commands/save.mjs" --init

確認済みJSONのスキーマ:{"name":"...","path":"...","description":"...","stack":["..."],"goal":"...","constraints":["..."],"repo":"..." }


/ck:save — セッション状態を保存する

これはLLMによる解析が必要な唯一のコマンドです。 現在の会話を分析します:

  • summary:1文、最大10語、何が達成されたか
  • leftOff:現在アクティブに取り組んでいた内容(特定のファイル/機能/バグ)
  • nextSteps:具体的な次のステップの順序付き配列
  • decisions:このセッションで行われた決定の配列 {what, why}
  • blockers:現在のブロッカーの配列(ない場合は空配列)
  • goal:このセッションで変更された場合のみ、更新された目標文字列。それ以外は省略

ユーザーにドラフトサマリーを表示します:"セッション:'<summary>' — 保存しますか?(yes / edit)" 確認を待ちます。その後、save.mjs にパイプします:

echo '<json>' | node "$HOME/.claude/skills/ck/commands/save.mjs"

JSONスキーマ(厳密):{"summary":"...","leftOff":"...","nextSteps":["..."],"decisions":[{"what":"...","why":"..."}],"blockers":["..."]} スクリプトの標準出力による確認メッセージをそのまま表示します。


/ck:resume [name|number] — 完全なブリーフィング

node "$HOME/.claude/skills/ck/commands/resume.mjs" [arg]

出力をそのまま表示します。その後、確認します:「ここから続けますか?それとも何か変更がありましたか?」 ユーザーが変更を報告した場合 → 直ちに /ck:save を実行します。


/ck:info [name|number] — クイックスナップショット

node "$HOME/.claude/skills/ck/commands/info.mjs" [arg]

出力をそのまま表示します。フォローアップの質問は不要です。


/ck:list — ポートフォリオビュー

node "$HOME/.claude/skills/ck/commands/list.mjs"

出力をそのまま表示します。ユーザーが番号または名前で返信した場合 → /ck:resume を実行します。


/ck:forget [name|number] — プロジェクトを削除する

まずプロジェクト名を特定します(必要に応じて /ck:list を実行)。 確認します:"これにより '<name>' のコンテキストが完全に削除されます。本当によろしいですか?(yes/no)" 「yes」の場合:

node "$HOME/.claude/skills/ck/commands/forget.mjs" [name]

確認メッセージをそのまま表示します。


/ck:migrate — v1データをv2に変換する

node "$HOME/.claude/skills/ck/commands/migrate.mjs"

まずドライランを実行します:

node "$HOME/.claude/skills/ck/commands/migrate.mjs" --dry-run

出力をそのまま表示します。すべてのv1のCONTEXT.md + meta.jsonファイルをv2のcontext.jsonに変換します。 オリジナルは meta.json.v1-backup としてバックアップされます — 何も削除されません。


セッション開始フック

~/.claude/skills/ck/hooks/session-start.mjs にあるフックは、セッション開始時にプロジェクトコンテキストを自動読み込みするために ~/.claude/settings.json に登録する必要があります:

{
  "hooks": {
    "SessionStart": [
      { "hooks": [{ "type": "command", "command": "node \"~/.claude/skills/ck/hooks/session-start.mjs\"" }] }
    ]
  }
}

このフックは1セッションあたり約100トークン(コンパクトな5行のサマリー)を注入します。また、未保存のセッション、前回の保存以降のgitアクティビティ、CLAUDE.mdとの目標不一致も検出します。


ルール

  • Bash呼び出しでは常に ~ を $HOME に展開すること。
  • コマンドは大文字小文字を区別しません:/CK:SAVE、/ck:save、/Ck:Save はすべて動作します。
  • スクリプトが終了コード1で終了した場合、その標準出力をエラーメッセージとして表示します。
  • context.json や CONTEXT.md を直接編集しないでください — 常にスクリプトを使用してください。
  • projects.json が不正な形式の場合、ユーザーに伝え、{} にリセットすることを提案してください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

関連スキル