The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
add skills inventory
Justin D'Souzaef64712ee27d
diff --git a/cli/beacon/cmd/endpoint.go b/cli/beacon/cmd/endpoint.goindex d5659cfe..9fb53f39 100644--- a/cli/beacon/cmd/endpoint.go+++ b/cli/beacon/cmd/endpoint.go@@ -415,13 +415,13 @@ func init() {endpointDoctorCmd.Flags().BoolVar(&endpointOpts.fix, "fix", false, "Apply safe endpoint doctor remediations")endpointInventoryCmd.Flags().BoolVar(&endpointOpts.jsonOutput, "json", false, "Print inventory as JSON")endpointInventoryCmd.Flags().BoolVar(&endpointOpts.allTargets, "all", false, "Include all supported targets")- endpointInventoryCmd.Flags().BoolVar(&endpointOpts.writeInventoryEvent, "write-event", false, "Append config inventory events to the endpoint runtime log")+ endpointInventoryCmd.Flags().BoolVar(&endpointOpts.writeInventoryEvent, "write-event", false, "Append inventory events to the endpoint runtime log")topLevelDoctorCmd.Flags().BoolVar(&endpointOpts.jsonOutput, "json", false, "Print doctor results as JSON")topLevelDoctorCmd.Flags().BoolVar(&endpointOpts.fix, "fix", false, "Apply safe endpoint doctor remediations")topLevelStatusCmd.Flags().BoolVar(&endpointOpts.jsonOutput, "json", false, "Print status as JSON")topLevelInventoryCmd.Flags().BoolVar(&endpointOpts.jsonOutput, "json", false, "Print inventory as JSON")topLevelInventoryCmd.Flags().BoolVar(&endpointOpts.allTargets, "all", false, "Include all supported targets")- topLevelInventoryCmd.Flags().BoolVar(&endpointOpts.writeInventoryEvent, "write-event", false, "Append config inventory events to the endpoint runtime log")+ topLevelInventoryCmd.Flags().BoolVar(&endpointOpts.writeInventoryEvent, "write-event", false, "Append inventory events to the endpoint runtime log")endpointTestEventCmd.Flags().BoolVar(&endpointOpts.jsonOutput, "json", false, "Print validation stages as JSON")endpointBundleDiagnosticsCmd.Flags().StringVar(&endpointOpts.outputDir, "output", "", "Output directory for diagnostics bundle")endpointBundleDiagnosticsCmd.Flags().BoolVar(&endpointOpts.includeEventSummaries, "include-event-summaries", false, "Include redacted event summaries")diff --git a/cli/beacon/cmd/endpoint_diagnostics.go b/cli/beacon/cmd/endpoint_diagnostics.goindex ead7d6d6..e1882ecd 100644--- a/cli/beacon/cmd/endpoint_diagnostics.go+++ b/cli/beacon/cmd/endpoint_diagnostics.go@@ -48,6 +48,7 @@ type inventoryResult struct {LastEventObserved bool `json:"last_event_observed"`Configs []endpointinventory.Config `json:"configs,omitempty"`MCPServers []endpointinventory.MCPServer `json:"mcp_servers,omitempty"`+ Skills []endpointinventory.Skill `json:"skills,omitempty"`UserScope endpointinventory.UserScope `json:"user_scope"`}@@ -222,6 +223,7 @@ func runEndpointInventory(cmd *cobra.Command, args []string) error {LastEventObserved: status.LastEvent != "",Configs: configInventory.Configs,MCPServers: configInventory.MCPServers,+ Skills: configInventory.Skills,UserScope: configInventory.UserScope,}if endpointOpts.jsonOutput {@@ -251,6 +253,14 @@ func runEndpointInventory(cmd *cobra.Command, args []string) error {}}result.MCPServers = filteredServers++ filteredSkills := []endpointinventory.Skill{}+ for _, s := range result.Skills {+ if s.Exists {+ filteredSkills = append(filteredSkills, s)+ }+ }+ result.Skills = filteredSkills}if err := json.NewEncoder(os.Stdout).Encode(result); err != nil {return err@@ -290,6 +300,23 @@ func runEndpointInventory(cmd *cobra.Command, args []string) error {}fmt.Printf("MCP: %s %s scope=%s transport=%s command_present=%t args=%d env_keys=%d\n", server.Runtime, name, server.SourceScope, server.Transport, server.CommandPresent, server.ArgsCount, server.EnvKeyCount)}+ for _, skill := range result.Skills {+ if !endpointOpts.allTargets && !skill.Exists {+ continue+ }+ name := skill.SkillName+ if name == "" {+ name = skill.SkillNameHash+ }+ path := skill.ManifestPath+ if path == "" {+ path = skill.RootPath+ }+ if path == "" {+ path = skill.ManifestPathHash+ }+ fmt.Printf("Skill: %s %s scope=%s status=%s path=%s\n", skill.Runtime, name, skill.SourceScope, skill.ParserStatus, path)+ }if endpointOpts.writeInventoryEvent {return writeInventoryEvents(effectiveCfg, configInventory)}@@ -323,6 +350,30 @@ func writeInventoryEvents(cfg endpointconfig.Config, result endpointinventory.Rereturn err}}+ for _, skill := range result.Skills {+ if !skill.Exists {+ continue+ }+ event := schema.NewEvent(schema.NewEventOptions{+ Action: "skill.inventory",+ Category: "inventory",+ Severity: schema.SeverityInfo,+ AgentVersion: version.GetVersion(),+ Harness: schema.HarnessInfo{+ Name: skill.Runtime,+ ConfigPath: skill.ManifestPath,+ },+ Message: fmt.Sprintf("%s skill inventory observed", skill.Runtime),+ })+ event.Raw = map[string]interface{}{+ "inventory": map[string]interface{}{+ "skill": skill,+ },+ }+ if _, err := writer.AppendEvent(event, writer.Options{Path: cfg.LogPath, UserMode: cfg.UserMode}); err != nil {+ return err+ }+ }return nil}diff --git a/cli/beacon/cmd/endpoint_test.go b/cli/beacon/cmd/endpoint_test.goindex 1f58d36b..a2502bf4 100644--- a/cli/beacon/cmd/endpoint_test.go+++ b/cli/beacon/cmd/endpoint_test.go@@ -749,6 +749,30 @@ func TestWriteInventoryEventsAppendsConfigInventory(t *testing.T) {Redaction: endpointinventory.RedactionFull,},},+ Skills: []endpointinventory.Skill{+ {+ Runtime: "claude_code",+ SkillName: "deploy",+ SkillNameHash: "sha256:skill",+ RootPathHash: "sha256:root",+ SourceScope: endpointinventory.ScopeUser,+ ManifestPath: filepath.Join(t.TempDir(), ".claude", "skills", "deploy", "SKILL.md"),+ ManifestPathHash: "sha256:manifest",+ Exists: true,+ Readable: true,+ ParserStatus: endpointinventory.StatusOK,+ FileSHA256: "sha256:body",+ Redaction: endpointinventory.RedactionFull,+ },+ {+ Runtime: "cursor",+ RootPathHash: "sha256:missing-skill-root",+ SourceScope: endpointinventory.ScopeUser,+ Exists: false,+ ParserStatus: endpointinventory.StatusNotFound,+ Redaction: endpointinventory.RedactionFull,+ },+ },}if err := writeInventoryEvents(cfg, result); err != nil {@@ -762,9 +786,18 @@ func TestWriteInventoryEventsAppendsConfigInventory(t *testing.T) {if strings.Count(text, "config.inventory") != 1 {t.Fatalf("inventory events = %d, want 1; log=%s", strings.Count(text, "config.inventory"), text)}+ if strings.Count(text, "skill.inventory") != 1 {+ t.Fatalf("skill inventory events = %d, want 1; log=%s", strings.Count(text, "skill.inventory"), text)+ }if !strings.Contains(text, "filesystem") {t.Fatalf("inventory log missing MCP server summary: %s", text)}+ if !strings.Contains(text, "deploy") {+ t.Fatalf("inventory log missing skill summary: %s", text)+ }+ if strings.Contains(text, "missing-skill-root") {+ t.Fatalf("inventory log should not include missing skill roots: %s", text)+ }}func TestTopLevelAliasesRegistered(t *testing.T) {diff --git a/cli/beacon/internal/endpoint/dashboard/server.go b/cli/beacon/internal/endpoint/dashboard/server.goindex 429cf1f2..822d9891 100644--- a/cli/beacon/internal/endpoint/dashboard/server.go+++ b/cli/beacon/internal/endpoint/dashboard/server.go@@ -51,6 +51,7 @@ type InventoryResponse struct {Harnesses interface{} `json:"harnesses"`Configs []inventory.Config `json:"configs"`MCPServers []inventory.MCPServer `json:"mcp_servers"`+ Skills []inventory.Skill `json:"skills"`}var (@@ -101,6 +102,7 @@ func Handler(opts Options) (http.Handler, error) {Harnesses: status.Harnesses,Configs: scan.Configs,MCPServers: scan.MCPServers,+ Skills: scan.Skills,})})mux.HandleFunc("/api/summary", func(w http.ResponseWriter, r *http.Request) {diff --git a/cli/beacon/internal/endpoint/dashboard/server_test.go b/cli/beacon/internal/endpoint/dashboard/server_test.goindex 0a431577..2db577c6 100644--- a/cli/beacon/internal/endpoint/dashboard/server_test.go+++ b/cli/beacon/internal/endpoint/dashboard/server_test.go@@ -422,6 +422,13 @@ func TestInventoryEndpointReturnsConfigsAndMCPServers(t *testing.T) {if err := os.WriteFile(filepath.Join(claudeDir, "settings.json"), []byte(settings), 0644); err != nil {t.Fatalf("write claude settings: %v", err)}+ skillDir := filepath.Join(claudeDir, "skills", "deploy")+ if err := os.MkdirAll(skillDir, 0755); err != nil {+ t.Fatalf("mkdir claude skill dir: %v", err)+ }+ if err := os.WriteFile(filepath.Join(skillDir, "SKILL.md"), []byte("# Deploy\nDo not retain this body."), 0644); err != nil {+ t.Fatalf("write claude skill: %v", err)+ }handler, err := Handler(Options{UserMode: true, LogPath: filepath.Join(t.TempDir(), "runtime.jsonl")})if err != nil {@@ -477,6 +484,21 @@ func TestInventoryEndpointReturnsConfigsAndMCPServers(t *testing.T) {if !found {t.Fatalf("expected a local-fs MCP server, got %#v", resp.MCPServers)}+ foundSkill := false+ for _, skill := range resp.Skills {+ if skill.Runtime == "claude_code" && skill.SkillName == "deploy" {+ foundSkill = true+ if !skill.Exists || !skill.Readable || skill.FileSHA256 == "" {+ t.Fatalf("skill metadata = %#v, want readable skill with hash", skill)+ }+ }+ }+ if !foundSkill {+ t.Fatalf("expected deploy skill, got %#v", resp.Skills)+ }+ if strings.Contains(rec.Body.String(), "Do not retain this body") {+ t.Fatalf("inventory response retained skill body: %s", rec.Body.String())+ }}func TestStaticDashboardPagesServe(t *testing.T) {diff --git a/cli/beacon/internal/endpoint/dashboard/static/app.js b/cli/beacon/internal/endpoint/dashboard/static/app.jsindex 0fb084eb..55379d18 100644--- a/cli/beacon/internal/endpoint/dashboard/static/app.js+++ b/cli/beacon/internal/endpoint/dashboard/static/app.js@@ -271,16 +271,19 @@ function renderInventory(resp) {const harnesses = resp?.harnesses || [];const configs = resp?.configs || [];const servers = resp?.mcp_servers || [];+ const skills = resp?.skills || [];const existingConfigs = configs.filter((config) => config.exists);+ const existingSkills = skills.filter((skill) => skill.exists);setText("#inventory-meta", resp?.generated_at ? `Scanned ${formatTime(resp.generated_at)}` : "");- renderInventoryCards(harnesses, existingConfigs, servers);+ renderInventoryCards(harnesses, existingConfigs, servers, existingSkills);renderInventoryHarnesses(harnesses);renderInventoryConfigs(configs);renderInventoryMCP(servers);+ renderInventorySkills(existingSkills);renderInventoryScope(resp?.user_scope || {});}-function renderInventoryCards(harnesses, configs, servers) {+function renderInventoryCards(harnesses, configs, servers, skills = []) {if (!$("#inventory-cards")) return;const detected = harnesses.filter((harness) => harness.detected).length;const enabled = harnesses.filter((harness) => harness.telemetry_status === "enabled").length;@@ -290,6 +293,7 @@ function renderInventoryCards(harnesses, configs, servers) {{ label: "Telemetry Enabled", value: enabled, hint: "reporting to Beacon" },{ label: "Config Files", value: configs.length, hint: `${managed} Beacon-managed` },{ label: "MCP Servers", value: servers.length, hint: "across all configs" },+ { label: "Agent Skills", value: skills.length, hint: "local manifests" },];$("#inventory-cards").innerHTML = cards.map((card) => `@@ -383,6 +387,27 @@ function renderInventoryMCP(servers) {.join("");}+function renderInventorySkills(skills) {+ const tbody = $("#inventory-skills");+ if (!tbody) return;+ if (!skills.length) {+ tbody.innerHTML = `<tr><td colspan="6" class="muted">No agent skills discovered in supported local roots.</td></tr>`;+ return;+ }+ tbody.innerHTML = skills+ .map((skill) => `+ <tr>+ <td>${escapeHTML(runtimeLabel(skill.runtime))}</td>+ <td>${escapeHTML(skill.skill_name || skill.skill_name_hash || "")}</td>+ <td>${badge(skill.source_scope || "unknown", "badge-muted")}</td>+ <td>${parserBadge(skill)}</td>+ <td class="nowrap">${skill.modified_at ? escapeHTML(formatTime(skill.modified_at)) : `<span class="muted">-</span>`}</td>+ <td class="mono path-cell">${escapeHTML(skill.manifest_path || skill.manifest_path_hash || skill.root_path || skill.root_path_hash || "")}</td>+ </tr>+ `)+ .join("");+}+function renderInventoryScope(scope) {const el = $("#inventory-scope");if (!el) return;@@ -444,6 +469,7 @@ function runtimeLabel(value) {"devin-cli": "Devin CLI","devin-desktop": "Devin Desktop",grok: "Grok",+ agent_skills: "Agent Skills",};return labels[value] || harnessLabel(value);}diff --git a/cli/beacon/internal/endpoint/dashboard/static/inventory.html b/cli/beacon/internal/endpoint/dashboard/static/inventory.htmlindex 45170de4..7dd967d2 100644--- a/cli/beacon/internal/endpoint/dashboard/static/inventory.html+++ b/cli/beacon/internal/endpoint/dashboard/static/inventory.html@@ -108,6 +108,30 @@</div></section>+ <section class="panel">+ <div class="section-head">+ <div>+ <h2>Agent Skills</h2>+ <p class="muted">Local skill manifests discovered under supported agent skill roots. Skill instruction bodies are not retained.</p>+ </div>+ </div>+ <div class="table-wrap">+ <table>+ <thead>+ <tr>+ <th>Runtime</th>+ <th>Skill</th>+ <th>Scope</th>+ <th>Status</th>+ <th>Modified</th>+ <th>Manifest</th>+ </tr>+ </thead>+ <tbody id="inventory-skills"></tbody>+ </table>+ </div>+ </section>+<section class="panel"><h2>Scan Scope</h2><div id="inventory-scope" class="scope-grid"></div>diff --git a/cli/beacon/internal/endpoint/inventory/inventory.go b/cli/beacon/internal/endpoint/inventory/inventory.goindex b2f3cba6..f9a694a5 100644--- a/cli/beacon/internal/endpoint/inventory/inventory.go+++ b/cli/beacon/internal/endpoint/inventory/inventory.go@@ -61,6 +61,7 @@ type Result struct {GeneratedAt string `json:"generated_at"`Configs []Config `json:"configs"`MCPServers []MCPServer `json:"mcp_servers"`+ Skills []Skill `json:"skills"`UserScope UserScope `json:"user_scope"`}@@ -147,6 +148,7 @@ func Scan(opts Options) Result {result.Configs = append(result.Configs, config)result.MCPServers = append(result.MCPServers, servers...)}+ result.Skills = scanSkills(home, wd, redaction)return result}diff --git a/cli/beacon/internal/endpoint/inventory/inventory_test.go b/cli/beacon/internal/endpoint/inventory/inventory_test.goindex 3917f231..c07a5baa 100644--- a/cli/beacon/internal/endpoint/inventory/inventory_test.go+++ b/cli/beacon/internal/endpoint/inventory/inventory_test.go@@ -1,8 +1,10 @@package inventoryimport (+ "encoding/json""os""path/filepath"+ "strings""testing""time")@@ -335,6 +337,93 @@ func TestCopilotManagedDetectionFalsePositives(t *testing.T) {}}+func TestScanCurrentUserAndProjectSkillInventory(t *testing.T) {+ home := t.TempDir()+ work := t.TempDir()+ claudeSkillPath := filepath.Join(home, ".claude", "skills", "deploy", "SKILL.md")+ agentSkillPath := filepath.Join(work, ".agents", "skills", "review", "SKILL.md")+ writeFile(t, claudeSkillPath, "---\ndescription: do not retain\n---\nSECRET INSTRUCTIONS")+ writeFile(t, agentSkillPath, "# Review\nKeep this instruction body out of inventory.")++ result := Scan(Options{+ HomeDir: home,+ WorkingDir: work,+ Now: fixedNow,+ })++ deploy := findSkill(result.Skills, "claude_code", "deploy", claudeSkillPath)+ if deploy == nil {+ t.Fatalf("Claude skill not found in %#v", result.Skills)+ }+ if deploy.SourceScope != ScopeUser || !deploy.Exists || !deploy.Readable || deploy.ParserStatus != StatusOK {+ t.Fatalf("Claude skill status = %#v", deploy)+ }+ if deploy.FileSHA256 == "" || deploy.SkillNameHash == "" || deploy.RootPathHash == "" || deploy.ManifestPathHash == "" {+ t.Fatalf("Claude skill missing hashes: %#v", deploy)+ }+ review := findSkill(result.Skills, "agent_skills", "review", agentSkillPath)+ if review == nil || review.SourceScope != ScopeProject {+ t.Fatalf("project agent skill = %#v, want project scope", review)+ }++ data, err := json.Marshal(result.Skills)+ if err != nil {+ t.Fatal(err)+ }+ text := string(data)+ for _, forbidden := range []string{"SECRET INSTRUCTIONS", "Keep this instruction body", "do not retain"} {+ if strings.Contains(text, forbidden) {+ t.Fatalf("skill inventory retained manifest content %q in %s", forbidden, text)+ }+ }+}++func TestMissingSkillRootsAreReportedAsNotFound(t *testing.T) {+ result := Scan(Options{+ HomeDir: t.TempDir(),+ WorkingDir: t.TempDir(),+ Now: fixedNow,+ })+ if len(result.Skills) == 0 {+ t.Fatal("expected missing skill roots to be reported")+ }+ for _, skill := range result.Skills {+ if skill.Exists {+ continue+ }+ if skill.ParserStatus != StatusNotFound {+ t.Fatalf("missing skill status = %s, want %s", skill.ParserStatus, StatusNotFound)+ }+ if skill.RootPathHash == "" {+ t.Fatal("missing skill root should still include a path hash")+ }+ }+}++func TestSkillScanIsBoundedToDirectSkillManifests(t *testing.T) {+ home := t.TempDir()+ work := t.TempDir()+ writeFile(t, filepath.Join(home, ".cursor", "skills", "direct", "SKILL.md"), "# Direct")+ writeFile(t, filepath.Join(home, ".cursor", "skills", "nested", "child", "SKILL.md"), "# Nested")+ writeFile(t, filepath.Join(home, ".cursor", "skills", "node_modules", "package", "SKILL.md"), "# Vendor")++ result := Scan(Options{+ HomeDir: home,+ WorkingDir: work,+ Now: fixedNow,+ })++ if findSkill(result.Skills, "cursor", "direct", filepath.Join(home, ".cursor", "skills", "direct", "SKILL.md")) == nil {+ t.Fatal("direct Cursor skill not found")+ }+ if findSkill(result.Skills, "cursor", "child", filepath.Join(home, ".cursor", "skills", "nested", "child", "SKILL.md")) != nil {+ t.Fatal("nested skill manifest should not be discovered")+ }+ if findSkill(result.Skills, "cursor", "package", filepath.Join(home, ".cursor", "skills", "node_modules", "package", "SKILL.md")) != nil {+ t.Fatal("vendor skill manifest should not be discovered")+ }+}+func fixedNow() time.Time {return time.Date(2026, 6, 5, 7, 0, 0, 0, time.UTC)}@@ -386,3 +475,13 @@ func findConfig(configs []Config, runtime, path string) *Config {}return nil}++func findSkill(skills []Skill, runtime, name, manifestPath string) *Skill {+ manifestPathHash := hashString(manifestPath)+ for i := range skills {+ if skills[i].Runtime == runtime && skills[i].SkillName == name && skills[i].ManifestPathHash == manifestPathHash {+ return &skills[i]+ }+ }+ return nil+}diff --git a/cli/beacon/internal/endpoint/inventory/skills.go b/cli/beacon/internal/endpoint/inventory/skills.gonew file mode 100644index 00000000..6727f4c7--- /dev/null+++ b/cli/beacon/internal/endpoint/inventory/skills.go@@ -0,0 +1,190 @@+package inventory++import (+ "os"+ "path/filepath"+ "sort"+ "time"+)++const maxSkillsPerRoot = 200++type Skill struct {+ Runtime string `json:"runtime"`+ SkillName string `json:"skill_name,omitempty"`+ SkillNameHash string `json:"skill_name_hash,omitempty"`+ RootPath string `json:"root_path,omitempty"`+ RootPathHash string `json:"root_path_hash,omitempty"`+ SourceScope string `json:"source_scope"`+ ManifestPath string `json:"manifest_path,omitempty"`+ ManifestPathHash string `json:"manifest_path_hash,omitempty"`+ Exists bool `json:"exists"`+ Readable bool `json:"readable"`+ Reason string `json:"reason,omitempty"`+ ParserStatus string `json:"parser_status"`+ FileSHA256 string `json:"file_sha256,omitempty"`+ ModifiedAt string `json:"modified_at,omitempty"`+ Redaction string `json:"redaction"`+}++type skillRoot struct {+ runtime string+ path string+ scope string+}++func scanSkills(home, wd, redaction string) []Skill {+ var skills []Skill+ for _, root := range skillRoots(home, wd) {+ skills = append(skills, inspectSkillRoot(root, redaction)...)+ }+ return dedupeSkills(skills)+}++func skillRoots(home, wd string) []skillRoot {+ items := []skillRoot{+ {runtime: "claude_code", path: filepath.Join(home, ".claude", "skills"), scope: ScopeUser},+ {runtime: "claude_code", path: filepath.Join(wd, ".claude", "skills"), scope: ScopeProject},+ {runtime: "cursor", path: filepath.Join(home, ".cursor", "skills"), scope: ScopeUser},+ {runtime: "cursor", path: filepath.Join(wd, ".cursor", "skills"), scope: ScopeProject},+ {runtime: "cursor", path: filepath.Join(home, ".cursor", "skills-cursor"), scope: ScopeUser},+ {runtime: "cursor", path: filepath.Join(wd, ".cursor", "skills-cursor"), scope: ScopeProject},+ {runtime: "agent_skills", path: filepath.Join(home, ".agents", "skills"), scope: ScopeUser},+ {runtime: "agent_skills", path: filepath.Join(wd, ".agents", "skills"), scope: ScopeProject},+ }+ seen := map[string]bool{}+ out := make([]skillRoot, 0, len(items))+ for _, item := range items {+ key := item.runtime + "\x00" + item.path+ if seen[key] {+ continue+ }+ seen[key] = true+ out = append(out, item)+ }+ return out+}++func inspectSkillRoot(root skillRoot, redaction string) []Skill {+ base := Skill{+ Runtime: root.runtime,+ RootPath: valueForPath(root.path, redaction),+ RootPathHash: hashString(root.path),+ SourceScope: root.scope,+ ParserStatus: StatusNotFound,+ Redaction: redaction,+ }+ info, err := os.Stat(root.path)+ if err != nil {+ base.Reason = errReason(err)+ if !os.IsNotExist(err) {+ base.ParserStatus = StatusUnreadable+ }+ return []Skill{base}+ }+ base.Exists = true+ if !info.IsDir() {+ base.ParserStatus = StatusUnsupported+ base.Reason = "path is not a directory"+ return []Skill{base}+ }+ entries, err := os.ReadDir(root.path)+ if err != nil {+ base.ParserStatus = StatusUnreadable+ base.Reason = errReason(err)+ return []Skill{base}+ }+ var skills []Skill+ for _, entry := range entries {+ if len(skills) >= maxSkillsPerRoot {+ break+ }+ if !entry.IsDir() || skipSkillDir(entry.Name()) {+ continue+ }+ manifestPath := filepath.Join(root.path, entry.Name(), "SKILL.md")+ if _, err := os.Stat(manifestPath); os.IsNotExist(err) {+ continue+ }+ skills = append(skills, inspectSkillManifest(root, entry.Name(), manifestPath, redaction))+ }+ if len(skills) == 0 {+ return nil+ }+ return skills+}++func inspectSkillManifest(root skillRoot, name, manifestPath, redaction string) Skill {+ skill := Skill{+ Runtime: root.runtime,+ SkillName: valueForName(name, redaction),+ SkillNameHash: hashString(name),+ RootPath: valueForPath(root.path, redaction),+ RootPathHash: hashString(root.path),+ SourceScope: root.scope,+ ManifestPath: valueForPath(manifestPath, redaction),+ ManifestPathHash: hashString(manifestPath),+ ParserStatus: StatusNotFound,+ Redaction: redaction,+ }+ info, err := os.Stat(manifestPath)+ if err != nil {+ skill.Reason = errReason(err)+ if !os.IsNotExist(err) {+ skill.ParserStatus = StatusUnreadable+ }+ return skill+ }+ skill.Exists = true+ skill.ModifiedAt = info.ModTime().UTC().Format(time.RFC3339)+ if info.IsDir() {+ skill.ParserStatus = StatusUnsupported+ skill.Reason = "manifest path is a directory"+ return skill+ }+ data, err := os.ReadFile(manifestPath)+ if err != nil {+ skill.ParserStatus = StatusUnreadable+ skill.Reason = errReason(err)+ return skill+ }+ skill.Readable = true+ skill.FileSHA256 = hashBytes(data)+ skill.ParserStatus = StatusOK+ return skill+}++func skipSkillDir(name string) bool {+ switch name {+ case ".git", "node_modules", "vendor", "dist", "build", "tmp", "temp":+ return true+ default:+ return false+ }+}++func dedupeSkills(skills []Skill) []Skill {+ seen := map[string]bool{}+ out := make([]Skill, 0, len(skills))+ for _, skill := range skills {+ key := skill.Runtime + "\x00" + skill.SourceScope + "\x00" + skill.RootPathHash + "\x00" + skill.SkillNameHash + "\x00" + skill.ManifestPathHash+ if seen[key] {+ continue+ }+ seen[key] = true+ out = append(out, skill)+ }+ sort.Slice(out, func(i, j int) bool {+ if out[i].Runtime == out[j].Runtime {+ if out[i].SourceScope == out[j].SourceScope {+ if out[i].RootPathHash == out[j].RootPathHash {+ return out[i].SkillNameHash < out[j].SkillNameHash+ }+ return out[i].RootPathHash < out[j].RootPathHash+ }+ return out[i].SourceScope < out[j].SourceScope+ }+ return out[i].Runtime < out[j].Runtime+ })+ return out+}diff --git a/docs/cli/endpoint-inventory.mdx b/docs/cli/endpoint-inventory.mdxindex 6d0841ea..f9b2da77 100644--- a/docs/cli/endpoint-inventory.mdx+++ b/docs/cli/endpoint-inventory.mdx@@ -23,10 +23,11 @@ Inventory can include:- Detected supported runtimes and telemetry status, including MDM-managed launch-environment state for GitHub Copilot CLI and Factory Droid- Hook integration status for Antigravity CLI, Claude Code, Cursor, Devin CLI, Devin Desktop, Factory Droid, Grok Build, Hermes Agent, and OpenCode- Supported agent configuration files and MCP server configuration context where Beacon can inspect them locally+- Local agent skill manifests discovered under supported skill roots, reported as metadata and hashes only- Recently observed Beacon runtime events when the runtime log exists- Admin-configured integration observations such as Claude Cowork and OpenClaw Gateway events-Human-readable and JSON inventory use the same default filtering: configuration records and MCP server context are shown when they are relevant to the local endpoint state. Use `--all` with `--json` when you need the complete supported inventory surface for fleet comparison or troubleshooting.+Human-readable and JSON inventory use the same default filtering: configuration records, MCP server context, and skill manifests are shown when they are relevant to the local endpoint state. Use `--all` with `--json` when you need the complete supported inventory surface for fleet comparison or troubleshooting.## Flagsdiff --git a/docs/guides/inventory.mdx b/docs/guides/inventory.mdxindex 252c8c5c..28641720 100644--- a/docs/guides/inventory.mdx+++ b/docs/guides/inventory.mdx@@ -1,11 +1,11 @@---title: "Inventory Local Agent Runtimes"-description: "Inventory local agent runtimes, MCP servers, and Beacon-observable configuration"+description: "Inventory local agent runtimes, skills, MCP servers, and Beacon-observable configuration"---## Overview-This guide shows how to inventory the AI agent footprint on an endpoint: installed runtimes, MCP servers, local config files, telemetry hooks, OTLP settings, and recent observed activity.+This guide shows how to inventory the AI agent footprint on an endpoint: installed runtimes, local skills, MCP servers, local config files, telemetry hooks, OTLP settings, and recent observed activity.Use it when you need to answer what is installed, what an agent may be able to access, and whether Beacon has recently observed activity from each runtime.@@ -35,13 +35,14 @@ Claude Code installed configured observedCodex CLI installed managed observedCursor installed hooks: not installedMCP servers 3 configured+Agent skills 2 discoveredRuntime log ~/.beacon/endpoint/logs/runtime.jsonl```</Accordion>## 2. Include All Local Signals-Use `--all` when you want local config files, MCP servers, hooks, OTLP settings, and observed runtime coverage in one report:+Use `--all` when you want local config files, skill manifests, MCP servers, hooks, OTLP settings, and observed runtime coverage in one report:```bash title="Show full local inventory"beacon endpoint inventory --all@@ -86,6 +87,7 @@ beacon endpoint inventory --json## Key Questions Answered- Which supported agent runtimes are installed or configured on this machine?+- Which local agent skills are present under supported skill roots?- Which MCP servers are referenced by local agent configuration?- Which runtime config files can Beacon inspect locally?- Which hooks, OTLP settings, or launch environment entries are present?@@ -97,12 +99,13 @@ beacon endpoint inventory --json|--------|----------------|| Installed runtimes | Shows the local AI tools present on the endpoint. || Config files | Identifies where runtime behavior and integrations are defined. |+| Agent skills | Identifies local skill manifests by name/path/hash without retaining instruction bodies. || MCP servers | Shows external tools an agent may be able to call. || Hooks and OTLP settings | Confirms whether Beacon can collect telemetry. || Managed state | Distinguishes Beacon-managed collection from customer-managed config. || Observed events | Confirms the runtime has recently emitted Beacon telemetry. |-Inventory reads local endpoint state only. It does not authenticate to remote SaaS accounts or MCP servers.+Inventory reads local endpoint state only. It does not authenticate to remote SaaS accounts, skill marketplaces, or MCP servers.## View Results@@ -124,6 +127,17 @@ Use MCP inventory to spot tool exposure from local agent configs:- Server references introduced by a specific runtime config- User-mode versus system-mode config differences+### Agent Skills++Use skill inventory to spot durable local instruction surfaces:++- Expected skill packs missing after workstation setup+- Unexpected local skills on sensitive endpoints+- User-scope versus project-scope skill differences+- Recent skill manifest changes through file hash and modified-time metadata++Beacon reports skill names, paths, hashes, scope, and parser status. It does not retain `SKILL.md` instruction bodies in inventory output or inventory events.+## 4. Open Dashboard InventoryOpen the dashboard for a quick visual check alongside top harnesses, models, repositories, MCP servers, and risk signals:@@ -135,7 +149,7 @@ beacon endpoint dashboard --open## Key Features Demonstrated- Local runtime discovery without remote SaaS authentication.-- MCP server and config inventory from supported local paths.+- Skill, MCP server, and config inventory from supported local paths.- Coverage state comparison across installed, configured, managed, and observed runtimes.- Dashboard handoff for visual review.@@ -145,6 +159,7 @@ Check whether:- The runtime is installed on the endpoint- Beacon can detect the runtime or its configuration file+- The skill exists under a supported one-level skill root with a `SKILL.md` manifest- The MCP server is defined in a supported local config path- Hooks, OTLP settings, or launch environment entries are configured for that runtime- User mode or system mode is reading the config and runtime log you expectdiff --git a/docs/security/data-inventory.mdx b/docs/security/data-inventory.mdxindex caeb22f3..bd4dcbb4 100644--- a/docs/security/data-inventory.mdx+++ b/docs/security/data-inventory.mdx@@ -23,6 +23,18 @@ Beacon writes normalized endpoint events only when supported runtimes provide te| Claude Cowork | Admin-configured OTLP | Prompt, command, tool, and file telemetry when emitted through Claude Cowork OTLP || OpenClaw Gateway | Gateway-configured OTLP/HTTP | OTLP logs, traces, and metrics from the Gateway diagnostics plugin |+## Local Inventory Metadata++`beacon endpoint inventory` can also report local agent configuration metadata that is not emitted by a runtime event:++| Inventory area | Data retained |+|----------------|---------------|+| Configuration files | Runtime, scope, parser status, path/path hash, file hash, modified time, Beacon-managed state, and MCP server counts |+| MCP servers | Runtime, source path hash, server name/hash, transport, command name/hash, argument count, safe env-key names/counts, and definition hash |+| Agent skills | Runtime/source family, scope, skill name/hash, root and manifest path/hash, file hash, modified time, and parser status |++Skill inventory is metadata-only. Beacon hashes `SKILL.md` manifests for change detection but does not retain skill instruction bodies in inventory JSON, dashboard responses, or `skill.inventory` events.+## Required Fields| Field | Meaning |