Token导航 LogoToken导航

Agent Skill · 前端设计

infer-setup(推断设置)

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

infer-setup 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在前端设计类的 10,216 个 Skill 里排第 6,853。

总安装 447周安装 19GitHub Stars 公开资料未说明下载 157核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/infer-events/skills --skill infer-setup

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。通过 npx skills add 命令从指定仓库安装,需确认权限和维护状态。使用前建议核验具体用法,避免触发联网或文件读写操作。

涉及敏感数据时应先确认脱敏边界和命令执行范围。

来源仓库内路径:skills/infer-setup

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/infer-events/skills --skill infer-setup;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

infer-setup 怎么安装?

在终端执行 npx skills add https://github.com/infer-events/skills --skill infer-setup。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

infer-setup 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

infer-setup 需要什么权限?

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

infer-setup 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

infer-setup 用的人多吗?

公开数据是累计安装 447 次,近一周安装 19 次,下载 157 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

infer-setup 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
infer-setup

推断设置 · 本页

447—接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Infer Setup — The Wizard

Update Check (non-blocking)

Run this at the start. Checks for newer Infer versions using a 6-hour cache:

_INFER_CACHE=~/.infer/last-update-check.json
_NEEDS_CHECK="yes"
if [ -f "$_INFER_CACHE" ]; then
  _CACHE_AGE=$(( $(date +%s) - $(stat -f '%m' "$_INFER_CACHE" 2>/dev/null || stat -c '%Y' "$_INFER_CACHE" 2>/dev/null || echo 0) ))
  [ "$_CACHE_AGE" -lt 21600 ] && _NEEDS_CHECK="no"
fi
if [ "$_NEEDS_CHECK" = "yes" ]; then
  _SDK_LATEST=$(npm view @inferevents/sdk version 2>/dev/null || echo "unknown")
  _MCP_LATEST=$(npm view @inferevents/mcp version 2>/dev/null || echo "unknown")
  _SDK_INSTALLED=$(node -e "try{console.log(require('@inferevents/sdk/package.json').version)}catch{console.log('none')}" 2>/dev/null || echo "none")
  mkdir -p ~/.infer
  echo "{\"checked\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"sdk_latest\":\"$_SDK_LATEST\",\"mcp_latest\":\"$_MCP_LATEST\",\"sdk_installed\":\"$_SDK_INSTALLED\"}" > "$_INFER_CACHE"
  echo "INFER_SDK_INSTALLED=$_SDK_INSTALLED INFER_SDK_LATEST=$_SDK_LATEST INFER_MCP_LATEST=$_MCP_LATEST"
else
  cat "$_INFER_CACHE"
  echo "INFER_CHECK=cached"
fi

If installed SDK version differs from latest, append at the END of your response: Infer update available — run /infer-upgrade to get the latest. Do NOT block the wizard. Continue normally.

This is the full setup wizard. It detects your current state and walks you through everything step by step, asking before each change.

How Infer Works

  • Write key (pk_write_...): Public. Embedded in app JS. Can ONLY send events.
  • Read key (pk_read_...): Secret. In ~/.infer/config.json. Used by this MCP server to query data.
  • SDK (@inferevents/sdk): Installed in the user's app. Tracks events.
  • MCP server (@inferevents/mcp): Separate package. Connects to Claude Code as an MCP server. Queries the API.
  • Skills (@inferevents/skills): This package. Teaches agents how to use Infer.

Setup Flow

The wizard follows this order:

1. Account setup (signup or login)
2. Project setup (create or select project, fetch keys)
3. SDK install + integrate into project code
4. Tracking plan (read codebase, suggest and add events)
5. Configure MCP + restart Claude Code

MCP is last because it needs a restart. By doing it last, the restart serves double duty: connects MCP AND marks the end of setup. When the user comes back, everything is ready — SDK installed, events instrumented, MCP connected.

Entry Points

There are two ways users arrive here:

Entry A: User says "set up Infer" or invokes /infer-setup

Start from Step 1 below.

Entry B: User pasted a setup prompt from infer.events/signup

The prompt contains credentials inline. Extract them and skip to Step 3. Look for: projectId, writeKey, readKey, endpoint in the pasted text.

The Wizard

Step 1: Account setup

Read ~/.infer/config.json. Four possible states:

State A: Config exists with projects The user already has an Infer account. Check if the current directory already has Infer configured (check package.json for @inferevents/sdk in dependencies).

If SDK is already installed: → Say: "This project already has Infer configured (project: [active project name])." → Ask: "Want to keep this config, switch to a different project, or create a new one?" A) Keep current config → Jump to Step 3 (detect project) B) Switch project → List projects from config, let user pick, then Step 3 C) Create new project → Go to Step 2

If SDK is NOT installed: → Say: "Found your Infer account ([N] projects). Let's set up this codebase." → Ask: "Use an existing project or create a new one?" A) Use existing → Let user pick, then jump to Step 3 B) Create new → Go to Step 2

State B: Config exists but empty/invalid → Say: "Found Infer config but it's invalid. Let's reconnect." → Go to Step 1c (signup).

State C: Config exists with session but no projects (new signup) The user just signed up. The config has {"endpoint":"...","session":"abc123"} but no projects yet. → Say: "Found your Infer session. Let me fetch your project." → Go to Step 1b (fetch keys).

State D: No config file → Say: "No Infer account found. Let's get you set up." → Go to Step 1c (signup).

Step 1b: Fetch project keys via session

If the config has a session field but no project keys, fetch them from the API.

  1. Call GET /v1/auth/me?session=SESSION to get the user's project list
  2. If user has one project:

- Call GET /v1/auth/project-keys?session=SESSION&project_id=PROJECT_ID - Save the returned write_key and read_key to ~/.infer/config.json - Write .infer.json to project root: {"project": "<project-slug>"} - Add .infer.json to .gitignore - Jump to Step 3 (detect project)

  1. If user has multiple projects:

- Ask which project to use for this codebase - Fetch keys for the chosen project - Save to config as active project - Write .infer.json to project root with chosen project - Add .infer.json to .gitignore

  1. If user has no projects:

- Go to Step 2 (create new project)

This step is the magic: the user never sees or handles API keys. The session token authenticates, the API returns the keys, and they're saved automatically. The .infer.json file in the project root pins this directory to the correct project so the MCP server auto-selects it regardless of the global activeProject.

Step 1c: Signup

→ Ask: "Do you have an Infer account?" A) Yes → Open https://infer.events/signup, sign in, paste the setup command here. B) No → Open https://infer.events/signup, create an account, paste the setup command.

When they paste it, the config is saved to ~/.infer/config.json with a session token. Proceed to Step 1b.

Step 2: Create new project

This runs entirely in the CLI. No website redirect needed.

Ask: "What should we call this project?" (suggest: the current directory name)

Then call the create_project MCP tool with the project name. This:

  1. Reads the saved session token from ~/.infer/config.json
  2. Calls the Infer API to create a new project
  3. Generates write + read API keys
  4. Saves the new project to ~/.infer/config.json as the active project

If the tool returns "No session found": the user needs to sign in first. Say: "You need to sign in once. Opening infer.events/signup..." After they complete signup and paste the setup command, extract the session token and retry the project creation.

After project creation succeeds: → Write .infer.json to the project root: {"project": "<project-slug>"} This pins this directory to the project so the MCP server auto-selects it. → Add .infer.json to the project's .gitignore (it contains no secrets, but it's machine-specific like.env.local). → Say: "Project '[name]' created! Config saved. This directory is now linked to it." → Jump to Step 3 (detect project).

Step 3: Detect project and install SDK

Read package.json in the current working directory.

Framework detection:

SignalFrameworkEntry point
"next" in deps + src/app/ existsNext.js App Routersrc/app/layout.tsx
"next" in deps + src/pages/ existsNext.js Pages Routersrc/pages/_app.tsx
"react-scripts" in depsCreate React Appsrc/index.tsx
"vite" in devDeps + "react" in depsVite + Reactsrc/main.tsx
"expo" in depsExpo / React NativeApp.tsx or app/_layout.tsx
"nuxt" in depsNuxt.jsapp.vue or plugins/
"@sveltejs/kit" in devDepsSvelteKitsrc/routes/+layout.svelte
None detectedUnknownAsk user

Tell the user what you detected: "Detected [framework] project. Entry point: [path]."

If @inferevents/sdk is already in dependencies: "SDK already installed. Checking integration..." → Skip to Step 4.

Otherwise, ask: "Install @inferevents/sdk? (This adds the tracking library to your project)"

If yes:

npm install @inferevents/sdk@latest

Step 4: Integrate SDK

Ask: "Add tracking to [detected entry point]? I'll create the analytics module and wire it into your app. I'll ask before changing each file."

Then create files based on detected framework:

Next.js App Router

Gate 1: "Create src/lib/analytics.ts?"

import { init, track, identify, page, reset } from "@inferevents/sdk";

export function initAnalytics() {
  if (typeof window === "undefined") return;
  init({
    projectId: "[WRITE_KEY]",
    endpoint: "[ENDPOINT]",
    autoTrack: true,
    debug: process.env.NODE_ENV === "development",
  });
}

export { track, identify, page, reset };

Gate 2: "Create src/components/analytics-provider.tsx?"

"use client";
import { useEffect } from "react";
import { initAnalytics } from "@/lib/analytics";

export function AnalyticsProvider() {
  useEffect(() => { initAnalytics(); }, []);
  return null;
}

Gate 3: "Add <AnalyticsProvider /> to src/app/layout.tsx?"

  • Import the component
  • Add inside <body> tag
Next.js Pages Router

Gate 1: Create src/lib/analytics.ts (same as above) Gate 2: Add to src/pages/_app.tsx:

import { useEffect } from "react";
import { initAnalytics } from "@/lib/analytics";

// Inside the component:
useEffect(() => { initAnalytics(); }, []);
Vite / CRA / Plain React

Gate 1: Create src/lib/analytics.ts (same as above) Gate 2: Add to src/main.tsx:

import { initAnalytics } from "./lib/analytics";
initAnalytics();

Step 4b: Check for Content Security Policy

After integrating the SDK, check if the project has a CSP that would block requests to api.infer.events. Search for Content-Security-Policy in:

  • next.config.ts / next.config.js (Next.js headers)
  • middleware.ts (Next.js middleware)
  • <meta http-equiv="Content-Security-Policy"> in HTML
  • .htaccess, nginx.conf, vercel.json headers

If a CSP with connect-src is found and does NOT include api.infer.events: → Say: "Your site has a Content Security Policy. I need to add api.infer.events to connect-src so the SDK can send events." → Add https://api.infer.events to the existing connect-src directive. → Ask before making the change.

If no CSP is found, skip this step silently.

Step 5: Build tracking plan

Say: "Now let's set up your tracking plan. I'll read your codebase and suggest which user actions to track beyond the auto-tracked page views and clicks."

Follow the tracking plan process completely. It will:

  1. Deep dive into the codebase to understand the product
  2. Map the user journey (entry → activation → core action → engagement)
  3. Propose specific events at specific file:line locations
  4. Present a table for approval
  5. Implement only the approved events

This is the most valuable step — it's doing the PM's job of deciding what to measure, based on the actual code, not guessing.

Step 6: Configure MCP server

Now that the SDK and tracking plan are set up, add the MCP server config.

Check if .mcp.json already exists in the project root or if the user's Claude Code settings already have an infer MCP server configured.

If NOT configured: Ask: "I need to add the Infer MCP server to your project config. This lets your agent query your analytics data. OK?"

Add to .mcp.json in the project root:

{
  "mcpServers": {
    "infer": {
      "command": "npx",
      "args": ["--yes", "@inferevents/mcp@latest"]
    }
  }
}

If .mcp.json already exists, merge the infer entry into it.

Step 7: Restart and verify

This is the final step. Present a summary of everything that was set up:

Setup complete:
- ~/.infer/config.json — account credentials
- .infer.json — links this directory to your project
- .mcp.json — Infer MCP server for querying analytics
- src/lib/analytics.ts — SDK initialized with your project key
- src/components/analytics-provider.tsx — client component that boots the SDK
- src/app/layout.tsx — provider wired into root layout
- [N] custom events added via tracking plan

To start using Infer:
1. Restart Claude Code (so the MCP server connects)
2. Open your app in the browser (npm run dev)
3. Navigate around — auto-tracking and custom events will fire

Then you MUST call the AskUserQuestion tool:

Restart Claude Code to connect the MCP server. After restart, you can ask your agent anything about your analytics data. 💡 Tip: After restarting, try asking "Give me a quick pulse on the app" to see your first insights.

Options:

  • A) I'll restart now — Come back and ask me anything about your data
  • B) See my first insights — Run a quick health check on whatever data is flowing (requires restart first)
  • C) Set up daily monitoring — Schedule automatic checks so you catch issues early
  • D) Just explore — I'll ask questions about my data as I go

From the Website: Install Flow

When a user signs up on the website, the signup page shows two steps:

Step 1: Install skills

npx skills add infer-events/skills

Step 2: Paste into Claude Code

Save this config to ~/.infer/config.json:
{"apiKey":"[READ_KEY]","endpoint":"[ENDPOINT]","projectId":"[PROJECT_ID]"}.
Then run /infer-setup to configure everything.

The setup wizard handles the rest: account check, SDK install, framework detection, tracking integration, MCP config, and restart instructions.

Troubleshooting

SymptomCauseFix
"No events found" after setupWrite key wrong or app not runningCheck write key in analytics.ts, check browser console
401 from APIInvalid or wrong key typeWrite key for SDK, read key for MCP
SDK not initializingSSR calling init()Check typeof window!== "undefined" guard
MCP server can't connectWrong endpoint or read keyCheck ~/.infer/config.json
"Failed to reconnect" after upgrade.mcp.json has pinned version (@inferevents/mcp@0.1.6)Change args to ["@inferevents/mcp"] (no version), then /mcp restart
Auto-track not firingautoTrack not setSet autoTrack: true in init()
Console: "Refused to connect" / CSP errorContent Security Policy blocks api.infer.eventsAdd https://api.infer.events to connect-src in your CSP header
SDK retries then stops after 5 attemptsCSP or network blocking the endpointCheck console for the CSP help message, add domain to connect-src

平台分布

Codex

37.68%
按下载量换算59

Claude

29.15%
按下载量换算46

Cursor

18.46%
按下载量换算29

Gemini CLI

9.6%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

未通过

权限和风险

接触敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills