Skip to main content
A Skill is a workspace-scoped markdown document the AI chat LLM consumes at query time. Two flavours coexist in the same table, discriminated by kind: reference skills are long-form procedure docs browsable in workspace settings, while action skills capture a specific AI action (filter, custom column, table setup) and can be shared via a public link whose URL can be dropped into any chat to replay the action. Skills are soft-deletable, carry optional authorship provenance (created_by membership) and optional derivation provenance (source_thread chat conversation), and control their own visibility (private vs public). The entity has no cascade-delete from its owning workspace, which is intentional to protect cross-workspace public-link sharing.
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

Data model

Attributes

Relationships

System-computed

  • skill_id — generated by gen_random_uuid() at insert; never client-supplied.
  • created_at — set by MikroORM onCreate hook (new Date()); maps to TIMESTAMPTZ NOT NULL DEFAULT now().
  • updated_at — set by MikroORM onCreate hook and refreshed on every flush via onUpdate hook.
  • deleted_at — soft-delete field; set by the delete handler to the current timestamp; never written by callers; live queries always filter deleted_at IS NULL.
  • visibility default — the ORM default and DB column default are both ‘private’; callers may omit this field on create.
  • Partial index idx_skills_workspace_kind covers (workspace_pk, kind, created_at DESC) WHERE deleted_at IS NULL — list-by-workspace-and-kind queries satisfy ORDER BY without a separate sort step.
  • Partial index idx_skills_source_thread covers (source_thread_pk) WHERE source_thread_pk IS NOT NULL AND deleted_at IS NULL — reverse-lookup ‘skills derived from this conversation’ query.

Example

Source: apps/api/src/database/entities/Skill.ts · domain: automation · tier: Activity