# Edit Live WP FSE Templates and Their CSS

> Use when editing live WordPress FSE templates, parts, and the CSS they render.

Edit Live WP FSE Templates and Their CSS is a paid AI agent skill on Agensi by Anthony, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $6 (one-time purchase)
- Creator: [Anthony](https://www.agensi.io/creators/avz369)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/edit-live-wp-fse-templates-and-their-css
- Tags: api, wordpress, css, wp-cli, automation

## About this skill

Production CSS work on FSE sites, decided by measurement. Four places to search for the real source of a rule: templates, parts, blocks, and the page content itself, because a wp-block-html block can carry its own style. The contested value is always the render, never the recopied CSS text. Prove hover with a real mouse event, check both widths before calling anything desktop-only, deliver a measured before/after table with snapshot and rollback. Includes the hit-test reference and a browser script that does the measuring.

### What it does
- **Locate CSS sources**: Identifies if styles live in theme files, `wp_template`, `wp_template_part`, or inline within `wp-block-html` blocks.
- **Precision patching**: Updates post content using exact-match logic and uniqueness guards to prevent accidental global corruption.
- **Visual measurement**: Uses browser execution to read `getComputedStyle` and `getBoundingClientRect` for actual rendered values rather than trusting CSS text.
- **State verification**: Simulates real `:hover` and `:focus` events via coordinate-based mouse dispatch to verify interactive styles.
- **Environment parity**: Handles viewport-specific rules to ensure desktop changes do not bleed into mobile media queries unintentionally.

### How it works
1. **Source Discovery**: Search the database and file system to find where a selector is truly defined (post table vs. disk).
2. **Snapshot**: Create a byte-exact backup of the `post_content` using `wp eval` before any modification.
3. **Execution**: Apply changes using PHP-based string replacement for precision, followed by a LiteSpeed cache purge.
4. **Verification**: Run `css_state_check.py` to compare pre- and post-change measurements on the live served page.

### Frameworks & tools
WordPress FSE, WP-CLI, PHP, Python, LiteSpeed Cache, and Linux-based environments.

### Why this beats prompting it yourself
Generic prompts often fail to account for the four different places FSE styles can hide or how WordPress normalizes newlines in the database. This skill enforces a strict "measure before proposing" workflow, ensuring you never break a mobile layout while fixing a desktop header.

### Use cases
- Aligning navigation items where `line-height` and `padding` conflicts cause sub-pixel offsets.
- Fixing "sticky" hover states that only appear on specific viewport widths.
- Patching CSS in template parts that are shared across dozens of pages without manual searching.
- Debugging Z-index or pointer-event issues where a decorative element blocks a context menu.

### Known limitations
It covers FSE template parts, not theme code. The measurements were taken at 1440 and 390 px; other breakpoints are not covered by the protocol. A hover proof is a real dispatch_event on an element whose pointer-events reach the target, not an approximation. On any other theme, the same search method must be re-applied before the first write.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Edit Live WP FSE Templates and Their CSS skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill handle CSS changes differently than simply asking a standard AI to write code?

This skill solves the 'FSE style ghosting' problem by identifying exactly where a style is stored—whether it's in the database, theme files, or inline—and uses browser-based measurements to verify that CSS changes actually render as intended without breaking layouts.

### What are the specific technical requirements for my WordPress hosting environment?

The skill requires a Linux-based WordPress environment with WP-CLI installed and the ability to execute Python scripts for the browser-based verification step. Ensure your hosting environment allows shell execution via these tools for full functionality.

### Is it safe to use this skill on a live production site with shared template parts?

Yes, the 'Precision Patching' system uses exact-match logic and unique guards to ensure edits are applied specifically to the intended template or part, preventing the accidental global style corruption common with generic find-and-replace methods.

### Which AI agents or platforms are compatible with this skill?

This skill is designed for AI agents with access to a filesystem and terminal (such as an IDE agent or a local automation worker) that can interface with your WordPress server's WP-CLI and run the validation scripts.

### How does the visual verification process work after a style is updated?

Unlike standard editors that only show code, this skill uses a Python-based execution layer to check 'getComputedStyle' on the live page, ensuring that factors like specificity or cache layers aren't overriding your new styles.

### What exactly is included in the purchase of this skill?

You receive the specialized skill logic for WordPress source discovery, the snapshot and patching protocols, and the custom Python verification scripts used to measure rendered CSS states.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
