| name | librarian-indexer |
| description | Meta-skill that indexes, optimizes, and auto-generates Claude skills with GitOps automation, OCA GitHub bot integration, and Odoo developer tools. Use for skill creation, CI/CD workflows, OCA module management, and advanced Odoo development. |
Librarian Indexer Skill v2.0
Purpose
Advanced meta-skill that combines knowledge base optimization, skill auto-generation, GitOps automation, OCA GitHub bot workflows, and Odoo developer mode expertise for maximum development efficiency.
Version History
v2.0.0 (2025-10-30):
added:
- GitOps expertise (CI/CD, GitHub Actions)
- OCA GitHub bot integration and commands
- Odoo Developer Mode tools and techniques
- Automated workflow patterns
- Advanced debugging capabilities
v1.0.0 (2025-10-30):
- Initial release
- Core skill templates
- Knowledge base optimization
- Skill taxonomy
Core Functions
1. Skill Taxonomy & Indexing
Automatically catalog all skills with metadata:
- Category: Technical, Business, Integration, Domain-Specific
- Dependencies: Which skills/tools/APIs this skill relies on
- Cross-references: Related skills, overlapping functionality
- Complexity: Beginner, Intermediate, Advanced, Expert
- Update frequency: Static knowledge vs. rapidly evolving domains
- GitOps: CI/CD pipeline requirements, automated testing
2. GitOps Expertise
CI/CD Pipeline Architecture
github_actions_workflows:
module_testing:
name: "Test Odoo Module"
trigger: [push, pull_request]
steps:
- checkout_code
- setup_odoo_environment
- install_dependencies
- run_unit_tests
- run_integration_tests
- generate_coverage_report
best_practices:
- Use OCA's maintainer-tools for testing
- Test against multiple Odoo versions
- Cache dependencies for speed
- Fail fast on critical errors
docker_build_push:
name: "Build and Push Docker Image"
trigger: [push_to_main, release]
steps:
- checkout_code
- setup_docker_buildx
- login_to_registry
- build_multi_arch_image
- push_to_dockerhub
- create_github_release
best_practices:
- Use multi-stage builds
- Tag with version + latest
- Sign images for security
- Use BuildKit for caching
oca_bot_integration:
name: "OCA Bot Automated Workflows"
trigger: [pull_request_review, schedule]
commands:
- /ocabot merge [major|minor|patch|nobump]
- /ocabot rebase
- /ocabot migration <module_name>
automation:
- Auto-generate README.rst from fragments
- Auto-generate addon icons
- Auto-update setup.py
- Auto-approve with 2+ approvals
- Auto-merge after 5 days + green CI
deployment_pipeline:
name: "Deploy to Production"
trigger: [release, manual_dispatch]
environments: [staging, production]
steps:
- run_all_tests
- build_docker_image
- push_to_registry
- deploy_to_staging
- run_smoke_tests
- manual_approval
- deploy_to_production
- rollback_on_failure
Git Workflow Patterns
git clone https://github.com/YOUR_USERNAME/OCA_REPO.git
cd OCA_REPO
git remote add upstream https://github.com/OCA/OCA_REPO.git
git checkout -b 19.0-feat-new-feature origin/19.0
pre-commit install
pre-commit run --all-files
git push origin 19.0-feat-new-feature
git checkout 19.0
git fetch upstream
git merge upstream/19.0
git push origin 19.0
GitHub Actions Templates
name: Test Odoo Modules
on:
push:
branches: [19.0, 18.0]
pull_request:
branches: [19.0, 18.0]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
odoo-version: ['19.0']
python-version: ['3.11']
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: Install OCA maintainer-tools
run: |
git clone https://github.com/OCA/maintainer-tools.git
cd maintainer-tools
pip install -r requirements.txt
- name: Install Odoo
run: |
git clone --depth=1 --branch=${{ matrix.odoo-version }} https://github.com/odoo/odoo.git
pip install -r odoo/requirements.txt
- name: Install module dependencies
run: |
# Auto-detect and install OCA dependencies
python maintainer-tools/tools/install_odoo_modules.py
- name: Run tests
run: |
export ODOO_RC=/dev/null
python -m pytest tests/ --cov=. --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
name: Build and Push Docker Image
on:
push:
branches: [main]
tags: ['v*']
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: yourorg/insightpulse-odoo
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
3. OCA GitHub Bot Integration
Bot Commands
/ocabot merge major
/ocabot merge minor
/ocabot merge patch
/ocabot merge nobump
/ocabot rebase
/ocabot migration account_payment_order
Bot Automated Operations
Webhooks (Real-time):
on_pull_request_opened:
- mention_maintainers
- call_for_maintainers
on_pull_request_approved:
- set_approved_label
- set_ready_to_merge_label
on_ci_success:
- set_needs_review_label
on_merge:
- delete_pr_branch
- bump_version
- update_changelog
- generate_wheel
Scheduled Tasks (Nightly):
daily_maintenance:
- update_readme_table
- generate_addon_readme
- generate_addon_icons
- update_setup_py
- generate_wheels
- upload_to_pypi
Setting Up OCA Bot for Your Org
git clone https://github.com/OCA/oca-github-bot.git
cd oca-github-bot
cp environment.sample .env
GITHUB_TOKEN=ghp_xxxxx
GITHUB_SECRET=your_webhook_secret
BOT_TASKS=all
BOT_TASKS_DISABLED=
docker-compose up -d
ngrok http 8080
Custom Bot Tasks
from celery import task
from ..github import gh_call
@task()
def validate_module_structure(org, repo, pr_number):
"""Custom task: Validate Odoo module structure"""
files = gh_call(f'repos/{org}/{repo}/pulls/{pr_number}/files')
required_files = [
'__manifest__.py',
'__init__.py',
'README.rst',
'security/ir.model.access.csv'
]
for module_path in detect_modules(files):
missing = []
for req_file in required_files:
if not file_exists(module_path, req_file):
missing.append(req_file)
if missing:
gh_call(
f'repos/{org}/{repo}/issues/{pr_number}/comments',
method='POST',
data={
'body': f'⚠️ Module `{module_path}` is missing: {", ".join(missing)}'
}
)
return False
return True
4. Odoo Developer Mode
Activation Methods
https://example.odoo.com/odoo?debug=1
https://example.odoo.com/odoo?debug=assets
https://example.odoo.com/odoo?debug=tests
https://example.odoo.com/odoo?debug=0
Developer Mode Tools
View Architecture:
→ Edit View: Form / Tree / Kanban / etc.
→ View Fields: See all field definitions
→ View Metadata: Created, modified, version info
→ Manage Filters: Edit search filters
→ Edit Action: Modify window actions
→ Edit Workflow: (Legacy) View state transitions
→ Hover over field → See technical name
→ Right-click field → "View Field"
- Name: account_id
- Model: account.move
- Type: many2one
- Widget: many2one
- Required: True
- Readonly: False
Database Tools:
Settings → Technical
Database Structure/
├── Models
├── Fields
├── Menu Items
├── Views
├── Actions
├── Translations
└── Parameters
Sequences/
└── Sequences
Automation/
├── Scheduled Actions (Cron)
├── Automation Rules
└── Server Actions
Security/
├── Users & Companies
├── Groups
├── Access Rights
├── Record Rules
└── Access Control Lists
Python Debugging:
self.env.user.write({'debug': True})
import logging
_logger = logging.getLogger(__name__)
_logger.setLevel(logging.DEBUG)
self.env['sale.order'].search([('state', '=', 'draft')])
order = self.env['sale.order'].browse(1)
_logger.info(f"Order: {order}")
_logger.info(f"Fields: {order.fields_get()}")