Sets up or debugs a Bricks child theme with asset loading, extension registration, and query customization patterns.
Ships in bricks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Keep theme-specific customizations in the existing child theme so parent updates preserve them. A plugin can own functionality that should survive a theme change; do not move working plugin code merely to enforce a directory preference.
The child directory needs style.css with Template: bricks (the parent directory
name), and functions.php for the hooks actually used. Follow the existing layout;
extra autoloaders, build pipelines and empty include files are unnecessary.
/*
Theme Name: Example Bricks Child
Template: bricks
Version: 1.0.0
Text Domain: example-bricks-child
*/
Enqueue the real child stylesheet, excluding the Builder panel:
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action( 'wp_enqueue_scripts', function() {
if ( bricks_is_builder_main() ) return;
wp_enqueue_style(
'example-bricks-child',
get_stylesheet_directory_uri() . '/style.css',
[ 'bricks-frontend' ],
wp_get_theme()->get( 'Version' )
);
}, 20 );
Add JavaScript/include files only when needed. With a build pipeline, enqueue compiled output; retain source in development/version control and package runtime assets. See the child-theme guide.
| Task | Route |
|---|---|
| Custom element | bricks/load_elements/after, then Bricks\Elements::register_element() with real file/class; bricks-custom-elements |
| Element-specific assets | Its enqueue_scripts() method; a named $scripts initializer for Builder updates |
| Custom dynamic tags | Public picker, individual-tag and content-render filters; bricks-custom-dynamic-data-providers |
| Query customization | Appropriate hook scoped with its passed element ID; bricks-hooks-reference |
| Echo tag or Code element PHP | bricks-custom-code for execution and allow-list contracts |
Do not call Providers::register() with instances or invoke it late in init.
It takes slugs, constructs Bricks provider classes and schedules registration before
tags. Ordinary custom tags should use public filters. There is no
Bricks\Helpers::post_has_element() helper in Bricks 2.4; use the element asset
lifecycle instead. Choose hook priority from its actual dependencies, not a generic
before/after-10 rule. Restrict autoloaders to the project's own namespace.
Replace qypost with the actual six-character element ID, not its Structure label.
add_filter( 'bricks/posts/query_vars', function( $args, $settings, $element_id ) {
if ( $element_id === 'qypost' ) {
$args['posts_per_page'] = 6;
}
return $args;
}, 10, 3 );
Preserve existing meta_query/tax_query clauses when adding constraints. Obtain
Woo featured-product semantics from its supported query/taxonomy contract instead
of assuming legacy _featured post meta.
The initial bricks/code/echo_function_names value can be the requested callback
string. Merge only an existing array with explicitly approved public helpers:
add_filter( 'bricks/code/echo_function_names', function( $allowed ) {
$allowed = is_array( $allowed ) ? $allowed : [];
return array_merge( $allowed, [ 'example_public_label' ] );
} );
Define the named helper before using it. Do not cast incoming strings to arrays: that would allow the caller's requested function. Avoid broad prefixes or unrestricted metadata access when only one public value is needed.
For a Woo template override, mirror the path below the plugin's templates/
directory under the child's woocommerce/. Prefer Bricks elements/hooks when they
cover the request; track override compatibility with WooCommerce updates.
Check activation/header, PHP errors, actual paths/class names and registration lifecycle. For styles, inspect loaded files, selectors and cascade before changing specificity. Verify custom elements/tags on the frontend and Builder update path; PHP syntax checks alone do not establish those behaviors.
What SKILL.md sets; muted values are Claude Code's defaults
/bricks:bricks-child-theme-patternsfrom bricks
npx claudepluginhub codeerhq/bricks-skills --plugin bricks46 skills in this plugin
/bricks-agent-repositoryHandle complex existing-site Bricks edits through advertised repository/workspace workflows when focused abilities cannot express the change./bricks-ai-tabDiagnose Bricks AI connection setup, ability toggles, dispatcher availability and disabled actions. Use for connection/availability problems./bricks-audit-design-systemAudit Bricks classes, variables, palettes and components, or carry out requested cleanup. Report-only audits do not authorize fixes.Other plugins' skills for the same job