skills/create-provider-package-with-core/SKILL.md
Use when building a custom provider integration on top of @prefactor/core so your app can instrument agent, llm, and tool workflows without relying on a prebuilt adapter package.
npx skillsauth add prefactordev/typescript-sdk create-provider-package-with-coreInstall 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.
Build your own provider adapter package on top of @prefactor/core.
Core principle: @prefactor/core handles tracing infrastructure, while your adapter maps provider-specific APIs.
Apply this skill when the request includes patterns like:
@prefactor/core for lifecycle, context, serialization, and transport behavior.<provider>:agent, <provider>:llm, <provider>:tool).In your app or workspace, create a dedicated module/package (for example prefactor-provider-<provider>):
src/index.ts public entrypointsrc/<provider>-middleware.ts provider integration wrappertests/ covering tracing behaviorpackage.json with dependency on @prefactor/coreUse this package surface:
.js on relative imports.src/index.ts.@prefactor/core for tracing, context propagation, config, transport helpers.init + withSpan, keep them bound to the same tracer source; if calling core withSpan outside adapter helpers, pass an explicit tracer.SpanContext.runAsync(...)) so parent/child spans remain intact.Validate in integration tests or a local smoke script:
Confirm telemetry is emitted through your configured Prefactor transport.
Before rollout, verify:
| Decision | Put it where |
| --- | --- |
| Reusable tracing/context helpers | @prefactor/core |
| Provider request/response mapping | your adapter package |
| Span lifecycle logic | @prefactor/core + thin wrapper calls |
| Provider-only middleware/wrappers | your adapter package |
references/provider-package-checklist.md for an implementation checklist.development
Use when an agent is already instrumented with Prefactor and you need to populate data_risk fields on its span types to enable compliance tracking and data governance.
tools
Use when an existing agent already works without Prefactor and you need to add tracing for runs, llm calls, tool calls, and failures with minimal behavior changes.
tools
Use when an existing agent needs Prefactor resources created via the Prefactor CLI before SDK instrumentation is added.
development
Use when choosing which Prefactor SDK skill to load for agent instrumentation or for building a custom provider integration on top of @prefactor/core.