.claude/skills/agent-to-bricks/SKILL.md
Builds, converts, and deploys pages to a Bricks Builder WordPress site using the agent-to-bricks CLI (`bricks`). Use when the user asks to create a page, deploy HTML, build a landing page, update a Bricks site, push content to WordPress, convert HTML to Bricks, or manage Bricks Builder elements. Also activates when the user mentions Bricks Builder, ACSS, Automatic.css, or references their WordPress site in the context of page building.
npx skillsauth add nerveband/agent-to-bricks agent-to-bricksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You have access to the bricks CLI which manages a Bricks Builder WordPress site.
It can convert HTML to native Bricks elements, push content to pages, and query
the site's design system — all without leaving the terminal.
When the user asks you to build or update a Bricks page, follow these steps:
bricks discover --json
This returns the site's colors, fonts, spacing variables, CSS framework classes, available element types, and pages. Pay attention to:
--primary, --space-m) — use these in your HTMLWrite clean, semantic HTML that uses the site's CSS variables and class names.
Structure your HTML with <section> > <div> > content elements.
# Convert HTML and push directly to a page
bricks convert html --push PAGE_ID --stdin <<'HTML'
<section>...</section>
HTML
# Or from a file
bricks convert html page.html --push PAGE_ID
# Preview without pushing (dry run)
bricks convert html --push PAGE_ID --dry-run --stdin <<'HTML'
<section>...</section>
HTML
# Snapshot before pushing (for rollback)
bricks convert html --push PAGE_ID --snapshot --stdin <<'HTML'
<section>...</section>
HTML
# Use the REST API to check page elements (the CLI handles auth from config)
curl -s -H "X-ATB-Key: $(grep api_key ~/.agent-to-bricks/config.yaml | awk '{print $2}')" \
"$(grep url ~/.agent-to-bricks/config.yaml | awk '{print $2}')/wp-json/agent-bricks/v1/pages/PAGE_ID/elements"
# Or just use --dry-run before pushing to preview the conversion
bricks convert html --push PAGE_ID --dry-run --stdin <<'HTML'
<section>...</section>
HTML
When you need to modify an existing page (change classes, text, styles),
use bricks patch instead of regenerating the full page. It's faster and
uses fewer tokens.
# Step 1: List elements to find IDs
bricks patch PAGE_ID --list
bricks patch PAGE_ID --list --json # structured output
# Step 2: Patch specific settings by element ID
bricks patch PAGE_ID -e ELEMENT_ID --set '_cssClasses=new-class another'
bricks patch PAGE_ID -e ELEMENT_ID --set 'text=Updated Heading'
bricks patch PAGE_ID -e ELEMENT_ID --set '_display=flex' --set '_gap=var(--space-m)'
# Patch with JSON values (for nested settings like background, typography)
bricks patch PAGE_ID -e ELEMENT_ID --set '_background={"color":{"raw":"var(--primary)"}}'
bricks patch PAGE_ID -e ELEMENT_ID --set '_typography={"font-size":"var(--h2)","font-weight":"700"}'
# Remove a setting
bricks patch PAGE_ID -e ELEMENT_ID --rm '_padding'
# Multi-element patch via JSON stdin
echo '{"patches":[
{"id":"abc123","settings":{"_cssClasses":"hero-dark"}},
{"id":"def456","settings":{"text":"New text"}}
]}' | bricks patch PAGE_ID --stdin
# Preview without applying
bricks patch PAGE_ID -e ELEMENT_ID --set 'text=Preview' --dry-run
When to use patch vs convert:
| Command | Description |
|---------|-------------|
| bricks discover --json | Full site context dump (run first) |
| bricks convert html [file] --push ID | Convert HTML and push to page |
| bricks convert html --stdin | Read HTML from stdin pipe |
| bricks patch ID --list | List elements with IDs on a page |
| bricks patch ID -e EL --set k=v | Patch element settings |
| bricks elements types --json | List available Bricks element types |
| bricks site info --json | Bricks/WP versions, element types |
| bricks classes --json | Global CSS classes |
| bricks frameworks --json | CSS framework config (ACSS) |
| bricks schema | Bricks element JSON schema |
bricks discover --json first to learn the design systembricks patch for updates — don't regenerate what you can patch--snapshot when pushing to important pages--json on any command for structured output--stdin for seamless workflow| HTML Tag | Bricks Element | |----------|---------------| | section, header, footer, main, article | section | | div, aside, nav | div | | h1-h6 | heading | | p, span, blockquote | text-basic | | a | text-link | | button | button | | img | image | | video | video | | ul, ol | list | | form | form | | code, pre | code |
bricks doctor--dry-run to inspect before pushingbricks elements PAGE_ID rollback SNAP_IDtools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.