Matrix logo

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

FileRole
skills/ck/SKILL.mdUser-facing command guide for the Context Keeper workflow
skills/ck/SKILL.mtxCompiler-facing skill manifest for the ck skill
skills/ck/commands/init.mjsAuto-detects project metadata and prints JSON for confirmation
skills/ck/commands/info.mjsEmits a compact read-only project snapshot
skills/ck/commands/forget.mjsDeletes a project context directory and removes its registry entry
skills/ck/hooks/session-start.mjsSession-start hook that injects compact project context

Commands

CommandBehavior
/ck:initRuns the init script, shows the detected project draft, waits for approval, then saves
/ck:saveRequires 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:listRuns the list script and prints the portfolio view verbatim
/ck:forget [name|number]Confirms deletion, then runs the forget script
/ck:migrateRuns the migration script, with an optional dry run mode

Data layout

  • ~/.claude/ck/projects.json maps project path to {name, contextDir, lastUpdated}.
  • ~/.claude/ck/contexts/<name>/context.json is the source of truth for structured context.
  • ~/.claude/ck/contexts/<name>/CONTEXT.md is a generated view, not hand-edited.

Behavioral rules

  • ~ must be expanded to $HOME in shell calls.
  • Command names are case-insensitive.
  • Script output is shown verbatim.
  • Exit code 1 is treated as an error message surfaced to the user.
  • context.json and CONTEXT.md are edited only through the scripts.

init.mjs detection order

  1. package.json for name, description, and stack hints.
  2. go.mod for Go projects and module-name fallback.
  3. Cargo.toml for Rust projects and crate name fallback.
  4. pyproject.toml for Python projects and project name fallback.
  5. .git/config for the remote URL.
  6. CLAUDE.md for goal, constraints, stack, and description fallback.
  7. README.md for a final description fallback.
  8. 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 in context.json against CLAUDE.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:

FieldValue
idck
version0.1.0
displayCk
mcl.verbsmonitor, build
determinismseedable
seed_policyper_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:

FilePurpose
agents/default.jsonBaseline per-user self/cloud agent with full tool surface
agents/neo.jsonNeo conversational agent with the complete Paxeer chain surface
agents/forge.jsonSelf-maintenance runtime for the Forge instance
agents/cody.jsonCoding-only agent with no value-moving surface
agents/paxeer.jsonPaxeer machine-economy agent for on-chain actions
agents/mcp-server-templates.jsonTemplate catalog for MCP server definitions

Locked design decisions

DecisionMeaning
Q4Off-chain tools dispatch through Anthropic MCP
Q15Supported transports are stdio and http (streamable HTTP)
Q17Tool URIs use matrix://tool/mcp/<server-alias>/<tool-name>@<version>
Q18Credentials are supplied through $env:NAME references in env or headers; never journaled
Q19native_tools is reserved as a placeholder for chain tools (v1.1)
Q21tools must exhaustively enumerate what the server advertises
Q22package_digest must be the sha256 of the published server package

Production checklist

Before any production or chain-anchoring deployment:

  1. Install the MCP server packages locally with the version pinned in the manifest.
  2. Compute the actual sha256 of the distribution package.
  3. Replace the zero-filled package_digest with the real value.
  4. 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

FileRole
skills/continuous-learning-v2/agents/observer.mdBackground agent definition and behavior guide
skills/continuous-learning-v2/agents/start-observer.shLauncher for the observer process
skills/continuous-learning-v2/agents/observer-loop.shContinuous background analysis loop
skills/continuous-learning-v2/agents/session-guardian.shExecution 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/.