You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(integrations): suggest curated skills per integration with one-click add (#4912)
* feat(integrations): suggest curated skills per integration with one-click add
Curate research-backed, capability-grounded skills for every catalog
integration and surface them on the integration detail page. Each skill
maps to operations the block actually supports and can be added to the
workspace in one click; track adds in PostHog.
- Add SuggestedSkill type + skills field on BlockMeta; populate skills
for all 193 catalog integrations (3 audit passes for grounding/sourcing)
- getSuggestedSkillsForBlock() with versioned-type (e.g. notion_v2) base fallback
- Skills section on the integration detail page with add/added states
- integration_skill_added PostHog event with workspace/integration metadata
* fix(integrations): flip suggested-skill row to Added immediately after add
The row derived Added state solely from the useSkills cache, so between a
successful create and the list refetch the row still showed Add and could
be clicked again, hitting the server duplicate-name check. Track added
names in local state so the row reflects the add immediately.
* fix(integrations): harden suggested-skill add flow; document skill authoring
Address PR review feedback on the suggested-skills section:
- Make useSkills the single source of truth for Added state by writing the
created skill into the React Query cache onSuccess (fixes stale Added that
survived a delete, and the lag that allowed a duplicate click)
- Track in-flight adds in a Set so concurrent adds keep independent pending
state and cannot be double-submitted
- Surface failures with toast.error instead of swallowing the rejection
- Extract the duplicated SkillTile into a shared workspace component
Also document the new BlockMeta.skills field in the add-block and
validate-integration skills (+ blocks AGENTS.md): skills must be grounded in
the block's tools.access and sourced from real online use cases, never invented.
* fix(integrations): synchronous in-flight guard for skill add; align cursor docs
- Guard handleAdd with a ref so two rapid clicks cannot both fire a create
before the disabled state re-renders (pendingNames is async)
- Fold the create-cache-merge rationale into the hook's TSDoc and drop
non-TSDoc inline comments to match the repo convention
- Align .cursor add-block/validate-integration command docs with the newer
.claude/.agents versions: BlockMeta section + skills authoring/validation
guidance (grounded in tools.access, sourced from real online use cases)
* fix(integrations): gate skill Add/Added on authoritative workspace skills
useSkills uses keepPreviousData, so during initial load or a workspace switch
the list could be empty or a prior workspace's placeholder — making rows show
a misleading Add (duplicate-submittable) or a false Added. Derive skillsReady
from !isPending && !isPlaceholderData, only mark Added when ready, and disable
Add until the current workspace's list has loaded.
* chore(integrations): drop local-variable comments in skills section
Keep to the repo's TSDoc-on-declarations convention — the in-flight guard and
skillsReady derivation are self-evident from naming.
-**`alsoIntegrations`** names other block types (e.g. `'slack'`, `'linear'`) referenced in the template prompt — helps the catalog surface this template when those blocks are selected
666
674
- Place the export **after** the main `{Service}Block` export, at the very bottom of the file
`skills` is an optional array of `SuggestedSkill` (`{ name, description, content }`) shown on the integration's detail page; users click **Add** to create the skill in their workspace. Aim for 3–5 skills for mainstream services, 2–3 for niche/low-level ones.
679
+
680
+
-**`name`** — kebab-case, lowercase letters/numbers/hyphens, ≤ 64 chars, unique within the integration, verb-led (e.g. `summarize-thread`).
681
+
-**`description`** — one line, ≤ 1024 chars: what it does and when to use it.
682
+
-**`content`** — markdown instructions for the agent (literal `\n` for newlines): a `# Title`, then `## Steps` and an output/guidance section. Keep ~600–2000 chars.
683
+
-**Ground every skill in operations the block actually exposes.** Cross-check each skill's steps against the block's `tools.access` list — never describe an action the integration cannot perform (e.g. "receive messages" when the block only sends).
684
+
-**Skills MUST be derived from real, popular use cases found online — never invented.** Before adding a skill, web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles). If you cannot source a use case as something people genuinely do with the service, do not add it. Do not hallucinate skills.
685
+
668
686
### Register in the blocksMeta object
669
687
670
688
After adding `{Service}BlockMeta` to the block file, register it in `apps/sim/blocks/registry.ts`:
@@ -888,6 +906,7 @@ All tool IDs referenced in `tools.access` and returned by `tools.config.tool` MU
888
906
-[ ] Outputs match tool outputs
889
907
-[ ] Block registered in `registry.ts` blocks object (alphabetically)
890
908
-[ ]`{Service}BlockMeta` exported at bottom of block file with `tags` and `templates`
909
+
-[ ]`skills` added to `{Service}BlockMeta`, each grounded in the block's `tools.access` and derived from a real online-sourced use case (not invented)
891
910
-[ ]`BlockMeta` imported from `@/blocks/types` alongside `BlockConfig`
892
911
-[ ] Block meta registered in `registry.ts` blocksMeta object (alphabetically)
Copy file name to clipboardExpand all lines: .agents/skills/validate-integration/SKILL.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,6 +207,12 @@ For **each tool** in `tools.access`:
207
207
-[ ]`authMode` is set correctly (`AuthMode.OAuth` or `AuthMode.ApiKey`)
208
208
-[ ] Block is registered in `blocks/registry.ts` alphabetically
209
209
210
+
### BlockMeta Skills (catalog)
211
+
-[ ]`{Service}BlockMeta.skills` is present (3–5 for mainstream services, 2–3 for niche/low-level)
212
+
-[ ]**Every skill is grounded** — its steps only use operations the block exposes in `tools.access`; flag any skill that implies an unsupported action (e.g. "receive messages" when the block only sends)
213
+
-[ ]**Every skill is real, not hallucinated** — web-search the service and confirm each skill maps to a popular use case attested online (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles). Rewrite or remove any skill you cannot source as something people genuinely do with the service.
214
+
-[ ] Each skill has a kebab-case `name` (≤64 chars, unique), a one-line `description`, and markdown `content` with `# Title` + `## Steps` + an output/guidance section
215
+
210
216
### Block Inputs
211
217
-[ ]`inputs` section lists all subBlock params that the block accepts
Derive templates from the service's real use cases. Each prompt should name a concrete trigger, transformation, and output — not a generic description of what the service does.
814
823
824
+
`skills` are curated, ready-to-add agent skills shown on the integration's detail page (users click **Add** to create them in their workspace). Two hard rules:
825
+
826
+
-**Ground every skill in operations the block actually exposes** — cross-check each skill's steps against `tools.access`. Never describe an action the integration cannot perform.
827
+
-**Derive skills from real, popular use cases found online — never invent them.** Web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles) and only add a skill you can source as something people genuinely do with the service. Do not hallucinate skills.
828
+
815
829
## Checklist Before Finishing
816
830
817
831
-[ ]`integrationType` is set to the correct `IntegrationType` enum value
@@ -831,6 +845,7 @@ Derive templates from the service's real use cases. Each prompt should name a co
831
845
-[ ] Optional/rarely-used fields set to `mode: 'advanced'`
832
846
-[ ] Timestamps and complex inputs have `wandConfig` enabled
833
847
-[ ] Exported `{Service}BlockMeta` with at least 7 templates
848
+
-[ ]`skills` added to `{Service}BlockMeta`, each grounded in `tools.access` and sourced from a real online use case (not invented)
Copy file name to clipboardExpand all lines: .claude/commands/validate-integration.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,8 @@ For **each tool** in `tools.access`:
197
197
-[ ] Has at least 7 templates, each with `icon`, `title`, `prompt`, `modules`, `category`, and `tags`
198
198
-[ ] Prompts describe concrete use cases, not generic descriptions of what the service does
199
199
-[ ]`alsoIntegrations` is set on any template whose prompt references another service
200
+
-[ ]`skills` present (3–5 mainstream, 2–3 niche), each grounded in `tools.access` — flag any skill implying an unsupported action
201
+
-[ ]**Each skill is real, not hallucinated** — web-search and confirm it maps to a popular use case attested online (vendor use-case pages, official docs describing the workflow, reputable "top automations" articles); rewrite/remove any you cannot source
200
202
201
203
### Block Inputs
202
204
-[ ]`inputs` section lists all subBlock params that the block accepts
Copy file name to clipboardExpand all lines: .cursor/commands/add-block.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -793,6 +793,47 @@ Use `wandConfig` for fields that are hard to fill out manually, such as timestam
793
793
794
794
All tool IDs referenced in `tools.access` and returned by `tools.config.tool` MUST use `snake_case` (e.g., `x_create_tweet`, `slack_send_message`). Never use camelCase or PascalCase.
795
795
796
+
## BlockMeta (Required)
797
+
798
+
Every block file must export a `{Service}BlockMeta` alongside the block — **minimum 7 templates**. Look at existing examples in `apps/sim/blocks/blocks/` (e.g. `browser_use.ts`, `google_sheets.ts`) for the pattern.
799
+
800
+
```typescript
801
+
importtype { BlockMeta } from'@/blocks/types'
802
+
803
+
exportconst {Service}BlockMeta = {
804
+
tags: ['tag1', 'tag2'], // IntegrationTag[]
805
+
templates: [
806
+
{
807
+
icon: {Service}Icon,
808
+
title: '{Service} <use-case>', // 2–5 words
809
+
prompt: 'Build a workflow that...', // specific use case, 1–3 sentences
Derive templates from the service's real use cases. Each prompt should name a concrete trigger, transformation, and output — not a generic description of what the service does.
831
+
832
+
`skills` are curated, ready-to-add agent skills shown on the integration's detail page (users click **Add** to create them in their workspace). Two hard rules:
833
+
834
+
-**Ground every skill in operations the block actually exposes** — cross-check each skill's steps against `tools.access`. Never describe an action the integration cannot perform.
835
+
-**Derive skills from real, popular use cases found online — never invent them.** Web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles) and only add a skill you can source as something people genuinely do with the service. Do not hallucinate skills.
836
+
796
837
## Checklist Before Finishing
797
838
798
839
-[ ]`integrationType` is set to the correct `IntegrationType` enum value
@@ -811,6 +852,8 @@ All tool IDs referenced in `tools.access` and returned by `tools.config.tool` MU
Copy file name to clipboardExpand all lines: .cursor/commands/validate-integration.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,6 +187,14 @@ For **each tool** in `tools.access`:
187
187
-[ ]`authMode` is set correctly (`AuthMode.OAuth` or `AuthMode.ApiKey`)
188
188
-[ ] Block is registered in `blocks/registry.ts` alphabetically
189
189
190
+
### BlockMeta
191
+
-[ ]`{Service}BlockMeta` is exported in the same file as the block
192
+
-[ ] Has at least 7 templates, each with `icon`, `title`, `prompt`, `modules`, `category`, and `tags`
193
+
-[ ] Prompts describe concrete use cases, not generic descriptions of what the service does
194
+
-[ ]`alsoIntegrations` is set on any template whose prompt references another service
195
+
-[ ]`skills` present (3–5 mainstream, 2–3 niche), each grounded in `tools.access` — flag any skill implying an unsupported action
196
+
-[ ]**Each skill is real, not hallucinated** — web-search and confirm it maps to a popular use case attested online (vendor use-case pages, official docs describing the workflow, reputable "top automations" articles); rewrite/remove any you cannot source
197
+
190
198
### Block Inputs
191
199
-[ ]`inputs` section lists all subBlock params that the block accepts
0 commit comments