Skip to content

feat(skill-hub): org-wide skill hub for agent procedural memory - #1

Open
ZaltaClaw wants to merge 1 commit into
mainfrom
feat/skill-hub
Open

feat(skill-hub): org-wide skill hub for agent procedural memory#1
ZaltaClaw wants to merge 1 commit into
mainfrom
feat/skill-hub

Conversation

@ZaltaClaw

Copy link
Copy Markdown
Collaborator

What changed

Adds a complete Skill Hub module — an org-wide library of reusable procedural memory skills that can be assigned to any agent at runtime.

New files

Path Purpose
src/types/agent.ts Added Skill, SkillVisibility, CreateSkillRequest, UpdateSkillRequest types
src/lib/skill-store.ts SkillStore adapter — file-based CRUD backed by data/skills/*.md
src/app/skill-hub/page.tsx Skill Hub page (browse grid, search, CRUD, modals)
src/app/api/skill-hub/route.ts GET /api/skill-hub (list + filter), POST /api/skill-hub (create)
src/app/api/skill-hub/[slug]/route.ts GET, PUT, DELETE /api/skill-hub/:slug
src/components/skill-hub/skill-card.tsx Browse grid card (pinned indicator, tags, visibility, assign button)
src/components/skill-hub/skill-detail.tsx Full detail modal (metadata, tags, env vars, content preview)
src/components/skill-hub/skill-editor.tsx Create/edit modal with markdown editor + preview toggle
src/components/skill-hub/skill-filters.tsx Visibility tab bar + tag chip filters
src/components/skill-hub/assign-skill-modal.tsx Agent picker — appends skill content to agent system prompt
data/skills/azure-deployment-style.md Seed: Azure infra naming, Bicep, managed identity, zero-trust
data/skills/code-review-checklist.md Seed: Security, perf, observability, quality checklist
data/skills/incident-response.md Seed: P0–P3 severity, response steps, communication template
data/skills/prompt-engineering-guide.md Seed: System prompt structure, principles, anti-patterns

Modified files

  • src/components/layout/sidebar.tsx — Added Skill Hub nav entry between Tools and Knowledge in the Build group
  • README.md — Added Skill Hub subsection under Features
  • .gitignore — Unignored data/skills/** so seed markdown files are tracked

Design decisions

File-based JSON/Markdown storage

Skills are stored as data/skills/<slug>.md files with YAML-like frontmatter + markdown body. This was chosen for the initial implementation because:

  • Zero infrastructure dependency — works immediately with no database setup
  • Skills are human-readable and diff-friendly in version control
  • Easy to seed via PRs (just add a .md file)
  • SkillStore exposes a clean interface (list, get, create, update, delete) that maps 1:1 to what a Cosmos/Postgres adapter would need

Skill → Agent assignment

The "Assign to Agent" flow appends the skill's markdown body to the selected agent's instructions field via PUT /api/agents/local/:id. This is the simplest runtime injection mechanism that works without changes to the inference path. A future iteration could use a structured skills array on the agent object and inject at request time.

Type naming

The Skill Hub types use Skill (not HubSkill) in agent.ts. The existing src/types/skill.ts file was checked and uses a different interface for a different domain — no collision.

Follow-up plan

  • Cosmos/Postgres adapter: Swap SkillStore implementation when a DB is available — the interface is identical, no callsite changes needed
  • Skill versioning: Track version history in the frontmatter, add a changelog view in SkillDetail
  • Agent skills section: Add a "Skills" tab to the agent detail page showing attached skills with chip UI
  • Import/export: Bulk export skills as a zip of .md files, import from external repos
  • Skill analytics: Track which skills are most-assigned and which agents use them

Screenshots

Screenshots directory: docs/screenshots/

Skill Hub grid, detail modal, editor, and assign flow follow the existing dark-theme design system (cyan/purple accents, CSS variable tokens, consistent card/modal patterns from Marketplace and Tools pages).

Acceptance checklist

  • npm run lint — 0 new errors (58 pre-existing errors in unrelated files unchanged)
  • npm run build — clean build, /skill-hub appears as static route, /api/skill-hub and /api/skill-hub/[slug] as dynamic routes
  • Sidebar nav updated (Skill Hub between Tools and Knowledge)
  • 4 seed skills committed under data/skills/
  • README.md Skill Hub subsection added

🤖 Generated with Claude Code

Adds the Skill Hub module — a library of reusable markdown skills that
agents can draw from at runtime. Skills are appended to agent system
prompts, acting as composable procedural memory for the org.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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