{
  "markdown": "# Adaptive Agent\n\n[![GitHub](https://img.shields.io/github/stars/truenorth-lj/adaptive-agent-skill?style=social)](https://github.com/truenorth-lj/adaptive-agent-skill)\n[![skills.sh](https://img.shields.io/badge/skills.sh-install-blue)](https://skills.sh/truenorth-lj/adaptive-agent-skill)\n[![ClawHub: skill-review](https://img.shields.io/badge/ClawHub-skill--review-purple)](https://clawhub.ai/skills/adaptive-agent-skill-review)\n[![ClawHub: build-user-profile](https://img.shields.io/badge/ClawHub-build--user--profile-purple)](https://clawhub.ai/skills/adaptive-agent-build-user-profile)\n[![Anthropic Plugin](https://img.shields.io/badge/Anthropic_Plugin-pending_review-orange)](https://github.com/truenorth-lj/adaptive-agent-skill)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nMake your AI coding agent get stronger with use — skill self-improvement, memory-skill feedback loops, and automatic user profiling.\n\nInspired by [Hermes Agent](https://github.com/NousResearch/hermes-agent)'s four-layer memory architecture, adapted for Claude Code and other AI coding agents through prompt engineering.\n\n## Install\n\n```bash\n# skills.sh (Claude Code, Codex, Gemini CLI, Copilot, 45 agents)\nnpx skills add truenorth-lj/adaptive-agent-skill\n\n# ClawHub\nclawhub install adaptive-agent-skill-review\nclawhub install adaptive-agent-build-user-profile\n\n# Manual (any agent)\ngit clone https://github.com/truenorth-lj/adaptive-agent-skill.git\ncp -r adaptive-agent-skill/skills/skill-review ~/.claude/skills/\ncp -r adaptive-agent-skill/skills/build-user-profile ~/.claude/skills/\n```\n\n## Directory Structure\n\n```\nadaptive-agent-skill/\n├── CLAUDE.md                          # Always-on behavioral rules (paste into your project)\n├── .claude-plugin/\n│   └── plugin.json                    # Claude Code plugin manifest\n├── skills/\n│   ├── skill-review/\n│   │   └── SKILL.md                   # Periodic skill audit and improvement\n│   └── build-user-profile/\n│       └── SKILL.md                   # Build user profile from workspace context\n├── templates/\n│   └── user_profile.md                # Memory template for user profile\n├── meta.json                          # Skill metadata\n├── LICENSE\n└── README.md\n```\n\n## The Idea\n\nAI agents treat skills and memory as separate systems. They shouldn't.\n\n- **Skills** = procedural memory (\"how to do things\" — muscle memory)\n- **Memory** = declarative memory (\"what I know\" — conscious memory)\n- They should feed each other in a loop\n\nWhen a skill fails, the lesson should flow back into the skill AND into memory. When memory contains a relevant gotcha, it should be applied proactively before the skill hits the same wall.\n\n### Three-Layer Architecture\n\n```\n┌────────────────────────────────────────────────┐\n│  CLAUDE.md — Always-On Rules                    │\n│  Auto-patch skills on friction                  │\n│  Apply memory lessons proactively               │\n│  Detect skill gaps from repeated workflows      │\n├────────────────────────────────────────────────┤\n│  Skills — Procedural Memory                     │\n│  /skill-review: audit and improve all skills    │\n│  /build-user-profile: build who-you-are memory  │\n├────────────────────────────────────────────────┤\n│  Memory — Declarative Memory                    │\n│  user_profile.md: role, strengths, preferences  │\n│  (agent's memory system, auto-loaded)           │\n└────────────────────────────────────────────────┘\n```\n\n## Setup\n\n### 1. Add behavioral rules to your project\n\nCopy the \"Adaptive Behavior\" section from `CLAUDE.md` into your project's CLAUDE.md. This enables the always-on rules:\n\n- Skill self-improvement (auto-patch on friction)\n- Memory → Skill flow (apply gotchas proactively)\n- Skill gap detection (create skills for repeated workflows)\n\n### 2. Build your user profile\n\nRun `/build-user-profile` in your first session. The agent will:\n\n1. Scan your workspace (git history, project structure, tech stack)\n2. Synthesize a profile (role, strengths, work style, preferences)\n3. Ask you to validate\n4. Save to memory — every future session starts knowing who you are\n\n### 3. Review skills periodically\n\nRun `/skill-review` after a batch of tasks. The agent will:\n\n1. Inventory all skills with last-modified dates\n2. Cross-reference with memory and gotchas\n3. Patch stale skills, flag gaps\n4. Report summary\n\n## How It Works\n\n### Skill Self-Improvement (Always-On)\n\n```\nYou run /deploy → a step fails (API changed)\n  → Agent fixes the immediate problem\n  → Agent patches the skill file (adds ## Gotchas or updates steps)\n  → Agent saves lesson to memory if cross-skill\n  → Next session: skill has the fix baked in\n```\n\n### Memory → Skill Flow (Always-On)\n\n```\nMemory has: \"Zeabur CLI domain create needs GraphQL fallback\"\nYou run /deploy with Zeabur step\n  → Agent checks memory before executing\n  → Agent applies the workaround proactively\n  → You never hit the known issue\n```\n\n### User Profile (On Demand)\n\n```\nFirst session: /build-user-profile\n  → Gathers context from git, config files, memory\n  → Writes structured profile to memory\n  → Every future session starts knowing who you are\n```\n\n## Background: Hermes Agent's Memory Architecture\n\nThis project is based on a [source-code analysis](https://zengineer.blog/blog/deeptech/hermes-agent-deep-dive-nous-research-ai-agents-2026/) of Hermes Agent v0.9.0, which implements a four-layer memory system:\n\n| Layer | Hermes Implementation | Our Adaptation |\n|-------|----------------------|----------------|\n| L4: Procedural Memory | Skills with auto-create + auto-patch | Skills with CLAUDE.md auto-patch rules |\n| L3: Semantic Memory | FTS5 cross-session search | Not possible (architecture constraint) |\n| L2: Declarative Memory | MEMORY.md + USER.md (bounded) | Agent memory files (no char limit) |\n| L1: External Plugins | Honcho, mem0, 11 backends | Not possible (architecture constraint) |\n\nWe can't replicate L1 and L3 (they require infrastructure changes), but L2 and L4 are achievable through prompt engineering alone. The key insight: **Opus 4.6's instruction-following ability compensates** — a smart agent that follows behavioral rules reliably is equivalent to a less-smart agent with built-in memory infrastructure.\n\n## Constraints\n\n| Limitation | Why | Workaround |\n|-----------|-----|------------|\n| No cross-session search | Agent can't search past conversations | Memory files persist key lessons |\n| No background review | Can't spawn background LLM calls | Manual `/skill-review` invocation |\n| No proactive memory saves | Only saves when rules trigger | CLAUDE.md rules cover common cases |\n| Permission gates | Skill patches need user approval | Expected — user controls the boundary |\n\n## Compatibility\n\n| Agent | Status |\n|-------|--------|\n| Claude Code | Full support (primary target) |\n| Codex CLI | Skills work, CLAUDE.md → AGENTS.md |\n| Gemini CLI | Skills work, CLAUDE.md equivalent varies |\n| OpenClaw | Skills work via agentskills.io standard |\n| Cursor | Skills work via .cursorrules |\n\n## License\n\nMIT\n",
  "bytes": 7039,
  "sha": "df7a99b11301cd265bde927fc7e18ce330c7201083a458683b0c0cfba5be701e",
  "repo_slug": "truenorth-lj/adaptive-agent-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_truenorth_lj_adaptive_agent_skill_adapti_7fa1fcda/readme"
}