Self-learning

self-learning-skills

A meta-skill that saves a hard-won working procedure as a new skill or rule, so the next session starts already knowing it

SkillMedium risk

kulaxyz/self-learning-skills

Install

npx skills add kulaxyz/self-learning-skills

Add -g for a global install or -a claude-code to target one agent.

This is third-party code. Review the repository files before installing.

What it does

The skill teaches the agent to notice when a task only worked after several attempts or needed project facts it did not know upfront. At that point the agent extracts the verified procedure, including the dead ends, and writes it where the tool will load it automatically: a new SKILL.md, a Cursor rule or AGENTS.md. Lessons are triaged: a multi-step procedure becomes a skill, a single fact goes to notes, and a one-off is skipped. A path is promoted to a skill only with a passing check, a named failure pattern and at least one ruled-out approach.

Who it is for. For developers tired of re-explaining to the agent how to deploy, where the database is and how to verify a change.

Good fit when

  • After a long debugging session, so it is not repeated next time
  • When the agent has worked out non-obvious project facts: deploy commands, migrations, environment access
  • When you want to tell the agent to remember something and get a reusable skill out of it

Not a fit when

  • You need ready-made domain skills rather than a way to accumulate them
  • The agent must not create files in the repository without an explicit request

Example request

Remember how we finally connected to the staging database and save it as a skill

Limitations

By default the skill acts without asking and creates files itself, so review them before committing. The quality of saved procedures depends on the model. It is designed to record only where secrets live, never their values, but you should still check.

How to disable. Uninstall the self-learning plugin via /plugin, remove the self-learning folder from the skills directory or delete self-learning.mdc from .cursor/rules.

Security check

  • The agent creates and edits skill and instruction files in the project on its own
  • Saved procedures may accidentally include sensitive infrastructure details

README in short

The README explains a three-step loop: recognize the moment, capture the procedure without asking, and reuse it next session. It lists where knowledge is stored for Claude Code and Codex, Cursor and AGENTS.md agents. It documents the triage rule and the promotion rule for skills. Install via npx skills, a Claude Code plugin or manually. MIT licensed.

SKILL.md

---
name: self-learning
description: >
  Capture a hard-won "golden path" from the current session as a reusable Agent
  Skill, so future sessions start already knowing it. Use it (1) right after
  non-trivial debugging, after working out a multi-step operational workflow, or
  after rediscovering project facts you didn't know up front — e.g. how to reach
  the dev/prod database, where credentials and env vars live, how to deploy, run
  migrations, or verify a change live; and (2) whenever the user says "remember
  this", "save this as a skill", "make a skill for this", "don't make me
  re-explain this next time", or otherwise wants a workflow preserved across
  sessions. Proactively recognize the moment even when unprompted: if a task took
  several attempts before it worked, used non-obvious tooling, or is likely to
  recur, harvest it without asking first. Delegates to a subagent when your tool
  supports one, or works inline, to extract the proven procedure into a new
  project-local or global skill.
license: MIT
metadata:
  author: kulaxyz
  version: "1.0"
---

# Self-learning: harvest golden paths into skills

This skill turns something you just figured out the hard way into a reusable
Agent Skill, so the next session — yours or a teammate's — starts already
knowing the proven route instead of rediscovering it from scratch.

It is a *meta-skill*: it doesn't do the work, it captures **how** work got done.
It's tool-neutral — it works with any agent that reads the Agent Skills format
(e.g. Claude Code and Codex, which both load `SKILL.md` skills natively). Where a
step differs by tool, the generic version comes first and any tool-specific
detail is only an example.

## Recognize the moment

Watch for these signals during normal work. Any one of them is a cue to harvest:

FAQ

Will it clutter the skill list with trivia?

No, a separate skill is created only for a verified multi-step procedure. Single facts go to notes and one-offs are skipped.

Does it work in Cursor?

Yes, there is a dedicated Cursor rule, and new knowledge is written to .cursor/rules/learned.

Editors’ pick

Open-source personal AI assistant on your own machine: answers in Telegram, Slack, Discord and WhatsApp, extended with skills and plugins

CLIHigh risk389.7K
Editors’ pick

A self-improving agent from Nous Research with a TUI, messaging gateway, cron jobs and skills it writes itself

CLIHigh risk245.5K
Editors’ pick

Anthropic's coding agent for the terminal, IDE and GitHub: understands your codebase, runs tasks and handles git

CLIHigh risk145K
Editors’ pick

OpenAI's coding agent that runs locally in your terminal, with IDE and desktop versions

CLIHigh risk124.1K