An AI Agent Skill that teaches any coding agent to see and navigate webpage layouts β not just code trees.
Drop in SKILL.md, map your pages, and watch your AI stop guessing which component to edit.
Standalone AI Agent Skill β Works with any AI coding agent (Cursor, Windsurf, Gemini CLI, Claude Code). Part of the Pageel ecosystem.
π»π³ PhiΓͺn bαΊ£n tiαΊΏng Viα»t
When humans build or modify a webpage, we see a global visual layout (nav, hero, sidebar, footer).
When AI Agents modify a webpage, they see endless trees of .astro, .tsx, or .vue files β isolated from the big picture.
This often leads to AI altering the wrong component or losing track of the structural hierarchy.
The Page Map architecture solves this by providing three anchor files:
PAGE_MAP.mdβ An intuitive ASCII wireframe showing the exact visual layout geometry, identifying sections with tags like[hero.title].BLUEPRINT.mdβ A mapping table linking those tags directly to the actual source code (src/components/Hero.astro).INDEX.mdβ A site-wide coverage tracker with progress bars showing which pages and components are mapped.
By supplying this shared "mental map," AI Agents become hyper-accurate in UI localization, and developers can instantly swap themes without breaking content structures.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β [header] β
β logo βββ nav(docs, blog, contact) βββ actions(gh, lang) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [hero] β
β βββββββββββββ¬βββββββββββββββββββ¬βββββββββββββββββββ β
β β [hero. β [hero.content] β [hero.visual] β β
β β sidebar] β β β β
β β β Welcome to β <HeroImage/> β β
β β vertical β My Project β β β
β β text β tagline + CTA β β β
β βββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [features] β
β Feature cards grid (3 columns) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [footer] β
β links βββ social βββ copyright β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Then the BLUEPRINT maps each tag to real code:
| Section | Tag | Component | Notes |
|---|---|---|---|
| header | [header] |
src/components/Header.astro |
Fixed, scroll effect |
| hero.content | [hero.content] |
src/pages/index.astro (inline) |
h1 + CTA button |
| hero.visual | [hero.visual] |
src/components/HeroImage.tsx |
React, client:load |
| features | [features] |
src/components/FeatureGrid.astro |
3-col grid |
| footer | [footer] |
src/components/Footer.astro |
Dark background |
| Metric | Result |
|---|---|
| Token savings per page | ~87% average |
| Agent navigation accuracy | 3/3 test scenarios passed |
| Build impact | Zero (comments only) |
Measured during real-world testing on a production Astro site with 120+ pages.
| File | Description |
|---|---|
SKILL.md |
Drop-in AI agent instructions β makes any agent understand page map context |
docs/spec.md |
Complete format specification (naming, inline tags, storage convention) |
templates/PAGE_MAP.md |
Page-level wireframe template with cross-reference arrows |
templates/BLUEPRINT.md |
Page-level blueprint template with Hydration + Component Map columns |
templates/COMPONENT_MAP.md |
Component-level wireframe template for internal layout zones |
templates/COMPONENT_BLUEPRINT.md |
Component-level blueprint template |
templates/INDEX.md |
Site-wide coverage tracker template with progress bars |
examples/ |
Real-world mappings: Landing Page, Documentation Site, Blog |
Copy SKILL.md into your agent's custom instructions or skills folder:
# For PARA Workspace users
cp SKILL.md /path/to/workspace/.agent/skills/page-map/SKILL.md
# For Cursor / Windsurf / other agents
# Copy SKILL.md content into your agent's custom instructionsStore page maps in .pageel/page-maps/ at your repository root, organized by type:
your-project/
βββ .pageel/
β βββ page-maps/
β βββ INDEX.md β Site-wide coverage tracker
β βββ pages/
β β βββ index/
β β β βββ PAGE_MAP.md β Visual wireframe
β β β βββ BLUEPRINT.mdβ Component mapping
β β βββ about/
β β βββ PAGE_MAP.md
β β βββ BLUEPRINT.md
β βββ components/
β βββ Hero/
β β βββ PAGE_MAP.md β Internal layout zones
β β βββ BLUEPRINT.md
β βββ Navbar/
β βββ ...
βββ .pageelrc.json β (optional) CMS config
βββ src/
Mark sections in your source code so the agent can navigate precisely:
{/* [hero.cta] */}
<a href="/docs" class="btn-primary">Get Started</a>
{/* [hero.title] */}
<h1 class="text-6xl font-bold">Welcome</h1>Now when you say "fix the CTA in hero", the agent will:
- Read
.pageel/page-maps/index/BLUEPRINT.mdβ find[hero.cta]β locate component file - Grep
{/* [hero.cta] */}in source β navigate to exact line - Edit only the tagged section β no guesswork
See docs/spec.md for the complete specification covering:
- Section naming convention:
[page.section]for pages,[Component.Section]for components - Inline tag format:
{/* [Section.Subsection] */} - Storage convention:
pages/for routes,components/for reusable units - Cross-referencing rules between page and component maps
- INDEX.md site-wide coverage tracking with progress bars
- PAGE_MAP, BLUEPRINT, and INDEX file requirements
Contributions are welcome! Ideas for improvement:
- ASCII layouts for new framework patterns (Next.js, SvelteKit, Nuxt)
- Better BLUEPRINT column schemas
- Integration examples for other AI agents
See CONTRIBUTING.md for guidelines.
pageel-theme-kitβ Full theme management with validator + CLI@pageel/mcp-page-mapβ (Coming soon) MCP server exposing page maps as resources