GroundRules: Skill for Claude Code

.agents/archive/v3/skill_odoo-discipline/skills/odoo-test-writer/SKILL.md

odoo-test-writer is a skill for Claude Code, Codex from chama-x/GroundRules. It costs 66 tokens per session (817 once invoked), scanned A, original, MIT.

A guide for writing tests for custom Odoo modules using Odoo’s built-in testing tools. It covers business logic, forms, access rules, controllers, reports, workflows, and integrations.

In plain words
What is it for?
Use it to add or improve tests for models, invoices, form interactions, HTTP and website flows, permissions, external APIs, and other Odoo behavior.
Why use it?
It helps developers check that an Odoo module behaves correctly and catch regressions when code changes. It also helps choose a suitable test type for each part of the module.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is chama-x/GroundRules's own configuration. It tells Claude Code and Codex how to work on GroundRules itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything GroundRules configures →

Reuse

Borrowing it

Nothing to install: this file belongs to chama-x/GroundRules. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/chama-x/GroundRules/master/.agents/archive/v3/skill_odoo-discipline/skills/odoo-test-writer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/chama-x/GroundRules

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for odoo-test-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/chama-x/groundrules/odoo-test-writer.svg)](https://agentmods.dev/skills/chama-x/groundrules/odoo-test-writer)
Your own site
<a href="https://agentmods.dev/skills/chama-x/groundrules/odoo-test-writer"><img src="https://agentmods.dev/badge/skills/chama-x/groundrules/odoo-test-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 817 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.00817
Opus 5 $0.00033 $0.00409
Sonnet 5 $0.00013 $0.00163
Haiku 4.5 $0.00007 $0.00082

Measured 6d ago against content hash 82d5f0979e14, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

odoo-test-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/archive/v3/skill_odoo-discipline/skills/odoo-test-writer/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Odoo Test Writer

Use this skill to add practical tests for Odoo custom modules. Prefer tests at the Odoo behavior seam: ORM flows, constraints, computes, access rules, controllers, reports, forms, workflows, and integration boundaries.

First Move

Before writing tests:

  • Identify the addon/module and target Odoo version.
  • Inspect __manifest__.py, models/, views/, security/, controllers/, report/, static/src/, existing tests/, and relevant docs.
  • If $ODOO_SOURCE is set, inspect local test helpers and framework behavior instead of guessing.

Choose The Test Type

  • Use TransactionCase for most model/business-logic tests. Each test runs in a savepoint and rolls back.
  • Use AccountTestInvoicingCommon for accounting tests needing companies, products, partners, taxes, journals, or invoices.
  • Use Form helper when testing default values, onchanges, form validations, One2many/Many2many form behavior, or user-like form flows.
  • Use HttpCase for browser, tour, website, portal, controller, or full UI flows.
  • Use SingleTransactionCase only for read-only suites or expensive setup where cross-test state is acceptable.
  • Use unittest.mock.patch/MagicMock for external APIs, payment gateways, OAuth, webhooks, file system, time, or slow services. Do not mock Odoo internals unless there is no better seam.

Required Structure

your_module/
├── __init__.py              # Do not import tests here
├── __manifest__.py
├── tests/
│   ├── __init__.py          # Import test modules here
│   ├── common.py            # Optional shared fixtures/helpers
│   └── test_*.py            # Test files

Every new test_*.py must be imported from tests/__init__.py, or the Odoo test runner will not discover it.

Writing Workflow

  1. Map the behavior to prove and the smallest Odoo seam that proves it.
  2. Add or update tests/common.py only for reusable fixtures/helpers.
  3. Create fresh mutable records inside each test unless immutable setup belongs in setUpClass.
  4. Use Arrange, Act, Assert sections in test method body.
  5. Test happy path, validation/error path, and relevant side effects.
  6. For access/security changes, test realistic users/groups/companies with with_user().
  7. For external integrations, patch the boundary where it is used, then assert both state changes and mock calls.
  8. For performance-sensitive code, add assertQueryCount when supported by the target version/test base.
  9. Update tests/__init__.py and manifest dependencies only when evidence requires it.

Read the full file on GitHub · 71 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 71 lines · 66 tokens per session scan A 82d5f0979e14

Subscribe to this mod's changes

odoo-test-writer is a skill published in the GitHub repository chama-x/GroundRules (5 stars, last pushed 23d ago), licensed MIT. It adds 66 tokens to every session and 817 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.