.cursor/skills/solution-analysis/SKILL.md
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.
npx skillsauth add petrowsky/agentic-fm solution-analysisInstall 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.
This skill produces a comprehensive profile of a FileMaker solution by running agent/scripts/analyze.py — a Python script that reads pre-indexed data (index files, xref, layout summaries, sanitized scripts) and synthesizes a structured overview. The agent never touches raw XML; all heavy processing happens on disk.
Purpose: Give a developer (or someone new to a solution) a complete understanding of what the solution does — its data model, scripted business logic, UI coverage, integration points, and health.
Output: agent/sandbox/{solution} - solution-profile.json and optionally a markdown specification document.
analyze.py)Pure Python analysis that reads pre-indexed data and produces structured output:
python3 agent/scripts/analyze.py -s "SolutionApp" # JSON profile
python3 agent/scripts/analyze.py -s "SolutionApp" --format markdown # Markdown spec
python3 agent/scripts/analyze.py -s "SolutionApp" --deep # Full script analysis
python3 agent/scripts/analyze.py -s "SolutionApp" --ensure-prerequisites # Build xref + layout summaries first
python3 agent/scripts/analyze.py --list-extensions # Show optional deps
The script automatically builds missing prerequisites (xref.index, layout summaries) when --ensure-prerequisites is passed.
Reads the compact JSON profile and produces narrative insight — what the solution appears to do, how its parts connect, what patterns it follows, and what health issues deserve attention.
Determine which solution to analyze:
agent/CONTEXT.json exists, read the solution fieldagent/context/, auto-detect itpython3 agent/scripts/analyze.py -s "{solution}" --ensure-prerequisites
This:
xref.index (via trace.py build) if missinglayout_to_summary.py) if missingagent/sandbox/{solution} - solution-profile.jsonFor deep analysis (when the developer requests it or the solution is small enough):
python3 agent/scripts/analyze.py -s "{solution}" --ensure-prerequisites --deep
Read agent/sandbox/{solution} - solution-profile.json. The profile contains these sections:
| Section | Key | What it contains |
| ---------------- | -------------------- | -------------------------------------------------------------------------------- |
| Summary | summary | Top-level counts (tables, fields, scripts, layouts, etc.) |
| Data Model | data_model | Tables with field breakdowns, TO groups, relationship summary, topology analysis |
| Naming | naming_conventions | Detected prefix patterns and case styles |
| Business Logic | business_logic | Script folders, call graph, entry points, utility scripts, clusters, line counts |
| Custom Functions | custom_functions | Function inventory, categories, dependency chains |
| UI Layer | ui_layer | Layout inventory, classifications, portal usage, orphaned layouts |
| Integrations | integrations | External data sources, value lists, external script calls |
| Multi-file | multi_file | Cross-file references and correlated solutions |
| Health | health | Dead objects, disconnected tables, empty scripts |
Using the profile data, produce a narrative specification that covers:
Executive Summary — What this solution appears to be (CRM, ERP, inventory system, etc.) based on table names, script domains, and integration patterns. Mention the solution's scale (table count, script count, field count).
Data Architecture — Describe the topology pattern (anchor-buoy, spider-web, hybrid). Identify the core entity tables and how they relate. Note the naming convention and what it tells us about the development approach.
Business Logic Domains — Walk through the script folder hierarchy. For each major folder, describe what that functional area does based on script names and entry points. Highlight the largest scripts and utility scripts that serve as shared infrastructure.
UI Coverage — Which tables have layouts and which don't. Note the layout classification distribution. Call out orphaned layouts and any portals that reveal parent-child UI patterns.
Integration Points — External data sources, API calls (Insert from URL), email integration, import/export capabilities.
Health Observations — Dead object counts, disconnected tables, empty scripts. Frame these as observations, not criticisms — solutions grow organically and some "dead" objects may be intentional placeholders.
If the developer wants a shareable document:
python3 agent/scripts/analyze.py -s "{solution}" --format markdown --ensure-prerequisites
This produces agent/sandbox/{solution} - solution-profile.md — a structured markdown document with tables, the Mermaid ERD, and all metrics.
The analysis script supports optional Python libraries that enable deeper analysis. Check availability:
python3 agent/scripts/analyze.py --list-extensions
Extended features include:
If any are missing and the developer wants extended analysis, guide them through setup:
Extended analysis requires additional Python dependencies.
Core analysis works without them — install only if you want topology detection, statistical profiling, visualizations, or templated reports.
Option A: venv in the project folder (recommended)
python3 -m venv agent/.venv source agent/.venv/bin/activate pip install -r .cursor/skills/solution-analysis/assets/requirements-analyze.txtOnce set up, run the analysis with the venv active, or prefix with
agent/.venv/bin/python3:agent/.venv/bin/python3 agent/scripts/analyze.py -s "{solution}" --ensure-prerequisites
If the developer declines, proceed with the core analysis — all six profile sections are still generated, just without the extended metrics.
When a FileMaker solution uses a data separation model (UI file + data file) or references other FM files, the analysis automatically detects and incorporates cross-file relationships into a single unified profile.
detect_multi_file() parses external_data_sources/ XML to find referenced filesagent/context/ (both files have been exploded and indexed via fmcontext.sh), the analysis loads both solutions' index datatable_occurrences.index (columns: TOName|TOID|BaseTableName|BaseTableID|Type|DataSource)source_file attribution# Standard analysis — auto-detects correlated files
python3 agent/scripts/analyze.py -s "SolutionApp" --ensure-prerequisites
# Explicitly name correlated solutions
python3 agent/scripts/analyze.py -s "SolutionApp" --correlated SolutionData
The JSON profile includes these additional fields when multi-file is detected:
multi_file.file_architecture: "data_separation", "multi_file", or "single"multi_file.data_source_map: Maps external data source names to correlated SolutionApps (e.g., {"Data": "SolutionData"})multi_file.files: Array with per-file summary (name, role, local table count, TO counts)data_model.tables[*].source_file: Which FM file owns each base tabledata_model.tables[*].is_external: true for tables from correlated solutionsdata_model.base_table_edges[*].cross_file: Whether a relationship crosses file boundariesdata_model.local_tables / data_model.external_tables: Tables grouped by ownershipdata_model.to_classification: Breakdown of Local vs External TOs by data sourceHTML: The relationship graph colors nodes by source file (blue = local, orange = data file). Cross-file edges use dashed orange lines. A legend shows the file-to-color mapping. The tables DataTable includes a "Source" column.
Markdown: The ERD uses a Mermaid flowchart with subgraph blocks per file (instead of erDiagram). Cross-file edges are dashed. A "Multi-File Architecture" section shows the pattern, per-file summary table, and table ownership.
JSON: All enrichments above are machine-readable for agent consumption.
When describing a data separation model solution:
development
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
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.
development
Generate a companion verification script that exercises a target script with known inputs and asserts expected outputs. Uses the fm-debug infrastructure to report pass/fail results back to the agent. At Tier 1 the developer runs the test script manually. At Tier 3 the agent deploys, runs, and reads results autonomously. Triggers on phrases like "test this script", "write a test", "verification script", "assert results", or "prove this works".