claude commands
This commit is contained in:
@@ -9,45 +9,53 @@
|
||||
@anthropic-ai/claude-code
|
||||
'';
|
||||
|
||||
# Create writable commands directory and symlink individual command files
|
||||
home.activation.claudeCommandsDir = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
# Create writable commands/skills directories and symlink files
|
||||
home.activation.claudeCommandsDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
COMMANDS_DIR="$HOME/.claude/commands"
|
||||
SKILLS_DIR="$HOME/.claude/skills"
|
||||
SETTINGS_FILE="$HOME/.claude/settings.json"
|
||||
|
||||
# Remove old symlink if it exists
|
||||
# Remove old symlinks if they exist
|
||||
if [ -L "$COMMANDS_DIR" ]; then
|
||||
$DRY_RUN_CMD rm -f "$COMMANDS_DIR"
|
||||
fi
|
||||
if [ -L "$SKILLS_DIR" ]; then
|
||||
$DRY_RUN_CMD rm -f "$SKILLS_DIR"
|
||||
fi
|
||||
|
||||
# Create the directory if it doesn't exist
|
||||
# Create directories
|
||||
$DRY_RUN_CMD mkdir -p "$COMMANDS_DIR"
|
||||
$DRY_RUN_CMD mkdir -p "$SKILLS_DIR"
|
||||
|
||||
# Symlink individual command files from nix store
|
||||
# Commands
|
||||
$DRY_RUN_CMD ln -sf ${./commands/merge.md} "$COMMANDS_DIR/merge.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/update.md} "$COMMANDS_DIR/update.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/work.md} "$COMMANDS_DIR/work.md"
|
||||
|
||||
# Agents (adapted from opencode)
|
||||
$DRY_RUN_CMD ln -sf ${./commands/designer-bold.md} "$COMMANDS_DIR/designer-bold.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/designer.md} "$COMMANDS_DIR/designer.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/analyze-branch.md} "$COMMANDS_DIR/analyze-branch.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/oracle.md} "$COMMANDS_DIR/oracle.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/librarian.md} "$COMMANDS_DIR/librarian.md"
|
||||
# Skills: agents (adapted from opencode)
|
||||
$DRY_RUN_CMD mkdir -p "$SKILLS_DIR"/{designer-bold,designer,analyze-branch,oracle,librarian}
|
||||
$DRY_RUN_CMD ln -sf ${./skills/designer-bold/SKILL.md} "$SKILLS_DIR/designer-bold/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/designer/SKILL.md} "$SKILLS_DIR/designer/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/analyze-branch/SKILL.md} "$SKILLS_DIR/analyze-branch/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/oracle/SKILL.md} "$SKILLS_DIR/oracle/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/librarian/SKILL.md} "$SKILLS_DIR/librarian/SKILL.md"
|
||||
|
||||
# Skills (adapted from opencode)
|
||||
$DRY_RUN_CMD ln -sf ${./commands/git-master.md} "$COMMANDS_DIR/git-master.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/planning-with-files.md} "$COMMANDS_DIR/planning-with-files.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/react-patterns.md} "$COMMANDS_DIR/react-patterns.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/vercel-react-best-practices.md} "$COMMANDS_DIR/vercel-react-best-practices.md"
|
||||
# Skills: knowledge (adapted from opencode)
|
||||
$DRY_RUN_CMD mkdir -p "$SKILLS_DIR"/{git-master,planning-with-files,react-patterns,vercel-react-best-practices}
|
||||
$DRY_RUN_CMD ln -sf ${./skills/git-master/SKILL.md} "$SKILLS_DIR/git-master/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/planning-with-files/SKILL.md} "$SKILLS_DIR/planning-with-files/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/react-patterns/SKILL.md} "$SKILLS_DIR/react-patterns/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/vercel-react-best-practices/SKILL.md} "$SKILLS_DIR/vercel-react-best-practices/SKILL.md"
|
||||
|
||||
# Commands (adapted from opencode)
|
||||
$DRY_RUN_CMD ln -sf ${./commands/smart-debug.md} "$COMMANDS_DIR/smart-debug.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/tdd-cycle.md} "$COMMANDS_DIR/tdd-cycle.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/security-scan.md} "$COMMANDS_DIR/security-scan.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/issue.md} "$COMMANDS_DIR/issue.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/remove-deadcode.md} "$COMMANDS_DIR/remove-deadcode.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/worktree-compare.md} "$COMMANDS_DIR/worktree-compare.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/worktree-list.md} "$COMMANDS_DIR/worktree-list.md"
|
||||
# Skills: workflows (adapted from opencode)
|
||||
$DRY_RUN_CMD mkdir -p "$SKILLS_DIR"/{smart-debug,tdd-cycle,security-scan,issue,remove-deadcode,worktree-compare,worktree-list}
|
||||
$DRY_RUN_CMD ln -sf ${./skills/smart-debug/SKILL.md} "$SKILLS_DIR/smart-debug/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/tdd-cycle/SKILL.md} "$SKILLS_DIR/tdd-cycle/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/security-scan/SKILL.md} "$SKILLS_DIR/security-scan/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/issue/SKILL.md} "$SKILLS_DIR/issue/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/remove-deadcode/SKILL.md} "$SKILLS_DIR/remove-deadcode/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/worktree-compare/SKILL.md} "$SKILLS_DIR/worktree-compare/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/worktree-list/SKILL.md} "$SKILLS_DIR/worktree-list/SKILL.md"
|
||||
|
||||
# Copy settings.json to make it writable (only if it doesn't exist or is a symlink)
|
||||
if [ -L "$SETTINGS_FILE" ] || [ ! -f "$SETTINGS_FILE" ]; then
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
clang
|
||||
];
|
||||
|
||||
home.sessionPath = [ "\${CARGO_HOME:-~/.cargo}/bin" ];
|
||||
home.sessionPath = [ "\${CARGO_HOME:-$HOME/.cargo}/bin" ];
|
||||
|
||||
home.file.".cargo/config.toml".text = ''
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
export PATH="$HOME/.bin:$PATH"
|
||||
export PATH="''${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
|
||||
export FOUNDRY_DISABLE_NIGHTLY_WARNING=true
|
||||
export LD_LIBRARY_PATH=${pkgs.icu}/lib:${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=${pkgs.zlib}/lib:${pkgs.icu}/lib:${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH
|
||||
|
||||
function y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||
|
||||
Reference in New Issue
Block a user