05-claude-elementor-skill
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-07-09
- Stars
- ★ 0
- Forks
- 0
02 资源文件 9
- 参考文档hosts/generic-ssh.md2.4 KB
- 参考文档hosts/local.md2.3 KB
- 参考文档hosts/managed-wp.md2.9 KB
- 其他inject.php2.2 KB
- 许可证LICENSE1.0 KB
- 参考文档README.md5.5 KB
- 参考文档reference.md2.5 KB
- 参考文档samples/homepage.example.json4.2 KB
- 参考文档SETUP.md5.2 KB
03 SKILL.md 正文
Elementor page builder — any host
Build and edit Elementor pages on self-hosted WordPress from the CLI by
generating the page's _elementor_data JSON and injecting it with WP-CLI —
instead of clicking through the visual editor. The build technique is identical on
every host; only how you get a shell + wp changes.
SETUP.md— first-time setup: how to export the site's design (calibration) so builds match it.reference.md— host-agnostic WP-CLI + verify cheat-sheet.inject.php— the injection template (wp eval-file).hosts/*.md— per-platform access adapters. Read the one that matches your host first.
0. Pick your host adapter
Everything below assumes you can run wp against the target site. Get there via the
matching adapter, then come back:
| Your setup | Adapter | How wp runs |
|---|---|---|
| VPS / DigitalOcean / self-managed Linux, you have SSH | hosts/generic-ssh.md |
ssh host "cd WEBROOT && wp ..." |
| Kinsta, WP Engine, Flywheel (managed, SSH-gated) | hosts/managed-wp.md |
SSH gateway → wp ... |
| Local: DDEV, LocalWP, wp-env, Studio | hosts/local.md |
ddev wp ... / wp ... locally |
Not listed (e.g. Cloudways) — the core below still applies; you just need that platform's way to add an SSH key / open a shell and find the webroot.
The golden path (same on every host)
- Get CLI access — via your host adapter; confirm
wp core versionworks. - Calibrate — pull a real page's Elementor JSON to learn the site's exact structure, atoms, and global-kit IDs. Never invent Elementor setting keys.
- Build on STAGING as a draft/noindex page; clone real atoms and re-content them.
- Inject via
wp eval-file inject.php+wp elementor flush-css. - Verify server-side AND on the real frontend.
- Promote to live via export/import once approved.
1. Calibrate first (non-negotiable)
An Elementor page is a JSON tree stored in postmeta _elementor_data. Modern sites
use the Flexbox Container model (elType:"container" nesting); older sites use
section/column. Confirm which the target site uses before generating.
Get a real design sample — see SETUP.md for the full how-to (CLI and no-CLI
editor-export methods). The fast path if you have wp:
wp option get page_on_front # homepage post id (static front page)
wp option get elementor_active_kit # global kit post id
wp post list --post_type=page --fields=ID,post_title,post_status
wp post meta get <id> _elementor_data --format=json # pull a real page to clone
No shell access? Export from the Elementor editor (Save as Template → Templates →
Export) and hand Claude the .json; the injectable array is under .content. (SETUP.md)
Extract real "atoms" (heading, button, image, icon-list, icon-box, carousel nodes)
plus the global-kit color/typography IDs. Build by CLONING these real nodes and
re-contenting them — this removes ~all setting-key guesswork. Bind colors/type to
the kit via settings.__globals__ (cloning atoms carries these for free); don't
hardcode hexes where the site uses globals.
2. Inject _elementor_data (see inject.php)
PID=$(wp post create --post_type=page --post_status=draft \
--post_title="T" --post_name="slug" --porcelain)
# push the JSON to a path wp can read, then:
wp eval-file inject.php $PID page.json \
"$(wp plugin get elementor --field=version)" elementor_header_footer
wp elementor flush-css
inject.php sets _elementor_data = wp_slash(wp_json_encode($data)), plus
_elementor_edit_mode=builder, _elementor_template_type=wp-page,
_elementor_version, and _wp_page_template:
elementor_header_footer— full width, keeps theme nav/footer (default)elementor_canvas— blank canvas If Rank Math is active, setrank_math_title/rank_math_description/rank_math_focus_keyword/rank_math_robots(=array('noindex')on staging). Yoast is the same idea with_yoast_wpseo_*keys.
Getting the JSON file to where wp can read it: the portable method that works
on every host (including SFTP-chrooted managed hosts) is to stream it over the shell:
ssh host "cat > ~/page.json" < local.json # no scp/SFTP dependency
Locally just write the file. See your host adapter for the writable path.
3. Verify before claiming done
# server-side render — expect 0 fatals (popup hrefs are stripped here; see gotchas)
wp eval "echo \Elementor\Plugin::\$instance->frontend->get_builder_content_for_display($PID);" \
| grep -ic "fatal error\|critical error"
# real frontend
curl -s URL | grep -c 'data-element_type="container"' # container count
Check the frontend for: container count, kit CSS + page CSS loaded, images present,
elementor-action count (popups), and 0 errors.
4. Gotchas learned the hard way (universal — apply on every host)
- Popup / "Book Now" buttons: a button URL of
#elementor-action:action=popup:open&settings=...is stripped byesc_urland renders no href. Use the site's real mechanism — often a Dynamic Content for Elementor popup tag insettings.__dynamic__.link. Inspect how the site's own buttons open popups and copy that verbatim. CLI render also strips popup hrefs, so verify popup buttons on the REAL frontend. - Unique element ids: every Elementor element needs a unique string
id; when generating many sections, prefix ids per-section. (Repeated numeric media/icon ids are fine — those are attachment ids, not element ids.) - Relative internal links (
/page/) so they work on staging and live. wpfatals onwp-salt.php? Some installsrequiresalts with a relative path, sowp --path=DIRfatals. Fix:cdinto the webroot first, then runwp.scp/SFTP to/tmpblocked? Common on chrooted managed hosts. Stream files over the shell instead (ssh host "cat > ~/file" < local).
5. Staging & safety
- Always build on staging as a draft/noindex page;
wp db exportfirst. Never edit live directly. Promote via export/import (or re-inject on live) once approved. - Each managed host has its own staging environment + push-to-live flow — see the host adapter.
- Scale builds by fanning out one agent per section (each clones atoms) → assemble → validate (jq: array of containers, unique element ids) → inject → verify.
Reference implementations
- lmoncany/elementor-claude-skill (WP-CLI injection technique)
- emersimeon/claude-elementor-kit (REST/MCP alternative; see docs/LESSONS.md)
- bvisible/elementor-mcp-api (REST+MCP plugin for interactive editing)
04 同仓库更多 Skills
maps
Location intelligence — geocode a place, reverse-geocode coordinates, find nearby places (46 POI categories), driving/walking/cycling distance + time, turn-by-turn directions, timezone lookup, bounding box + area for a named place, and POI search within a rectangle. Uses OpenStreetMap + Overpass + OSRM. Free, no API key.
artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
returns-reverse-logistics
Codified expertise for returns authorization, receipt and inspection, disposition decisions, refund processing, fraud detection, and warranty claims management. Informed by returns operations managers with 15+ years experience. Includes grading frameworks, disposition economics, fraud pattern recognition, and vendor recovery processes. Use when handling product returns, reverse logistics, refund decisions, return fraud detection, or warranty claims.
quality-nonconformance
Codified expertise for quality control, non-conformance investigation, root cause analysis, corrective action, and supplier quality management in regulated manufacturing. Informed by quality engineers with 15+ years experience across FDA, IATF 16949, and AS9100 environments. Includes NCR lifecycle management, CAPA systems, SPC interpretation, and audit methodology. Use when investigating non-conformances, performing root cause analysis, managing CAPAs, interpreting SPC data, or handling supplier quality issues.
production-scheduling
Codified expertise for production scheduling, job sequencing, line balancing, changeover optimization, and bottleneck resolution in discrete and batch manufacturing. Informed by production schedulers with 15+ years experience. Includes TOC/drum-buffer-rope, SMED, OEE analysis, disruption response frameworks, and ERP/MES interaction patterns. Use when scheduling production, resolving bottlenecks, optimizing changeovers, responding to disruptions, or balancing manufacturing lines.
logistics-exception-management
Codified expertise for handling freight exceptions, shipment delays, damages, losses, and carrier disputes. Informed by logistics professionals with 15+ years operational experience. Includes escalation protocols, carrier-specific behaviors, claims procedures, and judgment frameworks. Use when handling shipping exceptions, freight claims, delivery issues, or carrier disputes.