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
fix(SOL-422): stackone-unified-connectors - update stale StackOne docs links and description (#44)
* fix(SOL-422): stackone-unified-connectors - update stale docs links and description
- connector-engine links -> connector-building/stackone-cli
- key urls: connector building, defined output schemas, yaml reference
- llms.txt fallback
- description no longer names uninstallable schema skills
- skill version 2.2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(SOL-422): map fields with action-level fieldConfigs
- fieldConfigs replaces inline map_fields fields; map_fields/typecast take dataSource only
- expressions relative to each record, no step prefix
- drop schema inference troubleshooting entry
- lower() replaces unsupported .toLowerCase() in enum matching
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(SOL-422): scope .md rule to urls not ending in .md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(SOL-422): align docs fallback with sibling skills
- also covers pages that do not answer the question
- contact support when docs do not cover it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: plugins/integrations/stackone-unified-connectors/skills/stackone-unified-connectors/SKILL.md
+56-62Lines changed: 56 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
name: stackone-unified-connectors
3
-
description: Baseline skill for building unified/schema-based connectors that transform provider data into standardized schemas. Use alongside domain-specific schema skills (e.g., unified-hris-schema, unified-crm-schema) that define your organization's standard schemas. Use when user says "start unified build for [provider]", "build a schema-based connector", "map fields to schema", "test unified connector", or asks about field mapping, enum mapping, pagination configuration, or scope decisions. This skill provides implementation patterns; schema skills provide field definitions. Do NOT use for agentic/custom connectors (use stackone-cli), discovering existing connectors (use stackone-connectors), or building AI agents (use stackone-agents).
3
+
description: Baseline skill for building unified/schema-based connectors that transform provider data into standardized schemas. Use alongside domain-specific schema skills that you create to define your organization's standard schemas. Use when user says "start unified build for [provider]", "build a schema-based connector", "map fields to schema", "test unified connector", or asks about field mapping, enum mapping, pagination configuration, or scope decisions. This skill provides implementation patterns; schema skills provide field definitions. Do NOT use for agentic/custom connectors (use stackone-cli), discovering existing connectors (use stackone-connectors), or building AI agents (use stackone-agents).
4
4
license: MIT
5
5
compatibility: Requires StackOne CLI (@stackone/cli). Requires access to provider API documentation.
6
6
metadata:
7
7
author: stackone
8
-
version: "2.1"
8
+
version: "2.2"
9
9
---
10
10
11
11
# StackOne Unified Connectors
@@ -27,10 +27,16 @@ This separation allows you to maintain consistent schemas across all providers w
27
27
## Important
28
28
29
29
Before building unified connectors:
30
-
1. Read the CLI documentation: https://docs.stackone.com/guides/connector-engine/cli-reference
30
+
1. Read the CLI documentation: https://docs.stackone.com/connector-building/stackone-cli.md
31
31
2. Use `stackone help <command>` for command-specific details
32
32
3. Always verify response structures with `--debug` before configuring mappings
33
33
34
+
When fetching a `docs.stackone.com` page whose URL doesn't already end in `.md`, append `.md` to get it as markdown. `llms.txt` is already plain text, so fetch it as is.
35
+
36
+
**If any URL in this skill returns 404, or a page doesn't cover what you need** (StackOne reorganizes its docs from time to time):
37
+
- Fetch `https://docs.stackone.com/llms.txt`, which indexes every docs page by title and description. Search it for the page's topic (e.g. "StackOne CLI", "Defined Output Schemas", "Connector YAML Reference") and use the URL listed there.
38
+
- If the docs don't cover the question, say so and suggest contacting StackOne support. Don't invent an answer.
39
+
34
40
## Core Principles
35
41
36
42
These principles apply to ALL unified connector work. Violations cause silent failures or broken mappings.
Pass `fields` directly in `map_fields` step parameters rather than action-level `fieldConfigs`. This avoids schema inference issues that cause build failures.
79
+
Declare the field mapping once in the action's `fieldConfigs`. The `map_fields` and `typecast` steps then take only a `dataSource` and apply those `fieldConfigs`.
74
80
75
81
```yaml
76
-
# RECOMMENDED - Inline fields
77
-
- stepId: map_data
78
-
stepFunction:
79
-
functionName: map_fields
80
-
version: '2'
81
-
parameters:
82
-
fields:
83
-
- targetFieldKey: email
84
-
expression: $.email # Direct reference, NO step prefix
85
-
type: string
86
-
dataSource: $.steps.get_data.output.data
82
+
fieldConfigs:
83
+
- targetFieldKey: email
84
+
expression: $.email # Relative to each record, NO step prefix
85
+
type: string
86
+
87
+
steps:
88
+
- stepId: map_data
89
+
stepFunction:
90
+
functionName: map_fields
91
+
version: '2'
92
+
parameters:
93
+
dataSource: $.steps.get_data.output.data
87
94
```
88
95
89
-
### 5. Expression Context Depends on Location
96
+
### 5. Expressions Are Relative to Each Record
90
97
91
-
| Location | Expression Format | Example |
92
-
|----------|------------------|---------|
93
-
| Inline in `parameters.fields` | Direct field reference | `$.email`, `$.work.department` |
`fieldConfigs` expressions are evaluated against each record of the `map_fields` `dataSource`, so reference the record's fields directly: `$.email`, `$.work.department`. Do not prefix them with a step ID.
95
99
96
100
### 6. Never Suggest User-Side Mapping
97
101
@@ -186,52 +190,44 @@ See `references/scope-patterns.md` for detailed patterns.
186
190
187
191
### Step 5: Map Fields to Schema
188
192
189
-
Use inline fields in map_fields parameters:
193
+
Declare the mapping in action-level `fieldConfigs`, then run `map_fields` and `typecast` over the data:
190
194
191
195
```yaml
196
+
fieldConfigs:
197
+
- targetFieldKey: id
198
+
expression: $.id
199
+
type: string
200
+
- targetFieldKey: email
201
+
expression: $.email
202
+
type: string
203
+
- targetFieldKey: department
204
+
expression: $.work.department # Nested field
205
+
type: string
206
+
- targetFieldKey: status
207
+
expression: $.status
208
+
type: enum
209
+
enumMapper:
210
+
matcher:
211
+
- matchExpression: '{{$.status == "Active"}}'
212
+
value: active
213
+
- matchExpression: '{{$.status == "Inactive"}}'
214
+
value: inactive
215
+
- matchExpression: '{{$.status == null}}'
216
+
value: unknown
217
+
192
218
steps:
193
219
- stepId: map_data
194
220
stepFunction:
195
221
functionName: map_fields
196
222
version: '2'
197
223
parameters:
198
-
fields:
199
-
- targetFieldKey: id
200
-
expression: $.id
201
-
type: string
202
-
- targetFieldKey: email
203
-
expression: $.email
204
-
type: string
205
-
- targetFieldKey: department
206
-
expression: $.work.department # Nested field
207
-
type: string
208
-
- targetFieldKey: status
209
-
expression: $.status
210
-
type: enum
211
-
enumMapper:
212
-
matcher:
213
-
- matchExpression: '{{$.status == "Active"}}'
214
-
value: active
215
-
- matchExpression: '{{$.status == "Inactive"}}'
216
-
value: inactive
217
-
- matchExpression: '{{$.status == null}}'
218
-
value: unknown
219
224
dataSource: $.steps.get_data.output.data
220
225
221
226
- stepId: typecast_data
222
227
stepFunction:
223
228
functionName: typecast
224
229
version: '2'
225
230
parameters:
226
-
fields:
227
-
- targetFieldKey: id
228
-
type: string
229
-
- targetFieldKey: email
230
-
type: string
231
-
- targetFieldKey: department
232
-
type: string
233
-
- targetFieldKey: status
234
-
type: enum
235
231
dataSource: $.steps.map_data.output.data
236
232
237
233
result:
@@ -329,7 +325,7 @@ Actions:
329
325
3. **If no skill**: Ask for schema, recommend creating `unified-hris-schema` skill for consistency across HRIS providers
330
326
4. Research BambooHR endpoints: `/v1/employees`, `/v1/employees/directory`, custom reports
331
327
5. Present options with trade-offs (field coverage, scopes, deprecation)
332
-
6. After user selects, implement map_fields with inline fields using schema from skill
328
+
6. After user selects, declare `fieldConfigs` using schema from skill and add map_fields and typecast steps
333
329
7. Configure pagination with cursor support
334
330
8. Test with `--debug`, verify field names match schema
335
331
9. Document coverage
@@ -356,7 +352,7 @@ User says: "My unified connector returns provider field names instead of my sche
356
352
Actions:
357
353
1. Check if `targetFieldKey` uses YOUR schema names (not provider names)
358
354
2. Verify `version: '2'` is specified on map_fields and typecast
359
-
3. Check expression context - inline fields should NOT have step prefix
355
+
3. Check expression context - `fieldConfigs` expressions should NOT have a step prefix
360
356
4. Run with `--debug` to see raw response structure
361
357
5. Verify dataSource path is correct
362
358
@@ -383,20 +379,16 @@ Result: Working pagination with correct cursor handling.
383
379
384
380
### Mapping produces empty results
385
381
**Cause**: Missing `version: '2'` or wrong expression context.
386
-
**Fix**: Add `version: '2'` to map_fields and typecast. For inline fields, use direct references (`$.email`) without step prefix.
382
+
**Fix**: Add `version: '2'` to map_fields and typecast. In `fieldConfigs`, use direct references (`$.email`) without step prefix.
387
383
388
384
### Enum values not translating
389
385
**Cause**: `matchExpression` doesn't match provider values (case-sensitive).
390
-
**Fix**: Check exact provider values with `--debug`. Use `.toLowerCase()` for case-insensitive matching. Always include null/unknown fallback.
386
+
**Fix**: Check exact provider values with `--debug`. Use the `lower()` function for case-insensitive matching (e.g. `'{{lower($.status) == "active"}}'`). Always include null/unknown fallback.
391
387
392
388
### Pagination returns same records
393
389
**Cause**: Cursor not being sent or extracted correctly.
394
390
**Fix**: Verify `iterator.key` matches API's expected parameter name. Check `nextKey` path against raw response. Verify `iterator.in` is correct (query/body/headers).
0 commit comments