About conventions
conventions is a CLI that checks commit messages against Philtz conventions, called by a repository’s `.vite-hooks/commit-msg` hook. It can prioritize a repository-local `.github/conventions.yml` and is distributed as a skill.
Key features
- 01Checks messages against Philtz conventions
- 02Supports repository-specific convention files
- 03Runs from a commit-msg hook
- 04No dependencies; requires Node 22+
Use cases
- 01Validate commit message format before submission
- 02Apply repository-specific rules across repositories
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ philtzjp/ skills --skill conventionsAfter installing, type/conventionsin Claude Code to confirm it loaded.
Bundled filescli.mjsconventions.yml
Details
From the project READMEconventions
コミットメッセージを、Philtz の規約で検査する CLI です。各リポジトリの .vite-hooks/commit-msg が呼びます。
このスキルの中身は、philtzjp/organizer-bot の packages/conventions と、philtzjp/.github の conventions.yml から philtz-organizer-bot が写しています。ここを直接編集しないでください。次に写したときに上書きされます。
中身
cli.mjs: 検査器。依存がなく、Node 22 以上だけで動くconventions.yml: 規約。作業中のリポジトリに.github/conventions.ymlがあれば、そちらを優先する
hook から呼ぶ
#!/bin/sh
cli=.agents/skills/conventions/cli.mjs
if [ ! -f "$cli" ]; then
echo "書式の検査器がありません。AGENTS.md の手順でスキルを入れてください"
exit 1
fi
exec node "$cli" commit-msg "$1"
検査器がないときに黙って通すと、検査が効いているように見えて効いていない状態になります。止めて、スキルを入れる手順を出してください。
検査に落ちたとき
- 出たメッセージに従ってコミットメッセージを直す。書き方は github スキルに従う。
--no-verifyで hook を迂回しない。- 規約がおかしいと思ったら、philtzjp/.github の
conventions.ymlを直す Issue を起票する。このスキルや hook に規則を書き足さない。
Comments
Markdown supported