Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

bootstrap-existing-agent-with-prefactor-clibootstrap existing Agent with prefactor CLI 命令行

Agent Skill

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

总安装

722

周安装

31

GitHub Stars

2

下载量

253
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:bootstrap-existing-agent-with-prefactor-cli(bootstrap existing Agent with prefactor CLI 命令行)
来源仓库:https://github.com/prefactordev/typescript-sdk
仓库路径:skills/bootstrap-existing-agent-with-prefactor-cli
安装命令:
npx skills add https://github.com/prefactordev/typescript-sdk --skill bootstrap-existing-agent-with-prefactor-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/prefactordev/typescript-sdk --skill bootstrap-existing-agent-with-prefactor-cli

简介

提供 Prefactor 资源预置能力,支持已有代理的监控配置。

  • 核心原则:先配置环境,再添加埋点代码。
  • 适用于主流云服务商和托管平台的代理设置。
  • 安装方式:通过 npx 从 GitHub 仓库添加,适用于 Codex、Claude、Cursor、Gemini CLI。
  • 注意:需确认提供商支持情况,不支持时需手动配置替代方案。

SKILL.md

Bootstrap Existing Agent With Prefactor CLI

Set up Prefactor resources for an already-working agent before instrumentation code changes.

Core principle: provision first, instrument second.

Coding Assistant Usage

Apply this skill first when the user asks to:

  • "set up Prefactor for this existing agent"
  • "create Prefactor environment/agent/instance"
  • "use CLI to bootstrap Prefactor"
  • "prepare IDs and env vars before instrumentation"

After this skill completes:

  1. If provider is supported, continue with skills/instrument-existing-agent-with-prefactor-sdk/SKILL.md.
  2. If provider is unsupported, continue with skills/create-provider-package-with-core/SKILL.md.
  3. Return a copy/paste block with exported env vars and the selected package.

Inputs You Need

  • Prefactor API token (for CLI profile)
  • Base URL (optional, defaults to Prefactor cloud)
  • Account ID
  • Target provider/framework (langchain, ai, openclaw, or custom)
  • Human-readable names for environment and agent
  • Working directory to store config (recommended: repo root)

CLI Workflow

Before running CLI commands, choose package first, then install required Prefactor package(s).

  • Use whichever package manager the project already uses (bun, npm, pnpm, or yarn).
  • Install @prefactor/cli for bootstrap commands.

prefactor command requirement:

  • The prefactor command comes from the npm package @prefactor/cli.
  • If the command is not globally available, run it via the package manager launcher (bunx @prefactor/cli, npx @prefactor/cli, pnpm dlx @prefactor/cli, or yarn dlx @prefactor/cli).
  • Use prefactor help or prefactor <group> help for command details.

Examples:

# bun
bun add @prefactor/cli

# npm
npm install @prefactor/cli

# pnpm
pnpm add @prefactor/cli

# yarn
yarn add @prefactor/cli

Run these in order:

prefactor profiles add default [base-url] --api-token <api-token>
prefactor accounts list
prefactor environments create --name <env-name> --account_id <account-id>
prefactor agents create --name <agent-name> --environment_id <environment-id>
prefactor agent_instances register \
  --agent_id <agent-id> \
  --agent_version_external_identifier <agent-version-id> \
  --agent_version_name <agent-version-name> \
  --agent_schema_version_external_identifier <schema-version-id> \
  --update_current_version

Profile notes:

  • <profile-name> is any key like default, staging, or prod.
  • Select profile with --profile <name>.
  • When using launchers, prefix commands consistently (for example npx @prefactor/cli profiles add...).

Config resolution notes:

  • CLI config resolution order is:

1. ./prefactor.json 2. ~/.prefactor/prefactor.json 3. if none exists, profile creation writes ./prefactor.json

  • Global CLI install does not make config global; command working directory still controls which config file is used.

Collect and persist these IDs from command output:

  • environment_id
  • agent_id
  • agent_instance_id

Package Selection

Choose package by provider:

  • LangChain -> @prefactor/langchain
  • AI SDK -> @prefactor/ai
  • OpenClaw -> @prefactor/openclaw
  • Custom/unsupported provider -> use skills/create-provider-package-with-core/SKILL.md

When handing off to SDK instrumentation, import helpers from that selected package directly, for example:

import { init, withSpan, shutdown } from '@prefactor/ai';
// or '@prefactor/langchain'

Do not mix adapter init with withSpan/shutdown from @prefactor/core unless an explicit tracer is passed. This guidance targets adapter-style integrations (@prefactor/ai, @prefactor/langchain) and does not change @prefactor/openclaw plugin runtime behavior.

If you have identified and selected an existing package, use skills/instrument-existing-agent-with-prefactor-sdk/SKILL.md

Runtime Environment Variables

Produce this output for the user after setup:

export PREFACTOR_API_URL="<api-url>"
export PREFACTOR_API_TOKEN="<api-token>"
export PREFACTOR_AGENT_ID="<agent-id>"

Use the created agent_id for PREFACTOR_AGENT_ID.

Verification

  • Confirm CLI commands succeeded without HTTP/auth errors.
  • Confirm IDs were returned and captured.
  • Confirm package selection matches provider.
  • Confirm env vars match created resources.
  • Confirm prefactor.json is ignored by git (git check-ignore prefactor.json, git status --short).

Common Mistakes

  • Instrumenting code before creating Prefactor resources.
  • Using account ID where environment ID is required.
  • Forgetting to propagate created agent_id to PREFACTOR_AGENT_ID.
  • Picking @prefactor/core directly when a built-in adapter exists.
  • Running commands from the wrong directory and reading/writing the wrong prefactor.json.
  • Committing prefactor.json (contains API tokens).

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.22%
按下载量换算94

Claude

29.76%
按下载量换算75

Cursor

19.53%
按下载量换算49

Gemini CLI

8.67%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills