본문으로 건너뛰기
cccskills
무료GitHub에 공개

odoo-commit

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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:

    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:

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>.

  1. Before opening a pull request, squash your own back-and-forth commits into one clean commit per logical change (per OCA guidelines): 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:

    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.

  2. 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:

[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

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

dtg-base

무료

Complete reference for DTG Base module utilities and helpers. DTGBase is an abstract model providing common utility methods for date/time handling, barcode generation, timezone conversion, file operations, and more.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

unclecatvn/agent-skills1472026년 10월 16일 업데이트

odoo-16

무료

Odoo 16 development reference for Python models and ORM (search, domain, read_group, compute fields), XML/CSV data and views, OWL/JS client code, QWeb reports, security (ACL, record rules, groups), cron and server actions, migrations and module upgrades, tests, i18n, and performance. Use this skill whenever work involves Odoo 16 or custom addons—even if the user only pastes a traceback, mentions addons/ or __manifest__.py, describes form/tree/kanban/XML errors, HTTP controllers, or business rules on models—including building features, fixing bugs, refactoring, or reviewing addon code. Includes CSS/SCSS asset authoring and review for Odoo addons.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

unclecatvn/agent-skills1472026년 10월 16일 업데이트

odoo-17

무료

Odoo 17 development reference for Python models and ORM (search, domain, read_group, compute fields), XML/CSV data and views, OWL/JS client code, QWeb reports, security (ACL, record rules, groups), cron and server actions, migrations and module upgrades, tests, i18n, and performance. Use this skill whenever work involves Odoo 17 or custom addons—even if the user only pastes a traceback, mentions addons/ or __manifest__.py, describes form/tree/kanban/XML errors, HTTP controllers, or business rules on models—including building features, fixing bugs, refactoring, or reviewing addon code. Includes CSS/SCSS asset authoring and review for Odoo addons.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

unclecatvn/agent-skills1472026년 10월 16일 업데이트

odoo-18

무료

Odoo 18 development reference for Python models and ORM (search, domain, read_group, compute fields), XML/CSV data and views, OWL/JS client code, QWeb reports, security (ACL, record rules, groups), cron and server actions, migrations and module upgrades, tests, i18n, and performance. Use this skill whenever work involves Odoo 18 or custom addons—even if the user only pastes a traceback, mentions addons/ or __manifest__.py, describes form/list/kanban/XML errors, HTTP controllers, or business rules on models—including building features, fixing bugs, refactoring, or reviewing addon code. Includes CSS/SCSS asset authoring and review for Odoo addons.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

unclecatvn/agent-skills1472026년 10월 16일 업데이트

odoo-19

무료

Odoo 19 development knowledge base with 18 specialized guides covering Actions (ir.actions.*, cron jobs, server actions), Controllers (HTTP routing, endpoints, auth types), Data files (XML/CSV records, shortcuts, noupdate), API Decorators (@api.depends, @api.constrains, @api.ondelete, @api.onchange, @api.model, @api.private), SQL Constraints (models.Constraint replacing _sql_constraints), Database Indexes (models.Index), Module development (manifest, wizards, reports), Field types (Char, Text, Monetary, relational fields), Manifest configuration (__manifest__.py, dependencies, asset bundles), Mixins (mail.thread, mail.activity.mixin, mail.alias.mixin, utm.mixin), ORM Model methods (search, CRUD, domain filters, recordsets, CamelCase model naming), Migration scripts (pre/post/end hooks, data migration), OWL frontend components (hooks, services, lifecycle), Performance optimization (N+1 prevention, batch ops, _read_group), QWeb Reports (PDF/HTML, paper formats, barcodes, t-out), Security/ACL (record rules, field permissions, privilege-based groups, @api.private), Testing (TransactionCase, HttpCase, mocking, query count assertions), Transactions (savepoints, UniqueViolation, serialization failures), Translations (i18n, PO files, translatable fields), XML Views (list/form/search, kanban card templates, xpath inheritance, QWeb templates). Use when writing, reviewing, or debugging any Odoo 19 Python or XML code, creating or modifying modules, fixing performance issues, or looking up Odoo 19 API patterns and best practices. Includes CSS/SCSS asset authoring and review for Odoo addons.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

unclecatvn/agent-skills1472026년 10월 16일 업데이트

Mandatory pre-code gate and definition-of-done for ANY Odoo change (add field, override method, inherit view/xpath, OWL/JS patch, wizard, cron, controller, report, security, migration, bug fix, refactor, "optimize", "clean code", "stick to base"), Odoo 16-19. Also when the user pastes an Odoo traceback or install/upgrade error (ParseError "cannot be located in parent view", "Field ... does not exist", missing xmlid) or asks where an Odoo model, field, method, view or xmlid is defined. Run BEFORE brainstorming or planning: Odoo design questions are answered by tracing the real source into a Context Brief (file:line), not by open-ended Q&A or memory. Resolves the Odoo runtime and version, loads the matching odoo-<major> pack, and closes with install, test, upgrade, i18n, security and hygiene checks before commit.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

unclecatvn/agent-skills1472026년 10월 16일 업데이트

unclecatvn의 스킬 모두 보기

이 스킬의 문제 신고