TIP: Teaching AI your Schema - Claude on steroids

Claude has been super helpful for me for gruntwork. Here's how I use it, hopefully it's helpful to others:

  • I have a paid Max plan, so I use the latest model 4.8 (4.7 was having problems with Filemaker so I was using 4.6 before that)
  • I use the Claude desktop app and the "Code" tab (see screenshot below). I used to use terminal but this is a little easier for me.
  • I've mentioned this before, but I used an improved version of the AppleScript app Claude wrote for me: GitHub - jasonnmark/FilemakerXMLCompressor: This takes a Filemaker DDR file and compresses it for use with AIs and to make it more human readable. · GitHub (full source available on GitHub as well as the actual app build). This script takes the XML save of a database structure (which is around 92MB for me) and turns it into a human-readable (and AI-readable) 4MBs which includes every script, layout, table, relationship, custom function, value list, and account in separate .md files.
  • For every Filemaker project I have a folder on my machine where I export the Schema.
  • I also have a generic Filemaker.md file that runs every time I trigger Claude Code for a Filemaker project, which lets it know to look at the Schema, and how I like my code formatted (blank line between each section for readability, results returned in a $$Results variable vs a file, always make a new folder if it's writing actual files, etc.
  • It also reminds Claude to always give me code samples in copy-able XML format, so I can use BaseElements to simply paste in their code and don't have to manually create it!

Examples of how I use this to save time:
Parsing Crash Logs - This morning I uploaded a crash log to Claude since the server failed overnight. It asked for the Events log so I uploaded that too. I tracked down an overnight script that runs on the server that's stuck in an endless loop ONLY when school is out for the summer (which is why it just showed up now), and gave me a fix. Once it pointed it out it made so much sense, but literally 10 minutes while I was doing other things it pinpointed the error.
Wrote me an email report - This morning I had it write this. It took about 20 minutes for first draft and had an error. I let it know that the warning it was giving was wrong because the cycle does exist, and told it the field name and it fixed it in two minutes. I could have written all this, but instead I spent less than 5 minutes of my time writing up the prompt, reading the code it wrote, and testing the result.
I need you to write a script that cycles through every active staff member. I will be running this every Friday. It will start by looking at current cycle and the date range for current cycle. It will then find every course that staff member is associated with and will check each course the staff member teaches from that current cycle OR from the cycle "ongoing". NOTE if Cycles::Cycle is "Summer" it should not include ongoing. Then it should go through holiday list and if the any day that week is NOT a holiday see if any students have attendance. Again, summer school is exception, if it's a summer session it will instead check anyway for any active classes that cycle, but not for ongoing.
The goal is to find if there are any days that do not have attenance taken, so if there is a non-holiday day which does NOT have ANY students with attendance it should add it to their list. Eventually we will email every teacher, but for now I'd like it to return a list of what emails it *would* send if it was summer session, in one long list so I can audit. The email will eventually say:

"MIssing attendance" and will go to Nicole as well as ``<email>`` the person who is missing attendance, and then it will have a list of courses missing attendance.

For debugging now I want one master list that basically says:
Danielle
No missing classes
Chris
<Classname>
Monday 7/1 - Missing
Wednesday 7/3 Missing

Or whatever.

2 Likes

There is a lot of brilliant achievement happening here, both on your part, @JasonMark, as well as on Claude's part. Thank you so much for sharing.

For the record, in case anyone is reading the details to help cultivate FMP skills:

  • I disagree with Claude's assertion that $variables are not evaluated in the Perform Find script step when used with stored Find parameters.

  • The technique of quote-enclosing a string used in a Find parameter is not sufficient for performing an exact match (as implied by the parenthetical comment). The quote enclosure does help with being able to perform a find using a string that contains characters which require special handling in Find mode.

I wish to mention:

By calling out some points which I believe are in error, I am not trying to downplay, diminish, or critique the path of innovation that @JasonMark is honing and generously sharing with the rest of us. I love that this was shared. My motivation here is just to call out the couple of inaccuracies that caught my eye, both to help newbies, and to keep us all on our toes.

1 Like

Use of variables inside a stored find is supported but the input area for stored finds is limited to literal strings, you can't insert calculations. So its not entirely wrong. I've been bitten by that distinction and moved away from using stored finds as a result.

1 Like

@Malcolm @steve_ssh Thanks guys. These are great points. I had Claude save it to my FilemakerRules.md file which stores all my notes like these and made sure it knows that I prefer to have my find steps exploded with a number of "set field" and "omits" visible right in the script going forward.

Claude just tacked those notes onto the end of my FilemakerRules file. :slight_smile:

I've only used that file for about 5 hours of coding, so I'm sure it will continue to grow, but here's what it has so far... whenever there's something else I want to add to it I just tell it to update itself...

FileMakerRules.md (6.6 KB)

1 Like

Check out the skills file posted at Cadence UX. @jasonmark.

https://www.cadenceux.com.au/blog

Malcolm

1 Like

thanks!