Skills Reference: CK Context Keeper, Agent Manifests, and Skill Index Tools
Operational assets that shape Matrix agent behavior: the ck Context Keeper skill, agent manifest packs, continuous-learning observer scripts, and the skill index builder.
Overview
This section covers the reusable assets that shape Matrix agent behavior and project memory: the ck Context Keeper skill, the agent manifest packs, the continuous-learning observer scripts, and the index builder for the skills corpus. Together, these files define how Claude Code sessions load project context, how agents are packaged with tool access, how observation-driven instincts are produced, and how skill metadata is turned into searchable indexes.
The material is intentionally operational rather than product-facing. The files document command helpers, manifest policies, runtime guards, and generation scripts that support project bootstrapping, session recall, and agent orchestration.
CK Context Keeper Skill
Covered files
| File | Role |
|---|---|
skills/ck/SKILL.md | User-facing command guide for the Context Keeper workflow |
skills/ck/SKILL.mtx | Compiler-facing skill manifest for the ck skill |
skills/ck/commands/init.mjs | Auto-detects project metadata and prints JSON for confirmation |
skills/ck/commands/info.mjs | Emits a compact read-only project snapshot |
skills/ck/commands/forget.mjs | Deletes a project context directory and removes its registry entry |
skills/ck/hooks/session-start.mjs | Session-start hook that injects compact project context |
Commands
| Command | Behavior |
|---|---|
/ck:init | Runs the init script, shows the detected project draft, waits for approval, then saves |
/ck:save | Requires LLM analysis of the current conversation, drafts a session summary, asks for confirmation |
/ck:resume [name|number] | Runs the resume script and prints the full briefing verbatim |
/ck:info [name|number] | Runs the info script and prints the compact snapshot verbatim |
/ck:list | Runs the list script and prints the portfolio view verbatim |
/ck:forget [name|number] | Confirms deletion, then runs the forget script |
/ck:migrate | Runs the migration script, with an optional dry run mode |
Data layout
~/.claude/ck/projects.jsonmaps project path to{name, contextDir, lastUpdated}.~/.claude/ck/contexts/<name>/context.jsonis the source of truth for structured context.~/.claude/ck/contexts/<name>/CONTEXT.mdis a generated view, not hand-edited.
Behavioral rules
~must be expanded to$HOMEin shell calls.- Command names are case-insensitive.
- Script output is shown verbatim.
- Exit code
1is treated as an error message surfaced to the user. context.jsonandCONTEXT.mdare edited only through the scripts.
init.mjs detection order
package.jsonforname,description, and stack hints.go.modfor Go projects and module-name fallback.Cargo.tomlfor Rust projects and crate name fallback.pyproject.tomlfor Python projects and project name fallback..git/configfor the remote URL.CLAUDE.mdfor goal, constraints, stack, and description fallback.README.mdfor a final description fallback.- Directory basename as the final name fallback.
session-start.mjs flow
The hook builds an additionalContext JSON payload with two paths:
- Registered project path: Reads the project's
context.json, builds a summary from the latest session, goal, left-off state, and next steps, detects an unsaved previous session, adds a Git activity summary if commits occurred since the last saved session, and compares the goal incontext.jsonagainstCLAUDE.md. - Unregistered project path: Sorts recent projects by latest session date, builds a compact portfolio view with staleness markers, and prompts the user to register with
/ck:init.
MatrixScript manifest
skills/ck/SKILL.mtx declares:
| Field | Value |
|---|---|
id | ck |
version | 0.1.0 |
display | Ck |
mcl.verbs | monitor, build |
determinism | seedable |
seed_policy | per_intent |
Both verbs resolve slot.target by searching Cortex memories near the requested target. If the target cannot be identified, the skill fails with a blocking unknown-target path. If confidence is below 0.75, it asks for clarification before proceeding. It declares no tools.
Agent Manifest Packs
Manifest structure
Agent manifests are JSON-on-disk descriptions of the tools a Matrix agent has access to. The executor loads them at boot and resolves every matrix://tool/... URI against the manifest data. Six manifests exist:
| File | Purpose |
|---|---|
agents/default.json | Baseline per-user self/cloud agent with full tool surface |
agents/neo.json | Neo conversational agent with the complete Paxeer chain surface |
agents/forge.json | Self-maintenance runtime for the Forge instance |
agents/cody.json | Coding-only agent with no value-moving surface |
agents/paxeer.json | Paxeer machine-economy agent for on-chain actions |
agents/mcp-server-templates.json | Template catalog for MCP server definitions |
Locked design decisions
| Decision | Meaning |
|---|---|
| Q4 | Off-chain tools dispatch through Anthropic MCP |
| Q15 | Supported transports are stdio and http (streamable HTTP) |
| Q17 | Tool URIs use matrix://tool/mcp/<server-alias>/<tool-name>@<version> |
| Q18 | Credentials are supplied through $env:NAME references in env or headers; never journaled |
| Q19 | native_tools is reserved as a placeholder for chain tools (v1.1) |
| Q21 | tools must exhaustively enumerate what the server advertises |
| Q22 | package_digest must be the sha256 of the published server package |
Production checklist
Before any production or chain-anchoring deployment:
- Install the MCP server packages locally with the version pinned in the manifest.
- Compute the actual sha256 of the distribution package.
- Replace the zero-filled
package_digestwith the real value. - Commit the manifest update so the digest change stays auditable.
Credential handling
Servers requiring credentials embed references in the env or headers lists:
"env": ["GITHUB_TOKEN=$env:GITHUB_TOKEN"]
The executor resolves the $env: token from its own process environment at spawn time. Literal credentials in the manifest file are forbidden.
Default agent (agents/default.json)
The baseline agent allows read, write, network, and shell side effects. It bundles MCP servers for: filesystem (fs), HTTP retrieval (fetch), web search (web-search), browser automation (browser), git operations (git), shell and service supervision (exec), and the full Paxeer chain surface (paxeer-net).
The paxeer-net server exposes 42 tools across two categories:
- Read-only tools: RPC reads,
eth_call, contract reads, ABI encoding, chain info, balances, PaxScan-style reads, prices, analytics, delegation status, stream status, and job status. - Write tools: transfers, approvals, streams (open, settle, close, update rate), scheduled jobs (schedule, cancel, reschedule), delegation (delegate, undelegate, redelegate), and generic contract writes.
Chain writes are signed through the Paxeer Embedded Wallet and are plan-gated by PaxeerSpendPolicy before side effects happen. Headless wallet auth via PAXEER_WALLET_TOKEN or PAXEER_WALLET_EMAIL + PAXEER_WALLET_PASSWORD + PAXEER_SUPABASE_ANON_KEY.
Neo agent (agents/neo.json)
Neo carries the complete paxeer-net lane directly (42 tools) plus fs, fetch, web-search, browser, git, and exec. The exec server's service registry is isolated to /data/neo/services via MATRIX_EXEC_STATE_DIR to avoid collisions with the co-located MCL daemon. Custody and key material live network-side in the Paxeer Embedded Wallet; spend limits are enforced on the wallet at the network layer.
Forge agent (agents/forge.json)
Forge is the self-maintenance runtime rooted at /root/matrix. The Cortex store, knowledge, and journal directories are protected by ForgeFSPolicy and cannot be modified by the agent. The forge-bridge server exposes shell_exec (runs /bin/bash -lc inside /root/matrix, output capped) and opencode_run (spawns an OpenCode sub-agent for free-form tasks). Commits go to feature branches; merges to main are human-gated.
Cody agent (agents/cody.json)
Cody has no value-moving surface: no signing key, no MCL/core_execute delegation, no chain lanes. The manifest carries only coding bridges: fs (/workspace), exec (shell + supervised services), git (stages/diffs/proposes), browser, fetch, and web-search. The exec server's state is isolated to /data/cody/services.
Paxeer agent (agents/paxeer.json)
The Paxeer agent acts on the Paxeer network (EVM chain 125). READS need no auth. WRITES sign through the Paxeer Embedded Wallet. Spend authority is gated by PaxeerSpendPolicy (per-call PAXEER_MAX_SPEND_WEI ceiling + cortex Constraint limits) evaluated on the synthesized plan before any write side effect.
MCP server templates (agents/mcp-server-templates.json)
A template catalog for common MCP server definitions. Includes command-based entries (npx, uvx, node, python3) and HTTP-based entries. Covers issue tracking, GitHub operations, web scraping, persistence, reasoning, browser automation, deployment, analytics, documentation lookup, and evaluation tooling.
Continuous Learning Observer Tooling
| File | Role |
|---|---|
skills/continuous-learning-v2/agents/observer.md | Background agent definition and behavior guide |
skills/continuous-learning-v2/agents/start-observer.sh | Launcher for the observer process |
skills/continuous-learning-v2/agents/observer-loop.sh | Continuous background analysis loop |
skills/continuous-learning-v2/agents/session-guardian.sh | Execution gate for active hours, cooldown, and idle checks |
The observer runs as haiku, reads project-scoped observations with a global fallback, and writes instinct files with YAML frontmatter fields for id, trigger, confidence, domain, source, scope, project_id, and project_name.
Skill Index Builder
tools/skills/build_index.py generates skills/INDEX.md and skills/INDEX.json from the frontmatter of every SKILL.md. It reads PORT_MANIFEST.json for keep/adapt status and produces both human-readable and machine-readable indexes.
python3 tools/skills/build_index.py
tools/skills/port_from_dev.sh is a one-shot port of development/skills/ into matrix/skills/. It handles the drop set (off-wedge packs, vendor-coupled skills, Tier 0 dev-meta), the defer set (tracked but not copied), and the adapt set (copied but flagged for MCL+cortex rewrite).
Future tooling (S1 enforcement)
validate.py- frontmatter schema check + body's 6 canonical sections.publish.py- content-hash + signed manifest registration.find.py- verb + nearest-neighbor + salience-ranked skill discovery.- Eventually rewrite in Go and merge into
protocol/compiler/.
