dawiddutoit/custom-claude/browser-layout-editor
Claude Code and agent skill by dawiddutoit/custom-claude
- community
Checking that the SKILL.md file is still in the repository.
Builds browser-based 2D layout editors with FastAPI backend and vanilla JS + SVG frontend. Use when creating: (1) Visual editors for 2D arrangements (cut lists, floor plans, diagrams), (2) Drag-and-drop interfaces with multiple containers/sheets, (3) Single-file browser UIs served from Python, (4) Real-time position editing with validation. Triggers: "layout editor", "drag between", "visual editor", "browser UI for editing", "SVG editor".
Install
npx vskill@latest install dawiddutoit/custom-claude/browser-layout-editorSKILL.md
Browser Layout Editor
Build browser-based 2D layout editors with FastAPI + vanilla JS + SVG.
When to Use This Skill
Use when asked to:
- Create visual editors for 2D layouts (cut lists, floor plans, room arrangements)
- Build drag-and-drop interfaces with multiple containers or sheets
- Develop interactive browser UIs for editing positions and sizes
- Create single-file browser applications served from Python
- Implement real-time position editing with validation and collision detection
Do NOT use when:
- Simple form inputs are sufficient (don't over-engineer)
- 3D visualization is needed (this is 2D only)
- User needs desktop application (this is browser-based)
Architecture
Core Patterns
1. Module-Level State (Single-User Server)
For single-user editing, use module globals instead of a database:
2. API Endpoint Pattern
Standard CRUD for layout editing:
| Endpoint | Method | Purpose | |
|---|---|---|---|
/ | GET | Serve HTML | |
/api/layout | GET | Get full layout | |
/api/layout | PUT | Save to file | |
/api/piece/{container}/{index} | PATCH | Update single item | |
/api/move-piece | POST | Move between containers | |
/api/validate | POST | Check overlaps/bounds |
3. Pydantic Schemas
4. Single-File HTML UI
Embed CSS and JS in one HTML file served by FastAPI:
5. SVG for 2D Layout
Render items as SVG rectangles with labels:
Cross-Container Drag-and-Drop
See references/drag-drop-pattern.md for the complete ghost-based drag pattern.
Key insight: Items rendered inside different SVGs cannot visually cross boundaries. Use a DOM ghost element that follows the cursor globally.
Quick Reference
File Structure
Dependencies
CLI Integration
Validation Pattern
Check bounds and overlaps server-side:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/browser-layout-editor/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dawiddutoit/custom-claude/browser-layout-editor)