# Swap Page Sections

> Reorder <section> blocks in a minified HTML file with byte-level safety.

- **Kind**: Shell tool
- **Category**: engineering
- **Owner**: Sentinel (/sentinel)
- **Default model**: sonnet
- **Cost class**: cheap (Haiku-class model. Cents per invocation.)
- **Turn budget**: 6
- **Execution**: synchronous (result lands in the same turn)
- **Canonical URL**: https://app.51ultron.com/docs/skills/swap-page-sections

## What it does

Uses the swap-sections tool (and the matching SKILL.md) to swap two <section> blocks in /work/index.html. Handles the minified-into-one-line case via grep anchors + byte offsets so the swap doesn't corrupt the document.

## When to use this

- user wants to reorder sections in a cloned landing page
- user says 'move the pricing section above the features' / 'swap section A and B'

## When NOT to use this

- user wants to edit text inside a section → use shell_write / string-editing skill instead
- the HTML is not minified to one line → use a normal editor; this is overkill

## Example prompts

- `swap the hero and the testimonials sections`
- `move the pricing block above the features block in index.html`

## Inputs

- **section_a**: anchor or index of first section
- **section_b**: anchor or index of second

## Output

Updated /work/index.html with the two sections swapped; diff summary.

## Tools used

`shell_exec`

## Execution template

Shell tools dispatch through `shell_exec` with the following command template:

```bash
swap-sections {{section_a}} {{section_b}} /work/index.html
```

## Tags

`engineering`, `html`, `edit`

## Keywords

swap, reorder, sections, html, rearrange

