$npx -y skills add 19prince/claude-odoo-builder --skill odoo-theme-fixTRIGGER: User shares a screenshot of an Odoo page and asks for visual fixes, theming improvements, or readability changes.
| 1 | # Skill: odoo-theme-fix |
| 2 | |
| 3 | TRIGGER: User shares a screenshot of an Odoo page and asks for visual fixes, theming improvements, or readability changes. |
| 4 | |
| 5 | ## What this skill does |
| 6 | |
| 7 | Reviews an Odoo page screenshot against the blueprint dark theme, identifies broken or mismatched elements, writes targeted CSS overrides, and pushes them to `website.custom_code_head` via RPC — without touching any page arch. |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## Instructions |
| 12 | |
| 13 | When invoked: |
| 14 | |
| 15 | 1. **Read the screenshot** — identify every element that is wrong: |
| 16 | - White or light backgrounds that should be dark (`#071222`) |
| 17 | - Dark text on dark backgrounds (contrast failure) |
| 18 | - Default Odoo colors breaking the blueprint palette |
| 19 | - Unstyled form inputs, search bars, cards, pagination, badges |
| 20 | |
| 21 | 2. **Read `workflows/css_theming.md`** — check the known selector map before writing anything new. Reuse confirmed selectors. Add new ones only when needed. |
| 22 | |
| 23 | 3. **Read the current `custom_code_head`**: |
| 24 | ```python |
| 25 | sites = c.search_read("website", [], ["id", "custom_code_head"]) |
| 26 | ``` |
| 27 | |
| 28 | 4. **Write a targeted `<style>` block** following these rules: |
| 29 | - Use the blueprint palette: `#071222` bg, `#0a1c33` card bg, `#3b8eea` / `#5da8ff` / `#7ec8ff` blues, `#ffffff` headings, `rgba(255,255,255,.82)` body, `rgba(255,255,255,.6)` muted |
| 30 | - Scope every selector to the page's body class (e.g. `.o_wblog_index`, `.o_wblog_post_page`) to avoid leaking styles globally |
| 31 | - Use `!important` on color and background overrides — Odoo's specificity is high |
| 32 | - Wrap the block in `/* == [section name] start == */` and `/* == [section name] end == */` CSS comments so it can be cleanly replaced later |
| 33 | - Strip the previous block for that section before appending the new one (use `re.sub` with `DOTALL`) |
| 34 | |
| 35 | 5. **Push via RPC**: |
| 36 | ```python |
| 37 | c.write("website", [site_id], {"custom_code_head": new_head}) |
| 38 | ``` |
| 39 | |
| 40 | 6. **Confirm** what changed and ask for a follow-up screenshot to verify. |
| 41 | |
| 42 | --- |
| 43 | |
| 44 | ## Blueprint Palette Reference |
| 45 | |
| 46 | | Role | Value | |
| 47 | |---|---| |
| 48 | | Page background | `#071222` | |
| 49 | | Card / panel background | `rgba(10,28,51,.85)` | |
| 50 | | Elevated surface | `#0a1c33` | |
| 51 | | Primary blue | `#3b8eea` | |
| 52 | | Bright blue (links, accents) | `#5da8ff` | |
| 53 | | Light blue (muted accents) | `#7ec8ff` | |
| 54 | | Heading text | `#ffffff` | |
| 55 | | Body text | `rgba(255,255,255,.82)` | |
| 56 | | Muted text | `rgba(255,255,255,.55)` | |
| 57 | | Subtle text | `rgba(255,255,255,.4)` | |
| 58 | | Card border | `rgba(59,142,234,.22)` | |
| 59 | | Divider | `rgba(59,142,234,.18)` | |
| 60 | | Blueprint grid line | `rgba(59,142,234,.07)` | |
| 61 | | Success green | `#4ade80` | |
| 62 | | Error red | `#f87171` | |
| 63 | | Warning amber | `#fbbf24` | |
| 64 | |
| 65 | --- |
| 66 | |
| 67 | ## Do Not |
| 68 | |
| 69 | - Do not modify `ir.ui.view` arch or `website.page` records — CSS only |
| 70 | - Do not use broad unscoped selectors like `h1 { color: white }` — always scope to a page class |
| 71 | - Do not push without running a `re.sub` cleanup of any previous block for that section |
| 72 | - Do not add visible text markers in the HTML — markers must be CSS comments inside `<style>` tags |