Elementor widget development
Skill randhoy/agent-skills-pack/.agent/skills/wp/elementor-widget-development
npx -y skills add randhoy/agent-skills-pack --skill elementor-widget-developmentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Engineer Elementor widgets for any WordPress project. Use for control modeling, frontend rendering, editor preview parity, selector logic, and widget-level dependency loading.
SKILL.md
2.4 KB, 477 tokens by cl100k_base, as published. Nobody here has run it
Elementor Widget Development
Core (Universal)
Trigger Scope
Use this skill when the task is widget internals:
- building/refactoring widget classes
- mapping controls to visual output
- fixing
render()andcontent_template()mismatch - optimizing widget-specific JS/CSS dependencies
Workflow
- Define widget contract.
- required identity methods
- control model with explicit defaults
- Implement control surface.
- section structure
- responsive and conditional behavior
- Implement frontend rendering.
- deterministic output from sanitized settings
- explicit output escaping
- Implement editor rendering.
- mirror frontend intent in
content_template() - keep branch parity where possible
- Verify behavior.
- empty/default/custom states
- editor/frontend parity
Control And Selector Patterns
- Prefer
{{WRAPPER}}-scoped selectors for style controls. - Use control placeholders by data shape:
{{VALUE}}for scalar controls (text/color/select/switcher).{{SIZE}}{{UNIT}}for slider-like controls.{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}for dimensions.{{URL}}for media/url bindings.- For repeater rows, use the row
_idand{{CURRENT_ITEM}}-style targeting patterns.
Guardrails
- Do not rely on implicit defaults for critical output.
- Do not output raw setting values without escaping.
- Do not enqueue heavy assets globally when widget-level dependency is possible.
- Avoid unnecessary DOM wrappers.
Extended Cases
- If widget includes rich form behavior (validation/actions/record processing), route to
$elementor-forms. - If control injection into third-party widgets is needed, use element hooks before/after section boundaries.
Minimal Example
class Card_Widget extends \Elementor\Widget_Base {
public function get_name(): string { return 'card_widget'; }
public function get_title(): string { return esc_html__( 'Card', 'vendor-kit' ); }
public function get_categories(): array { return [ 'basic' ]; }
public function get_script_depends(): array { return [ 'vendor-card' ]; }
protected function register_controls(): void {}
protected function render(): void {}
protected function content_template(): void {}
}
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.