diff --git a/.claude/settings.json b/.claude/settings.json index 46504f4..8f8eede 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -18,6 +18,10 @@ { "type": "command", "command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && [ -f \"$fp\" ] && case \"$fp\" in *.sh|*/bin/*) head -1 \"$fp\" | grep -qE '^#!.*(ba)?sh' && command -v shfmt > /dev/null && shfmt -i 2 -bn -ci -sr -fn -w \"$fp\";; esac; exit 0" + }, + { + "type": "command", + "command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && [ -f \"$fp\" ] && case \"$fp\" in *.fish) command -v fish_indent > /dev/null && fish_indent -w \"$fp\";; esac; exit 0" } ] } diff --git a/.claude/skills/fish-validate/SKILL.md b/.claude/skills/fish-validate/SKILL.md new file mode 100644 index 0000000..05116ec --- /dev/null +++ b/.claude/skills/fish-validate/SKILL.md @@ -0,0 +1,38 @@ +--- +name: fish-validate +description: >- + Validate fish scripts after editing. + Apply when writing or modifying any .fish file + in config/fish/. +user-invocable: false +allowed-tools: Bash, Read +--- + +After editing any `.fish` file in `config/fish/`, validate it: + +## 1. Syntax check + +```bash +fish --no-execute +``` + +If syntax check fails, fix the issue before proceeding. + +## 2. Format check + +Run `fish_indent` to verify formatting: + +```bash +fish_indent --check +``` + +If formatting differs, apply it: + +```bash +fish_indent -w +``` + +## Key files to never validate + +- Files inside `config/fish/functions/` prefixed with `_tide_` + (managed by the tide prompt plugin) diff --git a/.claude/skills/lua-format/SKILL.md b/.claude/skills/lua-format/SKILL.md new file mode 100644 index 0000000..4563dec --- /dev/null +++ b/.claude/skills/lua-format/SKILL.md @@ -0,0 +1,22 @@ +--- +name: lua-format +description: >- + Format Lua files after editing. + Apply when writing or modifying any .lua file. +user-invocable: false +allowed-tools: Bash +--- + +After editing any `.lua` file, format it with stylua: + +```bash +stylua +``` + +Project settings are in `stylua.toml` (90-char line length). + +If stylua is not available, skip formatting silently. + +## Files to never format + +- Files inside `config/nvim/` managed by plugins (lazy.nvim lockfile)