Diagnoses and optimizes Bricks page builder performance: CSS loading methods, loop-marker preservation, random seed TTL for pagination, and query caching.
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.
Measure the affected page before changing settings. Use request timing, rendered assets, query timings, and interaction profiles to identify the bottleneck, then compare the same page after the change.
Setting: Bricks > Settings > Performance > CSS loading method. Stored as cssLoading in the Bricks settings registry (includes/abilities/settings.php) and used by the asset loader (includes/assets.php).
| Mode | Value | Tradeoff |
|---|---|---|
| Inline (default) | '' (empty string) | One less HTTP request. CSS ships in <style> blocks inside <head>. Repeated across all pages: not cached by browser. |
| External file | 'file' | Separate .css files per template / global style. Browser-cacheable. Tiny HTTP request but cold-load pays for it. |
Compare cold loads and repeat navigation with both modes on representative pages.
File-mode regeneration: files are written to wp-content/uploads/bricks/css/ at save time. After a bulk update (site-wide CSS change, theme-style swap, class rename), regenerate all via Bricks > Settings > Performance > Regenerate CSS files. Without this, stale CSS serves until each template is manually saved.
Filter: bricks/generate_css_file: intercept per-file generation.
Bricks query loops rely on loop markers for AJAX pagination, Load More, Infinite Scroll, and Query Filters.
Current source flow: server render adds data-brx-loop-start, then frontend JS converts it to a comment shaped like <!--brx-loop-start-{queryId}-->.
Optimization plugins and cache layers that remove Bricks markers can break AJAX swaps. Configure them to preserve Bricks brx-loop markers.
Diagnostic: inspect both page source and the live DOM on a page with a loop. Page source should contain data-brx-loop-start; the live DOM should contain a brx-loop-start comment. If either disappears after optimization, fix the plugin config and flush cache.
Query loops with orderby: rand need a stable seed across paginated pages, or the same item shows on page 1 and page 3.
Setting: random seed TTL (in minutes). Stored as randomSeedTtl in query vars. Default: 60 min (includes/query.php:3033).
Keep a positive TTL for random-order loops with pagination. Choose the duration according to how often the order should change.
Storage: Bricks sets a transient keyed by bricks_query_loop_random_seed_{element_id} (includes/query.php:3025). The seed is shared by queries for the same element until the transient expires. Bricks also deletes it when the random-seed setting changes.
Setting: Bricks > Settings > Performance > Cache query loops (checkbox cacheQueryLoops at includes/admin/admin-screen-settings.php:2358).
Uses WordPress object cache through wp_cache_get() / wp_cache_set() (includes/query.php). A persistent object cache such as Redis or Memcached makes it useful across requests. Without one, the cache is request-local and the benefit is much smaller.
Caches query results for one minute, keyed by element id, query vars, parent loop object id, and any language-specific cache-key filters.
Invalidation: current source uses a short object-cache TTL (MINUTE_IN_SECONDS) rather than a broad explicit invalidation graph for every content change. If a persistent object cache serves stale loop results, clear the object cache or adjust the query cache key through bricks/query/cache_key for the context you need.
Inspect the network waterfall and rendered markup:
bricks-custom-fonts when self-hosting fonts is part of the chosen fix.Interaction payload and event-handling work grow with the number of rendered elements. Profile repeated grids and expensive callbacks. Global-class interactions centralize authoring; each matching element still inherits the interaction rows.
Use CSS for simple visual states and consider delegated JavaScript handlers when profiling shows repeated event handling is costly. See bricks-interactions for storage and inheritance behavior.
The Bricks frontend source is src/assets/js/frontend.js; the compiled runtime is enqueued as bricks-scripts from assets/js/bricks.min.js. It handles interactions, popups, sliders, accordions, and filter helpers.
Inspect script loading and compression in the network response before changing optimization settings. After changing asset optimization, verify affected interactions, AJAX loops, and responsive styles.
Compare the same page and interaction under matching cache and device conditions. Record the measured change and any remaining bottleneck. Preserve query-loop markers and exclude personalized cart and checkout responses from shared full-page caching.
custom-code: CSS cascade order, where custom CSS lives.interactions: interaction cost details.query-loops: loop-specific performance (include/exclude, include-query).site-audit: full-site scan includes performance signals.What SKILL.md sets; muted values are Claude Code's defaults
46 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./bricks:bricks-performancefrom bricks
npx claudepluginhub codeerhq/bricks-skills --plugin bricksOther plugins' skills for the same job