Skip to content

feat: Skills System — reusable agent knowledge that compounds over time #3979

@OneStepAt4time

Description

@OneStepAt4time

Skills System — Reusable Agent Knowledge

Why

Every completed task should produce a reusable skill. Currently every Aegis session starts from zero — no memory, no learning, no compounding. Multica has this and it is a key differentiator.

Concept

  • A Skill is a reusable knowledge unit (SKILL.md body + supporting files + config JSON)
  • Skills are workspace-level — any agent can be assigned any skill
  • When an agent runs a session, its assigned skills are injected as context
  • Skills can be created manually, imported from completed sessions, or discovered from .agents/skills/ in the project directory
  • Every skill has: name, description, content (markdown), optional files, optional config

DB Schema (TypeScript / better-sqlite3)

CREATE TABLE skill (
  id TEXT PRIMARY KEY,
  workspace_id TEXT NOT NULL,
  name TEXT NOT NULL UNIQUE,
  description TEXT NOT NULL DEFAULT '',
  content TEXT NOT NULL DEFAULT '',  -- SKILL.md body
  config TEXT NOT NULL DEFAULT '{}',  -- JSON
  created_by TEXT,
  created_at TEXT NOT NULL DEFAULT (datetime('now')),
  updated_at TEXT NOT NULL DEFAULT (datetime('now'))
);

CREATE TABLE skill_file (
  id TEXT PRIMARY KEY,
  skill_id TEXT NOT NULL REFERENCES skill(id) ON DELETE CASCADE,
  path TEXT NOT NULL,
  content TEXT NOT NULL,
  created_at TEXT NOT NULL DEFAULT (datetime('now')),
  updated_at TEXT NOT NULL DEFAULT (datetime('now')),
  UNIQUE(skill_id, path)
);

CREATE TABLE agent_skill (
  agent_key TEXT NOT NULL,  -- references agent config key
  skill_id TEXT NOT NULL REFERENCES skill(id) ON DELETE CASCADE,
  created_at TEXT NOT NULL DEFAULT (datetime('now')),
  PRIMARY KEY (agent_key, skill_id)
);

API Endpoints

  • GET /v1/skills — list skills (summary only, no content body)
  • POST /v1/skills — create skill
  • GET /v1/skills/:id — get skill with full content
  • PUT /v1/skills/:id — update skill
  • DELETE /v1/skills/:id — delete skill
  • GET /v1/skills/:id/files — list skill files
  • POST /v1/skills/:id/files — add/update skill file
  • DELETE /v1/skills/:id/files/:fileId — delete skill file
  • PUT /v1/agents/:key/skills — set agent skill assignments
  • GET /v1/agents/:key/skills — list agent skills

Frontend

  • Skills page: list view with name, description, agent count
  • Skill detail page: content viewer, file browser, agent assignments
  • Create/import dialog: manual create or import from .agents/skills/ directory
  • Agent settings: skill picker for assigning skills to agents

Runtime Integration

  • When a CC session starts, the agent's assigned skills are collected
  • Skills are injected into the session as context (appended to system prompt or CLAUDE.md)
  • File-based skills are made available as references the agent can read

Acceptance Criteria

  • CRUD API for skills and skill files
  • Agent-skill binding API
  • Skills injected into CC sessions as context
  • Dashboard skills page with list/detail/create views
  • Import from .agents/skills/ directory
  • Tests for all API endpoints
  • npm run gate passes

Reference

Competitive analysis: references/multica-competitive-analysis.md §2.2
Inspired by Multica's skills system (concepts only, our own implementation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions