From 9059a739a03f871b469ba252308569681ce32961 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sat, 22 Nov 2025 09:32:54 -0800 Subject: [PATCH] [development] Add claude code plugins --- home/home-darwin-work.nix | 1 + home/home-laptop-compact.nix | 1 - home/roles/development/default.nix | 30 ++++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/home/home-darwin-work.nix b/home/home-darwin-work.nix index 525902e..823e808 100644 --- a/home/home-darwin-work.nix +++ b/home/home-darwin-work.nix @@ -222,6 +222,7 @@ in home.roles = { base.enable = true; + development.enable = true; }; imports = [ diff --git a/home/home-laptop-compact.nix b/home/home-laptop-compact.nix index 6fe5fb1..d044c70 100644 --- a/home/home-laptop-compact.nix +++ b/home/home-laptop-compact.nix @@ -32,5 +32,4 @@ ./modules/plasma-manager ./modules/tmux ]; - } diff --git a/home/roles/development/default.nix b/home/roles/development/default.nix index 024bb26..87b82f7 100644 --- a/home/roles/development/default.nix +++ b/home/roles/development/default.nix @@ -4,6 +4,16 @@ with lib; let cfg = config.home.roles.development; + + # Fetch the claude-plugins repository + # Update the rev to get newer versions of the commands + claudePluginsRepo = builtins.fetchGit { + url = "https://github.com/jeffh/claude-plugins.git"; + # To update: change this to the latest commit hash + # You can find the latest commit at: https://github.com/jeffh/claude-plugins/commits/main + rev = "5e3e4d937162185b6d78c62022cbfd1c8ad42c4c"; + ref = "main"; + }; in { options.home.roles.development = { @@ -21,6 +31,26 @@ in programs.kubectl-secure.enable = true; + # Install Claude Code humanlayer command plugins + home.activation.claudeCodeCommands = lib.hm.dag.entryAfter ["writeBoundary"] '' + # Clean up old plugin-installed commands to avoid duplicates + rm -f ~/.claude/commands/humanlayer:* 2>/dev/null || true + + # Create commands directory if it doesn't exist + mkdir -p ~/.claude/commands + + # Copy all humanlayer command files + for file in ${claudePluginsRepo}/humanlayer/commands/*.md; do + if [ -f "$file" ]; then + filename=$(basename "$file" .md) + # Create symlink with the namespace prefix + ln -sf "$file" ~/.claude/commands/humanlayer:''${filename}.md + fi + done + + $DRY_RUN_CMD echo "Claude Code humanlayer commands installed successfully" + ''; + # Note: modules must be imported at top-level home config }; }