odoo-commit — скилл для Claude Code: что делает и как установить
Скилл odoo-commit формирует коммиты по официальным гайдлайнам Odoo, с тегами модулей, точечным добавлением файлов и чисткой истории перед pull request.
MIT 137 установок ★ 152 обновлён 2026-10-22
npx skills add unclecatvn/agent-skills --skill odoo-commit -a claude-codeЧто делает odoo-commit
Скилл настраивает работу с Git в проектах на Odoo. Перед созданием коммита агент смотрит статус через git diff --stat, git status --short и проверяет локальную историю. Если последнее изменение в непосланном коммите — агент делает git commit --amend вместо пложения лишних точек в истории. Файлы индексируются строго по именам: команды git add . и git add -A запрещены.
Заголовок строится по шаблону [TAG] module: description в повелительном наклонении, без точки на конце и строго до 72 символов (целевой размер около 50). Текст сообщения сначала пишется во временный файл и передаётся через git commit -F. Описание объясняет причину изменения, а не сам диф.
Перед созданием PR скилл рекомендует объединять промежуточные правки через интерактивный ребейз git rebase -i. Из коммитов полностью вычищаются любые следы ИИ: строки Co-Authored-By и пометки генерации Claude отсекаются принудительно.
Какие задачи решает
- сформировать заголовок коммита по правилам Odoo с тегом модуля
- объединить мелкие промежуточные правки в один чистый коммит перед pull request
- исключить случайное добавление лишних файлов мимо индексации по именам
- убрать служебные подписи ИИ-ассистентов из истории Git
Примеры запросов агенту
- Закоммить изменения в модуле account по гайдлайнам Odoo
- Объедини последние три локальных коммита перед отправкой PR
- Сделай amend последнего неотправленного коммита с новыми правками
Как установить odoo-commit
1Через Skills CLI (Vercel)
npx skills add unclecatvn/agent-skills --skill odoo-commit -a claude-code2Вручную: положить файлы
~/.claude/skills/odoo-commit/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/odoo-commit/
1Через Skills CLI (Vercel)
npx skills add unclecatvn/agent-skills --skill odoo-commit -a codex2Вручную: положить файлы
.agents/skills/odoo-commit/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add unclecatvn/agent-skills --skill odoo-commit -a cursor2Вручную: положить файлы
.cursor/skills/odoo-commit/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install unclecatvn/agent-skills skills/odoo-commit2Вручную: положить файлы
.github/skills/odoo-commit/SKILL.md1Через Skills CLI (Vercel)
npx skills add unclecatvn/agent-skills --skill odoo-commit -a gemini-cli2Командой платформы
gemini skills install https://github.com/unclecatvn/agent-skills --path skills/odoo-commitВручную: положить файлы
.devin/skills/odoo-commit/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add unclecatvn/agent-skills --skill odoo-commit -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об odoo-commit
Как установить odoo-commit в Claude Code?
Выполните команду npx skills add unclecatvn/agent-skills --skill odoo-commit -a claude-code. Файл навыка сохранится по пути ~/.claude/skills/odoo-commit/SKILL.md.
Что делает odoo-commit?
Скилл берёт на себя форматирование Git-коммитов по стандартам Odoo, проверяет историю на неотправленные изменения, запрещает добавление файлов скопом и отсекает AI-атрибуцию.
Какие теги использует скилл для коммитов?
Используются официальные теги Odoo, включая [FIX] для исправления ошибок, [REF] для рефакторинга, [ADD] для добавления модулей, [REM] для удаления ресурсов и [IMP] для улучшений.
Исходный текст
SKILL.md · MIT
---
name: odoo-commit
description: >
Guides Odoo-style commit creation following official Odoo git guidelines.
Drafts `[TAG] module: short description` messages, checks whether to amend or
create a new commit, stages files explicitly, commits via `git commit -F`,
and keeps local history clean before PRs. Auto-invokes for commit-related
requests in Odoo repositories and takes priority over generic commit skills.
---
## Workflow
1. Run `git diff --stat` and `git status --short` to see what changed, plus
`git log -1 --oneline` (and `git log @{u}.. --oneline` if a remote-tracking
branch exists) to see the last local commit and whether it's still unpushed.
2. If the change is a direct continuation or fix of that unpushed `HEAD` commit,
skip drafting a new message and fold it in instead of creating a second commit
for the same logical change:
```bash
git add <file>
git commit --amend --no-edit # or drop --no-edit to also revise the message
```
Otherwise, draft a new commit message.
3. Stage relevant files by name - never `git add -A` or `git add .`.
4. Write the commit message to a temporary file, then commit with `git commit -F`:
```bash
cat > /tmp/odoo-commit-message.txt <<'EOF'
[TAG] module: short description
Optional body line.
EOF
git commit -F /tmp/odoo-commit-message.txt
```
Any equivalent temp-file flow is fine (for example, using PowerShell's
`Set-Content` or another editor) as long as the final commit is created with
`git commit -F <file>`.
5. Before opening a pull request, squash your own back-and-forth commits into one
clean commit per logical change (per [OCA guidelines](https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests#mergesquash-your-own-commits)):
the rest of the world doesn't need your intermediate "fix bug 1", "fix bug 2"
history - only the final state and a clear summary. For a single trailing fix,
`git commit --amend` (step 2) is usually enough; for folding several commits
into one, use an interactive rebase instead:
```bash
git rebase -i HEAD~N # N = number of commits to fold
```
Keep the first line as `pick` with the real `[TAG] module: description` message,
mark the rest `fixup` (drop their messages) or `squash` (merge messages):
```
pick 1949129 [IMP] module: Introduce feature A
fixup d2cf643 Fix bug 1 of feature A
fixup 42bd9e8 Fix bug 2 of feature A
fixup 7f767d5 Fix bug 3 of feature A
```
Either way, only rewrite commits that are still local/unpushed, or on a branch
you alone own - never amend or rebase shared history without confirming with
the user first.
6. Report the resulting commit hash and subject.
Do not bypass pre-commit hooks. If a hook fails, fix the issue,
re-stage the changes, and create the commit again.
## Format
```
[TAG] module: short description
Optional body explaining WHY, not what. What is visible in the diff.
Focus on motivation, constraints, and decisions made.
task-XXXX, opw-XXXXXX
```
## Subject Line Rules
- `[TAG] module: description` - tag in brackets, then module name, colon, space, description
- Target the **whole header** (`[TAG] module: description`) at about 50 characters for
readability; 72 is a hard ceiling, not something to aim for
- Self-test: the header must read as a valid sentence after "if applied, this commit
will `<header>`" - e.g. `[IMP] base: prevent to archive users linked to active
partners` -> *"if applied, this commit will prevent to archive users linked to
active partners"*
- Never use single, vague words like "bugfix" or "improvements" as the description -
it must be self-explanatory and state the reason for the change
- Imperative mood: "add", "fix", "remove" - not "added", "fixes"
- No trailing period
- Module = technical module name (e.g. `hhc`, `plc`, `nhso_stddataset`, `imc`)
- Avoid touching multiple modules in one commit - split per module so each can be
reverted independently. If truly unavoidable, list the modules or use `various`
## Tags
- `[FIX]` - bug fix; used in stable versions, also valid for recent dev bugs
- `[REF]` - refactoring: feature heavily rewritten
- `[ADD]` - adding new modules
- `[REM]` - removing resources: dead code, views, modules
- `[REV]` - reverting commits
- `[MOV]` - moving files (no content change; use git mv)
- `[REL]` - release commits: major/minor stable versions
- `[IMP]` - improvements: most incremental dev changes
- `[MERGE]` - merge commits / forward port of bug fixes
- `[CLA]` - signing Odoo Individual Contributor License
- `[I18N]` - translation file changes
- `[PERF]` - performance patches
- `[CLN]` - code cleanup
- `[LINT]` - linting passes
## Body Rules
- Skip body when subject is self-explanatory
- Include body for: non-obvious WHY, breaking changes, migration notes, task references
- **Explain WHY, not WHAT** - the diff already shows what changed. WHAT is only worth
spelling out when a technical choice or trade-off was involved, and then explain
WHY that choice was made
- Don't force brevity for its own sake: official Odoo guidance explicitly says not to
hesitate being verbose when the reasoning deserves it. Every line should still earn
its place - no restating the diff, no filler
- Wrap at 72 characters per line
- Reference task IDs at the end: `task-XXXX`, `opw-XXXXXX`, `Fixes #123`, `Closes #123`
## What Never Goes In
- "This commit does X" - the diff says what
- "I", "we", "now", "currently"
- AI attribution of any kind: `Co-Authored-By: Claude ...` trailers, `Generated with Claude Code`
lines, session links. If the tooling injects one, remove it before committing
- Restating the file name or module when the subject already says it
## Pull Requests
- Title = the commit header (`[TAG] module: description`); one logical change per PR
- Body explains WHY and how it was verified (test command, screenshots for views); the diff shows WHAT
- No AI attribution anywhere in the body: no "Generated with" footer, no `Co-Authored-By`, no session links
- Do not add or edit author/reviewer lines; git already records the author
## Examples
Examples from the [official Odoo git guidelines](https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html):
```
[REF] models: use `parent_path` to implement parent_store
This replaces the former modified preorder tree traversal (MPTT) with the
fields `parent_left`/`parent_right`[...]
```
```
[FIX] account: remove frenglish
[...]
Closes #22793
Fixes #22769
```
```
[FIX] website: remove unused alert div, fixes look of input-group-btn
Bootstrap's CSS depends on the input-group-btn element being the first/last
child of its parent. This was not the case because of the invisible and
useless alert.
```
Header-only, illustrating the "valid sentence" self-test:
```
[IMP] base: prevent to archive users linked to active partners
```
© unclecatvn · MIT · unclecatvn/agent-skills