agentleFS
cpodercpoder/claude-apple-plugin/skills/cloudkit/SKILL.md

cloudkit

Skill0 starsChanged 30 days agoMITView on GitHub

CloudKit Web Services reference for the apple plugin — query, look up, create, update and delete records in a CloudKit container's public database with a server-to-server key; zones; field value formats; filters and sorts. Load for CloudKit data inspection/maintenance or cloudkit_* tools.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

CloudKit Web Services (tools cloudkit_*)

Auth: server-to-server key (EC P-256) → each request is signed: date:base64(sha256(body)):path with ECDSA/SHA-256, headers X-Apple-CloudKit-Request-KeyID, -ISO8601Date, -SignatureV1. Handled by the server from cloudkit.container/key_id/private_key, environment (development|production), database (server keys can only use the public database). Base: https://api.apple-cloudkit.com/database/1/{container}/{env}/public/....

Records

  • Query: cloudkit_query record_type=Post filter_by=[{"comparator":"EQUALS","fieldName":"status","fieldValue":{"value":"published"}}] sort_by=[{"fieldName":"createdAt","ascending":false}] results_limit=50 desired_keys=[…] → records[] with recordName, recordType, recordChangeTag, fields.{name:{value,type}}, created/modified.{timestamp,userRecordName}; paginate with continuationMarker. Comparators: EQUALS, NOT_EQUALS, LESS_THAN(_OR_EQUALS), GREATER_THAN(_OR_EQUALS), NEAR (location with distance), CONTAINS_ALL_TOKENS, CONTAINS_ANY_TOKENS (searchable string fields), IN, NOT_IN, LIST_CONTAINS(_ALL|_ANY), BEGINS_WITH. Queried fields need the "Queryable"/"Sortable" index in the CloudKit schema (system recordName always works: fieldName: "___recordID").
  • Lookup by name: cloudkit_lookup record_names=[…].
  • Modify: cloudkit_modify operations=[{"operationType":"create","record":{"recordType":"Post","fields":{"title":{"value":"Hi"},"views":{"value":3},"when":{"value":1700000000000},"tags":{"value":["a","b"]},"author":{"value":{"recordName":"u1","action":"NONE"}},"where":{"value":{"latitude":48.8,"longitude":2.3}}}}}] — update/forceUpdate/replace/forceReplace/delete/forceDelete; non-force ops require the current recordChangeTag. Field values: strings, numbers, booleans → number 0/1 (type INT64 in schema), dates = ms since epoch (type TIMESTAMP), lists, references {recordName, action} (NONE|DELETE_SELF|VALIDATE), locations, assets (assets/upload two-step).
  • Zones: cloudkit_zones. Public database only has _defaultZone for most apps.
  • Other operations via cloudkit_request subpath=records/changes|zones/lookup|assets/upload|users/caller.

Limits: 200 records per query page; request body ≤ 1 MB; the public database has per-container quotas that grow with the user base. Errors come as serverErrorCode (AUTHENTICATION_FAILED → key not uploaded/activated for this environment, BAD_REQUEST → unindexed field, NOT_FOUND). Docs: apple_docs_index technology=cloudkitwebservices.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.