chore: general maintenance and cleanup (#306)

This commit is contained in:
2026-03-15 19:14:36 +02:00
committed by GitHub
parent 2410f343c2
commit 8a5c9f9089
27 changed files with 316 additions and 759 deletions

View File

@@ -0,0 +1,14 @@
---
name: code-reviewer
description: Reviews shell/fish/lua changes for correctness and style
tools: [Read, Grep, Glob, Bash]
---
Review the changed files for:
1. **Shell scripts**: POSIX compliance for /bin/sh scripts, proper quoting, shellcheck issues
2. **Fish files**: fish syntax correctness, consistent function patterns
3. **Lua files**: stylua compliance, Neovim API usage patterns
4. **All**: EditorConfig compliance (2-space indent, LF endings)
Report only high-confidence issues. Skip vendor files (fzf-tmux).

View File

@@ -22,6 +22,10 @@
{
"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"
},
{
"type": "command",
"command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && [ -f \"$fp\" ] && case \"$fp\" in *.lua) command -v stylua > /dev/null && stylua \"$fp\";; esac; exit 0"
}
]
}

View File

@@ -0,0 +1,38 @@
---
name: yaml-validate
description: >-
Validate YAML files after editing.
Apply when writing or modifying any .yml or .yaml file.
user-invocable: false
allowed-tools: Bash, Read
---
After editing any YAML file, validate it:
## 1. Syntax check
Run yamllint on the file:
```bash
yamllint <file>
```
If yamllint is not available, fall back to:
```bash
python3 -c "import yaml; yaml.safe_load(open('<file>'))"
```
## 2. GitHub Actions workflows
If the file is under `.github/workflows/`, also run:
```bash
actionlint <file>
```
If actionlint is not available, skip silently.
## Files to skip
- `config/gh/hosts.yml` — managed by `gh` CLI, not hand-edited