用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Sidiora-Labs/ion-agent --skill airtable命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | airtable |
| description | Airtable REST API via curl. Records CRUD, filters, upserts. |
| version | 1.1.0 |
| author | community |
| license | MIT |
| platforms | ["linux","macos","windows"] |
| prerequisites | {"env_vars":["AIRTABLE_API_KEY"],"commands":["curl"]} |
| metadata | {"ion":{"tags":["Airtable","Productivity","Database","API"],"homepage":"https://airtable.com/developers/web/api/introduction"}} |
Interact with Airtable's REST API using curl through the terminal tool. No MCP server, no OAuth handshake, no Python SDK required — just curl paired with a personal access token.
pat...).data.records:read — retrieve rowsdata.records:write — add / modify / remove rowsschema.bases:read — enumerate bases and tables403.${ION_HOME:-~/.ion}/.env (or through ion setup):
AIRTABLE_API_KEY=pat_your_token_here
Note: the legacy
key...API keys were retired in Feb 2024. Only PATs and OAuth tokens are accepted now.
https://api.airtable.com/v0Authorization: Bearer $AIRTABLE_API_KEYContent-Type: application/json for any POST/PATCH/PUT body).app..., tables tbl..., records rec..., fields fld.... IDs are immutable; names can change. Prefer IDs in automations.429 response means you should back off. Rapid bursts against a single base will be throttled.Base curl pattern:
curl -s "https://api.airtable.com/v0/$BASE_ID/$TABLE?maxRecords=5" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
Include -s on every call to silence curl's progress bar — this keeps tool output clean for Ion. Always pipe through python3 -m json.tool (guaranteed available) or jq (if present) for formatted JSON.
| Field type | Write shape |
|---|---|
| Single line text | "Name": "hello" |
| Long text | "Notes": "multi\nline" |
| Number | "Score": 42 |
| Checkbox | "Done": true |
| Single select | "Status": "Todo" (the name must already exist unless typecast: true) |
| Multi-select | "Tags": ["urgent", "bug"] |
| Date | "Due": "2026-04-01" |
| DateTime (UTC) | "At": "2026-04-01T14:30:00.000Z" |
| URL / Email / Phone | "Link": "https://…" |
| Attachment | "Files": [{"url": "https://…"}] (Airtable downloads and rehosts) |
| Linked record | "Owner": ["recXXXXXXXXXXXXXX"] (array of record IDs) |
| User | "AssignedTo": {"id": "usrXXXXXXXXXXXXXX"} |
Include "typecast": true at the top level of a create/update payload to let Airtable automatically coerce values (e.g. dynamically create a new select option, convert "42" → 42).
curl -s "https://api.airtable.com/v0/meta/bases" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
curl -s "https://api.airtable.com/v0/meta/bases/$BASE_ID/tables" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
Run this BEFORE making any changes — it confirms exact field names and IDs, reveals options.choices for select fields, and shows primary-field names.
curl -s "https://api.airtable.com/v0/$BASE_ID/$TABLE?maxRecords=10" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
curl -s "https://api.airtable.com/v0/$BASE_ID/$TABLE/$RECORD_ID" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
Airtable formulas need URL encoding. Delegate this to Python stdlib — never encode by hand:
FORMULA="{Status}='Todo'"
ENC=$(python3 -c 'import sys, urllib.parse; print(urllib.parse.quote(sys.argv[1], safe=""))' "$FORMULA")
curl -s "https://api.airtable.com/v0/$BASE_ID/$TABLE?filterByFormula=$ENC&maxRecords=20" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
Useful formula patterns:
{Email}='user@example.com'FIND('bug', LOWER({Title}))AND({Status}='Todo', {Priority}='High')OR({Owner}='alice', {Owner}='bob')NOT({Assignee}='')IS_AFTER({Due}, TODAY())curl -s "https://api.airtable.com/v0/$BASE_ID/$TABLE?sort%5B0%5D%5Bfield%5D=Priority&sort%5B0%5D%5Bdirection%5D=asc&fields%5B%5D=Name&fields%5B%5D=Status" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
Square brackets in query parameters must be percent-encoded (%5B / %5D).
curl -s "https://api.airtable.com/v0/$BASE_ID/$TABLE?view=Grid%20view&maxRecords=50" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
Views apply their stored filter + sort on the server side.
curl -s -X POST "https://api.airtable.com/v0/$BASE_ID/$TABLE" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"fields":{"Name":"New task","Status":"Todo","Priority":"High"}}' | python3 -m json.tool
curl -s -X POST "https://api.airtable.com/v0/$BASE_ID/$TABLE" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"typecast": true,
"records": [
{"fields": {"Name": "Task A", "Status": "Todo"}},
{"fields": {"Name": "Task B", "Status": "In progress"}}
]
}' | python3 -m json.tool
Batch endpoints accept a maximum of 10 records per request. For bigger inserts, iterate in batches of 10 with a brief pause to stay within the 5 req/sec/base limit.
curl -s -X PATCH "https://api.airtable.com/v0/$BASE_ID/$TABLE/$RECORD_ID" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"fields":{"Status":"Done"}}' | python3 -m json.tool
curl -s -X PATCH "https://api.airtable.com/v0/$BASE_ID/$TABLE" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"performUpsert": {"fieldsToMergeOn": ["Email"]},
"records": [
{"fields": {"Email": "user@example.com", "Status": "Active"}}
]
}' | python3 -m json.tool
performUpsert inserts records when the merge-field value is new, and patches existing records when the merge-field value matches. Ideal for idempotent synchronization.
curl -s -X DELETE "https://api.airtable.com/v0/$BASE_ID/$TABLE/$RECORD_ID" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
curl -s -X DELETE "https://api.airtable.com/v0/$BASE_ID/$TABLE?records%5B%5D=rec1&records%5B%5D=rec2" \
-H "Authorization: Bearer $AIRTABLE_API_KEY" | python3 -m json.tool
List endpoints return a maximum of 100 records per page. When the response includes "offset": "...", supply that value in the next request. Continue looping until the offset field disappears:
OFFSET=""
while :; do
URL="https://api.airtable.com/v0/$BASE_ID/$TABLE?pageSize=100"
[ -n "$OFFSET" ] && URL="$URL&offset=$OFFSET"
RESP=$(curl -s "$URL" -H "Authorization: Bearer $AIRTABLE_API_KEY")
echo "$RESP" | python3 -c 'import json,sys; d=json.load(sys.stdin); [print(r["id"], r["fields"].get("Name","")) for r in d["records"]]'
OFFSET=$(echo "$RESP" | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("offset",""))')
[ -z "$OFFSET" ] && break
done
curl -s -o /dev/null -w "%{http_code}\n" https://api.airtable.com/v0/meta/bases -H "Authorization: Bearer $AIRTABLE_API_KEY" — expect 200.app... ID if the token doesn't have schema.bases:read.GET /v0/meta/bases/$BASE_ID/tables — locally cache the exact field names and primary-field name before performing any writes.filterByFormula first to resolve the rec... ID, then PATCH /v0/$BASE_ID/$TABLE/$RECORD_ID. Never guess record IDs.filterByFormula requires URL encoding. Field names containing spaces or non-ASCII characters also need encoding ({My Field} → %7BMy%20Field%7D). Use Python stdlib (see pattern above) — never hand-escape."Assignee" key doesn't indicate the field doesn't exist — it means this record's value is blank. Consult the schema (step 3) before assuming a field is missing.PATCH merges the supplied fields into the existing record. PUT overwrites the entire record and clears any field you omitted. Default to PATCH."Status": "Shipping" when Shipping isn't in the field's option list triggers INVALID_MULTIPLE_CHOICE_OPTIONS unless you include "typecast": true (which auto-creates the option).403 on one base while others work means the token's Access list doesn't cover that base — not a scope or auth problem. Direct the user to https://airtable.com/create/tokens to add it.baseA and 5 req/sec on baseB is fine; 6 req/sec on just baseA triggers throttling. Watch the Retry-After header on 429.curl via the terminal tool. Do NOT use web_extract (it cannot supply auth headers) or browser_navigate (requires UI auth and is slow).AIRTABLE_API_KEY is automatically available from ${ION_HOME:-~/.ion}/.env in the subprocess when this skill loads — no need to re-export it before each curl call.{Status} is literal. In a shell argument, {Status} is safe outside brace-expansion context — but route dynamic strings through python3 urllib.parse.quote before embedding in a URL.python3 -m json.tool (always available) rather than jq (optional). Only reach for jq when you need filtering or projection.offset until the field is absent.errors array on non-2xx responses — Airtable returns structured error codes like AUTHENTICATION_REQUIRED, INVALID_PERMISSIONS, MODEL_ID_NOT_FOUND, INVALID_MULTIPLE_CHOICE_OPTIONS that pinpoint the exact issue.