auditing-ui-archeology
Skill378 starsChanged 4 months agoApache-2.0View on GitHub
Analyzes legacy UI templates (Pug, EJS, HTML) to extract a comprehensive inventory of components, layouts, and conditional logic. Use when reverse-engineering a legacy frontend for a modern rewrite.
In this repository59 other files it gives its agents.
- codelabs/ai-toolkit-lab-2/hackathon-judge/frontend/.agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- codelabs/ai-toolkit-lab-2/hackathon-judge/frontend/.agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- batch-executing-test-suitesSkill
- circuit-breaker-reporterSkill
- generating-mock-imagesSkill
- making-forms-demoSkill
- multi-step-workflow-reporterSkill
- go-project-setupSkill
- latest-software-versionSkill
- video-descriptionSkill
- adk-memory-bank-initializerSkill
- agent-containerizerSkill
- cloud-run-agent-architectSkill
- gcp-agent-eval-engine-runnerSkill
- gcp-agent-eval-metric-configuratorSkill
- gcp-agent-golden-dataset-builderSkill
- gcp-agent-model-armor-shieldSkill
- gcp-agent-safety-gatekeeperSkill
- gcp-agent-sdp-template-factorySkill
- gcp-agent-shadow-deployerSkill
- gcp-agent-tool-trajectory-evaluatorSkill
- gcp-production-secret-handlerSkill
- mcp-connector-generatorSkill
- go-architectSkill
- go-backend-devSkill
- go-reviewerSkill
- go-test-expertSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- brand-guidelinesSkill
- knowledge_catalog_governanceSkill
- banana-breadSkill
- cheese-breadSkill
- drawingsSkill
- paintingsSkill
- photographySkill
- adding-easter-eggSkill
- building-platformer-gamesSkill
- creating-a-gameSkill
- ensuring-arcade-visualsSkill
- handling-user-inputSkill
- helping-the-userSkill
- improving-game-qualitySkill
- messaging-game-overSkill
- playing-the-gameSkill
- adversarial-verificationSkill
- auditing-api-contractsSkill
- auditing-business-logicSkill
- auditing-data-modelsSkill
- auditing-paritySkill
- generating-api-testsSkill
- generating-database-seederSkill
- orchestrating-greenfield-migrationSkill
- scaffolding-api-routesSkill
- scaffolding-data-layerSkill
- scaffolding-nextjs-foundationSkill
- scaffolding-test-foundationSkill
- scaffolding-ui-and-pagesSkill
- ping_pong_pairingSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Create a matrix mapping the Legacy Endpoint (e.g., GET /articles) to the intended Next.js App Router path (e.g., src/app/articles/page.tsx).
- Distinctive: line 34
Nested Layouts: Check if specific modules (e.g., "Account Settings" or "Dashboard") have their own sub-layouts.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Intent-Based UI Archeology
Analyze legacy template files (Pug, EJS, HTML) to extract "UI Intent" and structural patterns. Produce a blueprint for a modern, component-driven design system (e.g., ShadCN + Tailwind).
Objective
Reverse-engineer the legacy frontend by mapping out the explicit Route & Page Topology alongside identifying Recurring Component Patterns and Layout Hierarchies. This ensures no pages are left behind during modernization.
Instructions for the Subagent
Copy this checklist and track your progress:
Task Progress:
- [ ] Step 1: Map Route & Page Topology
- [ ] Step 2: Map Layout Hierarchies
- [ ] Step 3: Catalog Interaction Patterns
- [ ] Step 4: Document Component-Level Intent
- [ ] Step 5: Extract Design Tokens
- [ ] Step 6: Generate UI_Component_Inventory.mdStep 1. Map Route & Page Topology
Explicitly list every route/URL requested and rendered by the legacy views.
- Create a matrix mapping the Legacy Endpoint (e.g.,
GET /articles) to the intended Next.js App Router path (e.g.,src/app/articles/page.tsx). - For each route, briefly list the high-level components it relies on.
Step 2. Map Layout Hierarchies
Identify the "Shell" of the application. Locate parent templates (e.g., layout.pug, base.html) and child blocks.
- Global Regions: Identify Navbar, Sidebar, Footer, and Content areas.
- Nested Layouts: Check if specific modules (e.g., "Account Settings" or "Dashboard") have their own sub-layouts.
Step 3. Catalog Interaction Patterns
Group UI elements into functional Patterns:
- Navigation Patterns: Top-level menus, breadcrumbs, pagination.
- Form Patterns: Input fields, validation error displays, submission buttons.
- Data Display Patterns: Lists/Feeds, Cards, Detail Views, Tables.
- Feedback Patterns: Toasts/Messages, Loading states, Empty states.
Step 4. Document Component-Level Intent
For each unique pattern or shared fragment, document:
- UI Intent: What is the purpose of this element? (e.g., "The Primary Navbar provides global navigation and session-aware actions.")
- Logic & State: Conditional rendering (e.g., "Show 'Edit' button only if
resource.owner_id === current_user.id"). - Abstracted Props: What data is required from the backend to render this? (e.g.,
user,items[],isOwner).
Step 5. Extract Design Tokens
Identify the underlying "Style Intent" found in legacy CSS or inline classes (e.g., Bootstrap bg-primary, text-muted):
- Typography Hierarchy: H1/H2 sizes, font weights.
- Color Palette: Primary, secondary, danger (error), success (toasts).
- Spacing Patterns: Common padding, margins between items in a list.
Step 6. Generate UI_Component_Inventory.md & Identify Interaction Targets
Compile findings into a single, highly detailed artifact at docs/legacy-audit/UI_Component_Inventory.md, making sure the Route & Page Topology table is prominent. Additionally, identify specific interaction-parity targets (e.g., "The user profile must correctly display a fallback avatar if the image link is broken"). Append these interaction-specific test cases to docs/verification/Verification_Plan.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

