Agent skill

Self Learning

by Kulaxyz in Kulaxyz/self-learning-skills

Capture a hard-won "golden path" from the current session as a reusable Agent Skill, so future sessions start already knowing it.

MITAuto-check: warningsAgent Workflows

Install Self Learning

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add Kulaxyz/self-learning-skills --skill self-learning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Kulaxyz/self-learning-skills self-learning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Kulaxyz/self-learning-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/self-learning .claude/skills/self-learning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
self-learning
GitHub stars
961
Token cost
~2.8k tokens
SKILL.md length
1,513 words
Files
3 (incl. references, assets)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Capture a hard-won "golden path" from the current session as a reusable Agent Skill, so future sessions start already knowing it.

  • Works in 3 steps: A passing check. The path was actually… → A named failure pattern. You can name… → At least one ruled-out dead-end. A…
  • Tasks that involve Platform engineering
  • SKILL.md covers Recognize the moment, Harvest procedure, Delegate the write (subagent,… and Gotchas
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Self Learning is an agent skill from Kulaxyz/self-learning-skills. 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…

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files and assets (for example `assets/SKILL.template.md` and `references/skill-authoring.md`).

It sits in Agent Workflows, covering Platform engineering and Subagents. The repository describes itself as: A self-improving skill for AI coding agents (Claude Code, Cursor, AGENTS.md): recognize a hard-won golden path in a session and harvest it into a reusable skill/rule for next time. The licence is MIT.

When your agent uses it

  • Tasks that involve Platform engineering
  • Tasks that involve Subagents

Example prompts

  • “golden path”
  • “remember this”
  • “save this as a skill”
  • “/self-learning”

Requirements

  • A credential in FOO_TOKEN

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. A passing check. The path was actually verified — a test passed, the
  2. A named failure pattern. You can name the failure this path avoids or
  3. At least one ruled-out dead-end. A concrete approach you tried and

What it can do on your machine

Read from SKILL.md and the folder at commit 1304fce. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Self Learning loads about 2.8k tokens when it runs, and up to ~4.5k if it reads all its reference files. Until then it costs about 242 tokens; SKILL.md has 1,513 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~242
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningTells the agent its actions are pre-authorized / not to stop for confirmationSKILL.md:51
    **Act on the cue immediately — don't ask for permission first**, whether the
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:184
    `~/.aws/credentials`, MCP tool `secrets/get`, etc.).

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Kulaxyz/self-learning-skills at commit 1304fce, republished under its MIT licence (© Kulaxyz). 1,513 words, ~2,825 tokens.

Download SKILL.mdSave it as .claude/skills/self-learning/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
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
metadata.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:

  • A task only worked after several attempts, wrong turns, or a correction from the user. The successful path is worth more than the failures around it.
  • You discovered project-specific facts the agent didn't know up front: where creds/env vars live, which selector or backend talks to a service, a non-obvious command, a required sequence, a gotcha that defies the obvious assumption.
  • It's an operational workflow likely to recur: reach the dev/prod DB, deploy, run migrations, seed data, verify a change live, run one specific test path, rotate a key, tail the right logs.
  • The user signals it explicitly: "remember this", "save this as a skill", "don't make me re-explain this next time".

Act on the cue immediately — don't ask for permission first, whether the user requested it or you noticed it yourself. Harvest the skill, then tell the user what you captured and where (step 5). They can always edit or delete it.

Skill, memory, or skip?

Not every lesson deserves a whole skill — triage first, so you don't bloat the skills list with one-liners:

  • A multi-step, reusable procedure or workflow (how to deploy, reach the DB, run the migration dance, verify live) → harvest it as a skill using the procedure below.
  • A single standalone fact or one-line correction (an env var name, a path, one gotcha) → if your harness has a lightweight memory/notes facility (e.g. a MEMORY.md index), record it there instead; a whole skill is overkill for a one-liner. With no such facility, make a small skill.
  • A genuinely one-off thing unlikely to recur → skip it.

When you do harvest, capture the failures too, not just the win: the approaches you ruled out and why often save more time next session than the golden path itself.

Promotion rule: don't enshrine guesses

A skill is authoritative — the next session trusts it without re-deriving it — so hold promotion to a high bar. Only write a skill when all three hold:

  1. A passing check. The path was actually verified — a test passed, the command exited clean, the repro reproduced, the build went green. Record what the check was. "Seemed to work" is not a passing check.
  2. A named failure pattern. You can name the failure this path avoids or diagnoses (e.g. "stale build cache → phantom type errors"), not a vague "sometimes it breaks".
  3. At least one ruled-out dead-end. A concrete approach you tried and eliminated, with the reason.

If any is missing, it isn't a skill yet — leave a tentative note in memory (marked unverified) or skip it. This keeps confident guesses out of the skill set.

Harvest procedure

  • 1. Apply the promotion rule (above). Passing check + named failure pattern + one ruled-out dead-end — or it isn't a skill: note it in memory or skip. Don't proceed on a confident guess.
  • 2. Choose scope and name yourself using the heuristics below — don't stop to ask. Default to project scope; pick a clear, specific name.
  • 3. Dedupe. Look for an existing skill to UPDATE rather than duplicate. List your agent's skills directories — the project one and the user-level one (e.g. Claude Code .claude/skills + ~/.claude/skills, Codex .codex/skills + ~/.codex/skills, or your tool's equivalent). Also glance at any memory/notes index — a fact already there may just need a pointer.
  • 4. Distill the golden path from THIS conversation before delegating — while it's fresh in your head: the exact working commands, file paths, env var names, the required order, and (just as important) the dead-ends to avoid. This is the raw material for the write.
  • 5. Delegate the write to a subagent that inherits this conversation if your tool supports one, or do it inline otherwise — see below. The conversation is the only place the golden path lives, so whoever writes it must have that context.
  • 6. When the write is done, relay the new skill's path to the user and, in one line, what it captured.
Scope: project vs global
  • Project (the repo's skills directory — e.g. .claude/skills/, .codex/skills/): the path is specific to THIS codebase — its env vars, its build/release steps, its schema, its quirks. Most harvested operational skills are project-scoped, and they ship to the team via git.
  • Global (your user-level skills directory — e.g. ~/.claude/skills/, ~/.codex/skills/): the path generalizes across projects — a personal tool, a cross-repo habit, or a workflow tied to your machine rather than to one repo.

When unsure, prefer project — an over-shared global skill triggers in repos where its commands don't apply.

Show full SKILL.md (662 more words)Show less

Delegate the write (subagent, or inline)

Whoever writes the skill needs THIS conversation's context — it's the only place the golden path lives. Two equally valid ways to run it:

  • Inline — do the steps yourself in the main loop. Always works.
  • Subagent — if your tool can delegate to a subagent that inherits this conversation, use it to keep the harvesting work out of your main context. (Claude Code: a skill with context: fork. Codex and others spawn subagents their own way.) Don't hand it to a fresh agent with no context — it would start blank with nothing to extract.

Either way it over-reaches by default, so box it in tightly. Follow this brief (fill in the bracketed parts) — hand it to the subagent, or work through it yourself inline:

You are harvesting a skill. Your ONLY job is to write a new Agent Skill capturing the golden path we just worked out in this conversation: [one-line description of the workflow].

Hard rules:

  • Write ONLY under [skills dir]/[skill-name]/. Do NOT modify project source, run builds, install anything, or resume the original task.
  • First read [this-skill-dir]/references/skill-authoring.md and [this-skill-dir]/assets/SKILL.template.md, then author SKILL.md to that spec, plus any references/ or assets/ files the procedure warrants.
  • Capture the PROCEDURE — commands, paths, the required order, gotchas — not a one-off answer. Generalize so it works next time.
  • Capture the FAILURES too: the approaches we ruled out and why, so the next session skips the dead-ends. Put them in a "What didn't work" section.
  • Enforce the promotion rule: the skill must record the passing check that verified this path, name the failure pattern it addresses, and list at least one ruled-out dead-end. If any is missing (e.g. nothing was actually verified), STOP and report it isn't promotable — leave a tentative memory note instead of writing the skill.
  • NEVER write secret VALUES (passwords, tokens, connection strings, API keys). Record only WHERE to find them: the env var name, the selector function, the MCP tool, the secret manager. Reproducing a secret into a skill file leaks it.
  • Self-validate before finishing (see the checklist in skill-authoring.md).
  • Report back: the absolute path you wrote and a one-line summary. Then STOP — do not pick the original task back up.

Gotchas

  • Secrets never go in a skill file. Skills get committed and open-sourced. Point to where the secret lives; never reproduce the value. This is the single most important rule in this skill.
  • Run this 10-second self-audit the moment before you call write_file — paste the proposed body through this filter in your head:
    • Does any line contain a literal Bearer , Basic , sk-, ghp_, xox[bpars]-, AKIA, or a 32+ char base64/hex blob? → redact it.
    • Is there a connection string (postgres://, mysql://, mongodb://, redis://, https://user:pass@, amqp://, kafka://)? → strip credentials, keep scheme + host + path.
    • Did the user paste a value earlier in the conversation that you're now re-typing? → replace with the source pointer (env:FOO_TOKEN, ~/.aws/credentials, MCP tool secrets/get, etc.).
    • Is the value a placeholder (YOUR_TOKEN_HERE, <api-key>, ${TO_FILL}) that will be filled by a hook? → still redact; placeholders that get auto-filled leak the same way literals do.
    • Is this an example URL in a docs snippet? → use example.com, user:pass@example.com, or a documented test fixture.
  • name must equal the directory name, and be lowercase a-z/0-9/hyphens only — no leading, trailing, or doubled hyphens. A mismatch means the skill won't load.
  • Whoever writes the skill over-reaches by default (a subagent especially). That's why the brief above forbids touching project source or resuming the task — keep it boxed to the skills directory.
  • Don't duplicate. If a near-identical skill (or memory) already exists, update it instead of spawning a second one that competes to trigger.
  • Capture procedures, not answers. "Join orders to customers for EMEA" is useless next time; "how to find the right tables and build the query" is the skill. See references/skill-authoring.md.
  • Keep SKILL.md tight (< 500 lines, < ~5000 tokens). Push detail into references/ and tell the reader when to load each file.

For the full authoring spec, see references/skill-authoring.md. The fill-in template is assets/SKILL.template.md.

© Kulaxyz, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references, assets) in skills/self-learning of Kulaxyz/self-learning-skills.

  • SKILL.md
  • assets/SKILL.template.md
  • references/skill-authoring.md

Open the folder on GitHubat commit 1304fce

Compare with similar skills

Self Learning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Self Learning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Self Learning this skillKulaxyz/self-learning-skills961—~2.8kAutomated safety check: WarnMIT
Olore Claude Code Latestolorehq/olore104—~901Automated safety check: PassMIT
O2 Review Loopopenobserve/openobserve22k—~3.7kAutomated safety check: PassAGPL-3.0
Kimi Code DelegationCherryHQ/cherry-studio52k1 repos~504Automated safety check: PassAGPL-3.0
V2 Perf Iterationmirage-project/mirage2.5k—~4kAutomated safety check: PassApache-2.0
Clone App Pat Proper-simmons/clone-app-pat-pro-public259—~1.9kAutomated safety check: NotesNone

Similar skills

  • Local claude-code documentation reference (latest). An agent skill from olorehq/olore.

    104 GitHub stars~901 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Kimi Code Delegation

    CherryHQ/cherry-studio

    Delegates one bounded repository task to Kimi Code in non-interactive prompt mode and reads back the final result from its JSON event stream.

    52k GitHub starsUsed in 1 repo~504 tokens
    Agent WorkflowsAuto-check passed
  • V2 Perf Iteration

    mirage-project/mirage

    Runtime-V2 performance-iteration workflow. An agent skill from mirage-project/mirage.

    2.5k GitHub stars~4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Clone App Pat Pro

    per-simmons/clone-app-pat-pro-public

    Clones any web app pixel-for-pixel from a URL. An agent skill from per-simmons/clone-app-pat-pro-public.

    259 GitHub stars~1.9k tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check: notes
  • Coordinates a hierarchical swarm of specialized agents through the claude-flow CLI for work that spans several files or modules at once.

    74k GitHub starsUsed in 2 repos~779 tokens
    Agent WorkflowsAuto-check passed

Questions about Self Learning

What does Self Learning do?

Capture a hard-won "golden path" from the current session as a reusable Agent Skill, so future sessions start already knowing it. Self Learning is an agent skill from Kulaxyz/self-learning-skills. Capture a hard-won "golden path" from the current session as a reusable Agent Skill, so future sessions start already knowing it.

When should I use Self Learning?

Self Learning fits situations like: tasks that involve Platform engineering; tasks that involve Subagents.

How do I install Self Learning in Claude Code?

Run `npx skills add Kulaxyz/self-learning-skills --skill self-learning -a claude-code`. Or copy the skill folder (skills/self-learning in Kulaxyz/self-learning-skills) into .claude/skills/self-learning in your project. Claude Code loads it when a task matches its description.

How do I install Self Learning in Codex?

Run `npx skills add Kulaxyz/self-learning-skills --skill self-learning -a codex`. Or copy the skill folder (skills/self-learning in Kulaxyz/self-learning-skills) into .agents/skills/self-learning in your project. Codex loads it when a task matches its description.

Can I use Self Learning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Kulaxyz/self-learning-skills --skill self-learning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/self-learning, .gemini/skills/self-learning, .github/skills/self-learning and .opencode/skills/self-learning in your project.

What does Self Learning need to run?

SKILL.md names no scripts, command-line tools or credentials: Self Learning is instructions for the agent only. Our summary lists: A credential in FOO_TOKEN.

Does Self Learning access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Self Learning safe to install?

Our automated static check of SKILL.md flagged 2 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation; mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Self Learning use?

Self Learning is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Self Learning use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.

What are the alternatives to Self Learning?

Skills that share tags, products or a category with Self Learning: Olore Claude Code Latest (olorehq/olore, 104 stars), O2 Review Loop (openobserve/openobserve, 22k stars), Kimi Code Delegation (CherryHQ/cherry-studio, 52k stars) and V2 Perf Iteration (mirage-project/mirage, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Self Learning?

Kulaxyz (a GitHub user) maintains it in Kulaxyz/self-learning-skills, which has 961 GitHub stars. The repository was last updated on September 14, 2026.

Source: Kulaxyz/self-learning-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.