Read skills from the global and workspace .agents/skills directories

- Discover skill directories under ~/.agents/skills and each
  workspace''s .agents/skills; a directory qualifies with a full
  skill.manifest.json or just a SKILL.md, whose manifest is derived
  (frontmatter name or the directory name). Paths resolve per platform
  on Windows, macOS, and Linux.
- Sync at startup for every organization and again when the Skills
  page opens; skills the org already carries are skipped, and one
  broken directory cannot block the rest.
- AGENTCOMPANY_NEW_SKILLS_ROOT points tests at a temporary library
  (overriding USERPROFILE crashes Electron on Windows).
This commit is contained in:
ZacharyZhang-NY committed 2026-07-07 01:21:33 -04:00
1 parent 256e0680c6
commit 2d43950123
14 files changed
+303 -12

No files matched your search

@@ -1,4 +1,4 @@
import { useState, type FormEvent } from "react";
import { useEffect, useState, type FormEvent } from "react";
import { Button, Field, Icon, Pill } from "../../shared/ui";
import { Dialog } from "../../shared/Dialog";
import type {
@@ -23,6 +23,12 @@ interface SkillsPanelProps {
export function SkillsPanel({ orgId, skills, revisions, bindings, tests, agents, actions }: SkillsPanelProps) {
const [importOpen, setImportOpen] = useState(false);
// The on-disk skill library (global ~/.agents/skills and each workspace's
// .agents/skills) syncs in when the panel opens.
useEffect(() => {
void actions.run(() => window.agentCompany.syncSkillsFromDisk({ orgId }));
}, [orgId, actions]);
const importSkill = (event: FormEvent<HTMLFormElement>) => {
event.preventDefault();
const form = new FormData(event.currentTarget);