Create Theme From Site
Create a new Chamilo color theme (colors + logo) derived from an external website's...
Install
npx skills add chamilo/chamilo-lms --skill create-theme-from-site -g -a claude-code -y- Repository
- chamilo/chamilo-lms1k
- Category
- Media
- Updated
- 3d ago
- License
- GPL-3.0
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
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.
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 folderslugis 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.


