.factory/skills/create-dsync-connector/SKILL.md
Create a new dsync connector with test suite. Use when adding support for a new data source/sink type (e.g., file, S3, database).
npx skillsauth add adiom-data/dsync create-dsync-connectorInstall 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.
file://, s3://, mongodb://)Read a similar connector as reference. Good examples:
connectors/s3/ - File-based sink with batchingconnectors/postgres/ - Full-featured with CDC using logical replicationconnectors/mongo/ - Full-featured with streamingconnectors/sqlbatch/ - Connector for SQL sources using a custom query and change-tracking with polling for CDCconnectors/null/ - Minimal sink-onlyconnectors/random/ - Source-onlyKey files to understand:
connector.go - Main implementationinternal/app/options/connectorflags.go - Registration and CLI flagspkg/test/connector.go - Test suite frameworkconnectors/<name>/
├── connector.go # Main implementation
└── connector_test.go # Tests
Required elements:
adiomv1connect.ConnectorServiceHandlerDbType identifierSource capabilities if readableSink capabilities if writableUnimplemented:
GeneratePlan - partition data for readingGetNamespaceMetadata - count recordsListData - read dataWriteData - write dataStreamUpdates - CDC (or Unimplemented)StreamLSN - LSN tracking (or Unimplemented)WriteUpdates - incremental updates (or Unimplemented)Error message guidelines:
fmt.Errorf("failed to X for Y: %w", err) patternEdit internal/app/options/connectorflags.go:
myconnector "github.com/adiom-data/dsync/connectors/<name>"
GetRegisteredConnectors():{
Name: "<Name>",
IsConnector: func(s string) bool {
return strings.HasPrefix(strings.ToLower(s), "<scheme>://")
},
Create: func(args []string, as AdditionalSettings) (adiomv1connect.ConnectorServiceHandler, []string, error) {
settings := myconnector.ConnectorSettings{Uri: args[0]}
return CreateHelper("<name>", "<usage>", MyConnectorFlags(&settings),
func(_ *cli.Context, _ []string, _ AdditionalSettings) (adiomv1connect.ConnectorServiceHandler, error) {
return myconnector.NewConn(settings)
})(args, as)
},
},
func MyConnectorFlags(settings *myconnector.ConnectorSettings) []cli.Flag {
return []cli.Flag{
// Define CLI flags
}
}
Create connectors/<name>/test_data/ with:
Create connector_test.go:
func TestMyConnectorSuite(t *testing.T) {
tSuite := pkgtest.NewConnectorTestSuite(
"namespace",
func() adiomv1connect.ConnectorServiceClient {
conn, _ := NewConn(ConnectorSettings{Uri: "..."})
return pkgtest.ClientFromHandler(conn)
},
bootstrapFunc, // or nil
insertUpdatesFunc, // or nil
numPages,
numItems,
)
// Set flags for unsupported features:
tSuite.SkipDuplicateTest = true // If output order non-deterministic
tSuite.SkipWriteUpdatesTest = true // If WriteUpdates not supported
suite.Run(t, tSuite)
}
Run:
go build ./...
go test ./connectors/<name>/... -v
Check:
--help shows connector optionsRun dsync with the new connector as destination:
go run main.go /dev/fakesource <new-connector-uri> [options]
Evaluate output for: namespaces, data content, warnings, errors.
Run dsync with the new connector as source:
go run main.go <new-connector-uri> "/dev/null --log-json"
Evaluate output for: namespaces, data content, warnings, errors.
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).