Local-first governance, memory, architecture conformance, and safety layer for AI coding agents.
Use this skill to install Agent Kernel, capture durable rules and Failure Lessons,
share memory across Claude Code, Codex, Cursor, OpenCode, Antigravity, and Gemini CLI,
enforce architecture conformance, search episodes, run change contracts, install hooks,
configure MCP, or make multiple coding agents follow the same standards.
Triggers: remember this rule, save this workflow, capture this failure, search past
episodes, learn from this error, prevent architecture drift, search before creating a
service, create a change contract, baseline existing debt, install agent guidance,
safe-link this repo, configure MCP, add a guard policy.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Local-first governance, memory, architecture conformance, and safety layer for AI coding agents.
Use this skill to install Agent Kernel, capture durable rules and Failure Lessons,
share memory across Claude Code, Codex, Cursor, OpenCode, Antigravity, and Gemini CLI,
enforce architecture conformance, search episodes, run change contracts, install hooks,
configure MCP, or make multiple coding agents follow the same standards.
Triggers: remember this rule, save this workflow, capture this failure, search past
episodes, learn from this error, prevent architecture drift, search before creating a
service, create a change contract, baseline existing debt, install agent guidance,
safe-link this repo, configure MCP, add a guard policy.
Agent Kernel — Claude Skill
This skill gives Claude Code the Agent Kernel workflow for local-first governance,
shared memory, and architecture conformance.
The full surface and command map live in the canonical skill at
SKILL.md.
Read that file for trigger phrases, command surface, mental model, and safety rules.
For architecture conformance work, also load the dedicated
architecture-guardian skill before any
non-trivial code change.
Common Claude-side entry points:
# Approve a rule the user just asked you to remember
agent-kernel remember "Never store raw tokens in JSON memory." \
--type policy --level critical --publish
# Search past debugging before retrying a failing command
agent-kernel failure search "ERR_MODULE_NOT_FOUND"# Capture this failure as a lesson
agent-kernel failure capture \
--from claude --type test-failure \
--command"npm test" --exit-code 1 \
--text "<error output>" \
--root-cause "<why>" --fix "<known fix>"# Architecture: discover, reuse, check before commit
agent-kernel architecture doctor .
agent-kernel architecture discover . --json
agent-kernel architecture reuse "<capability>" . --json
agent-kernel architecture check . --json
Claude PreToolUse hook for Architecture Guardian:
agent-kernel architecture init .
# Add this to .claude/settings.json hooks.PreToolUse:# matcher: "Write|Edit|MultiEdit"# command: "agent-kernel-architecture-hook"
Safety rules for Claude:
Do not approve or publish memory unless the user explicitly asks.
Do not silently broaden architecture policy, baseline, contract, or exception scope.
Do not store secrets, .env values, MCP credentials, or local auth files in repo-local config.
Do not bypass an existing public interface to reach infrastructure directly.
Search Failure Lessons and architecture reuse candidates before repeating work.
Use safe-link before modifying existing project guidance files.
Treat hooks as narrow, auditable lifecycle adapters.