$npx -y skills add 19prince/claude-odoo-builder --skill new-odoo-projectTRIGGER: User invokes /new-odoo-project to scaffold a new Odoo website builder project.
| 1 | # Skill: new-odoo-project |
| 2 | |
| 3 | TRIGGER: User invokes `/new-odoo-project` to scaffold a new Odoo website builder project. |
| 4 | |
| 5 | ## Objective |
| 6 | Scaffold a new Odoo website builder project directory, copy all bundled tools and workflows from the skill's `templates/` directory, create a configured `.env` template, and orient the user for their first session. |
| 7 | |
| 8 | --- |
| 9 | |
| 10 | ## Prerequisites |
| 11 | |
| 12 | Before running this skill, ensure the following are in place: |
| 13 | |
| 14 | 1. **Python 3.8+** installed and available as `python3` |
| 15 | 2. **Python packages** — install from the bundled requirements file: |
| 16 | ```bash |
| 17 | pip install -r {skill_dir}/templates/requirements.txt |
| 18 | ``` |
| 19 | This installs `requests` and `python-dotenv`, the only third-party dependencies. |
| 20 | 3. **An Odoo instance** with admin or API access (URL, database name, and login email) |
| 21 | 4. **Claude Code** — this skill is designed for Claude Code's skill system |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | ## Step 1 — Gather technical information (ask all at once) |
| 26 | |
| 27 | Ask the user for the following in a single message. Do not proceed until you have answers: |
| 28 | |
| 29 | 1. **Project parent directory** — the folder where the project subdirectory should be created (e.g. `~/projects` or `~/Odoo`) |
| 30 | 2. **Client / project name** — used for folder naming and memory. The project will be created at `{parent_dir}/{slugified-client-name}/` (e.g. `~/Odoo/client-acme/`) |
| 31 | 3. **Odoo URL** — e.g. `https://mysite.odoo.com` |
| 32 | 4. **Odoo DB name** — e.g. `mysite-main-12345` |
| 33 | 5. **Odoo login email** |
| 34 | 6. **Is this a production-only server, or is there a separate staging instance?** |
| 35 | - If staging + production: collect both URLs and DB names (but NOT passwords) |
| 36 | - If production only: note that changes go live immediately — extra caution required |
| 37 | 7. **GitHub repo linked to the Odoo.sh project** — e.g. `https://github.com/org/repo`. This is the repository Odoo.sh watches for deployments. Custom modules are added here as submodules. If the project is not hosted on Odoo.sh, answer "N/A". |
| 38 | |
| 39 | Do NOT ask for any passwords. Tell the user: "I'll leave the password fields blank in `.env` — fill those in yourself before running any tools." |
| 40 | |
| 41 | Do NOT ask about brand, fonts, or design yet — those come after the project is set up. |
| 42 | |
| 43 | --- |
| 44 | |
| 45 | ## Step 2 — Create the project directory |
| 46 | |
| 47 | Derive `{project_dir}` by slugifying the client name (lowercase, replace spaces with hyphens) and appending it to the parent directory: `{parent_dir}/{slugified-client-name}`. |
| 48 | |
| 49 | For example, if parent is `~/Odoo` and client name is "Demo Video", then `{project_dir}` = `~/Odoo/demo-video`. |
| 50 | |
| 51 | ```bash |
| 52 | mkdir -p {project_dir}/tools |
| 53 | mkdir -p {project_dir}/workflows |
| 54 | mkdir -p {project_dir}/.tmp |
| 55 | ``` |
| 56 | |
| 57 | --- |
| 58 | |
| 59 | ## Step 3 — Copy tools from skill templates |
| 60 | |
| 61 | Copy all `.py` files from the skill's bundled templates. The skill's base directory is provided when invoked — use it to locate `templates/tools/`: |
| 62 | |
| 63 | ```bash |
| 64 | cp {skill_dir}/templates/tools/*.py {project_dir}/tools/ |
| 65 | ``` |
| 66 | |
| 67 | The `migrate_to_production.py` template ships pre-cleaned with empty `META_UPDATES`, `CSS_VIEW_KEYS`, and `PAGE_URLS` lists, and a clean `main()` with commented examples. No post-copy cleanup is needed. |
| 68 | |
| 69 | --- |
| 70 | |
| 71 | ## Step 4 — Copy workflows from skill templates |
| 72 | |
| 73 | ```bash |
| 74 | cp {skill_dir}/templates/workflows/*.md {project_dir}/workflows/ |
| 75 | ``` |
| 76 | |
| 77 | Workflows are generic and apply to any Odoo project without modification. |
| 78 | |
| 79 | --- |
| 80 | |
| 81 | ## Step 4b — Create `.gitignore` |
| 82 | |
| 83 | Write `.gitignore` to the project root to prevent committing secrets and temporary files: |
| 84 | |
| 85 | ``` |
| 86 | # Credentials |
| 87 | .env |
| 88 | |
| 89 | # Temporary files |
| 90 | .tmp/ |
| 91 | |
| 92 | # Python |
| 93 | __pycache__/ |
| 94 | *.pyc |
| 95 | *.pyo |
| 96 | |
| 97 | # OS files |
| 98 | .DS_Store |
| 99 | Thumbs.db |
| 100 | |
| 101 | # IDE |
| 102 | .vscode/ |
| 103 | .idea/ |
| 104 | ``` |
| 105 | |
| 106 | --- |
| 107 | |
| 108 | ## Step 5 — Create `.env` |
| 109 | |
| 110 | Write `.env` to the project root. **Leave all password fields blank.** |
| 111 | |
| 112 | For a staging + production setup: |
| 113 | ``` |
| 114 | # Staging |
| 115 | ODOO_URL={staging_url} |
| 116 | ODOO_DB={staging_db} |
| 117 | ODOO_USER={login_email} |
| 118 | ODOO_PASSWORD= |
| 119 | |
| 120 | # Production (fill in when ready to migrate) |
| 121 | # PROD_ODOO_URL={prod_url} |
| 122 | # PROD_ODOO_DB={prod_db} |
| 123 | # PROD_ODOO_USER= |
| 124 | # PROD_ODOO_PASSWORD= |
| 125 | ``` |
| 126 | |
| 127 | For a production-only setup: |
| 128 | ``` |
| 129 | # Production (working directly on production — no staging) |
| 130 | ODOO_URL={odoo_url} |
| 131 | ODOO_DB={odoo_db} |
| 132 | ODOO_USER={login_email} |
| 133 | ODOO_PASSWORD= |
| 134 | ``` |
| 135 | |
| 136 | --- |
| 137 | |
| 138 | ## Step 6 — Create `CLAUDE.md` |
| 139 | |
| 140 | Write `CLAUDE.md` to the project root using this template: |
| 141 | |
| 142 | ```markdown |
| 143 | # Agent Instructions |
| 144 | |
| 145 | You're working inside the **WAT framework** (Workflows, Agents, Tools). |
| 146 | |
| 147 | ## The WAT Architecture |
| 148 | |
| 149 | **Layer 1: Workflows** — Markdown SOPs in `workflows/` |
| 150 | **Layer 2: Agents** — Your role: read workflows, run tools, handle failures |
| 151 | **Layer 3: Tools** — Python scripts in `tools/` for deterministic execution |
| 152 | |
| 153 | ## How to Operate |
| 154 | |
| 155 | 1. Look for existing tools before building new ones |
| 156 | 2. Learn and adapt when things fail — update workflows with findings |
| 157 | 3. Keep workflows current as the project evolves |
| 158 | |
| 159 | ## File Structure |
| 160 | |
| 161 | \`\`\` |
| 162 | .tmp/ # Temporary files — regenerated as needed |
| 163 | tools/ # Python scripts |
| 164 | workflows/ # Markdown SOPs |
| 165 | .env # Credentials — NEVER commit this |
| 166 | \`\`\` |
| 167 | |
| 168 | ## Project: {client_name} |
| 169 | |
| 170 | - **Server:** {odoo_url} |
| 171 | - **DB: |