pluginSkillsFiles not generating home.file entries for first-party plugin skills #11

Closed
opened 2026-02-15 17:04:28 -05:00 by yindo · 1 comment
Owner

Originally created by @schickling on GitHub (Jan 26, 2026).

Description

When using programs.clawdbot.firstParty.<plugin>.enable = true, the plugins are correctly resolved and included in instances.*.plugins, but the skill files are not being generated in home.file.

Expected Behavior

Skills from first-party plugins should be symlinked/copied to ~/.clawdbot/workspace/skills/<plugin-name>/ via home-manager's home.file mechanism.

Actual Behavior

Only the document files (AGENTS.md, SOUL.md, TOOLS.md) appear in home.file under .clawdbot/workspace/. No skill directories are created.

Investigation

  1. Plugins are correctly resolved:
nix eval --json '.#homeConfigurations.<name>.config.programs.clawdbot.instances.default.plugins' | jq 'length'
# Returns: 5 (for summarize, peekaboo, oracle, poltergeist, imsg)
  1. Plugin flakes DO have skills defined:
# From tools/summarize/flake.nix
clawdbotPlugin = {
  name = "summarize";
  skills = [ ./skills/summarize ];
  # ...
};
  1. Skills resolve to valid nix store paths when tested directly:
nix eval --impure --expr 'let flake = builtins.getFlake "github:clawdbot/nix-steipete-tools/e4e2cac...?dir=tools/summarize"; in flake.clawdbotPlugin.skills'
# Returns: [ /nix/store/...-source/tools/summarize/skills/summarize ]
  1. But home.file only shows documents, no skills:
nix eval --json '.#homeConfigurations.<name>.config.home.file' | jq 'keys | map(select(startswith(".clawdbot")))'
# Returns: [".clawdbot/workspace/AGENTS.md", ".clawdbot/workspace/SOUL.md", ".clawdbot/workspace/TOOLS.md"]

Suspected Cause

The pluginSkillsFiles function in nix/modules/home-manager/clawdbot.nix iterates over enabledInstances and calls resolvedPluginsByInstance, but the resulting entries may not be properly merged into home.file.

Relevant code (lines ~420-435):

pluginSkillsFiles =
  let
    entriesForInstance = instName: inst:
      let
        base = "${toRelative (resolvePath inst.workspaceDir)}/skills";
        skillEntriesFor = p:
          map (skillPath: {
            name = "${base}/${p.name}/${builtins.baseNameOf skillPath}";
            value = { source = skillPath; recursive = true; };
          }) p.skills;
        plugins = resolvedPluginsByInstance.${instName} or [];
      in
        lib.flatten (map skillEntriesFor plugins);
  in
    lib.listToAttrs (lib.flatten (lib.mapAttrsToList entriesForInstance enabledInstances));

Environment

  • nix-clawdbot rev: f73c4f3352
  • nix-steipete-tools rev: e4e2cac265de35175015cf1ae836b0b30dddd7b7
  • Platform: macOS (aarch64-darwin)
  • Nix version: 2.28.x

Workaround

Using programs.clawdbot.skills to manually define skills as a workaround.

Originally created by @schickling on GitHub (Jan 26, 2026). ## Description When using `programs.clawdbot.firstParty.<plugin>.enable = true`, the plugins are correctly resolved and included in `instances.*.plugins`, but the skill files are not being generated in `home.file`. ## Expected Behavior Skills from first-party plugins should be symlinked/copied to `~/.clawdbot/workspace/skills/<plugin-name>/` via home-manager's `home.file` mechanism. ## Actual Behavior Only the document files (AGENTS.md, SOUL.md, TOOLS.md) appear in `home.file` under `.clawdbot/workspace/`. No skill directories are created. ## Investigation 1. Plugins are correctly resolved: ```bash nix eval --json '.#homeConfigurations.<name>.config.programs.clawdbot.instances.default.plugins' | jq 'length' # Returns: 5 (for summarize, peekaboo, oracle, poltergeist, imsg) ``` 2. Plugin flakes DO have skills defined: ```nix # From tools/summarize/flake.nix clawdbotPlugin = { name = "summarize"; skills = [ ./skills/summarize ]; # ... }; ``` 3. Skills resolve to valid nix store paths when tested directly: ```bash nix eval --impure --expr 'let flake = builtins.getFlake "github:clawdbot/nix-steipete-tools/e4e2cac...?dir=tools/summarize"; in flake.clawdbotPlugin.skills' # Returns: [ /nix/store/...-source/tools/summarize/skills/summarize ] ``` 4. But `home.file` only shows documents, no skills: ```bash nix eval --json '.#homeConfigurations.<name>.config.home.file' | jq 'keys | map(select(startswith(".clawdbot")))' # Returns: [".clawdbot/workspace/AGENTS.md", ".clawdbot/workspace/SOUL.md", ".clawdbot/workspace/TOOLS.md"] ``` ## Suspected Cause The `pluginSkillsFiles` function in `nix/modules/home-manager/clawdbot.nix` iterates over `enabledInstances` and calls `resolvedPluginsByInstance`, but the resulting entries may not be properly merged into `home.file`. Relevant code (lines ~420-435): ```nix pluginSkillsFiles = let entriesForInstance = instName: inst: let base = "${toRelative (resolvePath inst.workspaceDir)}/skills"; skillEntriesFor = p: map (skillPath: { name = "${base}/${p.name}/${builtins.baseNameOf skillPath}"; value = { source = skillPath; recursive = true; }; }) p.skills; plugins = resolvedPluginsByInstance.${instName} or []; in lib.flatten (map skillEntriesFor plugins); in lib.listToAttrs (lib.flatten (lib.mapAttrsToList entriesForInstance enabledInstances)); ``` ## Environment - nix-clawdbot rev: f73c4f33526869d346c8b6d46a6e6f758b8b64e8 - nix-steipete-tools rev: e4e2cac265de35175015cf1ae836b0b30dddd7b7 - Platform: macOS (aarch64-darwin) - Nix version: 2.28.x ## Workaround Using `programs.clawdbot.skills` to manually define skills as a workaround.
yindo closed this issue 2026-02-15 17:04:28 -05:00
Author
Owner

@joshp123 commented on GitHub (Feb 4, 2026):

[🤖 this message brought to you by codex] should be fixed in 952a04f3 (pluginSkillsFiles now wired into home.file). Closing for now — come and yell at me in #golden-path-deployments on discord if you're still having issues! Stability work continues; we are making this better every week.

@joshp123 commented on GitHub (Feb 4, 2026): [🤖 this message brought to you by codex] should be fixed in 952a04f3 (pluginSkillsFiles now wired into home.file). Closing for now — come and yell at me in #golden-path-deployments on discord if you're still having issues! Stability work continues; we are making this better every week.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/nix-openclaw#11