mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-16 02:05:03 +00:00
chore: general maintenance and cleanup (#306)
This commit is contained in:
14
.claude/agents/code-reviewer.md
Normal file
14
.claude/agents/code-reviewer.md
Normal 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).
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
38
.claude/skills/yaml-validate/SKILL.md
Normal file
38
.claude/skills/yaml-validate/SKILL.md
Normal 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
|
||||
Reference in New Issue
Block a user