python-odoo-cursor-rules — Claude Code skill: Python and Odoo rules
A rule set for Python and Odoo development: ORM, XML views, module architecture. Useful when the agent writes ERP code.
npx skills add Mindrally/skills --skill python-odoo-cursor-rules -a claude-codeWhat python-odoo-cursor-rules does
The skill tells the agent to act as an expert in Python, Odoo and enterprise business applications. Inside is a list of rules: models inheriting from models.Model, API decorators like @api.model, @api.depends and @api.onchange, form, tree, kanban and calendar views in XML, view inheritance through <xpath> and <field>, controllers with @http.route, QWeb templates for reports.
Separate sections cover error handling and validation: ValidationError and UserError exceptions, @api.constrains checks, _logger for debug output, tests on Odoo's own framework. Performance gets its own block — domain filters, context parameters, computed fields, caching, moving long tasks to scheduled actions.
Security is described through ACLs and record rules in XML, translations through _(). To extend existing code the skill points at inheritance instead of editing core. Worth installing if the project already runs on Odoo: the rules lean on its ORM and module layout, so plain Python or Django work gains nothing here.
What it helps with
- define an Odoo model with the ORM and API decorators
- build a form or kanban view in XML and extend it by inheritance
- lock a model down with ACLs and record rules
- move a long-running task into a scheduled action
- catch broken data integrity with
@api.constrains
Example prompts for the agent
- Define a
sale.order.linemodel with a computed total and a constraint against negative quantities - Add a field to an existing form through XML inheritance without touching core
- Set up ACLs and a record rule for the new model in
ir.model.access.csv
How to install python-odoo-cursor-rules
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-odoo-cursor-rules -a claude-code2Manually: put the files in place
~/.claude/skills/python-odoo-cursor-rules/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/python-odoo-cursor-rules/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-odoo-cursor-rules -a codex2Manually: put the files in place
.agents/skills/python-odoo-cursor-rules/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-odoo-cursor-rules -a cursor2Manually: put the files in place
.cursor/skills/python-odoo-cursor-rules/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills python-odoo-cursor-rules2Manually: put the files in place
.github/skills/python-odoo-cursor-rules/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-odoo-cursor-rules -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path python-odoo-cursor-rulesManually: put the files in place
.devin/skills/python-odoo-cursor-rules/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-odoo-cursor-rules -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about python-odoo-cursor-rules
How do I install python-odoo-cursor-rules in Claude?
Run npx skills add Mindrally/skills --skill python-odoo-cursor-rules -a claude-code. The skill file lands at ~/.claude/skills/python-odoo-cursor-rules/SKILL.md.
What does python-odoo-cursor-rules do?
It gives the agent development rules for Python and Odoo: ORM work, XML views, controllers, security, tests. Answers follow Odoo conventions more closely.
Which platforms support this skill?
It installs into Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. GitHub Copilot uses a different command: gh skill install Mindrally/skills python-odoo-cursor-rules.
Source text
SKILL.md · Apache-2.0
--- name: python-odoo-cursor-rules description: Guidelines for Python and Odoo enterprise application development with ORM, XML views, and module architecture best practices. metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Python and Odoo Development You are an expert in Python, Odoo, and enterprise business application development. ## Key Principles - Write clear, technical responses with precise Odoo examples in Python, XML, and JSON - Leverage Odoo's built-in ORM, API decorators, and XML view inheritance - Prioritize readability and maintainability; follow PEP 8 - Use descriptive model, field, and function names - Structure modules with separation of concerns: models, views, controllers, data, security ## Odoo/Python Guidelines - Define models using Odoo's ORM by inheriting from `models.Model` - Use API decorators: `@api.model`, `@api.multi`, `@api.depends`, `@api.onchange` - Create and customize UI views using XML for forms, trees, kanban, calendar, and graph views - Use XML inheritance (via `<xpath>`, `<field>`, etc.) to extend existing views - Implement web controllers using the `@http.route` decorator - Organize modules with well-documented `__manifest__.py` files - Leverage QWeb for dynamic HTML templating in reports ## Error Handling and Validation - Use Odoo's built-in exceptions (`ValidationError`, `UserError`) - Enforce data integrity with `@api.constrains` - Use try-except blocks for business logic and controller operations - Use Odoo's logging system (`_logger`) for debug and error details - Write tests using Odoo's testing framework ## Odoo-Specific Guidelines - Use XML for defining UI elements and configuration files - Define robust ACLs and record rules in XML for security - Enable i18n by marking translatable strings with `_()` - Use automated actions and scheduled actions for background processing - Extend using Odoo's inheritance mechanisms rather than modifying core code ## Performance Optimization - Optimize ORM queries with domain filters, context parameters, and computed fields - Utilize caching for static or rarely updated data - Offload long-running tasks to scheduled actions or async job queues - Simplify XML views by leveraging inheritance ## Key Conventions 1. Follow Odoo's "Convention Over Configuration" approach 2. Prioritize security with ACLs, record rules, and data validations 3. Maintain modular structure separating models, views, controllers 4. Write comprehensive tests and clear documentation 5. Use Odoo's built-in features and extend through inheritance
© Mindrally · Apache-2.0 · Mindrally/skills