最新资讯
reddit.com OpenAI 称 Astra 仅满足 10% 安全任务标准 dev.to FreeToken:在自有 GPU 上运行前沿 MoE 模型及其内存需求 dev.to 当 AI Agent 说“完成”时,究竟完成了什么? dev.to 部署 Underdog Bark 3.0 Pro:逐字转写、自定义后端与分块设置 dev.to 为艰难对话构建 AI:五个 Agent、一条安全正则与一位盲评监督者 techcrunch.com Palo Alto Networks 洽谈以 5 亿美元收购 AI Agent 安全初创公司 Clutch theinformation.com 黄仁勋被要求就涉华间谍指控向国会作简报 www.infoq.com Edera 推出 Object Capability Bounded Authority,试图将凭证与 AI Agent 工作负载隔离 wechat 这波杀疯了!旗舰级模型不限量、1个月视频额度免费领 bloomberg.com AI 抛售蔓延至信用市场,软银领跌亚洲美元债 dev.to 如何在专用 GPU 服务器上用 OpenAI 兼容 API 部署 LLM dev.to 审计 153 份 Claude Code 与 Codex 会话记录:User-Agent 与 URL 中的邮箱泄露
多元动态
登录 注册
AI编码 dev.to · @Dave Kurian

Claude Code 插件评测:合并前用增量 Δ 为 skill 设门禁

原文 我的收藏

文章介绍 Claude Code v2.1.269+ 新增的 claude plugin eval 命令,可在加载与不加载插件两种条件下运行测试套件,输出 WITH、W/OUT 及 Δ(插件带来的提升),从而在将 skill 合并进 kit 仓库或固定到 CI 前进行门禁校验。作者建议在 evals/ 下创建用例、对结果评分,并在分数下降时让构建失败。

AI推荐理由 介绍 Claude Code 新增的 claude plugin eval 命令:分别在加载与不加载插件的情况下运行测试套件,报告 WITH、W/OUT 与 Δ 提升值,可用于在合并 skill 或 CI 固定版本前做门禁。对使用 Claude Code 的工程团队有直接工作流价值,但文中对官方文档的转述需以 Anthropic 文档为准。

70

正文

Claude Code now ships a first-party way to prove a plugin or skill actually helps. The command is claude plugin eval. It runs your suite with the plugin loaded and again without it, then reports WITH, W/OUT, and Δ — the lift the plugin contributed. That changes what production teams should do before they merge a skill into a kit repo or pin it in CI. This is not another “write better prompts” essay. It is a builder workflow for Claude Code v2.1.269+: create cases under evals/, grade outcomes, and fail the build when the score drops. If you already ship agent docs in an owned monorepo, pair this with Claude Code on an OTF kit: the CLAUDE.md and prompts that ship with the repo. For feature-level evals outside plugins, keep using A practical LLM evaluation loop for AI features that need to ship — different layer, different artifact. What changed for plugin authors Anthropic’s plugin evals docs describe a dedicated CLI path for plugin and skill authors. The important claims for builders: You need Claude Code v2.1.269 or later (claude --version, then claude update if needed). Cases live under an evals/ directory next to your plugin manifest (plugin.json or .claude-plugin/plugin.json). Each case is a realistic user prompt plus one or more graders (regex, tool_used, tool_order, file_exists, llm, baseline). By default each case runs three times with the plugin and three times without it. Δ is with-arm score minus without-arm score. claude plugin eval init can propose cases and graders interactively; claude plugin eval init --bare writes a blank template. CI can gate on --threshold, pin --model / --judge-model, keep reports local with --no-publish, and cap spend with --max-cost-usd. That is the DO: stop merging skills because a demo chat looked fine. Measure contribution, then gate. Why WITH alone is not enough A case that scores 1.00 with the plugin loaded can still be useless. Claude might already solve the prompt without your skill. The docs call this out: if WITH and W/OUT are both high, Δ near zero means the plugin did not move the outcome. Production implications: Trigger failures show up as skill graders failing. A common first finding is Δ ≈ 0 with a tool_used: Skill grader failing — Claude never chose your skill on natural phrasing. Fix the skill description, re-run, compare. Skill-fired graders are indicators, not free Δ inflation. In two-arm mode, tool_used graders on Skill are excluded from both arms’ scored totals so you do not invent lift by checking something impossible without the plugin. Judge graders cost money. regex, tool_used, tool_order, and file_exists are free transcript/file checks. llm and baseline call a judge model and add to the run’s list-price estimate. Non-determinism is assumed. Default three runs per arm exist because one agent run is noise. Cheap iteration uses --runs 1 --ablation none; trust needs the default three. If you only ever run the with-arm, you are grading absolute behavior. That is fine while drafting graders. Before you call a skill “done,” turn the baseline back on and read Δ. Minimal suite layout you can commit From the plugin root (the directory that contains the manifest): claude --version # need >= 2.1.269 claude plugin eval init --bare commit-message Enter fullscreen mode Exit fullscreen mode You get something shaped like: evals/commit-message/ ├── prompt.md └── graders/ └── criteria.md Enter fullscreen mode Exit fullscreen mode Edit prompt.md so the body is a request a user would type — do not name the skill in the prompt: --- max_turns: 10 allowed_tools: [Read, Glob, Grep, Skill] --- Write me a commit message for this change: I renamed getUser to fetchUser and updated the three call sites. Enter fullscreen mode Exit fullscreen mode Add a result grader (llm or regex) and a skill-fired grader: --- type: tool_used tool: Skill input_match: '"skill"\s*:\s*"(?:[\w-]+:)?your-skill-name"' --- Enter fullscreen mode Exit fullscreen mode Then run: claude plugin eval . Enter fullscreen mode Exit fullscreen mode Expect six runs for one case at defaults (3× with, 3× without). Open the HTML report path printed at the end. Iterate on description and graders until Δ is positive for the prompts you care about. For MCP-backed skills, put mocks under evals/mocks//.md so CI does not need the real service. Use --scaffold only for suites you trust — scaffold scripts run as you, outside the agent sandbox. Gate the suite in CI The docs’ recommended CI shape is explicit: claude plugin eval . \ --trust-plugin \ --json results.json \ --threshold 0.8 \ --model claude-sonnet-5 \ --judge-model claude-haiku-4-5 \ --no-publish \ --max-cost-usd 20 Enter fullscreen mode Exit fullscreen mode Exit codes that matter: 0 — every case met --threshold 1 — a case scored below threshold, files failed to load, or trust was missing without --trust-plugin 2 — partial run (--max-cost-usd hit or auth failed); JSON still written with partial: true Pin both models so a provider rollout is not mistaken for a plugin regression. Keep every-change suites on free graders when you can; reserve llm judges for short outputs with concrete PASS/FAIL rubrics. Leave partial: true results out of trend charts. Credentials and install still belong on the runner (ANTHROPIC_API_KEY or your normal Claude Code auth). Without --trust-plugin, a non-interactive job against an untrusted checkout exits 1. How this fits an owned kit repo OTF’s wedge is not “another sandboxed chat.” It is an owned repo agents keep editing — CLAUDE.md, prompts, and skills that travel with the product. Plugin eval is the missing acceptance gate for those skills: Layer Question Artifact Repo conventions Can an agent find the seams? CLAUDE.md / .cursorrules (see the kit docs post above) Change acceptance Did this PR do what we asked? AI coding agent acceptance checklist Plugin contribution Did the skill raise the score vs no plugin? claude plugin eval + Δ Product AI features Does the user-facing model path hold? LLM evaluation loop Put the suite next to the plugin you ship. Fail CI when Δ collapses after a description tweak or a model pin change. That is how skills stay production assets instead of chat folklore. Security note from the same docs: pointing claude plugin eval at a plugin is the same trust decision as claude --plugin-dir. Only evaluate plugins you trust. Hooks and real MCP servers you opt into with --allow-real-servers or --mocks off run outside the agent sandbox. Practical checklist before you merge a skill Upgrade to Claude Code ≥ 2.1.269. Add at least one natural-language case that should trigger the skill and one that should not. Include one outcome grader and one tool_used: Skill indicator. Run with baseline on; require a positive Δ for the should-trigger cases. Wire the CI command with --trust-plugin, pinned models, --threshold, and --max-cost-usd. Mock MCP tools for CI; do not call production services from eval runs. Treat rate-limit errors mid-suite as invalid scores — re-run after the limit resets before you trust the table. If you are still choosing between a sandboxed MVP host and a repo you own, start with the kit spine, then add this gate. Skills without Δ are demos. Skills with a CI threshold are release machinery. Sources Test plugins with evals (Claude Code docs) — primary: CLI requirements, WITH/WOUT/Δ, grader types, CI flags, exit codes, trust and isolation notes (verified 2026-09-14).

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容