Skip to content

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

@schickling

Description

@schickling

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: f73c4f3
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions