شعار Collections Development

Collections Development

مؤسسة
CrowdStrike
collections-development

Design JSON Schema collections and CRUD patterns for Falcon Foundry apps. TRIGGER when user asks to "create a collection", "define a JSON schema", "store data in Foundry", runs `foundry collections create`, or needs help with indexable fields, FQL queries, or collection access patterns. DO NOT TRIGGER for workflow YAML, function handlers, or UI components — use the appropriate sub-skill.

نظرة عامة

الناشرCrowdStrike
المستودعfoundry-skills
اسم المهارةcollections-development
النجوم
37
التفريعات
7
الملفات المرفقة
1
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 1

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها CrowdStrike على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Collections Development في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/CrowdStrike/foundry-skills/tree/main/skills/collections-development
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/CrowdStrike/foundry-skills.git /tmp/foundry-skills
mkdir -p .claude/skills
cp -r /tmp/foundry-skills/skills/collections-development .claude/skills/collections-development
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Collections Development في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Collections Development تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Collections Development بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Foundry Collections Development

Part of a suite. If development-workflow has not already run, and this is a new app or its first capability, load the development-workflow skill first — it owns the CLI prerequisite check, scaffolding order, and manifest coordination.

Falcon Foundry Collections are NoSQL document stores with JSON Schema validation. They provide persistent storage for app data with CRUD operations, FQL queries, and schema enforcement.

Collection Naming Constraints

ConstraintRule
Length5-200 characters
Start/endMust begin and end with a letter or number
Special charactersOnly underscores (_) allowed — no hyphens, spaces, or other chars
CaseCase-sensitive

Collection Description Constraints

ConstraintRule
Length3-500 characters
StartMust begin with an alphanumeric character
Allowed charactersLetters, numbers, spaces, dashes, periods, parentheses, and underscores only
Not allowedCommas, colons, semicolons, quotes, slashes, or other special characters

Check the description against this table before running collections create. The CLI accepts a comma (or any other disallowed character) in --description without complaint; the rejection only surfaces later, from foundry apps validate or deploy, by which time the collection is already in the manifest and has to be fixed by hand. Write the description with letters, numbers, spaces, dashes, periods, parentheses, and underscores only.

Collection Limits

ResourceLimit
Single object size~50 MB
Schema size256 KB
Object key length1-1,000 characters
Indexed fields per schema10
Objects per collectionNo enforced limit
Collections per appNo enforced limit
Search results per page500 max (default 50)

JSON Schema Requirements

  • JSON Schema draft 7 only — newer drafts (draft/2020-12, draft/2019-09) fail validation
  • Schema is auto-versioned: v1.0 on creation, auto-incremented on modification
  • additionalProperties: false by default — extra fields leak internal data and break type safety. Exception: a collection written with custom_storage_object_key whose fields may grow. Schema changes may not reach it after creation (see Common Pitfalls), so ship true there
  • x-cs-indexable: true on individual properties for searchable fields (max 10 per collection)

CLI Scaffolding

bash
# Write schema to /tmp/ first — the CLI copies it into collections/
foundry collections create \
  --name "my_collection" \
  --schema /tmp/schema.json \
  --description "App data store" \
  --no-prompt \
  --wf-expose \
  --wf-tags "tag1,tag2"

This creates the collection directory, copies the schema, and updates manifest.yml. Edit the project copy at collections/my_collection.json afterward to refine.

Exposing a Collection as an Agent Tool

Add --agent-tools-expose to let a Foundry AI agent read and write the collection:

bash
foundry collections create --name "triage_notes" --schema /tmp/schema.json \
  --description "Agent triage notes" --agent-tools-expose --no-prompt

That writes one block onto the collection's manifest entry:

yaml
collections:
    - name: triage_notes
      agent_tools_integration:
        exposed: true

Exposure is only half the wiring. The agent must also name each operation it may call in its own tools list, using action:collections.<collection_name>.<Operation>. Without the action: prefix, the deploy fails with a bare 500:

yaml
ai:
    agents:
        - name: Detection Triage Agent
          tools:
            - action:collections.triage_notes.CreateObject
            - action:collections.triage_notes.SearchObjects

Valid operations, exact casing required: CreateObject, GetObject, DeleteObject, ListObjects, SearchObjects.

A collection exposed but not listed in tools is unreachable by the agent, and vice versa — neither case produces an error, just an agent that silently cannot use the data. agent_tools_integration is independent of workflow_integration; a collection can be exposed to agents, to Fusion, to both, or to neither.

Agents can also use the generic collection, action:mcp/gce/collections:collections:generic:<Operation> — a scratch collection the platform creates per agent at runtime, needing no collection of your own. Use a named app collection when the data must outlive the agent or be readable by other capabilities. See ai-agents-development.

Collection API Access

Collections are managed via the CrowdStrike API or the foundry-js SDK. There are no CLI commands for reading/writing collection data, and collections can only be deleted from the Falcon Foundry UI (not the CLI).

PUT    /customobjects/v1/collections/{collection_name}/objects/{key}  — Create/update object
GET    /customobjects/v1/collections/{collection_name}/objects/{key}  — Get object by key
DELETE /customobjects/v1/collections/{collection_name}/objects/{key}  — Delete object
POST   /customobjects/v1/collections/{collection_name}/objects        — Search objects (FQL filter)

JSON Schema Patterns

Basic Schema

json
{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "type": "object",
  "title": "Incident",
  "description": "Security incident record",
  "required": ["id", "title", "severity", "status", "created_at"],
  "additionalProperties": false,
  "properties": {
    "id": { "type": "string", "format": "uuid" },
    "title": { "type": "string", "minLength": 1, "maxLength": 200 },
    "severity": { "type": "integer", "minimum": 1, "maximum": 10 },
    "status": {
      "type": "string",
      "enum": ["open", "investigating", "contained", "resolved", "closed"]
    },
    "tags": {
      "type": "array",
      "items": { "type": "string", "maxLength": 50 },
      "maxItems": 20,
      "uniqueItems": true
    },
    "created_at": { "type": "string", "format": "date-time" }
  }
}

Indexable Fields

Make fields searchable via FQL by marking them indexable. Two patterns are supported:

Pattern A: Top-level array (preferred — used by most foundry-sample repos)

json
{
  "$schema": "https://json-schema.org/draft-07/schema",
  "x-cs-indexable-fields": [
    { "field": "/status", "type": "string", "fql_name": "status" },
    { "field": "/severity", "type": "integer", "fql_name": "severity" },
    { "field": "/created_at", "type": "string", "fql_name": "created_at" }
  ],
  "type": "object",
  "properties": {
    "status": { "type": "string" },
    "severity": { "type": "integer" },
    "created_at": { "type": "string", "format": "date-time" }
  }
}

Pattern B: Per-field annotation

json
{
  "properties": {
    "compositeId": { "type": "string", "x-cs-indexable": true },
    "content": { "type": "string" }
  }
}

Both patterns work. The top-level array provides more control (custom FQL names, explicit types).

Manifest Configuration

yaml
# manifest.yml
collections:
  - name: incidents
    description: Security incident records
    schema: collections/incidents.json
    permissions: []
    workflow_integration:
      system_action: true
      tags:
        - Collection

  - name: audit_logs
    description: Audit log entries
    schema: collections/audit_logs.json
    permissions: []
    workflow_integration:
      system_action: false
      tags: []

Indexing is controlled entirely by x-cs-indexable-fields or x-cs-indexable: true in the JSON schema files, not in the manifest.

CRUD Operations

Use a typed foundry-js Collection client from UI/TypeScript, and the CustomStorage service class (not the APIHarnessV2 Uber class) from Python functions. Full walkthroughs — the typed TypeScript IncidentCollection client and the Python CustomStorage CRUD/search/paginate example with its key points — are in references/advanced-patterns.md. Two behaviors that bite in both: a never-created key reads as a truthy not-found envelope on the JS side and a 404 on the Python side (gate on a real field, not truthiness), and FQL filters only work on fields marked x-cs-indexable: true.

FQL Search Syntax

Only fields marked with x-cs-indexable: true can be used in FQL queries.

OperationSyntaxExample
Equalityfield:'value'status:'open'
Numeric comparisonfield:>=Nseverity:>=5
ANDfield1:'a'+field2:'b'status:'open'+severity:>=5
ORfield:'a',field:'b'status:'open',status:'investigating'
Wildcardfield:*'*pattern*'title:*'*malware*'
Sortingsort=field|ascsort=created_at|desc

The foundry-js SDK's search() method accepts a filter parameter for FQL queries. The search endpoint is POST /customobjects/v1/collections/{name}/objects, with filter, limit, offset, and sort sent as query parameters, not in the request body.

Workflow Share Settings

To make a collection accessible from workflows:

yaml
collections:
  - name: incidents
    schema: collections/incidents.json
    permissions: []
    workflow_integration:
      system_action: true           # true = app workflows only, false = also available as Fusion SOAR action
      tags:
        - Collection
SettingBehavior
workflow_integration.system_action: trueAvailable to app workflows only
workflow_integration.system_action: falseAvailable to both app workflows AND Falcon Fusion SOAR

RBAC and Direct API Access

Collections can be accessed directly via the CrowdStrike API (outside of functions) using custom roles with specific collection permissions. Include the X-CS-APP-ID header to identify your Foundry app. Foundry CLI credentials cannot access collections directly; use a separate API client with Custom Storage read/write scope.

Common Pitfalls

  • Using APIHarnessV2 (Uber class) for collection operations. Use CustomStorage service class instead — the Foundry functions editor auto-detects OAuth scopes from service class imports but cannot parse Uber class .command() calls.
  • Using JSON Schema newer than draft 7. Foundry only supports draft 7.
  • Missing indexes. Fields used in queries must be marked with x-cs-indexable: true or listed in x-cs-indexable-fields. Max 10 per collection.
  • Invalid collection names. Names must be 5-200 chars, start/end with letter or number, and contain only letters, numbers, and underscores.
  • Commas or other punctuation in --description. collections create accepts them; foundry apps validate and deploy reject them. Stick to letters, numbers, spaces, dashes, periods, parentheses, and underscores.
  • Schema edits may not reach a custom-storage collection. The docs say each schema change creates a new version that new writes validate against (see Schema Versioning in references/advanced-patterns.md). On collections written with custom_storage_object_key, though, writes have been observed to keep validating against the original schema: a new top-level field was rejected as additional properties not allowed after the schema that declared it was deployed. For those collections, ship "additionalProperties": true at the top level if fields may be added later, and treat any breaking schema change as a new collection name.
  • Custom-storage collections are effectively immutable — decide the schema at create time. Once a collection is written via custom_storage_object_key (the standard app pattern: collections.*.create with custom_storage_object_key, and foundry-js collection.write(key, obj)), you can no longer tighten its schema (additionalProperties: false, a new maxLength, etc.). The deploy fails with Invalid Collection - {"code":400,"message":"custom_storage_object_key is a reserved input property"}. You can neither declare custom_storage_object_key in the schema (rejected as reserved) nor omit it (Foundry injects it during re-provision validation). Bake strict validation into the INITIAL definition. Compounding trap: a failed collection deploy poisons the diff base — later plain deploys report no deployable artifacts found or keep replaying the error, and --re-deploy only retries the latest failed deployment. Recover by reverting the collection schema files and the schema edit in manifest.yml, leaving the IDs the deploy wrote in place (the failed deploys never went live).
  • There is no in-place collection rename. Foundry has no rename operation; changing a collection's name provisions a NEW empty collection and orphans every object written under the old name: the app reads and writes the new, empty collection, and nothing migrates the old objects. Rename a collection only if you can afford to lose its contents; for a brand/display rename, leave the internal collection names untouched. (This is also why a breaking schema change is handled as a new collection name — see the bullet above.)
  • A deleted collection name tombstones per app_id. After CrowdStrike support deletes an app's collections, redeploying into the same app_id fails with Invalid Collection - resource <app_id>:<name> existed previously, but was deleted. Collection names are namespaced per app_id, and a previously-deleted name cannot be recreated in that same app_id. Escape: strip the app_id (and all other provisioned ids) from the manifest, give the app a new name, and cold-deploy a fresh app_id — the names are free in the new namespace. That makes a new app: existing installs, and the data in their collections, stay with the old one, so users install the new app.
  • Concurrent writers lose fields. PutObject replaces the whole object, and there is no compare-and-set or version check. When two handlers can update the same key at once, read the object right before the write, merge your fields into it, and write it back. That narrows the window but doesn't close it. Collections can't give you mutual exclusion: a lock object would be written with the same PutObject, so taking the lock is its own race. When lost writes matter, send every update to the key through one writer, and make sure two runs of that writer can't overlap.
  • Not configuring workflow share settings. Set workflow_integration.system_action: true for app-only workflow access, or false to also expose collections as Falcon Fusion SOAR actions.
  • Trying to delete collections via CLI. Collections can only be deleted from the Falcon Foundry UI.
  • Trying to manage objects via CLI. Collection CRUD requires the CrowdStrike API or foundry-js SDK.
  • Schema field names must match exactly. If a field name in your write payload doesn't match the collection schema (e.g., writing score when the schema defines severity), the write fails and returns errors in the response body — but the SDK does not throw. Without checking result.errors, the failure is invisible. Always read the collection schema file before writing seed data; verify required fields, enum values, and exact field names.
  • Not checking write responses for errors. The SDK does not throw on server-side validation failures. Always check result?.errors?.length after write operations — errors include specific messages like "missing property 'severity'" or "value must be one of 'low', 'medium', 'high', 'critical'". Verify persistence with a follow-up read or list call.
  • Reading a never-created key returns a truthy NOT-FOUND envelope — not null, not a throw, not {}. On the foundry-js side, collection.read(key) of a key that was never written resolves to a truthy error body instead of the record (the API's 404 shape is { meta, errors: [{ code: 404, ... }] }). Two traps follow: if (obj) takes the "load existing" branch for a missing key (an empty-state gate that always thinks data exists — so the record's first write never fires), and spreading that envelope into a read-modify-write poisons the payload — write() succeeds but the stored object is unreadable garbage. Check for errors?.[0]?.code === 404 and gate on a field your schema requires on every record (the CRUD client in references/advanced-patterns.md checks created_at), and sanitize a read before merging it into a write. It's the JS side of the missing-key 404 in the Python section of that reference.

Reading Guide

TaskReference
Migrations, testing, pagination, extended schemas, counter-rationalizationsreferences/advanced-patterns.md

Use Cases

For real-world implementation patterns, see:

  • use-cases/collections.md — CRUD operations, search, field types
  • use-cases/lookup-table-enrichment.md — 3rd-party data for automated enrichment

Reference Implementations

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة أثناء تحميل المهارة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Collections Development؟

Design JSON Schema collections and CRUD patterns for Falcon Foundry apps. TRIGGER when user asks to "create a collection", "define a JSON schema", "store data in Foundry", runs `foundry collections create`, or needs help with indexable fields, FQL queries, or collection access patterns. DO NOT TRIGGER for workflow YAML, function handlers, or UI components — use the appropriate sub-skill.

لماذا تستخدم Collections Development على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Collections Development عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Collections Development في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/CrowdStrike/foundry-skills/tree/main/skills/collections-development. يقرأ TypingMind ملف SKILL.md الخاص بها، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Collections Development؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Collections Development؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Collections Development معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Collections Development مجانية؟

نعم. نشرها CrowdStrike على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇