letzdoo/claude-marketplace/odoo-indexer

Claude Code and agent skill by letzdoo/claude-marketplace

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Fast indexer for Odoo codebases - 95% more token-efficient than reading files. USE AUTOMATICALLY AND PROACTIVELY before ANY Odoo code work. AUTO-TRIGGER when user mentions models (sale.order, res.partner, account.move, etc.), fields (partner_id, name, state, etc.), views (form, tree, kanban), XML IDs, or when you need to search/validate/explore Odoo code. USE BEFORE writing code to validate references exist, USE BEFORE reading files to locate elements, USE DURING debugging to trace dependencies. CRITICAL: Always validate models/fields/xmlids with indexer before using them in code. Provides <100ms searches vs reading 20+ files. Essential for all Odoo development tasks.

Install

npx vskill@latest install letzdoo/claude-marketplace/odoo-indexer

SKILL.md

Odoo Indexer Skill

⚡ PROACTIVE USAGE: This skill should be used automatically when user asks questions about Odoo code structure, models, fields, views, or modules.

Fast indexing and search for Odoo codebase elements with sub-100ms query performance.


When to Auto-Use This Skill

✅ User asks: "What is sale.order?" → AUTO-USE: uv run scripts/get_details.py model "sale.order"

✅ User asks: "What fields does res.partner have?" → AUTO-USE: uv run scripts/get_details.py model "res.partner"

✅ User asks: "Find all Many2one fields in sale module" → AUTO-USE: uv run scripts/search_by_attr.py field --filters '{"field_type":"Many2one"}' --module sale

✅ User asks: "Where is project.task defined?" → AUTO-USE: uv run scripts/search.py "project.task" --type model

✅ User asks: "Does sale.order have partner_id field?" → AUTO-USE: uv run scripts/search.py "partner_id" --type field --parent "sale.order"

✅ User asks: "Search for task views" → AUTO-USE: uv run scripts/search.py "%task%" --type view

✅ User asks: "List all modules" → AUTO-USE: uv run scripts/list_modules.py

✅ User asks: "Tell me about the sale module" → AUTO-USE: uv run scripts/module_stats.py sale


Trigger Keywords

Automatically use this skill when user query contains:

  • "what is" + model/field/view name
  • "what fields" + model name
  • "find" / "search" / "search for" + element type
  • "show me" + element name
  • "where is" + element name
  • "does...have" + model + field
  • "list" + element type
  • "tell me about" + module name
  • "how does" + model/method name
  • "get" / "display" + element info

Prerequisites

This skill requires uv (Python package manager). Usually auto-installed by /odoo-setup.

Manual install (if needed):

bash
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or via Homebrew (macOS)
brew install uv

Configuration

Environment variables (optional - auto-detected by skill):

bash
export ODOO_PATH="$HOME/letzdoo-sh/odoo/custom/src" # Auto-detected if not set
export SQLITE_DB_PATH="$HOME/.odoo-indexer/odoo_indexer.sqlite3" # Default location

The skill auto-detects common Odoo locations:

  1. $ODOO_PATH (if set)
  2. /home/coder/letzdoo-sh/odoo/custom/src
  3. $HOME/odoo/custom/src
  4. ./odoo/custom/src

Initial Setup

Automatic (via /odoo-setup command):

  • Index is built automatically during plugin setup
  • No manual steps needed

Manual (if index not built):

bash
cd odoo-doodba-dev/skills/odoo-indexer
uv run scripts/update_index.py --full

Expected output:

Starting full index rebuild...
Scanning modules... Found 156 modules
Indexing: odoo (core) ████████████ 100%
Indexing: sale ████████████ 100%
...
✓ Indexing complete!
Summary:
- Modules: 156
- Models: 1,247
- Fields: 15,832
Database size: 42.3 MB

Indexing time:

  • Small (50 modules): 1-2 minutes
  • Medium (100-150 modules): 2-5 minutes
  • Large (200+ modules): 5-10 minutes

Core Commands

All commands use uv run from the skills/odoo-indexer/ directory:

1. Search for Elements
bash
# Search models
uv run scripts/search.py "sale.order" --type model
# Search fields in a module
uv run scripts/search.py "partner_id" --type field --module sale
# Search with wildcards (supports SQL LIKE patterns)
uv run scripts/search.py "action_view_%" --type action
# Limit results for performance
uv run scripts/search.py "sale%" --type model --limit 10

Parameters:

  • query: Search term (supports % wildcards)
  • --type: Element type (model/field/function/view/action/menu)
  • --module: Filter by module name
  • --parent: Filter by parent (e.g., model name for fields)
  • --limit: Max results (default: 20)
  • --offset: Pagination offset (default: 0)
  • --json: Output as JSON

Performance: <50ms for exact match, <100ms for wildcard search


2. Get Element Details

Get complete information about a specific element:

bash
# Model details (all fields, methods, views, actions)
uv run scripts/get_details.py model "sale.order"
# Field details (type, attributes, usage)
uv run scripts/get_details.py field "partner_id" --parent "sale.order"
# View details (structure, inheritance)
uv run scripts/get_details.py view "sale_order_form_view" --module sale

Returns:

  • Full element definition
  • All attributes and properties
  • Related elements (views, actions, menus)
  • File location and line numbers
  • Usage statistics

Performance: <30ms


3. List Modules
bash
# List all indexed modules
uv run scripts/list_modules.py
# Filter by pattern
uv run scripts/list_modules.py --pattern "sale*"

Returns:

  • Module name
  • Number of models, fields, views
  • Installation status
  • Location

4. Module Statistics
bash
# Detailed module info
uv run scripts/module_stats.py sale

Returns:

  • Total elements (models, fields, views, actions, menus)
  • Main models with field counts
  • Dependencies and dependents
  • Installation path
  • Index status

5. Find References

Find all locations where an element is used:

bash
# Find all references to a model
uv run scripts/find_refs.py model "sale.order"
# Find field references
uv run scripts/find_refs.py field "partner_id" --ref-type definition

Reference types:

  • definition - Where element is defined
  • inheritance - Where element is inherited
  • override - Where element is overridden
  • reference - Where element is referenced

6. Search by Attribute

Advanced search using element attributes:

bash
# Find all Many2one fields
uv run scripts/search_by_attr.py field --filters '{"field_type": "Many2one"}'
# Find transient models
uv run scripts/search_by_attr.py model --filters '{"model_type": "transient"}' --module sale
# Find form views
uv run scripts/search_by_attr.py view --filters '{"view_type": "form"}'
# Combine filters
uv run scripts/search_by_attr.py field --filters '{"field_type": "Many2one", "required": true}' --module sale

Common filters:

  • Fields: field_type, required, readonly, compute, store
  • Models: model_type (model/transient/abstract), inherit
  • Views: view_type (form/list/search/kanban/calendar/pivot/graph)

7. Search XML IDs
bash
# Search XML IDs with wildcards
uv run scripts/search_xml_id.py "action_view_%"
# Exact XML ID in module
uv run scripts/search_xml_id.py "sale_order_form_view" --module sale

Returns:

  • Full XML ID (with module prefix)
  • Element type (action/view/menu/etc)
  • Target model (if applicable)
  • File location

Important: Always use the full XML ID returned (with module prefix) in ref() calls.


8. Update Index

Keep the index up-to-date with code changes:

bash
# Incremental update (fast - only changed files)
uv run scripts/update_index.py
# Full rebuild (slow - all files)
uv run scripts/update_index.py --full
# Index specific modules
uv run scripts/update_index.py --modules "sale,account,stock"
# Clear and rebuild
uv run scripts/update_index.py --clear --full

When to update:

  • After installing new modules
  • After major code changes
  • After git pull with many changes
  • Weekly (for active development)

Performance:

  • Incremental: <30 seconds
  • Full rebuild: 2-10 minutes (depending on size)

9. Index Status

Check index health and statistics:

bash
uv run scripts/index_status.py

Returns:

  • Database size
  • Total elements indexed
  • Last update timestamp
  • Index health metrics
  • Stale files (if any)

Performance Metrics

OperationTimevs File Reading
Exact model search<20ms50x faster
Field lookup<30ms30x faster
Wildcard search<100ms20x faster
Module stats<50ms40x faster
Reference search<150ms15x faster

Token efficiency: 95% fewer tokens than reading files


Usage Tips

1. Use Wildcards for Broad Searches
bash
# Good - specific
uv run scripts/search.py "sale.order" --type model
# Also good - controlled wildcard
uv run scripts/search.py "sale.%" --type model --limit 10
# Avoid - too broad (slow)
uv run scripts/search.py "%" --type model # Returns thousands of results
2. Limit Results for Performance

Always use --limit for wildcard searches:

bash
uv run scripts/search.py "%partner%" --type field --limit 20
3. Combine Filters

Use specific filters to narrow results:

bash
uv run scripts/search.py "partner_id" --type field --parent "sale.order" --limit 1
4. Cache Common Queries

For frequently accessed info, mention you're using cached data:

I've already looked up sale.order (from indexer cache).
5. Prefer Exact Searches

Exact searches are much faster:

bash
# Fast
uv run scripts/get_details.py model "sale.order"
# Slower
uv run scripts/search.py "%sale.order%" --type model

Examples

Example 1: Model Overview

Query: "What is sale.order?"

Command:

bash
uv run scripts/get_details.py model "sale.order"

Response format:

  • Model name and description
  • Module location
  • Inheritance chain
  • Key fields (10-15 most important)
  • View count
  • Action references
  • File location

Example 2: Field Search

Query: "What fields does res.partner have?"

Command:

bash
uv run scripts/get_details.py model "res.partner"

Response format:

  • Field count
  • Categorized fields (contact info, address, relationships)
  • Field types and attributes
  • Mention of full list availability

Example 3: Advanced Search

Query: "Find all Many2one fields pointing to res.partner"

Command:

bash
uv run scripts/search_by_attr.py field --filters '{"field_type": "Many2one", "comodel_name": "res.partner"}' --limit 50

Response format:

  • Grouped by module/model
  • Field names with context
  • Total count
  • Query time

Troubleshooting

Index Not Found

Error: Database file not found

Solution:

bash
cd odoo-doodba-dev/skills/odoo-indexer
uv run scripts/update_index.py --full

Or run /odoo-setup to rebuild everything.


Wrong Odoo Path

Error: Odoo directory not found

Solution:

bash
# Set correct path
export ODOO_PATH="/path/to/your/odoo/custom/src"
# Verify
ls $ODOO_PATH/odoo # Should show Odoo core files
# Rebuild index
uv run scripts/update_index.py --full

Stale Results

Issue: Search returns outdated information

Solution:

bash
# Quick update (incremental)
uv run scripts/update_index.py
# Full rebuild if issues persist
uv run scripts/update_index.py --full

Slow Queries

Issue: Searches taking >1 second

Causes:

  1. Too broad search pattern (use --limit)
  2. Database corruption (rebuild with --full)
  3. Large database (optimize queries)

Solution:

bash
# Add limit
uv run scripts/search.py "%" --type model --limit 10
# Or rebuild index
uv run scripts/update_index.py --clear --full

Missing Dependencies

Error: ModuleNotFoundError: lxml

Solution:

bash
cd odoo-doodba-dev/skills/odoo-indexer
uv sync # Auto-installs from pyproject.toml

Integration with Commands

Used by /odoo-search

The /odoo-search command is a user-friendly wrapper around this skill:

  • Interprets natural language queries
  • Translates to appropriate indexer commands
  • Formats results for readability
Used by Agents

odoo-developer agent:

  • Validates all model/field references
  • Researches codebase before implementation
  • Checks XML IDs before use

odoo-verifier agent:

  • Validates module structure
  • Checks security groups
  • Verifies view references

Best Practices

1. Always Validate References

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
57
Repository forks
33
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 May 2026, 5 months ago.

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/letzdoo/claude-marketplace/odoo-indexer/badge)](https://verified-skill.com/skills/letzdoo/claude-marketplace/odoo-indexer)

Something wrong with this skill or its page? Tell us.