Creates or debugs Bricks element display conditions using OR groups, AND items, and dynamic comparisons. Covers schema, condition keys, and compare operators.
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.
Element conditions control whether Bricks renders an element's markup. Use CSS visibility controls when the markup should remain in the DOM.
Use this skill for element.settings._conditions. Use bricks-templates-conditions for template display rules such as where a header, popup, archive, or content template applies.
Storage key: _conditions on element.settings.
The shape is an outer array of OR groups. Each group is an inner array of AND items:
[
[
{ "id": "abc123", "key": "user_logged_in", "compare": "==", "value": true },
{ "id": "def456", "key": "post_status", "compare": "==", "value": "publish" }
],
[
{ "id": "ghi789", "key": "dynamic_data", "dynamic_data": "{post_title}", "compare": "contains", "value": "Sale" }
]
]
Meaning:
conditions: [] clears all conditions.[[]]. An empty group behaves like an always-true group in runtime logic.| Field | Required | Notes |
|---|---|---|
id | No | Unique row ID. The MCP writer generates it when omitted. |
key | Yes | Condition type, such as user_logged_in, post_id, dynamic_data, or woo_product_stock_status. |
compare | No | Defaults to ==. Use empty or empty_not when no value is needed. |
value | Usually | Required unless compare is empty or empty_not. |
dynamic_data | Only for key: "dynamic_data" | Dynamic tag to evaluate, such as {post_title}. Still provide value unless using empty or empty_not. |
Core operators:
==, !=, >=, <=, >, <, contains, contains_not, empty, empty_not
Use value types that match the condition. For booleans, send real booleans (true, false), not strings. For IDs, send integers when possible. For dates and times, use the same format the builder control expects.
General:
browser, current_url, date, datetime, dynamic_data, featured_image,
operating_system, referer, time, weekday
cookie (Bricks 2.5+)
Post:
post_author, post_date, post_id, post_parent, post_status, post_title
User:
user_id, user_logged_in, user_registered, user_role
WooCommerce:
woo_product_category, woo_product_featured, woo_product_new,
woo_product_purchased_by_user, woo_product_rating, woo_product_sale,
woo_product_sold_individually, woo_product_stock_management,
woo_product_stock_quantity, woo_product_stock_status, woo_product_tag,
woo_product_type, woo_checkout_login_step_needed, woo_order_withdrawal_screen
{ "key": "cookie", "cookie_name": "audience", "compare": "==", "value": "member" }
The cookie is read from the current request, so a full-page cache must vary by that cookie or exclude the page. Verify with a new request after setting the cookie.
The Bricks 2.5 Inner content condition (inner_content) is Builder-only: the 2.5 writer rejects it. Do not invent its row shape through a generic element write; ask the user to add it in the Builder.
Custom integrations can add condition keys through Bricks filters. The dedicated MCP writer accepts core keys plus keys registered through bricks/abilities/element_conditions/allowed_keys.
get-element-conditions: read the element's _conditions array.update-element-conditions: replace the element's _conditions array. Full replacement only. Generates missing row IDs. Takes a pre-save revision.Prefer the dedicated writer over generic update-element when changing _conditions. It validates the OR/AND shape and catches empty groups, missing keys, invalid compare operators, and incomplete dynamic-data conditions before saving.
get-page-elements or get-element-conditions.conditions array with update-element-conditions.revisionId exists with list-revisions.get-element-conditions.Logged-in users only:
{
"postId": 123,
"elementId": "abc123",
"conditions": [
[
{ "key": "user_logged_in", "compare": "==", "value": true }
]
]
}
Specific post IDs:
{
"conditions": [
[
{ "key": "post_id", "compare": "==", "value": 42 }
],
[
{ "key": "post_id", "compare": "==", "value": 89 }
]
]
}
Dynamic data contains text:
{
"conditions": [
[
{
"key": "dynamic_data",
"dynamic_data": "{post_title}",
"compare": "contains",
"value": "Sale"
}
]
]
}
Clear all element conditions:
{
"conditions": []
}
_conditions; if any group is intended to match, check each item in that group. One false item makes the whole group false.empty against a value that is always empty in the current context.dynamic_data is present, the tag renders in the current post context, and the value comparison matches the rendered string.{ "main": "any" }) inside element _conditions.[[]] or groups with only generated IDs and no key.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/bricks:bricks-element-conditionsfrom 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