Making Your AI Agent Get Stronger With Use: Adaptive Agent Skill -- Let Claude Code Memorize and Self-Improve Like Hermes Agent

Making Your AI Agent Get Stronger With Use: Adaptive Agent Skill -- Let Claude Code Memorize and Self-Improve Like Hermes Agent

中文 EN

Making Your AI Agent Get Stronger With Use: Adaptive Agent Skill

Let Claude Code Memorize and Self-Improve Like Hermes Agent

Your AI coding agent helps you write code, debug, and deploy every day — but it never learns from its mistakes.

That API change that broke your deploy last week? It'll hit the same wall next week. Your workflow preferences? Gone the moment the conversation ends.

That's why I built Adaptive Agent Skill.

Why This Exists

The idea comes from Nous Research's Hermes Agent (https://github.com/NousResearch/hermes-agent). I spent time studying its source code and wrote two deep-dive analyses:

Hermes Agent has a four-layer memory architecture and a full state management system. The problem is: most coding agents — Claude Code, Codex, Gemini CLI, Cursor — don't have any of this. They have skills. They have memory. But the two are completely disconnected.

So my approach is simple: without touching the agent's architecture, use pure prompt engineering and concept-level design to give existing coding agents something that approximates Hermes Agent's capabilities.

It can't fully cover everything — L1 (external plugin backends) and L3 (cross-session semantic search) require infrastructure changes that aren't possible. But L2 (declarative memory) and L4 (procedural memory) are achievable through prompt engineering alone.

Two Core Insights

The value of this project isn't in the code itself. It's in two concept-level insights:

1. Skills ARE Memory

This is the most important point.

Most agent frameworks treat skills as "tools" — a static set of instructions. But that's not how Hermes Agent sees it. In Hermes, the way an agent writes, uses, and modifies skills is identical to how it operates on memory. Skills are a form of memory.

The difference is that skills are procedural memory — like human muscle memory, you don't need to "think" to execute them. Regular memory is declarative memory — conscious knowledge, things you know you know.

Hermes gets this right: treat both as two sides of the same cognitive system. When a skill hits friction, the lesson should flow back into the skill itself (muscle memory gets stronger) AND into memory (conscious awareness records it). When memory has a relevant lesson, it should be applied proactively before the skill hits the same wall.

This doesn't require changing agent architecture. Just a few always-on rules in CLAUDE.md, and the agent does it automatically.

2. Build User Profile ASAP and Iterate Fast

The second insight: an agent should build a user profile in the very first conversation and keep iterating on it.

This isn't just "remembering user preferences." It's upgrading the agent from "knowing how to do things" to "knowing how to do things for YOU." An agent that knows you're a senior backend engineer will explain frontend concepts using backend analogies. An agent that knows you prefer minimal diffs won't refactor surrounding code while fixing a bug.

This also doesn't require architecture changes. A /build-user-profile skill + memory system handles it.

What About Everything Else?

Honestly, Hermes Agent's other components — tool management, conversation flow, task planning — already exist in most coding agents. The gap isn't significant there. The real differentiation is the two points above.

Three-Layer Architecture

┌──────────────────────────────────────────────┐
│  CLAUDE.md — Always-On Rules                  │
│  Auto-patch skills on friction                │
│  Apply memory lessons proactively             │
│  Detect skill gaps from repeated workflows    │
├──────────────────────────────────────────────┤
│  Skills — Procedural Memory                   │
│  /skill-review: audit and improve all skills  │
│  /build-user-profile: build who-you-are memory│
├──────────────────────────────────────────────┤
│  Memory — Declarative Memory                  │
│  user_profile.md: role, strengths, preferences│
│  Agent's memory system, auto-loaded           │
└──────────────────────────────────────────────┘

How It Actually Works

Skill Self-Improvement (Always-On)

You run /deploy → a step fails (API changed) → Agent fixes the immediate problem → Agent patches the skill file (adds Gotchas section or updates steps) → Agent saves lesson to memory if it's cross-skill → Next session: the skill has the fix baked in

Memory → Skill Flow (Always-On)

Memory has: "Zeabur CLI domain create needs GraphQL fallback" You run /deploy with a Zeabur step → Agent checks memory before executing → Applies the workaround proactively → You never hit the known issue

Hermes Agent Comparison

LayerHermes ImplementationOur AdaptationPossible?
L4: ProceduralSkills with auto-create + auto-patchCLAUDE.md auto-patch rulesYes
L3: SemanticFTS5 cross-session search—No (arch constraint)
L2: DeclarativeMEMORY.md + USER.md (bounded)Agent memory files (no char limit)Yes
L1: ExternalHoncho, mem0, 11 backends—No (arch constraint)

The key insight: Opus 4.6's instruction-following ability compensates for architectural limitations. A smart agent that reliably follows behavioral rules is equivalent to a less-smart agent with built-in memory infrastructure.

Install

# skills.sh (Claude Code, Codex, Gemini CLI, + 45 agents)
npx skills add truenorth-lj/adaptive-agent-skill

# Manual
git clone https://github.com/truenorth-lj/adaptive-agent-skill.git
cp -r adaptive-agent-skill/skills/skill-review ~/.claude/skills/
cp -r adaptive-agent-skill/skills/build-user-profile ~/.claude/skills/

Works with Claude Code (primary target), Codex CLI, Gemini CLI, OpenClaw, and Cursor. MIT License.

GitHub: https://github.com/truenorth-lj/adaptive-agent-skill