.cursor/skills/layout-spec/SKILL.md
Conduct a design conversation and produce a written layout specification for a FileMaker layout — object list, field bindings, section layout, portal configuration, button wiring, and style assignments. No XML output — this is the planning and consulting skill. Use when the developer says "layout spec", "layout blueprint", "spec out layout", "describe layout", or asks what objects a layout should contain.
npx skillsauth add petrowsky/agentic-fm layout-specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design a complete layout specification through a structured conversation with the developer. The output is a written blueprint — not XML or code — that describes every object, its position, its data binding, and its styling. This spec can be used as a manual build guide or as input to the layout-design skill for automated generation.
Check for agent/CONTEXT.json. If it exists, read it for:
current_layout — the layout being designed (name, TO, dimensions if available)tables — available fields and their typesrelationships — related TOs available for portalsscripts — scripts available for button wiringvalue_lists — value lists for dropdowns and radio buttonslayouts — other layouts for navigation buttonsIf CONTEXT.json is absent or scoped to the wrong layout, ask the developer to run Push Context on the target layout before proceeding.
Read the theme manifest and style classes if they exist:
ls agent/context/*/theme-manifest.json 2>/dev/null
ls agent/context/*/theme-classes.json 2>/dev/null
If theme data exists, read theme-manifest.json for the color palette and layout builder constants (default margins, field heights, label widths, portal row heights). Read theme-classes.json for available named style classes.
If theme data does not exist, note this to the developer and proceed with generic spacing recommendations. Suggest running python3 agent/scripts/extract_theme.py to extract theme data from the solution.
Ask the developer what type of layout this is. Common FM layout types:
| Type | Purpose | Key characteristics | |------|---------|---------------------| | Detail view | View/edit a single record | Fields arranged in sections, possibly with related portals | | List view | Browse multiple records | Repeating body part with summary fields, column headers in header | | Card window | Modal detail or picker | Compact, focused on a single task, fixed dimensions | | Dashboard | Overview with metrics | Summary fields, charts, navigation buttons, minimal data entry | | Print layout | Report output | Precise positioning, sub-summary parts, trailing grand summary | | Utility | Background or data-only | Minimal UI, used by scripts for context switching |
If the developer has already described the purpose, infer the type and confirm.
Walk through each design decision with the developer. Apply these UI/UX principles within FileMaker's fixed-position constraints:
For each part the layout will use, define:
Write the specification in a structured format. Include every object with enough detail for either manual construction or automated generation.
# Layout Specification: {Layout Name}
**Based on TO**: {Table Occurrence name}
**Layout type**: {Detail / List / Card / Dashboard / Print}
**Layout width**: {width in pixels}
## Parts
| Part | Height (px) | Background |
|------|-------------|------------|
| Header | 80 | Theme default |
| Body | 600 | White |
| Footer | 40 | Theme default |
## Section: {Section Name}
**Position**: Top-left corner at ({left}, {top}) relative to part
| Object | Type | Field/Value | Position (L, T, R, B) | Style Class | Notes |
|--------|------|-------------|----------------------|-------------|-------|
| Label: Client Name | Text | "Client Name" | (20, 90, 120, 110) | Field Label | |
| Field: ClientName | Edit Box | Clients::ClientName | (130, 90, 400, 110) | Data Field | |
| Label: Email | Text | "Email" | (20, 120, 120, 140) | Field Label | |
| Field: Email | Edit Box | Clients::Email | (130, 120, 400, 140) | Data Field | |
## Section: Related Invoices
**Portal configuration**:
- Related TO: Invoices_by_Client
- Visible rows: 5
- Row height: 22px
- Position: (20, 200, 780, 310)
- Vertical scroll bar: Yes
- Allow creation via relationship: No
| Column | Field | Width | Style Class |
|--------|-------|-------|-------------|
| Invoice # | Invoices_by_Client::InvoiceNumber | 100 | Portal Field |
| Date | Invoices_by_Client::InvoiceDate | 80 | Portal Field |
| Status | Invoices_by_Client::Status | 80 | Portal Field |
| Total | Invoices_by_Client::Total | 100 | Portal Field Right |
## Buttons
| Label | Position (L, T, R, B) | Script | Parameter | Style Class |
|-------|----------------------|--------|-----------|-------------|
| Save | (680, 10, 780, 35) | Save Record | "" | Primary Button |
| Cancel | (580, 10, 670, 35) | Cancel | "" | Secondary Button |
| New Invoice | (20, 310, 140, 335) | New Invoice | JSONSetElement ( "{}" ; "client_id" ; Clients::PrimaryKey ; JSONString ) | Action Button |
## Conditional Formatting
| Object | Condition | Style Change |
|--------|-----------|--------------|
| Field: Status | Status = "Overdue" | Text color: red, Bold |
| Field: Status | Status = "Paid" | Text color: green |
## Notes
- {Any design rationale, constraints, or follow-up items}
When assigning style classes, only use classes that exist in theme-classes.json. If no class fits the intended purpose:
Present the specification and ask for feedback:
Review the layout specification above. You can request changes like:
- "Move the portal below the address section"
- "Add a Notes field spanning the full width"
- "Use a button bar instead of separate buttons"
- "Add a tab control with Details and History tabs"
Reply with changes or confirm with "looks good" to finalize.
Iterate until the developer approves.
The specification is the final deliverable of this skill. Present it in the conversation.
If the developer requests it saved to a file, write to plans/layouts/{layout-name}-spec.md.
After approval, suggest next steps:
The layout specification is complete. Next steps:
- Create the layout shell in FileMaker — Layout Mode > New Layout > name it {Layout Name}, base it on {TO Name}
- Run Push Context on the new layout to refresh CONTEXT.json
- Use the
layout-designskill to generate the layout objects from this spec
theme-classes.json when available — never invent class namesrelationships.indexscripts.indexdevelopment
Generate a complete web application inside a FileMaker Web Viewer — self-contained HTML/CSS/JS styled with the FM theme, plus companion FM bridge scripts for bidirectional data flow. Use when the developer says "web viewer", "webviewer app", "HTML in FileMaker", "build web viewer", or when the layout-design skill delegates to the web-first output path. Recommended for modern, responsive UI, complex interactions (drag-and-drop, charts, rich text), or solutions considering future migration off FileMaker.
development
Trace references to a FileMaker object across the entire solution. Supports usage reports ("where is this field used?"), impact analysis ("what breaks if I rename this?"), and dead object scans ("show unused fields/scripts"). Use when the developer says "trace", "find references", "where is X used", "impact of renaming", "unused fields/scripts", "dead code", "what references X", or "is X used anywhere".
development
Analyze a FileMaker solution and produce a structured profile covering data model, business logic, UI layer, integrations, and health metrics. Uses on-disk pre-processing to handle solutions of any size without sending raw XML through the agent. Use when the developer says "analyze solution", "solution overview", "solution analysis", "solution profile", "solution spec", "what does this solution do", "solution summary", or wants a high-level understanding of an entire FileMaker solution.
development
Interactive setup wizard for agentic-fm. Detects what's already configured, walks the user through each remaining step, and verifies completion before proceeding. Use when the developer says "help me set up", "setup", "get started", "onboard", "first time setup", "install agentic-fm", "configure agentic-fm", or is clearly new to the project and needs guidance.