Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计通过

create-provider-package-with-core使用核心创建提供程序包

Agent Skill

create-provider-package-with-core 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

840

周安装

34

GitHub Stars

2

下载量

264
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:create-provider-package-with-core(使用核心创建提供程序包)
来源仓库:https://github.com/prefactordev/typescript-sdk
仓库路径:skills/create-provider-package-with-core
安装命令:
npx skills add https://github.com/prefactordev/typescript-sdk --skill create-provider-package-with-core
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/prefactordev/typescript-sdk --skill create-provider-package-with-core

简介

基于 @prefactor/core 构建自定义提供程序适配器包。

  • 适用于集成新框架或扩展现有追踪能力。create-provider-package-with-core 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 封装 provider-specific APIs,保持核心基础设施稳定。
  • 安装需确认 TypeScript 项目和 core 依赖版本兼容性。
  • 遵循最小适配原则,避免过度耦合业务逻辑。

SKILL.md

Create Provider Package With Core

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.

Trigger Phrases

Apply this skill when the request includes patterns like:

  • "add a new provider package"
  • "instrument provider X using @prefactor/core"
  • "my framework does not have a Prefactor adapter"
  • "build a custom SDK integration with Prefactor"

Workflow

  1. Define adapter boundaries.
  2. Create a small adapter package in your project.
  3. Implement instrumentation with core primitives.
  4. Validate trace behavior in your app.
  5. Harden for production usage.

1) Define adapter boundaries

  • Keep your adapter thin: request/response mapping, middleware hooks, payload adaptation.
  • Reuse @prefactor/core for lifecycle, context, serialization, and transport behavior.
  • Use provider-prefixed span types (<provider>:agent, <provider>:llm, <provider>:tool).

2) Create a small adapter package

In your app or workspace, create a dedicated module/package (for example prefactor-provider-<provider>):

  • src/index.ts public entrypoint
  • src/<provider>-middleware.ts provider integration wrapper
  • tests/ covering tracing behavior
  • package.json with dependency on @prefactor/core

Use this package surface:

  • ESM imports/exports; explicit .js on relative imports.
  • Export only stable adapter entrypoints from src/index.ts.

3) Implement instrumentation with core primitives

  • Depend on @prefactor/core for tracing, context propagation, config, transport helpers.
  • If your adapter exposes helper APIs like init + withSpan, keep them bound to the same tracer source; if calling core withSpan outside adapter helpers, pass an explicit tracer.
  • Wrap provider execution paths in context (SpanContext.runAsync(...)) so parent/child spans remain intact.
  • Capture inputs/outputs and usage metadata when available; apply truncation/redaction safeguards.
  • On errors, record span failure data and rethrow the original error.
  • For streaming providers, finish spans on completion, cancellation, and stream errors.

4) Validate trace behavior in your app

Validate in integration tests or a local smoke script:

  • parent/child span relationships
  • success + error span completion
  • streaming completion/cancel/error terminal paths
  • payload capture and limits
  • provider-prefixed span types

Confirm telemetry is emitted through your configured Prefactor transport.

5) Harden for production usage

Before rollout, verify:

  • instrumentation never crashes user requests
  • spans finish exactly once
  • secrets are redacted and payloads are bounded
  • errors preserve original stack/type when rethrown

Quick Reference

DecisionPut it where
Reusable tracing/context helpers@prefactor/core
Provider request/response mappingyour adapter package
Span lifecycle logic@prefactor/core + thin wrapper calls
Provider-only middleware/wrappersyour adapter package

References

  • Use references/provider-package-checklist.md for an implementation checklist.

Common Mistakes

  • Re-implementing tracing lifecycle per provider instead of reusing core.
  • Using generic span names instead of provider-prefixed types.
  • Capturing raw payloads without truncation/redaction.
  • Swallowing provider errors after instrumentation.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.9%
按下载量换算92

Claude

27.63%
按下载量换算73

Cursor

19.36%
按下载量换算51

Gemini CLI

9.87%
按下载量换算26

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/prefactordev/typescript-sdk --skill create-provider-package-with-core 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills