Trigger with "explain agentic os", "how do I set up a persistent agent environment", "what is the CLAUDE.md hierarchy", "explain the context folder structure", "how does session memory work", "what is soul.md or user.md", "explain auto-memory or MEMORY.md", "what is a loop scheduler or heartbeat", or when the user asks for the canonical guide.
From agent-agentic-osnpx claudepluginhub richfrem/agent-plugins-skills --plugin agent-agentic-osThis skill is limited to using the following tools:
acceptance-criteria.mdassets/diagrams/agentic-os-guide-flow.mmdassets/resources/agentic-os-guide-flow.mmdevals/evals.jsonevals/results.tsvreferences/acceptance-criteria.mdreferences/architecture.mdreferences/architecture/canonical-file-structure.mdreferences/architecture/claude-md-hierarchy.mdreferences/architecture/context-folder-patterns.mdreferences/architecture/sub-agents-and-hooks.mdreferences/canonical-file-structure.mdreferences/claude-md-hierarchy.mdreferences/context-folder-patterns.mdreferences/diagrams/agentic-os-guide-flow.mmdreferences/loop-scheduler.mdreferences/memory-hygiene.mdreferences/memory/memory-hygiene.mdreferences/operations/loop-scheduler.mdreferences/research/karpathy-autoresearch-3-file-eval.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
This skill requires Python 3.8+ and standard library only. No external packages needed.
To install this skill's dependencies:
pip-compile ./requirements.in
pip install -r ./requirements.txt
See ../../requirements.txt for the dependency lockfile (currently empty — standard library only).
The core insight: LLMs are stateless functions. CLAUDE.md is the only file loaded by
default into every conversation. The Agentic OS pattern turns this constraint into a
full operating system metaphor.
| OS Concept | Agent Equivalent |
|---|---|
| Kernel | CLAUDE.md hierarchy (global -> org -> project -> local) |
| RAM | context/ folder (soul, user prefs, memory) |
| Disk | context/memory/YYYY-MM-DD.md dated session logs |
| Stdlib | skills/ procedural knowledge bundles |
| Processes | .claude/agents/ sub-agents with isolated context |
| Shell | .claude/commands/ slash commands |
| Cron | /loop + heartbeat.md scheduled background tasks |
| Boot | START_HERE.md + MEMORY.md bootstrap on session start |
| Autoresearch Loop | os-eval-runner + improvement-ledger.md |
| Category | Skill | One-liner |
|---|---|---|
| Orchestration | os-improvement-loop | Multi-agent concurrent loop: ORCHESTRATOR + PEER + INNER |
| Evaluation | os-eval-runner | Autoresearch eval engine — scores and gates SKILL.md iterations |
| Evaluation | os-eval-lab-setup | Bootstraps isolated lab repos for eval runs |
| Evaluation | os-eval-backport | Reviews lab results, applies approved changes to master |
| Mutation | os-skill-improvement | RED-GREEN-REFACTOR routing accuracy improvement |
| Memory | os-memory-manager | Session log writing, L2→L3 promotion, deduplication |
| Reporting | os-improvement-report | Progress charts from results.tsv + improvement ledger |
| Bootstrap | os-init | Deploys kernel.py, agents.json, Triple-Loop files to new project |
| Utility | os-clean-locks | Clears stale .locks/ directories after agent crash |
Agents (not skills): Triple-Loop Retrospective (trigger/diagnostic), os-health-check (liveness), agentic-os-setup (bootstrap interview)
Execute these phases in order. Do not skip phases. This skill uses Progressive Disclosure. Load only what you need:
references/architecture/claude-md-hierarchy.mdreferences/architecture/context-folder-patterns.mdreferences/operations/loop-scheduler.mdreferences/architecture/sub-agents-and-hooks.mdreferences/memory/memory-hygiene.mdreferences/architecture/canonical-file-structure.mdreferences/research/optimizer-engine-patterns.md and references/research/karpathy-autoresearch-3-file-eval.mdWhat Anthropic ships natively:
MEMORY.md) - Claude writes this itself with build commands, style prefs, architecture decisions/loop command for cron-style scheduling (up to 50 tasks per session, auto-expire after 3 days)SKILL.md-based procedural knowledge bundles.claude/agents/ with isolated tool contextsWhat the community layered on top:
context/soul.md, context/user.md, context/memory/{date}.md folder conventionsSTART_HERE.md bootstrap prompt patternheartbeat.md scheduled task definition filesEvery line in
CLAUDE.mdcompetes for attention with actual work. Keep it under 300 lines. Focus on what Claude would get wrong without it. Use@import context/soul.mdto load identity on demand, not always.
Ask the user which aspect they need help with:
references/architecture/canonical-file-structure.md, walk them through the setupos-memory-manager skillTriple-Loop Retrospective agentreferences/architecture/claude-md-hierarchy.md for scope precedenceEvery significant work session — especially eval runs, skill edits, backports, and agent loop completions — must close through this two-phase protocol. Do not consider a session complete without running both phases.
Session Lifecycle Invariant: The OUTER loop (
os-improvement-loop) owns session lifecycle. INNER loops (os-eval-runner,os-skill-improvement) never close a session. A session is incomplete until Phase 6 is executed.Triple-Loop Retrospective(agent) is the trigger/diagnostic layer that feeds both Triple-Loop orchestration cycles — it detects friction and identifies targets;os-improvement-loop(skill) is the execution protocol the agents follow once a target is identified.
Work → Backport/Ship → Phase 6: Capture → Phase 7: Improve
[!NOTE] Dependency: Requires os-memory-manager (agent-agentic-os plugin). See INSTALL.md for instructions.
After any backport, eval run, or skill change:
Invoke os-memory-manager to write a dated session log and promote non-obvious
findings to long-term memory. Apply the non-obvious filter:
- CAPTURE: snags, footguns, scoring behaviors, architectural decisions, ADAPT patterns
- SKIP: routine score improvements, changes self-evident from the diff
What to capture:
Where it writes:
context/memory/YYYY-MM-DD.md — dated session log (git-tracked, not temp/)context/memory.md — promoted long-term facts with dedup IDsMEMORY.md system — cross-session feedback entriestemp/retrospectives/; loop sessions (os-improvement-loop) write to context/memory/retrospectives/. post_run_metrics.py only scans context/memory/retrospectives/ — lab surveys are not counted in loop metrics.[!NOTE] Dependency: Requires os-skill-improvement (agent-agentic-os plugin). See INSTALL.md for instructions.
After memory is captured, check whether any skill's routing or trigger accuracy was found to be weak during the session:
If any skill mis-triggered, failed to trigger, or scored below 0.90 on eval:
→ Invoke os-skill-improvement on that skill
→ Run RED-GREEN-REFACTOR to harden the description and trigger phrases
→ Run os-eval-runner to verify the score improvement before committing
Apply the improvement filter — only invoke if:
<example> block or keyword was identified that would close a routing gapSkip if:
1. Work / Eval Run / Backport
2. os-eval-backport → ACCEPT/ADAPT/REJECT each change, apply to master
3. os-memory-manager → Session log + promote non-obvious findings (Phase 6)
4. os-skill-improvement → Harden any skill whose routing was found weak (Phase 7)
5. Commit + push → Close the loop in git history
This Triple-Loop is what makes the OS self-improving. Skipping Phase 6 or 7 means knowledge evaporates at session end and skill quality drifts.
os-memory-manageragentic-os-setupTriple-Loop Retrospectivereferences/operations/loop-scheduler.mdAfter answering the user's question, emit a friction event for anything that was unclear, missing from the references, or required more turns than expected to explain:
# Only emit if friction was encountered — do not emit if explanation was clean
python3 context/kernel.py emit_event --agent os-guide \
--type friction --action encountered \
--summary "step:[which-reference] cause:[what-was-unclear]"
Then answer: What one addition to the guide references would have made this explanation
clearer or faster? Record the answer as a comment in the next session log or flag it
to Triple-Loop Retrospective if the same gap appears across multiple sessions.