.claude/skills/add-workflow-trigger/SKILL.md
Create an automation workflow trigger that fires on entity events (lead created, deal stage changed, etc.) and executes a sequence of actions. Use when building the automation engine.
npx skillsauth add malhajri07/real-estate-CRM-project add-workflow-triggerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Creates a new trigger type for the workflow automation engine. When the trigger condition is met, the engine starts a workflow run that executes configured actions in sequence.
lead_created, deal_stage_won, appointment_missed, lead_score_aboveRegister the trigger type in apps/api/libs/workflow-engine.ts:
export const TRIGGER_TYPES = {
lead_created: { entity: "leads", event: "create", label: "عميل جديد" },
deal_stage_changed: { entity: "deals", event: "update", field: "stage", label: "تغيير مرحلة الصفقة" },
} as const;
Add the emit point in the relevant API route. After the mutation succeeds:
await workflowEngine.checkTriggers("lead_created", { entityId: lead.id, orgId });
Implement checkTriggers in the workflow engine:
workflows table: active workflows with matching trigger type and orgIdworkflow_runs record with status PENDINGAdd trigger to the builder UI palette:
Test with a sample workflow:
lead_created → action = log to console/typecheck passestesting
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
tools
Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
data-ai
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
tools
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.