.cursor/skills/setup/SKILL.md
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.
npx skillsauth add petrowsky/agentic-fm setupInstall 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.
Interactive, resumable setup wizard for agentic-fm. Walks the developer through every step required to go from a fresh clone to a working AI-assisted FileMaker scripting environment.
Before presenting any steps, silently detect what is already in place. Run these checks and record the results — they determine which steps to skip.
# Python 3
python3 --version 2>&1
# fm-xml-export-exploder
test -x ~/bin/fm-xml-export-exploder && ~/bin/fm-xml-export-exploder --version 2>&1 || echo "NOT FOUND"
# xmllint
xmllint --version 2>&1
# Node.js (optional — webviewer path)
node --version 2>&1 || echo "NOT FOUND"
# Companion server running?
curl -s -o /dev/null -w "%{http_code}" http://localhost:8765/status 2>/dev/null || echo "NOT RUNNING"
# automation.json exists?
test -f agent/config/automation.json && echo "EXISTS" || echo "NOT FOUND"
# xml_parsed populated?
ls agent/xml_parsed/ 2>/dev/null | head -1 || echo "EMPTY"
# CONTEXT.json exists and is recent?
test -f agent/CONTEXT.json && echo "EXISTS" || echo "NOT FOUND"
If running inside a Docker container or non-macOS environment, also try host.docker.internal:8765 for the companion server check.
After running the checks, present a checklist showing what is done and what remains. Example:
agentic-fm setup status
- [x] Python 3 — v3.12.1
- [ ] fm-xml-export-exploder — not found
- [x] xmllint — installed
- [ ] Node.js — not found (only needed for webviewer)
- [ ] Companion server — not running
- [ ] FileMaker setup — unknown (no xml_parsed data)
- [ ] CONTEXT.json — not found
Starting from: Step 2 — Install fm-xml-export-exploder
Skip any step whose check passes. Resume from the first incomplete step.
Check: python3 --version succeeds.
If missing, tell the developer:
Python 3 is required for clipboard operations, validation, and the companion server. All scripts use the standard library only — no virtual environment needed.
macOS: Python 3 ships at
/usr/bin/python3. For a newer version:brew install pythonLinux:sudo apt-get install python3or your distro's equivalent.
Verify: Run python3 agent/scripts/clipboard.py --help and confirm it prints usage info.
Check: ~/bin/fm-xml-export-exploder exists and is executable.
If missing, walk through:
fm-xml-export-exploder is a Rust binary that parses FileMaker XML exports into individual files. It is required for the Explode XML workflow.
- Download the binary for your platform from GitHub releases
- Bleeding-edge builds: petrowsky fork
- Move it to
~/bin/and make it executable:mkdir -p ~/bin mv ~/Downloads/fm-xml-export-exploder ~/bin/ chmod +x ~/bin/fm-xml-export-exploder- macOS Gatekeeper: On first run, macOS will block it. Right-click the binary in Finder, choose Open, then authorize in System Settings > Privacy & Security.
Verify: Run ~/bin/fm-xml-export-exploder --version and confirm output.
Ask the developer to confirm when done before proceeding.
Check: xmllint --version succeeds.
If missing, tell the developer:
xmllint is required by
fmcontext.shto generate index files from exploded XML.
- macOS: Ships with the OS (part of libxml2). Should already be available.
- Linux:
sudo apt-get install libxml2-utils
This step usually passes automatically on macOS. Move on quickly if it does.
Check: Cannot be verified from the CLI. Ask the developer.
Have you already installed the Context custom function in your FileMaker solution?
If no, walk through:
The
Contextcustom function generates the JSON that powers the AI's awareness of your solution. Install it once per solution:
- Open your solution in FileMaker Pro 21.0+
- Go to File > Manage > Custom Functions
- Click New
- Name:
Context- Add one parameter:
task(type: Text)- Open the file
filemaker/Context.fmfnand paste its entire contents into the calculation editor- Click OK and save
Alternatively, you can install it via the clipboard:
python3 agent/scripts/clipboard.py write filemaker/context.xmlThen in FileMaker: File > Manage > Custom Functions — click in the function list and press Cmd+V.
Ask the developer to confirm when done.
Check: Cannot be verified from the CLI. Ask the developer.
Have you already installed the agentic-fm script folder in your FileMaker solution?
If no, present both options:
The companion scripts handle XML export, context generation, and debugging. Choose one method:
Option A — Copy from the included .fmp12 file (fastest)
- Open
filemaker/agentic-fm.fmp12in FileMaker Pro- Open its Script Workspace — you'll see an agentic-fm folder
- Copy the entire agentic-fm folder
- Switch to your solution's Script Workspace and paste (Cmd+V)
Option B — Install via clipboard
python3 agent/scripts/clipboard.py write filemaker/agentic-fm.xmlSwitch to FileMaker, open Scripts > Script Workspace, click in the script list, and press Cmd+V. The agentic-fm folder with all companion scripts will appear.
Ask the developer to confirm when done.
Check: Cannot be verified from the CLI. Ask the developer.
In FileMaker, run the Get agentic-fm path script from the Scripts menu. A folder picker will appear — select the root of this repo (the folder containing
QUICKSTART.md,agent/,filemaker/, etc.).This stores the path in
$$AGENTIC.FMfor the current session. The variable is cleared when the FileMaker file closes, so you'll need to run this again each session — or add a call to it in your solution's startup script (OnFirstWindowOpen) to automate it.
Ask the developer to confirm when done.
Check: HTTP request to http://localhost:8765/status returns a response.
If not running, tell the developer:
The companion server is a lightweight Python HTTP server that several FileMaker scripts communicate with. Start it in a terminal and keep it running while you work:
python3 agent/scripts/companion_server.pyIt listens on port 8765 by default. Use
--port Nfor a different port.
Verify: Run the health check again. If running inside Docker, also try host.docker.internal:8765.
Once confirmed, proceed.
Check: agent/xml_parsed/ contains solution data (non-empty directory with subdirectories).
If empty or missing, tell the developer:
Run the Explode XML script in FileMaker (from the Scripts menu). This exports your solution as XML and parses it into individual files that the AI agent can reference.
The script will:
- Save a Copy as XML of your solution
- Send the export to the companion server
- Parse it into
agent/xml_parsed/(individual tables, scripts, layouts, etc.)- Generate index files in
agent/context/for fast lookupThis takes a few seconds for small solutions, longer for large ones. You'll see progress in the companion server terminal.
Verify: Check that agent/xml_parsed/ now contains subdirectories. List what was found:
ls agent/xml_parsed/
Also verify index files were generated:
ls agent/context/
Report what solution(s) were found. Ask the developer to confirm before proceeding.
How do you want to work with agentic-fm?
A. CLI / IDE — Use Claude Code, Cursor, VS Code, or any terminal-based AI agent. The agent generates fmxmlsnippet XML that you paste into FileMaker. This is the most powerful path with access to the full skill set.
B. Webviewer — A visual three-panel editor (Monaco + AI chat) that runs in your browser and can embed directly inside FileMaker. Great if you prefer a visual workflow or are new to CLI tools.
C. Both — Set up both paths. They share the same underlying data.
Based on the answer, continue with the appropriate path(s).
Let's verify that context generation works. In FileMaker:
- Navigate to a layout you'd like to work with
- Run Push Context from the Scripts menu
- When prompted, enter a task description (e.g., "Explore the solution")
- Click OK
Verify:
test -f agent/CONTEXT.json && python3 -c "import json; d=json.load(open('agent/CONTEXT.json')); print(f'Context loaded: {d.get(\"current_layout\",{}).get(\"name\",\"unknown\")} layout, {len(d.get(\"tables\",{}))} tables')"
Report what was found (layout name, table count) to confirm it worked.
You're all set! Here's how to start your first session:
- Open this directory in your AI agent (Claude Code, Cursor, etc.)
- Try loading an existing script to see agentic-fm in action:
Load script "ScriptName" and give me a description of what it does.- When you need to generate or modify scripts that reference fields/layouts, run Push Context first on the relevant layout in FileMaker
- The agent writes validated XML to
agent/sandbox/and loads it onto your clipboard- In FileMaker Script Workspace: Cmd+V to paste
Every session checklist:
- Companion server running
$$AGENTIC.FMset (run Get agentic-fm path if needed)- Push Context run on the target layout
Check: node --version returns 18+.
If missing or too old:
Node.js 18+ is required for the webviewer dev server.
Install from nodejs.org or via Homebrew:
brew install node
You can start the webviewer in two ways:
From FileMaker (easiest): Run the Agentic-fm webviewer script from the Scripts menu. It installs dependencies and starts the dev server automatically.
From the terminal:
cd webviewer npm install npm run devThe webviewer will be available at http://localhost:8080.
Verify: Check that the dev server is responding:
curl -s -o /dev/null -w "%{http_code}" http://localhost:8080 2>/dev/null
To use AI chat within the webviewer, configure an AI provider in the settings panel (gear icon), or create
webviewer/.env.local:AI_PROVIDER=anthropic AI_MODEL=sonnet ANTHROPIC_API_KEY=your-key-hereSupported providers:
anthropic,openai,claude-code(CLI proxy).The webviewer works without an AI provider — you can write HR scripts manually and it converts them to fmxmlsnippet automatically.
To embed the webviewer directly inside FileMaker:
- Add a Web Viewer object to a layout
- Set the URL to
http://localhost:8080- Name the object exactly
agentic-fm(required for the bridge)- A dedicated layout with only the web viewer is recommended
See
webviewer/WEBVIEWER_INTEGRATION.mdfor full details.
After the core setup is complete, mention these optional next steps:
Optional: If you want the agent to trigger FileMaker scripts autonomously (via OData) or use Tier 2/3 auto-paste deployment, create
agent/config/automation.jsonfrom the example template:cp agent/config/automation.json.example agent/config/automation.jsonThen edit it to add your solution's OData credentials. Run the
schema-build connectskill for a guided OData setup.
Recommended: Add a call to Get agentic-fm path in your solution's
OnFirstWindowOpenscript trigger so the repo path is set automatically every time you open the file. This eliminates the need to run it manually each session.
Optional: If you embedded the webviewer in FileMaker, the
filemaker/custom_menu/folder contains an optional custom menu set that adds keyboard shortcuts for Monaco editor actions. Seefilemaker/custom_menu/README.mdfor integration steps.
Optional: Download the official Claris function reference for offline use by the agent.
This requires
requestsandbeautifulsoup4. Set up a venv first:python3 -m venv agent/.venv source agent/.venv/bin/activate pip install requests beautifulsoup4Then run the fetch script with the venv active (or prefix with
agent/.venv/bin/python3):agent/.venv/bin/python3 agent/docs/filemaker/fetch_docs.py
When all applicable steps are done, present a final summary:
Setup complete! Here's what's configured:
| Component | Status | | ------------------------ | --------------------------- | | Python 3 | vX.Y.Z | | fm-xml-export-exploder | installed | | xmllint | installed | | Context custom function | installed | | Companion scripts | installed | | Repo path ($$AGENTIC.FM) | set | | Companion server | running on port 8765 | | Explode XML | done — N solution(s) parsed | | CONTEXT.json | generated | | Workflow | CLI/IDE / Webviewer / Both |
Quick reference — every session:
- Start companion server:
python3 agent/scripts/companion_server.py- In FileMaker: run Get agentic-fm path (if not in startup script)
- Navigate to your target layout
- Run Push Context with a task description
- Start working with your AI agent
For more details, see
QUICKSTART.md.
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
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
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".