agent-to-bricks

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.

41 stars

Best use case

agent-to-bricks is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using agent-to-bricks should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/agent-to-bricks/SKILL.md --create-dirs "https://raw.githubusercontent.com/nerveband/agent-to-bricks/main/.claude/skills/agent-to-bricks/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/agent-to-bricks/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How agent-to-bricks Compares

Feature / Agentagent-to-bricksStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Agent to Bricks — Build & Deploy Bricks Pages

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.

## Quick Start Workflow

When the user asks you to build or update a Bricks page, follow these steps:

### Step 1: Discover the site's design system

```bash
bricks discover --json
```

This returns the site's colors, fonts, spacing variables, CSS framework classes,
available element types, and pages. Pay attention to:
- **CSS variables** (`--primary`, `--space-m`) — use these in your HTML
- **Global classes** (ACSS utilities) — add these as CSS classes
- **Breakpoints** — the site's responsive breakpoint widths

### Step 2: Generate HTML using the site's design tokens

Write clean, semantic HTML that uses the site's CSS variables and class names.
Structure your HTML with `<section>` > `<div>` > content elements.

### Step 3: Convert and push to the site

```bash
# 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
```

### Step 4: Verify

```bash
# 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
```

## Patching Existing Elements (Preferred for Updates)

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.

```bash
# 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:**
- **Patch**: changing classes, text, styles, settings on existing elements
- **Convert**: creating new sections/pages from HTML

## Available Commands

| 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 |

## Key Principles

1. **Always call `bricks discover --json` first** to learn the design system
2. **Prefer `bricks patch` for updates** — don't regenerate what you can patch
3. **Use the site's CSS variables** — not hardcoded values
4. **Use ACSS global classes** when available
5. **Use `--snapshot`** when pushing to important pages
6. **Use `--json`** on any command for structured output
7. **Pipe HTML from stdin** with `--stdin` for seamless workflow
8. **Structure HTML as**: section → div (container) → content elements

## Element Mapping

| 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 |

## Error Recovery

- 409 conflict: re-fetch elements and retry
- 401/403: check API key with `bricks doctor`
- Bad results: use `--dry-run` to inspect before pushing
- Undo: `bricks elements PAGE_ID rollback SNAP_ID`

Related Skills

databricks-webhooks-events

1868
from jeremylongshore/claude-code-plugins-plus-skills

Configure Databricks job notifications, webhooks, and event handling. Use when setting up Slack/Teams notifications, configuring alerts, or integrating Databricks events with external systems. Trigger with phrases like "databricks webhook", "databricks notifications", "databricks alerts", "job failure notification", "databricks slack".

databricks-upgrade-migration

1868
from jeremylongshore/claude-code-plugins-plus-skills

Upgrade Databricks runtime versions and migrate between features. Use when upgrading DBR versions, migrating to Unity Catalog, or updating deprecated APIs and features. Trigger with phrases like "databricks upgrade", "DBR upgrade", "databricks migration", "unity catalog migration", "hive to unity".

databricks-security-basics

1868
from jeremylongshore/claude-code-plugins-plus-skills

Apply Databricks security best practices for secrets and access control. Use when securing API tokens, implementing least privilege access, or auditing Databricks security configuration. Trigger with phrases like "databricks security", "databricks secrets", "secure databricks", "databricks token security", "databricks scopes".

databricks-sdk-patterns

1868
from jeremylongshore/claude-code-plugins-plus-skills

Apply production-ready Databricks SDK patterns for Python and REST API. Use when implementing Databricks integrations, refactoring SDK usage, or establishing team coding standards for Databricks. Trigger with phrases like "databricks SDK patterns", "databricks best practices", "databricks code patterns", "idiomatic databricks".

databricks-reference-architecture

1868
from jeremylongshore/claude-code-plugins-plus-skills

Implement Databricks reference architecture with best-practice project layout. Use when designing new Databricks projects, reviewing architecture, or establishing standards for Databricks applications. Trigger with phrases like "databricks architecture", "databricks best practices", "databricks project structure", "how to organize databricks", "databricks layout".

databricks-rate-limits

1868
from jeremylongshore/claude-code-plugins-plus-skills

Implement Databricks API rate limiting, backoff, and idempotency patterns. Use when handling rate limit errors, implementing retry logic, or optimizing API request throughput for Databricks. Trigger with phrases like "databricks rate limit", "databricks throttling", "databricks 429", "databricks retry", "databricks backoff".

databricks-prod-checklist

1868
from jeremylongshore/claude-code-plugins-plus-skills

Execute Databricks production deployment checklist and rollback procedures. Use when deploying Databricks jobs to production, preparing for launch, or implementing go-live procedures. Trigger with phrases like "databricks production", "deploy databricks", "databricks go-live", "databricks launch checklist".

databricks-performance-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Optimize Databricks cluster and query performance. Use when jobs are running slowly, optimizing Spark configurations, or improving Delta Lake query performance. Trigger with phrases like "databricks performance", "spark tuning", "databricks slow", "optimize databricks", "cluster performance".

databricks-observability

1868
from jeremylongshore/claude-code-plugins-plus-skills

Set up comprehensive observability for Databricks with metrics, traces, and alerts. Use when implementing monitoring for Databricks jobs, setting up dashboards, or configuring alerting for pipeline health. Trigger with phrases like "databricks monitoring", "databricks metrics", "databricks observability", "monitor databricks", "databricks alerts", "databricks logging".

databricks-multi-env-setup

1868
from jeremylongshore/claude-code-plugins-plus-skills

Configure Databricks across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific Databricks configurations. Trigger with phrases like "databricks environments", "databricks staging", "databricks dev prod", "databricks environment setup", "databricks config by env".

databricks-migration-deep-dive

1868
from jeremylongshore/claude-code-plugins-plus-skills

Execute comprehensive platform migrations to Databricks from legacy systems. Use when migrating from on-premises Hadoop, other cloud platforms, or legacy data warehouses to Databricks. Trigger with phrases like "migrate to databricks", "hadoop migration", "snowflake to databricks", "legacy migration", "data warehouse migration".

databricks-local-dev-loop

1868
from jeremylongshore/claude-code-plugins-plus-skills

Configure Databricks local development with Databricks Connect, Asset Bundles, and IDE. Use when setting up a local dev environment, configuring test workflows, or establishing a fast iteration cycle with Databricks. Trigger with phrases like "databricks dev setup", "databricks local", "databricks IDE", "develop with databricks", "databricks connect".