Skip to content

feat: Add self-improving skill system - #20

Open
YrFnS wants to merge 1 commit into
cosmicstack-labs:mainfrom
YrFnS:feature/self-improving-skills
Open

feat: Add self-improving skill system#20
YrFnS wants to merge 1 commit into
cosmicstack-labs:mainfrom
YrFnS:feature/self-improving-skills

Conversation

@YrFnS

@YrFnS YrFnS commented Apr 27, 2026

Copy link
Copy Markdown

Implements Hermes-Agent's closed learning loop pattern for automatic skill creation and improvement from successful task patterns.

New Tools

  • skill_manage: Create, edit, patch, delete, write-file, remove-file
  • skill_view: View skill full content with metadata

New Modules

  • src/skills/utils.ts: Validation helpers (validateSkillName, validateSkillContent, findSkill, etc.)
  • src/skills/review.ts: SkillTracker + triggerSkillReview for automatic review suggestions
  • src/capabilities/skills/skill-manage.ts: Full skill_manage tool implementation with atomic writes
  • src/capabilities/skills/skill-view.ts: Skill viewing tool

Features

  • Auto-suggest skills after 10 messages without skill actions
  • Survey existing skills before creating new (prefer patching)
  • Token-conscious async review generation (max 800 tokens)
  • Atomic writes with temp files (crash-safe)
  • Path validation and local skill detection
  • Automatic discovery refresh after skill changes

Following Mercury's Contributing Guidelines

  • Agentic expertise: loop-aware, permission-first, token-conscious
  • Code quality: TypeScript, JSDoc comments, async/await, tests
  • No new dependencies added
  • Graceful degradation on validation/provider errors
  • Channel-agnostic (works on CLI and Telegram)

Reference

Based on Hermes-Agent's skill_manager_tool.py implementation (NousResearch/hermes-agent)

Tests

Added 10 tests covering:

  • Skill name/content validation
  • Skill finding and discovery
  • SkillTracker iteration tracking
  • Skill name/description suggestion

Implements Hermes-Agent's closed learning loop pattern for automatic
skill creation and improvement from successful task patterns.

## New Tools

- skill_manage: Create, edit, patch, delete, write-file, remove-file
- skill_view: View skill full content with metadata

## New Modules

- src/skills/utils.ts: Validation helpers (validateSkillName,
  validateSkillContent, findSkill, etc.)
- src/skills/review.ts: SkillTracker + triggerSkillReview for
  automatic review suggestions
- src/capabilities/skills/skill-manage.ts: Full skill_manage tool
  implementation with atomic writes
- src/capabilities/skills/skill-view.ts: Skill viewing tool

## Features

- Auto-suggest skills after 10 messages without skill actions
- Survey existing skills before creating new (prefer patching)
- Token-conscious async review generation (max 800 tokens)
- Atomic writes with temp files (crash-safe)
- Path validation and local skill detection
- Automatic discovery refresh after skill changes

## Following Mercury's Contributing Guidelines

- Agentic expertise: loop-aware, permission-first, token-conscious
- Code quality: TypeScript, JSDoc comments, async/await, tests
- No new dependencies added
- Graceful degradation on validation/provider errors
- Channel-agnostic (works on CLI and Telegram)

## Reference

Based on Hermes-Agent's skill_manager_tool.py implementation
(NousResearch/hermes-agent)

## Tests

Added 10 tests covering:
- Skill name/content validation
- Skill finding and discovery
- SkillTracker iteration tracking
- Skill name/description suggestion
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