Skip to content

feat(skills): persistent, self-authored skills (learn_skill) - #20

Merged
ayman3000 merged 1 commit into
mainfrom
feat/self-improving-skills
Jul 27, 2026
Merged

feat(skills): persistent, self-authored skills (learn_skill)#20
ayman3000 merged 1 commit into
mainfrom
feat/self-improving-skills

Conversation

@ayman3000

Copy link
Copy Markdown
Owner

Summary

The substrate for a self-improving agent — it can turn a recurring task, or a corrected mistake, into a reusable skill that persists across sessions and activates by keyword.

Skills already existed (AgentSkill + SkillRegistry, progressive-disclosure prompt injection) but were in-memory only. This adds persistence + a tool to author them.

  • AgentSkillStore protocol + FileAgentSkillStore — one human-editable markdown file per skill (# name / Triggers: … / instructions body).
  • LearnSkillTool (learn_skill) — the agent calls it to save a skill; it persists to the store and registers into the live SkillRegistry, so the skill can fire later in the same session.
  • Agent.skillStore (didSet) — loads previously authored skills into skillRegistry and auto-registers learn_skill. Mirrors the memoryStore → RememberTool pattern.

Learning from mistakes composes with existing memory: short lessons go to remember (kind agent, always injected); larger repeatable procedures become learn_skill skills (keyword-triggered).

Tests

  • testFileSkillStoreRoundTrips — save → loadAll preserves name/triggers/instructions; matches a query.
  • testLearnSkillToolPersistsAndActivateslearn_skill persists to the store and the skill fires on a matching query.
  • All 111 tests pass.

🤖 Generated with Claude Code

Adds the substrate for a self-improving agent: it can turn a recurring task
(or a corrected mistake) into a reusable, keyword-triggered skill that
persists across sessions.

- AgentSkillStore protocol + FileAgentSkillStore (one markdown file per skill:
  `# name` / `Triggers:` / instructions body; human-editable).
- LearnSkillTool (`learn_skill`): saves a skill to the store AND registers it
  into the live SkillRegistry so it can fire later in the same session.
- Agent.skillStore didSet: loads persisted skills into skillRegistry and
  auto-registers learn_skill (mirrors memoryStore -> RememberTool).

Regression: store round-trip; learn_skill persists + activates on a matching
query.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@ayman3000
ayman3000 merged commit 5385599 into main Jul 27, 2026
1 check passed
@ayman3000
ayman3000 deleted the feat/self-improving-skills branch July 27, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant