Skip to content

Commit 34e308a

Browse files
author
Baton Admin
committed
chore: update connector skills via baton-admin
1 parent 796943f commit 34e308a

File tree

1 file changed

+121
-0
lines changed

1 file changed

+121
-0
lines changed

.claude/skills/connector/INDEX.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Connector Skills Index
2+
3+
Skills for building and reviewing ConductorOne Baton connectors.
4+
5+
---
6+
7+
## Available Sections
8+
9+
### Concepts (Understanding)
10+
11+
| File | Covers |
12+
|------|--------|
13+
| `concepts-sync-lifecycle.md` | Four sync phases, SDK orchestration, checkpointing |
14+
| `concepts-identifiers.md` | ResourceId vs ExternalId, SourceConnectorIds, match_baton_id |
15+
| `concepts-access-model.md` | Resources, entitlements, grants, traits |
16+
17+
### Building (Implementation)
18+
19+
| File | Covers |
20+
|------|--------|
21+
| `build-syncer.md` | ResourceSyncer interface, List/Entitlements/Grants methods |
22+
| `build-pagination.md` | Token strategies, pagination.Bag, termination conditions |
23+
| `build-provisioning.md` | Grant/Revoke implementation, idempotency, AccountManager |
24+
| `build-config.md` | Configuration schema, CLI flags, environment variables |
25+
26+
### Patterns (Best Practices)
27+
28+
| File | Covers |
29+
|------|--------|
30+
| `patterns-entity-sources.md` | Principal vs entitlement data extraction (CRITICAL) |
31+
| `patterns-http-safety.md` | Nil checks, error handling, response processing |
32+
| `patterns-error-handling.md` | Error wrapping, prefixes, retryable vs fatal |
33+
| `patterns-json-safety.md` | JSON type mismatches, flexible ID/bool types |
34+
35+
### Review (Code Review)
36+
37+
| File | Covers |
38+
|------|--------|
39+
| `review-checklist.md` | Pre-merge verification checklist |
40+
| `review-breaking-changes.md` | What constitutes breaking changes, guardrails |
41+
| `review-common-bugs.md` | Top 5 common bug patterns |
42+
43+
### Reference
44+
45+
| File | Covers |
46+
|------|--------|
47+
| `ref-traits.md` | User/Group/Role/App trait selection |
48+
| `ref-unused-features.md` | SDK features C1 ignores (don't waste effort) |
49+
| `ref-antipatterns.md` | What NOT to do |
50+
51+
---
52+
53+
## Selection Guidelines
54+
55+
### User is building a connector
56+
57+
**"How do I start?"**
58+
- `concepts-access-model.md` - Understand what connectors sync
59+
- `build-syncer.md` - Implement ResourceSyncer
60+
61+
**"How do I handle pagination?"**
62+
- `build-pagination.md` - Token strategies and termination
63+
64+
**"How do I implement Grant/Revoke?"**
65+
- `build-provisioning.md` - Provisioning patterns
66+
- `patterns-entity-sources.md` - Which entity provides which data (CRITICAL)
67+
68+
**"What traits should I use?"**
69+
- `ref-traits.md` - User vs App vs Group vs Role
70+
71+
**"What should I avoid?"**
72+
- `ref-antipatterns.md` - Common mistakes
73+
- `ref-unused-features.md` - Don't waste effort on dead code
74+
75+
### User is reviewing connector code
76+
77+
**"Is this PR safe to merge?"**
78+
- `review-checklist.md` - Verification checklist
79+
- `review-breaking-changes.md` - Breaking change detection
80+
81+
**"What bugs should I look for?"**
82+
- `review-common-bugs.md` - Top 5 bug patterns
83+
- `patterns-entity-sources.md` - Entity confusion detection
84+
- `patterns-http-safety.md` - Nil pointer patterns
85+
86+
### User has a bug
87+
88+
**"Sync hangs forever"**
89+
- `build-pagination.md` - Pagination termination issues
90+
- `review-common-bugs.md` - Infinite loop patterns
91+
92+
**"Grant gives access to wrong user"**
93+
- `patterns-entity-sources.md` - Entity confusion
94+
95+
**"Panic in production"**
96+
- `patterns-http-safety.md` - Nil pointer safety
97+
98+
---
99+
100+
## Quick Reference
101+
102+
**Three resource types every connector needs:**
103+
- User (TRAIT_USER) - principals who receive grants
104+
- Group (TRAIT_GROUP) - collections with "member" entitlement
105+
- Role (TRAIT_ROLE) - permissions with "assigned" entitlement
106+
107+
**Four sync phases (SDK orchestrates):**
108+
1. ResourceType() - discover what types exist
109+
2. List() - fetch all resources
110+
3. Entitlements() - fetch available permissions
111+
4. Grants() - fetch who has what
112+
113+
**Top 3 mistakes:**
114+
1. Entity confusion - getting data from wrong entity in Grant/Revoke
115+
2. Pagination infinite loop - wrong termination condition
116+
3. Nil pointer on HTTP response - accessing resp.Body when resp is nil
117+
118+
**SDK features - usage notes:**
119+
- `WithExternalID()` - **REQUIRED for provisioning** (stores native ID for API calls)
120+
- `WithMFAStatus()`, `WithSSOStatus()` - Only needed for IDP connectors
121+
- `WithStructuredName()` - Rarely needed; DisplayName usually sufficient

0 commit comments

Comments
 (0)