fmodata-client
БесплатноБез исполняемых скриптовНе проверенfmodata OData FMServerConnection fmTableOccurrence field builders textField numberField dateField timestampField containerField calcField listField query…
от proofsh★ 21 звезда на GitHubОб этом скилле
Setup
Start with typegen. Before writing any fmodata code, use
npx @proofkit/typegen@betato generate table schemas with correct entity IDs from FileMaker metadata. See the typegen-fmodata skill. Schema files (fields, entity IDs) MUST come from typegen — do NOT manually add fields or change entity IDs (FMFID/FMTID), as guessing them causes silent failures. You MAY add/editreadValidator,writeValidator,defaultSelect,navigationPaths, and other options on existing fields.
1. Create a server connection
import { FMServerConnection } from "@proofkit/fmodata";
const connection = new FMServerConnection({
serverUrl: "https://your-server.com",
auth: { username: "admin", password: "secret" },
// OR with OttoFMS API key:
// auth: { apiKey: "your-otto-api-key" },
// OR with Claris ID for FileMaker Cloud:
// auth: { clarisId: { username: "[email protected]", password: "secret" } },
fetchClientOptions: {
retries: 2,
timeout: 30000,
},
});
For FileMaker Cloud, use a Claris ID account, not an external IdP account. MFA-backed Claris ID accounts are not supported.
2. Create a database reference
const db = connection.database("MyDatabase.fmp12", {
useEntityIds: true, // use FMTID/FMFID instead of names
includeSpecialColumns: false, // include ROWID/ROWMODID
});
3. Define table schemas with fmTableOccurrence
IMPORTANT: Schema files — including field definitions and entity IDs — are generated by
@proofkit/typegen. The entity IDs shown below are illustrative only. Do NOT inventFMFID/FMTIDvalues; they must come from FileMaker metadata via typegen. You may customize generated schemas by addingreadValidator,writeValidator,defaultSelect,navigationPaths, and other options.
import {
fmTableOccurrence,
textField,
numberField,
timestampField,
containerField,
calcField,
listField,
} from "@proofkit/fmodata";
import { z } from "zod/v4";
// Generated by @proofkit/typegen — do not manually add fields or change entity IDs
const contacts = fmTableOccurrence(
"contacts",
{
id: textField().primaryKey().entityId("FMFID:1"),
name: textField().notNull().entityId("FMFID:2"),
email: textField().notNull().entityId("FMFID:3"),
phone: textField().entityId("FMFID:4"),
age: numberField().entityId("FMFID:5"),
// readValidator/writeValidator are safe to add or edit manually
active: numberField()
.readValidator(z.coerce.boolean())
.writeValidator(z.boolean().transform((v) => (v ? 1 : 0)))
.entityId("FMFID:6"),
tags: listField({ itemValidator: z.string() }),
photo: containerField(),
fullName: calcField(),
createdAt: timestampField().readOnly().entityId("FMFID:10"),
},
{
entityId: "FMTID:100",
// defaultSelect and navigationPaths are safe to add or edit manually
defaultSelect: "schema",
navigationPaths: ["invoices", "notes"],
},
);
Field builders: textField(), numberField(), dateField(), timeField(), timestampField(), containerField(), calcField(), listField().
Chainable methods: .primaryKey(), .notNull(), .readOnly(), .entityId("FMFID:..."), .readValidator(schema), .writeValidator(schema), .comment("...").
defaultSelect options:
"schema"(default) -- always sends$selectwith only schema-defined fields"all"-- no$select, returns all non-container fields from FM(cols) => ({ ... })-- custom subset of columns
Core Patterns
Querying (list / get / select / where / execute)
import { eq, gt, and, contains, asc, desc, getTableColumns } from "@proofkit/fmodata";
// List with filter, sort, pagination
const result = await db
.from(contacts)
.list()
.select({ name: contacts.name, email: contacts.email })
.where(and(eq(contacts.active, true), gt(contacts.age, 18)))
.orderBy(asc(contacts.name), desc(contacts.age))
.top(50)
.skip(0)
.execute();
if (result.data) {
for (const row of result.data) {
console.log(row.name, row.email);
}
}
// Get single record by ID
const one = await db.from(contacts).get("abc-123").execute();
// Get single record by FileMaker ROWID
const byRowId = await db.from(contacts).get({ ROWID: 2 }).execute();
// single() -- error if != 1 result; maybeSingle() -- null if 0, error if > 1
const exact = await db
.from(contacts)
.list()
.where(eq(contacts.email, "[email protected]"))
.single()
.execute();
// Count
const count = await db.from(contacts).list().count().execute();
// Override defaultSelect for one query
const all = await db.from(contacts).list().select("all").execute();
// Get single field (required for container fields)
const photo = await db
.from(contacts)
.get("abc-123")
.getSingleField(contacts.photo)
.execute();
// Select all columns except some
const { photo: _, ...cols } = getTableColumns(contacts);
const withoutPhoto = await db.from(contacts).list().select(cols).execute();
CR
Установить fmodata-client в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fmodata-client?
fmodata OData FMServerConnection fmTableOccurrence field builders textField numberField dateField timestampField containerField calcField listField query builder execute() filter operators eq ne gt gte lt lte contains startsWith endsWith matchesPattern inArray notInArray isNull isNotNull and or not tolower toupper trim CRUD insert update delete byId where navigate expand relationships batch Result error handling Effect.ts pattern FMODataError HTTPError ODataError ValidationError BatchTruncatedError entity IDs FMTID FMFID defaultSelect readValidator writeValidator orderBy asc desc top skip single maybeSingle count getSingleField FileMaker OData API schema management webhooks getTableColumns select("all")
Как установить скилл fmodata-client?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fmodata-client запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic