cd /news/ai-agents/self-learning-skill-for-claude-let-t… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-42784] src=github.com β†— pub= topic=ai-agents verified=true sentiment=↑ positive

Self-learning skill for Claude: let the agent capture its own hard-won patterns

A new open-source meta-skill called 'self-learning' enables AI coding agents like Claude Code and Cursor to automatically capture and persist reusable workflows, commands, and project knowledge across sessions, preventing repeated rediscovery of hard-won patterns. The tool, available via the skills CLI, stores golden paths as skills or rules that auto-load in future sessions, while excluding secrets to avoid leaks.

read3 min views1 publishedJun 29, 2026
Self-learning skill for Claude: let the agent capture its own hard-won patterns
Image: source

A self-improving skill for AI coding agents. Works with Claude Code, Cursor, and any agent that reads an AGENTS.md

/ standing-instructions file.

Every session you do hard debugging or rediscover the same thing β€” how do I reach the prod DB? where do the creds live? what's the deploy command? how do I verify this live? β€” and that hard-won knowledge evaporates when the session ends. The next session starts from zero and re-learns it.

self-learning fixes that. It teaches your agent to recognize the moment it has just earned a reusable golden path and persist it where the tool will auto-load it next time β€” so the next session starts already knowing the route instead of rediscovering it.

It's a meta-skill: it doesn't do the work, it captures how the work got done β€” including the failures, since skipping a known dead-end next session is often worth more than the win itself.

Recognize the momentβ€” a task that only worked after several tries, a non-obvious command, a project fact you didn't know up front, an operational workflow likely to recur, or you simply saying*"remember this".Capture it, no prompt neededβ€” it acts on the cue immediately, picks the scope/name itself, and tells you afterward. Theprocedure*is captured (not a one-off answer), plus a "what didn't work" note.Reuseβ€” next session the entry loads automatically, by skill/rule description or because the instructions file is always read.

What differs per tool is only where knowledge is persisted and how it's auto-loaded:

Tool Persists golden paths to Auto-loads via
Claude Code / Agent Skills clients a new skills/<name>/SKILL.md
skill description matching
Cursor a new .cursor/rules/learned/<name>.mdc
rule description / globs
Codex, Zed, Aider, … AGENTS.md (or project notes/memory)
always-read instructions

Uses the community skills CLI, which installs into whatever agents it detects β€” Claude Code, Cursor, Codex, Cline, OpenCode, and more:

npx skills add kulaxyz/self-learning-skills                 # this project (auto-detects agents)
npx skills add kulaxyz/self-learning-skills -g              # global β€” all your projects
npx skills add kulaxyz/self-learning-skills -a claude-code  # a specific agent

Try it once without installing:

npx skills use kulaxyz/self-learning-skills --skill self-learning | claude
/plugin marketplace add kulaxyz/self-learning-skills
/plugin install self-learning@self-learning-skills

Copy the files into place yourself #

git clone https://github.com/kulaxyz/self-learning-skills

cp -R self-learning-skills/skills/self-learning ~/.claude/skills/

mkdir -p .cursor/rules
cp self-learning-skills/.cursor/rules/self-learning.mdc .cursor/rules/

curl https://raw.githubusercontent.com/kulaxyz/self-learning-skills/main/AGENTS.md >> AGENTS.md

It won't bloat your config with one-liners. Each lesson is routed:

Lesson Where it goes
A multi-step, reusable procedure/workflow
a new skill / rule
A single fact or one-line correction
lightweight notes/memory (e.g. a MEMORY.md )
A genuine one-off
skipped

Harvested skills/rules get committed and shared, so this is built to never write secret values β€” no passwords, tokens, connection strings, or API keys. It records only where to find a secret (env var name, a client/selector function, an MCP tool, a secret manager). Reproducing a secret into a shared file leaks it.

self-learning-skills/
β”œβ”€β”€ AGENTS.md                          # generic, cross-tool version of the loop
β”œβ”€β”€ skills.sh.json                     # registry manifest for `npx skills` / skills.sh
β”œβ”€β”€ .claude-plugin/
β”‚   └── marketplace.json               # Claude Code plugin manifest
β”œβ”€β”€ skills/
β”‚   └── self-learning/                 # Agent Skills standard (Claude Code + clients)
β”‚       β”œβ”€β”€ SKILL.md                   # recognize-the-moment + harvest procedure
β”‚       β”œβ”€β”€ references/
β”‚       β”‚   └── skill-authoring.md     # condensed spec the writer loads to author a good skill
β”‚       └── assets/
β”‚           └── SKILL.template.md      # fill-in template for harvested skills
└── .cursor/
    └── rules/
        β”œβ”€β”€ self-learning.mdc          # Cursor adapter (always-applied rule)
        └── learned/                   # harvested Cursor rules land here

Built on the open Agent Skills standard.

MIT Β© kulaxyz

── more in #ai-agents 4 stories Β· sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/self-learning-skill-…] indexed:0 read:3min 2026-06-29 Β· β€”