zhlinh/linthis-plugin-template/lt-cmsg
Claude Code and agent skill by zhlinh/linthis-plugin-template
- community
Checking that the SKILL.md file is still in the repository.
通过 linthis cmsg 校验并自动修复 git 提交信息格式。 校验规则以 .linthis/config.toml [cmsg] 配置为准(默认为 Conventional Commits 规范)。 校验失败时分析 diff 和报错提示自动改写提交信息,匹配近期提交历史的语言风格(中文/英文)。 由 linthis 的 commit-msg git hook 触发。 Validate and auto-fix git commit messages via linthis cmsg. Validation rules are driven by .linthis/config.toml [cmsg] (defaults to Conventional Commits). On failure, rewrites the message based on linthis error output and staged diff analysis. If the lt-lint skill also exists, both should be invoked together when committing.
Install
npx vskill@latest install zhlinh/linthis-plugin-template/lt-cmsgSKILL.md
The same SKILL.md was published earlier as zhlinh/linthis-plugin-template/lt-cmsg.
Linthis Commit Message Skill
Companion Skills
When the user asks to commit, if the lt-lint skill is also available, both lt-lint and lt-cmsg should be invoked together. Run lt-lint first (to fix code issues), then lt-cmsg (to validate the commit message).
Goal
Ensure every commit message follows Conventional Commits format and accurately reflects the actual code changes. A well-structured commit history makes code review, changelog generation, and git bisect much easier.
When to Skip
If linthis cmsg .git/COMMIT_EDITMSG passes on the first run, approve immediately with ✅ Commit message OK.
Configuration
The validation pattern can be configured in .linthis/config.toml (project-level) or the global linthis config. If no config is present, linthis cmsg defaults to Conventional Commits format:
linthis cmsg resolves config automatically (project → global → built-in default). To check the effective pattern quickly:
Steps
- Run
linthis cmsg .git/COMMIT_EDITMSG— this is the authoritative validator and reads.linthis/config.tomlautomatically - If linthis cmsg passes → output
✅ Commit message OKand approve immediately - If linthis cmsg fails → read the error output to understand what rule was violated, then:
- Run
git diff --cached --statto understand what files actually changed — the type prefix must match the actual diff - Run
git log -n 5 --onelineto check the recent commit style and language (Chinese or English) — match that language for consistency - Automatically rewrite
.git/COMMIT_EDITMSGbased on the linthis error hints + diff analysis — do NOT ask for confirmation
- Re-run
linthis cmsg .git/COMMIT_EDITMSGto confirm the rewrite passes
Type Selection Guide
Select the type by examining what the staged diff actually contains, not by guessing from the message text:
| Type | When to use | Example diff pattern | |
|---|---|---|---|
| feat | New feature or functionality | New files, new exported functions/endpoints | |
| fix | Bug fix | Changed condition/logic in existing code | |
| refactor | Code restructured, no behavior change | Renamed, moved, or reorganized code | |
| perf | Performance improvement | Algorithm change, caching, reduced allocations | |
| docs | Documentation only | .md files, comments only | |
| style | Formatting, whitespace, lint fixes | No logic change | |
| test | Adding or updating tests | _test. files | |
| build | Build scripts, deps, CI config | Makefile, package.json, go.mod | |
| chore | Maintenance, tooling | Config not affecting src |
Examples
Good messages:
Bad → Fixed:
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinghooks/agent/plugins/_default/lt/skills/lt-cmsg/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/zhlinh/linthis-plugin-template/lt-cmsg)