用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill update-otel-genai-conventions命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | update-otel-genai-conventions |
| description | >- Use when this capability is needed. |
Analyze OpenTelemetry semantic-conventions releases or PRs with area:gen-ai changes and produce compensating updates in dotnet/extensions.
Determine the operating mode from the user's request:
| Signal | Mode |
|---|---|
| User asks to "audit" current implementation or "check alignment" with conventions | Mode 1: Audit |
| User asks to "update for vX.Y" or "apply vX.Y changes" in autopilot / one-shot | Mode 2: Autopilot |
| User asks to "generate a prompt" or "delegate to Copilot" or "CCA prompt" | Mode 3: CCA Prompt |
| Running inside Copilot Coding Agent with a prompt referencing this skill | Mode 4: CCA Implementation |
User is in /plan mode, asks to "plan" changes, or asks to "implement" / "apply" changes | Mode 5: Plan-then-Implement |
User asks to /review or "review" convention changes | Mode 6: Review |
If unclear, default to Mode 5 (Plan-then-Implement) and offer Mode 3 as an alternative.
The user provides one of:
v1.40.0) → fetch from https://github.com/open-telemetry/semantic-conventions/releases/tag/{version}open-telemetry/semantic-conventions with area:gen-ai changes — as URLs, PR numbers (e.g. #3598), or open-telemetry/semantic-conventions#3598 formatWhen PR numbers are given without a full URL, resolve them against the open-telemetry/semantic-conventions repository.
For Mode 1: Audit and Mode 5: Plan-then-Implement, after resolving the requested release or upstream PR identifiers but before doing deeper release analysis or creating a plan, search open pull requests in dotnet/extensions to determine whether another PR already appears to cover the requested GenAI/OpenTelemetry semantic-conventions update.
Search using the requested release version, release URL, or upstream semantic-conventions PR numbers, plus relevant terms such as gen-ai, GenAI, semantic conventions, OpenTelemetry, and OTel. If one or more likely matching PRs are open, report the PR number, title, author, URL, and the signal that matched. Then stop and state that the audit or plan is not proceeding because an open PR already appears to cover the update.
Do not silently ignore search failures. If GitHub search/listing is unavailable, report the problem and ask the user whether to proceed without the preflight.
For Step 4, read the source files listed in references/file-inventory.md (OpenTelemetryConsts.cs, OpenTelemetryChatClient.cs, OpenTelemetryEmbeddingGenerator.cs, Common/FunctionInvocationProcessor.cs, and any other OpenTelemetry* files).
When creating or updating a PR after implementing semantic-conventions changes, follow references/pr-description.md for the title format and the changes-table shape.
Audit the current gen-ai semantic conventions implementation against the latest published conventions to identify gaps, inconsistencies, or missed updates. Produces a plan that can be implemented locally (Mode 5) or delegated to CCA (Mode 3).
Complete the Existing dotnet/extensions PR Preflight above. If a matching open PR exists, report it and stop.
Determine the current implemented version: Read the version reference from OpenTelemetryChatClient.cs doc comment to identify which convention version the codebase claims to implement
Check for version drift: Verify every file with a gen-ai semantic conventions version reference uses the same version. Use the search command from references/file-inventory.md. If files reference different versions, flag that as a critical gap requiring investigation.
Fetch the latest convention spec: Read the current gen-ai semantic conventions from the published spec and the latest release notes
Read all current source files listed in references/file-inventory.md to understand what is actually implemented
Cross-reference: For each attribute, metric, event, and operation name defined in the conventions:
OpenTelemetryConsts.cs?Build an audit report as a table:
| Convention Item | Expected | Implemented | Gap |
|---|---|---|---|
gen_ai.request.attribute | v1.XX | ✅ Yes / ❌ No / ⚠️ Partial | Description of gap |
Produce a remediation plan covering all identified gaps — formatted as either:
Ask the user which format they prefer, or produce both if requested.
Verify this skill is still accurate (same as Mode 6, step 6): compare skill content against the current codebase and call out any discrepancies
Modes 2, 4, and 5 share the same implementation flow. See references/implementation-procedure.md.
One-shot mode that analyzes the release and implements all changes in a single pass without intermediate review. Best for end-to-end execution when the user does not need a plan checkpoint.
plan.md):
Generate a structured prompt suitable for delegating to Copilot Coding Agent on github.com.
The generated prompt should reference this skill:
Reference the
update-otel-genai-conventionsskill in.github/skills/for implementation patterns and testing guidance.
When running inside Copilot Coding Agent (github.com) with a prompt that references this skill.
Generate a plan and (after user review/approval) implement it. Best when the user wants a checkpoint between analysis and execution. The runtime decides how to track work items (e.g., a task list, an in-memory queue, or a SQL todos table — whichever the agent already uses).
Phase A: Plan —
plan.md with a problem statement linking to the upstream release, a changes audit table, and a numbered list of work items. Each work item should call out the file(s) to modify, what code/constants/attributes to add, and which tests to update.Phase B: Implement —
plan.mdReview changes to gen-ai conventions against past patterns and known gotchas.
EnableSensitiveData)Common/ classes)historical-releases.md only when explicitly asked.Critical knowledge from past PR reviews that should inform all modes:
ILogger with [LoggerMessage], NOT Activity.AddEvent. The OTel SDK handles Exception passed to ILogger. See OpenTelemetryLog.cs in Common/.exception.message, message content) must be gated behind EnableSensitiveData. When in doubt, gate it..SetStatus(...).SetTag(...)) rather than separate statements.src/Libraries/Microsoft.Extensions.AI/Common/. Before adding a new helper, method, or internal type, search Common/, TelemetryHelpers.cs, OpenTelemetryLog.cs, and sibling OpenTelemetry* clients for existing logic with the same purpose — reuse or extend instead of introducing a parallel implementation. When the same helper is needed in 2+ places, factor it into Common/ from the start. The same applies to parallel internal types: if a sibling client already defines a type with the same shape (same properties, same role, e.g. RealtimeOtelFunction vs OtelFunction), unify them under a single shared definition rather than letting each client carry its own copy.grep -rn "Semantic Conventions for Generative AI systems v" src/Libraries/Microsoft.Extensions.AI/. Not all OpenTelemetry* files contain this reference — only update the ones that do.[JsonSerializable] registration on OtelContext, (3) switch case in SerializeChatMessages().[LoggerMessage], the message text should match the OTel event name for console logger readability.After implementing changes (Modes 2, 4, and 5):
SDK.sln* files first; they cause build errors when present alongside a newly-generated filtered solution.artifacts/log/Build.binlogSource: dotnet/extensions — distributed by TomeVault.
OpenTelemetryConsts.cs unless the same PR also adds at least one emission site for it. If the convention defines an attribute that no current client populates, classify the change as 🟢 Constant not yet emitted and defer the constant — do not add it ahead of emission. Verify with grep -rn NewConstantName src/Libraries/Microsoft.Extensions.AI/ before submitting.基于 SOC 职业分类