# Create Theme From Site

Create a new Chamilo color theme (colors + logo) derived from an external website's...

- Repository: https://github.com/chamilo/chamilo-lms (1019 stars)
- Category: Media
- License: GPL-3.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add chamilo/chamilo-lms --skill create-theme-from-site -g -a claude-code -y`
Codex: `npx skills add chamilo/chamilo-lms --skill create-theme-from-site -g -a codex -y`
Cursor: `npx skills add chamilo/chamilo-lms --skill create-theme-from-site -g -a cursor -y`
Gemini CLI: `npx skills add chamilo/chamilo-lms --skill create-theme-from-site -g -a gemini-cli -y`

## Description

Create a new Chamilo color theme (colors + logo) derived from an external website's actual branding, given a theme name and the site's URL, or, if given a local path to a logo image instead, derived from that logo's own dominant colors. Mirrors exactly what an admin can do manually through /admin/configuration/colors, done entirely via the Chamilo REST API. Use when the user wants a new theme "based on" / "matching" a given website or a given logo file, or runs /create-theme-from-site.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Create Theme From Site

Given a **name** (e.g. `beeznest2`) and a **source**, either a **website URL**
(e.g. `https://beeznest.com`) or a **local path to a logo image**
(e.g. `/home/user/logos/acme.svg`), create a new Chamilo `ColorTheme`,
activate it as the platform's default theme, and attach a logo, all through
the same API the admin Vue UI (`/admin/configuration/colors`) uses. No direct
database or filesystem writes for the theme itself: every step from Step 5
onward is a real HTTP call against the running Chamilo instance, which is
what keeps this safe and correct (it reuses tested code paths, entity
validation, slug generation, `colors.css` rendering, image sanitization, instead of reinventing them).

---

## Step 0: Confirm inputs and scope, and detect the mode

Ask for whichever of these are missing:
- **Theme name** → becomes the `ColorTheme.title`; the theme's folder `slug`
  is auto-generated from it server-side (Gedmo slug), never guess or derive
  the slug yourself, always read it back from the API response.
- **Source** → either a website URL, or a local path to a logo image file.
- **Activate immediately?** Setting a theme "active" makes it the platform's
  default look for every user on this access URL, immediately. Default to
  yes only if the user has clearly asked for it (as in "set it as default
  theme"); otherwise create the theme and ask before activating.

**Detect which mode applies** from the source itself rather than asking: an
`http(s)://` URL is `site` mode, a readable local file with an `image/*` MIME
type is `logo` mode, and anything else is reported back to the user.

The rest: https://github.com/chamilo/chamilo-lms/blob/HEAD/.claude/skills/create-theme-from-site/SKILL.md
