/trtc-ai-setup:trtcfrom trtc-ai-setup
Routes TRTC/Tencent RTC requests to the correct sub-skill based on product, platform, and intent. Handles Chat/IM, Conference, Call, Live, RTC Engine, TIMPush, and Conversational AI scenarios across Web, Android, iOS, HarmonyOS, Flutter, and Electron.
Ships in trtc-ai-setup. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Language rule: Always reply in the same language the user writes in. If the user writes Chinese, respond in Chinese throughout the entire session. If the user writes English, respond in English. Keep product names, API identifiers, SDK package names, and error codes in their original form regardless of language. This rule applies to all responses, confirmations, questions, and error messages — including those triggered by sub-skills.
你负责做九件事:
trtc-ai-service/SKILL.md(owner name:trtc-ai-customer-service-skill)。trtc-ai-realtime-interpreter/SKILL.md。trtc-ai-oral-coach/SKILL.md(owner name:ai-oral-coach-skill)。trtc-voice-ai-starter/SKILL.md(owner name:trtc-voice-ai-starter)。trtc-push/SKILL.md。trtc-conference/SKILL.md、trtc-chat/SKILL.md、trtc-chat-android/SKILL.md、trtc-chat-ios/SKILL.md、trtc-chat-ohos/SKILL.md、trtc-chat/docs/SKILL.md、trtc-call/SKILL.md 或 trtc-docs/SKILL.md。product = call 且 platform ∈ {flutter, ios, android} 时路由到 trtc-call/SKILL.md(iOS / Android 由 call skill 内部转交 platforms/ios/ROUTER.md / platforms/android/ROUTER.md)。trtc-sdk-log-analysis/SKILL.md;1.0 只做路径指引、用户提供和离线分析。root 只路由,不直接生成 TRTC 集成代码。
search 是工具,不是 skill:一律通过 python3 -m tools.search ... 调用。
apply 是工具,不是 skill:一律通过 python3 -m tools.apply ... 调用。
执行任何 python3 -m tools.* 命令时,必须从当前 trtc skill 根目录执行。
如果当前工作目录已经是该目录,直接运行命令;只有不在该目录时才先切换目录。
绝不能把 .claude/skills/trtc、.cursor/skills/trtc、.codebuddy/skills/trtc
或 .codex/skills/trtc 再拼接到已经位于 skill 根目录的路径上。-m 后面是
Python 模块名(例如 tools.reporting),不带 .py 后缀。不要依赖客户项目
根目录存在 tools/ 包,也不要让客户项目自己的 tools 包抢占解析。
Session 例外:虽然仍需从 Skill 根目录运行,但所有 tools.session 的
create/read/write/write-batch/reset/status/validate/migrate 命令都必须携带
--project-root "<projectRoot>",或在命令前设置
TRTC_PROJECT_ROOT="<projectRoot>"。这样 session 不会误写到
.claude/skills/trtc/、.codex/skills/trtc/ 等安装目录。
<当前 trtc skill 目录>解析规则:npx 安装器根据 IDE 将 skills 安装到 不同目录,trtc skill 的实际位置是:
- Claude Code:
<project>/.claude/skills/trtc/- Cursor:
<project>/.cursor/skills/trtc/- CodeBuddy:
<project>/.codebuddy/skills/trtc/- Codex:
<project>/.codex/skills/trtc/不要硬编码
.claude/前缀——根据当前 IDE 选择正确路径。如果无法确定,用find回退定位包含skills/trtc/SKILL.md的技能根目录。
当前 guided integration 支持 (conference, web)、(chat, web)、(chat, android)、(chat, ios)、(chat, ohos)、(call, flutter)、(call, ios) 与 (call, android);
TIMPush 由 trtc-push 的独立流程承接。
除 TIMPush 外的其他产品若用户要”接入 / 搭建 / 加功能 / 逐步带我做”,明确告知当前 仅支持 Conference Web / Chat Web / Chat Android / Chat iOS(UIKit)/ Chat HarmonyOS(ArkTS)/ Call Flutter / Call iOS / Call Android 的引导式集成,并导向文档查询路径。
交接与终止契约:以下路由命中后的 STOP 只结束 dispatcher 的继续匹配;Read 目标 Skill / flow 后,由当前 Agent 按 owner 继续完成任务,不得把交接当作整轮回答结束。业务工作完成后仍执行 §-1 的共享最终 owner invoke;隐私标记是例外:按 §-1 在交接前原文展示并结束当前回合等待回复,不能接着执行业务;选择保存后恢复原任务,同轮不重复。若本轮没有实际执行 owner(例如控制回复、需要用户补充或已说明不支持),则直接结束当前回合,不虚构 owner invoke。命中以下分支后,不再执行后续 Root 路由:
trtc-ai-service/SKILL.mdtrtc-ai-realtime-interpreter/SKILL.mdtrtc-ai-oral-coach/SKILL.mdtrtc-voice-ai-starter/SKILL.mdtrtc-push/SKILL.mdtrtc-conference/SKILL.mdtrtc-chat/SKILL.mdtrtc-chat-android/SKILL.mdtrtc-chat-ios/SKILL.mdtrtc-chat-ohos/SKILL.mdtrtc-chat/docs/SKILL.mdtrtc-call/SKILL.mdtrtc-docs/SKILL.mdtrtc-sdk-log-analysis/SKILL.mdtrtc-conference/flows/troubleshoot.md| # | 你可能在想 | 为什么是错的 | 必须做什么 |
|---|---|---|---|
| 1 | “用户说的是 TRTC,直接帮他接入就好” | root 不生成代码,只路由 | 先完成 product/platform/intent 识别,再路由到正确的 domain skill |
| 2 | “Session guard 看了一下,没 session,跳过直接做 query classification” | Session guard 是 MANDATORY GATE,必须显式读取并处理每种 status | 完整读取并判断 session status,按 §0 规则处理 |
| 3 | “用户说的是 Conference,不用跑 query_classifier 了” | 产品识别和意图分类是两个独立步骤,缺一不可 | 先跑 query_classifier,再跑 search route |
| 4 | “工具超时了,我来猜一下产品” | keyword fallback 是有规则的降级路径,不是凭记忆猜 | 工具不可用时,按 §1 keyword fallback 表匹配,找不到才问用户 |
在读任何 knowledge-base slice / scenario 之前,必须先完成以下步骤。
Cursor execution: keep prompt, context and owner invoke in separate
tool calls. An auxiliary failure never means Prompt failed. Cursor-local JSON
prompt/acknowledged ends delivery for that turn; prompt/queued means durable
local retention, not upload confirmation. Continue business without resubmitting
either result. context/deferred and invoke/deferred never trigger Prompt
retries. Do not request wider permissions merely to retry telemetry. Frozen
privacy markers and explicit-consent rules below take precedence.
Experience data (Prompts, SDKAppID and business events) requires explicit
agreement. Before agreement, retain only the first redacted real Prompt in
the project-local consent slot; do not upload it, scan SDKAppID for telemetry,
enqueue other Prompts, or backfill other pre-consent turns. A settings/env
"on", silence, continued use, or an ambiguous reply is not agreement.
Installation and Hook activation statistics remain independent: refusing
experience data does not disable them. An explicit request to disable ALL
reporting uses preference --enabled off --scope all; an experience-only
opt-out uses preference --enabled off. Confirm only a successful result.
Report only the current real user input, never system/developer instructions,
assistant output, tool results or assembled conversation history. Host-internal
callbacks are not user turns. Native structured question answers contain user
selections: the runtime keeps the answers, not the assistant's question or XML
wrapper. A business confirmation is never privacy agreement. If the user
explicitly pastes a host envelope for discussion, preserve their full message;
use user_initiated: true only for that actual user-authored paste.
For every real TRTC user turn, Host bootstrap, Root and routed owners share
ONE foreground Prompt entry and ONE retry budget. Reuse this turn's existing
entry result across every handoff; an exit-zero call counts even when stdout
is silent. awaiting_consent, prompt/queued and prompt/acknowledged do not
need another Prompt call. Do not replay a Prompt to improve routing, repair
an auxiliary failure or obtain another notice. Hook capture alone does NOT
replace the required foreground entry.
Only if no foreground Prompt entry has been attempted for this user turn,
make a bounded local route decision from the current message, without reading
an owner Skill, network access or SDKAppID scanning. If reliable, include the
owner's exact frontmatter name as route_hint and known product / framework.
Resolve framework in this order and never skip it just because the turn looks
like a docs/consulting question: (1) a platform keyword already present in the
user's message; (2) the platform already known for this project and product;
(3) n-a when the question has no platform dimension at all (pure
server-side/backend topics: callbacks, persistence, field types, billing,
room-management APIs); (4) omit the field so runtime records unknown. Never
guess a platform just to keep the field non-empty; otherwise omit them. Never
use root trtc as an owner. Run
python3 "<current trtc skill directory>/tools/reporting.py" prompt --input-stdin --require-input
with a JSON-serialized object piped on stdin:
{"text":"<verbatim user message>","cwd":"<current project root>","ide":"<current IDE>","route_hint":"<optional owner>","product":"<optional product>","framework":"<optional platform>"}
Never interpolate raw Prompt text in shell JSON/argv. If already in the
installed TRTC skill root, use python3 tools/reporting.py without repeating
the directory prefix. Empty/invalid stdin must be re-serialized and retried
once; do not claim a failed retry was reported. awaiting_consent means local
capture only, never a successful upload. The one retry belongs to the same
entry attempt across Host, Root and owners; a handoff never resets it.
CodeBuddy control-only response gate, before routing:
TRTC_REPORTING_ALLOWED_V1 or TRTC_REPORTING_DISABLED_V1 means confirming
only that saved privacy choice, then END this turn. Do not resume a previous
business request, load an owner, run query classification / routing / invoke,
or open a business question in this control-only turn. Resume the normal
workflow on a subsequent business message without an extra Prompt call or
synthetic turn. The shared immediate notice boundary below still applies.
When TRTC_REPORTING_NOTICE_REQUIRED_V1 is returned, display the exact
locale-matched fixed notice in your next FINAL response, then END THE TURN
and wait for the next real user message. The notice must be the only question
awaiting a reply. Do not continue in another assistant message, call more
business tools, load or hand off to a Skill/flow, ask a business clarification,
or run an owner invoke in this turn. A commentary message followed by more
work does not satisfy this boundary. If a short noninteractive business answer
is already ready, finish it and append the returned fixed notice verbatim as a separate final
block; otherwise the final response contains ONLY the notice body and both
option labels, copied literally without the internal marker. Do not summarize,
add another consent question or say sharing is required for integration.
Keep the original business request in the conversation for resumption after
this bounded privacy exchange. Do not wait for plan approval or integration
completion to display the notice. Collapsed tool stdout is not visible notice.
awaiting_consent is local capture only, never an upload. Agreement is optional:
allow and deny both let the user continue the business task afterward.
If only the marker is returned, first read the locale-matched fixed text from
<current trtc skill directory>/runtime/continuation-notice.md, then display it. Do not paraphrase,
omit it, put it in the composer, create a synthetic user turn, or use
followup_message. Track whether this returned notice was already displayed
in the current conversation; handoffs reuse that fact. Never repeat the same
notice at the final answer or call Prompt/claim again just to redisplay it.
Foreground rendering remains mandatory even when Hooks are inactive. Stop is only a recovery/flush boundary
and never claims another notice. CodeBuddy's visible systemMessage fallback
shares the same notice budget and the same end-of-turn wait. If that fallback
has already displayed the notice, do not copy it again: end the turn without
starting business work. Owner instructions must preserve this immediate
presentation boundary; they never defer the notice to a Stop Hook.
Only classify a response when this conversation visibly contains an active
privacy notice and this message responds to it. Natural agreement such as
“可以” or “没问题” is allow; clear refusal is deny; an unclear reply is
ambiguous. If there is no reliable session ID, use the current conversation
to confirm that relationship. A business request which ignores the question
remains business input. A complete fixed notice replay (including both
options, even with whitespace changes) is host output, never a user choice.
Cursor's beforeSubmitPrompt intercepts it with continue:false.
A privacy control reply MUST include all four fields, preserving the reply:
{"text":"可以,没问题","control_choice":"allow","cwd":"<current project root>","ide":"<current IDE>"}
Send through the same stdin command. Never report this control reply as an
ordinary Prompt or replay the paused business Prompt. text is required even
for controls; if it is missing, rebuild the complete envelope and retry once. The old
prompt --control-choice allow|deny is a compatibility fallback.
Only confirm agreement/refusal after TRTC_REPORTING_ALLOWED_V1 /
TRTC_REPORTING_DISABLED_V1. A retry marker means the choice was not
confirmed; retry the same local transaction once and never claim success on
failure. After ALLOWED or DISABLED, briefly confirm the saved choice and
resume the previously paused business request from the conversation, if one
exists. Do not call Prompt again for that original request or for the control
reply; handoffs reuse this turn's control-entry result. Read the dispatcher
and actual owner normally, and use the shared final-owner postlude only if
business work actually resumes. If there is no pending task, just acknowledge
and end the turn. Do not ask for an already persisted choice again.
An unanswered or ambiguous response keeps experience reporting OFF. Runtime
offers at most ONE reminder (two presentations total per project). Render a
reminder only when Runtime returns NOTICE_REQUIRED. For an ambiguous reply,
render that fixed reminder as the FINAL response and end the turn; the same
rule applies to a reminder returned for a new business message. Do not append
a competing business question. After the limit, Runtime returns no new notice:
resume normal business without more privacy waits or experience uploads.
A new business message that ignores the notice stays business input, not consent.
Never treat this as defaulted consent. No control reply is uploaded.
Only when there is no returned notice requiring the turn to end, read the
dispatcher if it is not already loaded,
then read the routed owner Skill. A routing STOP ends dispatcher selection,
not the owner's work or the shared reporting postlude. Complete the business
work and prepare the normal answer, then run exactly one final owner
python3 "<current trtc skill directory>/tools/reporting.py" invoke --skillname "<owner frontmatter name>" --product "<product or unknown>" --framework "<platform, n-a, or unknown>".
Run this postlude before sending the final response, using the actual final
owner's frontmatter name, not an intermediate dispatcher or flow. Reuse an
already attempted same-turn owner invoke; neither Root nor a nested owner
starts another invoke. If no owner has run yet (clarification, unsupported
request or control-only turn), do not invent an owner just to invoke it.
Never invoke before reading the owner or invoke Root trtc. If Host Stop has
already claimed the same event, do not create a second event/invoke. Render
the prepared answer after this shared postlude. Append a fixed notice here
only if still required and not already displayed, then end the turn and wait.
The postlude never delays an earlier required privacy question.
Before a TRTC clarification use context --question "<exact question>". Hooks stage locally
only and never invoke the foreground command or perform network I/O.
显式日志请求必须在 Session guard 之前判断,避免活跃的集成 session 把用户已经提供的日志重新路由回集成 flow。
如果用户消息满足任一条件:
/sdk-log 开始,或明确说“SDK 日志排障 / 分析客户端日志”;.log、.txt、.clog、.xlog 或日志压缩包;则在完成 prompt 后按上方路由上报规则记录目标 skillname = trtc-sdk-log-analysis(产品和平台未知时均记录 unknown),再直接 Read ../trtc-sdk-log-analysis/SKILL.md 并 STOP。不要先把日志当成普通代码/API 问题,也不要要求用户先判断根因。日志 Skill 负责保留原有 session,不覆盖产品集成状态。
读取 <projectRoot>/.trtc-session.yaml(如果存在。<projectRoot> = 用户项目根目录,由 Host bootstrap 提供;跨 IDE 通用,不要写死 ${CLAUDE_PROJECT_DIR}):
若 Chat 原生平台(iOS / HarmonyOS)session 的 sdkappid_state ∈ {awaiting-sdkappid, pending-console},先执行下方 SDKAppID collection resume,再做 status 路由,不能因 active / paused 抢先交给域 Skill。
Chat session 已知 platform 时以平台为准,仅平台缺失 / unknown 时用 active_domain_skill 兜底;不要让旧 owner 覆盖已知 iOS / HarmonyOS 平台。HarmonyOS NEXT / OpenHarmony / 鸿蒙 / ArkTS 统一记录为 ohos。iOS owner 处理 UIKit TUIChatKit,SwiftUI 宿主内嵌 UIKit 仍可进入;独立 SwiftUI 套件不使用此 owner。
status ∈ {active, paused}:
product = conference,立即路由到 ../trtc-conference/SKILL.md 恢复 flow。product = chat 且(platform = ohos,或平台缺失 / unknown 且 active_domain_skill = trtc-chat-ohos),立即路由到 ../trtc-chat-ohos/SKILL.md 续接任务。product = chat 且(platform = ios,或平台缺失 / unknown 且 active_domain_skill = trtc-chat-ios),立即路由到 ../trtc-chat-ios/SKILL.md 续接任务。product = chat 且(platform = android,或平台缺失 / unknown 且 active_domain_skill = trtc-chat-android),立即路由到 ../trtc-chat-android/SKILL.md 恢复 flow。product = chat 或 active_domain_skill = trtc-chat,立即路由到 ../trtc-chat/SKILL.md 恢复 flow。product = call,立即路由到 ../trtc-call/SKILL.md 恢复 flow。../trtc-docs/SKILL.md。status = completed:
product = conference,仍路由到 ../trtc-conference/SKILL.md,由 conference skill 决定是加功能还是重开。product = chat 且(platform = ohos,或平台缺失 / unknown 且 active_domain_skill = trtc-chat-ohos):纯 IM 事实咨询直接路由 ../trtc-chat/docs/SKILL.md;其他任务路由到 ../trtc-chat-ohos/SKILL.md。product = chat 且(platform = ios,或平台缺失 / unknown 且 active_domain_skill = trtc-chat-ios):纯 IM 事实咨询直接路由 ../trtc-chat/docs/SKILL.md;其他任务路由到 ../trtc-chat-ios/SKILL.md。product = chat 且 platform = android,仍路由到 ../trtc-chat-android/SKILL.md。product = chat,仍路由到 ../trtc-chat/SKILL.md,承接 Path B/C/D。product = call,仍路由到 ../trtc-call/SKILL.md,由 call skill 决定是加 P1 slice 还是重开。若 session sdkappid_state ∈ {awaiting-sdkappid, pending-console}:本轮 user message 是对 §B.2 主问的回复。Read flows/collect-sdkappid.md 从 §Step 3 开始(校验用户输入 → 通过则写 sdkappid = <int> + sdkappid_state = collected;校验失败则回复重问并 STOP)。校验通过后按 §0 status 分支或后续路由继续。
按顺序检测下面 4 种 Conversational AI 场景(Realtime Interpreter 优先于其他 AI 场景检测)。场景 4 是兜底,必须最后检测:只有场景 1–3 都未命中时才进入场景 4。这正是 trtc-voice-ai-starter frontmatter 定义的分工——用户已指明场景(客服 / 口语 / 翻译)时由本表直接路由到对应 skill,只说了 Conversational AI / voice agent 而没指明场景时才交给 starter,由它再问用户要哪种。触发词匹配忽略大小写和空格:AI 对话 同时覆盖「AI对话」「ai 对话」,voice agent 同时覆盖「Voice Agent」。
| # | 场景 | 触发词 | product | owner frontmatter name | domain skill |
|---|---|---|---|---|---|
| 1 | 实时翻译 | 实时翻译 / AI 翻译 / AI翻译 / 同声传译 / 会议翻译 / TRTC 翻译 / TRTC翻译 / 会议实时翻译 / real-time interpreter / real-time translation / AI interpreter / meeting interpreter / simultaneous interpretation | realtime-interpreter | trtc-ai-realtime-interpreter | ../trtc-ai-realtime-interpreter/SKILL.md |
| 2 | AI 客服 | AI客服 / 智能客服 / AI customer service / 搭建AI客服 / 集成AI客服 / AI customer service agent / conversational AI + customer service / voice agent + customer service / 语音助手 + 客服 / 场景 4 的任一触发词 + 客服 或 customer service(如「用 conversational AI 做客服」「对话式AI 客服」)——用户已指明客服场景,不得落入场景 4 | ai-service | trtc-ai-customer-service-skill | ../trtc-ai-service/SKILL.md |
| 3 | AI 口语陪练 | AI口语陪练 / 口语陪练 / 口语教练 / 英语口语 / 英语陪练 / 英语对话练习 / oral coach / speaking coach / AI speaking practice / oral practice / speaking practice / language coach / 智能口语 / 口语练习 / 场景陪练 | oral-coach | ai-oral-coach-skill | ../trtc-ai-oral-coach/SKILL.md |
| 4 | AI 对话(未指明场景) | conversational AI / Conversational AI / TRTC Conversational AI / 对话式AI / 对话式 AI / AI 对话 / AI 语音对话 / AI 语音聊天 / 语音 AI / AI 对话接入 / 搭建 AI 对话 / AI 对话从零开始 / voice agent / voice AI / TRTC voice AI / build voice AI / voice AI quickstart / voice agent demo / AI 语音助手 / voice AI 骨架 | conversational-ai(场景未定,见下方说明) | trtc-voice-ai-starter | ../trtc-voice-ai-starter/SKILL.md |
route_hint 和最终 owner invocation 必须使用上表的 owner frontmatter name;目录名和 product 值不能替代 owner name。其他 handoff owner 同样使用各自 SKILL.md 的 name 字段。
场景 4 的 product:用户尚未选定具体场景,product 统一写 conversational-ai(session 与上报一致:tools/session.py 的 VALID_PRODUCTS 和 runtime/telemetry.js 的 PRODUCT_BY_SKILL 都已登记;上报看板会把该值归入 AI 产品线)。不得写 null、unknown 或 convo-ai 等其他值。 starter 在其 §5 让用户选定场景后:选 2–4 则交给对应 skill,product 随之改为 ai-service / oral-coach / realtime-interpreter;选 1 则留在 starter,product 保持 conversational-ai。
排除条件:
../trtc-docs/SKILL.md;(c) 用户只要独立的 STT / TTS / 语音识别 / 语音合成 API、没有对话闭环时不进入场景 4,改走 ../trtc-docs/SKILL.md。命中处理(4 个场景共用):
../trtc-docs/SKILL.md,STOP。AskUserQuestion 意图确认模板,product 取上表对应值;场景 4 的产品名展示为「Conversational AI」):
../trtc-voice-ai-starter/SKILL.md(理由见 Hard rule 9 的 starter 例外)../trtc-docs/SKILL.md在进入 Query Classification 之前,再检查是否为 TIMPush / 离线推送场景。
如果用户消息命中以下触发词之一:
且 消息中 不 同时出现明确的其他产品主导信号(Conference / Call / Live / 口语陪练 / AI客服):
→ 由 Host reporting boundary 完成当前回合记录后路由到 ../trtc-push/SKILL.md,按其引导流程执行。STOP — 不继续执行后续 §1–§3 步骤。
如果同时出现 TIMPush 触发词与其他产品信号(例如「给 Conference 加推送」),先问用户要做 TIMPush 接入还是原产品集成,再路由。
运行:
python3 -m tools.query_classifier --query “<user_message>”
用结果做路由:
kind = error_code 或 kind = symptom_like
kind(及 intent=slice-lookup,供后续 §A 使用)trtc-docs — Chat/IM 语境在 §A 分给 trtc-chat/docs;active/paused chat 集成 session 应由 §0 按平台路由到相应 Chat ownerkind = capability
capability_intent ∈ {integrate, lookup, ambiguous}运行:
python3 -m tools.search route --query “<user_message>”
规则:
status = exact 且 confidence >= 0.6:采用 candidates[0].productstatus = ambiguous:直接问用户澄清 product,STOPstatus = not_found 或工具不可用:使用下方 keyword fallbackKeywords: TRTC, Tencent RTC, TUIKit, REST API, Webhook, and the signals in
../knowledge-base/chat/web/path-d-signals.yaml.
Keyword fallback(工具不可用 / not_found 时使用):
| Product | Signals |
|---|---|
| Chat | 消息、群聊、IM、conversation、messaging |
| Call | 通话、1v1、video call、ringing |
| RTC Engine | 进房、推流、TRTCCloud、publish stream |
| Live | 直播、连麦、弹幕、礼物、co-guest |
| Conference | 会议、多人视频、屏幕共享、participant、meeting |
keyword fallback 也无法匹配时:直接问用户”你在用哪个 TRTC 产品?”,STOP。
Conference 引导式集成流水线:dispatcher → conference domain skill → onboarding/topic flow。
信号词单一来源:Read ../knowledge-base/chat/web/path-d-signals.yaml(与 trtc-chat Step 0 / Path D 共用;禁止在 Root 内联维护第二份列表)。
Chat/IM 语境(满足任一即可):
product = chatpath-d-signals.yaml 的 im_consult 或 symptom_in_integration§0 已覆盖(本节不再处理):
status ∈ {active, paused} 且 product = chat → 已按平台路由到 Chat owner;iOS / Android / HarmonyOS 由各自排障 reference 处理,Web 走 Path C,禁止 Root 直送 trtc-chat/docs 或 trtc-docsiOS UIKit 代码任务:product=chat, platform=ios 且是已有集成或组件源码的维护 / 定制 / 实际代码排障(非新增集成能力),先路由 ../trtc-chat-ios/SKILL.md,由其选择应用或源码 reference。纯概念、API / 错误码咨询仍按下表走 docs。新接入 / 新功能实施仍先完成 §B 的确认与 SDKAppID 收集。独立 SwiftUI 套件改走匹配文档,不把 UIKit API 套用到该套件。
HarmonyOS 代码任务:product=chat, platform=ohos 且是已有工程的接入维护 / 定制 / 实际代码排障,先路由 ../trtc-chat-ohos/SKILL.md,不使用 Android API。新接入 / 新功能实施先完成 §B 的确认与 SDKAppID 收集;纯 IM 概念、REST、计费、API / 错误码咨询仍走下表的 Chat docs,不为咨询创建集成 session。
Path D 冷启动(无 active/paused chat 集成 session)— 在 trtc-docs 之前:
| 条件 | 路由 |
|---|---|
Chat/IM 语境 + kind ∈ {error_code, symptom_like} | ../trtc-chat/docs/SKILL.md,STOP |
Chat/IM 语境 + IM 概念 / REST / Webhook / TUIKit / 计费 / SDK API(im_consult 或 factual/decision lookup) | ../trtc-chat/docs/SKILL.md,STOP |
product = chat + capability_intent = lookup | ../trtc-chat/docs/SKILL.md,STOP |
例外:Conference Web symptom(直连,不走 trtc-docs)
同时满足以下三条时,直接 Read ../trtc-conference/flows/troubleshoot.md,不经过 trtc-conference/SKILL.md:
product = conference(或 session / package.json 含 @tencentcloud/roomkit-web-vue3 / tuikit-atomicx-vue3)platform = web(或可推断)kind = symptom_like 或 intent 为 symptom / troubleshoot / 进不了房 / 黑屏 / 无声音等具体故障以下情况路由到 ../trtc-docs/SKILL.md(非 Chat/IM 语境,或 Conference 例外未命中):
kind = error_code 或 kind = symptom_like(非 Chat/IM 语境)传入 trtc-docs 时:
productplatform(必须按 §-1 的 4 级判定填写:原文关键词平台 / 本项目本产品已知平台 / n-a / unknown。不得因为这是文档咨询就直接留空)query(原问题)intent
fact-lookup / decision-lookup / path-lookupslice-lookup如果 capability_intent = integrate,或用户明确要求:
则,在路由到任何 domain skill 之前,先做一次意图确认:
意图确认
用一句话把识别到的 product / platform / 用户意图回显给用户(用用户自己的语言,不暴露内部字段名),用 AskUserQuestion 单选确认:
我来帮你 {用户原始描述的核心意图}。我理解:
- 产品:{product 的中英文名称}
- 平台:{platform}
- 目标:{从用户原始描述中提炼的简短意图,不超过 15 字,不用内部枚举值}
是这样吗?
规则:
status = active)时跳过此确认——用户之前已经确认过integrate-scenario / integrate-feature 等内部术语触发:§B 意图确认已通过(用户选择 ①),或本轮 session guard 检测到 sdkappid_state ∈ {awaiting-sdkappid, pending-console} 恢复到本节。
短路条件(任一满足即跳过本节,直接进入下方"确认通过后"路由分派):
sdkappid 已存在且为非零整数status ∈ {active, paused}(历史轮次已完成收集)Chat HarmonyOS 本轮未命中短路条件时,先执行下方收集流程;流程写 awaiting-sdkappid / pending-console 时,通过共享 session 工具一并保存 product=chat, platform=ohos, active_domain_skill=trtc-chat-ohos。仅 session 不存在时创建,已有 session 用 CAS 保留其他状态。新建 session 默认的 active 不代表历史已完成收集,不得因此中途跳过当前流程。这样 SDKAppID 下一轮回复可恢复原平台,不会落回 Web Chat;业务状态保存不代表同意上传体验数据。
执行:必须 Read flows/collect-sdkappid.md 并按其中规则完成主问、按 product(分组见 flows/collect-sdkappid.md §Step 2b,当前支持 conference / call / chat / ai-service / realtime-interpreter / oral-coach)与用户语言展示控制台链接、校验用户回复的 SDKAppID。禁止在 SKILL.md 内凭记忆生成控制台链接或输出模板;所有 VERBATIM 输出以 flows/collect-sdkappid.md 为唯一来源。
出口条件:sdkappid_state = collected 写入 session;未满足禁止路由到任何 domain skill。
确认通过后:
(product, platform) == (conference, web):路由到 ../trtc-conference/SKILL.md(product, platform) == (chat, web):路由到 ../trtc-chat/SKILL.md(product, platform) == (chat, android):路由到 ../trtc-chat-android/SKILL.md(product, platform) == (chat, ios) 且目标为 UIKit TUIChatKit:路由到 ../trtc-chat-ios/SKILL.md(SwiftUI 宿主可内嵌 UIKit;独立 SwiftUI 套件走匹配文档)(product, platform) == (chat, ohos):路由到 ../trtc-chat-ohos/SKILL.mdproduct == call:路由到 ../trtc-call/SKILL.md(平台兼容性检查由 call skill 内部完成)../trtc-docs/SKILL.md 或 Chat IM 咨询走 ../trtc-chat/docs/SKILL.md如果用户说的是 review / audit / 帮我看看 / 是否正确 / 检查遗漏 / 业务流程 / 对照官方:
../trtc-chat/docs/SKILL.md(§A);否则 ../trtc-docs/SKILL.md../knowledge-base/slices/conference/web/integration-audit.md,输出 checklist(不做 code review 形态的输出)../trtc-chat/SKILL.md + Read 08-state-config.md §8.2../trtc-conference/SKILL.md../trtc-chat/SKILL.md必要时再识别 platform;明确的 HarmonyOS / ArkTS 信号优先于通用 TypeScript 信号,统一写 ohos,不写 harmony 或 harmonyos:
| Platform | Signals |
|---|---|
| web | React, Vue, TypeScript, browser |
| android | Java, Kotlin, Gradle |
| ios | Swift, Objective-C, Xcode |
| ohos | HarmonyOS NEXT, HarmonyOS, OpenHarmony, OHOS, 鸿蒙, ArkTS, DevEco, oh-package.json5 |
| flutter | Dart, Flutter |
| electron | Electron, desktop |
如果是 docs lookup 且问题不依赖 platform,可以不问用户,但上报的 framework 不得因此留空:仍按 §-1 的 4 级判定执行——先看原文是否已含平台关键词,再看本项目本产品是否已有已知平台;只有确认问题天然不适用平台维度(纯服务端 / 后端架构类:回调 webhook、落库、字段类型、计费、房间管理接口)时才填 n-a,否则省略让 Runtime 记为 unknown。
Host Bootstrap、Root 和 owner 由当前 Agent 共享 §-1 的一次前台入口及最终归因后置步骤,Node Runtime 统一维护事件、上下文和 Host Stop 恢复。业务 Skill 只维护 session、回答和业务状态,不另起 Prompt / invoke,也不复制脱敏、去重或发送逻辑。不要恢复旧 MCP、send-query 或独立路径事件。技术字段和兼容入口只查 runtime/REPORTING.md。
| Type | Owner | Path |
|---|---|---|
| domain skill | Conference guided integration | ../trtc-conference/SKILL.md |
| domain skill | Chat guided integration | ../trtc-chat/SKILL.md |
| domain skill | Chat Android guided integration | ../trtc-chat-android/SKILL.md |
| domain skill | Chat iOS UIKit integration / source customization | ../trtc-chat-ios/SKILL.md |
| domain skill | Chat HarmonyOS NEXT / OpenHarmony integration (ArkTS) | ../trtc-chat-ohos/SKILL.md |
| domain skill | Chat IM docs (Path D) | ../trtc-chat/docs/SKILL.md |
| domain skill | Call Flutter / iOS / Android guided integration | ../trtc-call/SKILL.md |
| domain flow | Conference Web troubleshoot (symptom) | ../trtc-conference/flows/troubleshoot.md |
| domain skill | AI customer service / 智能客服 | ../trtc-ai-service/SKILL.md |
| domain skill | AI realtime interpreter / 实时翻译 | ../trtc-ai-realtime-interpreter/SKILL.md |
| domain skill | AI oral coach / 口语陪练 | ../trtc-ai-oral-coach/SKILL.md |
| domain skill | Voice AI starter — Conversational AI intent with no named scenario (Web) | ../trtc-voice-ai-starter/SKILL.md |
| domain skill | TIMPush / 离线推送 | ../trtc-push/SKILL.md |
| domain skill | SDK runtime log troubleshooting (manual 1.0) | ../trtc-sdk-log-analysis/SKILL.md |
| shared answer layer | factual / docs lookup | ../trtc-docs/SKILL.md |
| shared tool | product routing / slice lookup | python3 -m tools.search |
| shared tool | query kind / capability intent classify | python3 -m tools.query_classifier |
| shared tool | session bus | python3 -m tools.session |
| shared tool | flow enter / resume | python3 -m tools.flow |
| shared tool | structural gate | python3 -m tools.apply |
trtc-docs, and shared python3 -m tools.* commands only.trtc-chat/SKILL.md Path C; Android / iOS / HarmonyOS use their owner troubleshooting references, not the generic docs path.trtc-chat/SKILL.md or trtc-chat-android/SKILL.md or trtc-chat-ios/SKILL.md or trtc-chat-ohos/SKILL.md or trtc-chat/docs/SKILL.md as the first skill in a turn — always start from this file (trtc/SKILL.md) so the Host reporting boundary and routing run first. Domain skills are routed owners, not parallel dispatchers.sdkappid_state = collected written to session, or the short-circuit condition met (session already has non-zero sdkappid, or status ∈ {active, paused}). Routing to trtc-conference / trtc-chat / trtc-chat-android / trtc-chat-ios / trtc-chat-ohos / trtc-call / trtc-ai-customer-service-skill / trtc-ai-realtime-interpreter / ai-oral-coach-skill while §B.2 is still pending is a routing error. Console-link VERBATIM templates live only in flows/collect-sdkappid.md; never fabricate links from memory. TIMPush exception: trtc-push fast-path has its own credential flow via MCP workflow engine; §B.2 does not apply. Voice AI starter exception: AI fast-path scenario 4 (trtc-voice-ai-starter) also skips §B.2. The starter collects SDKAppID together with SDKSecretKey in its own §7 and never reads session.sdkappid, so §B.2 would make the user enter it twice; worse, its session product is conversational-ai, which has no console-link group in flows/collect-sdkappid.md Step 2b and no branch to return to in the second-turn resume in §B "确认通过后". If the starter then hands off to ai-service / oral-coach / realtime-interpreter, that skill collects credentials through its own fallback path. Domain fallback exception: trtc-call/A.3, trtc-call/D1.3, trtc-chat/Q.1 may inline the same links only when session.sdkappid is null AND sdkappid_state ∉ {awaiting-sdkappid, pending-console, collected} (i.e., root §B.2 was genuinely bypassed); they MUST mirror flows/collect-sdkappid.md verbatim.flows/collect-sdkappid.md (opens in a new tab)hooks/gate_slice_read.py (opens in a new tab)hooks/gate_slice_write.py (opens in a new tab)hooks/stop_require_apply_evidence.py (opens in a new tab)hooks/topic_phase_gate.py (opens in a new tab)room-builder/assets/local-usersig/basic-info-config.ts (opens in a new tab)room-builder/assets/local-usersig/lib-generate-test-usersig-es.min.d.ts (opens in a new tab)room-builder/assets/local-usersig/lib-generate-test-usersig-es.min.js (opens in a new tab)runtime/README.md (opens in a new tab)runtime/REPORTING.md (opens in a new tab)runtime/RUNTIME.md (opens in a new tab)runtime/adapters/claude.js (opens in a new tab)runtime/adapters/codebuddy.js (opens in a new tab)runtime/adapters/codex.js (opens in a new tab)runtime/adapters/cursor.js (opens in a new tab)runtime/adapters/gemini.js (opens in a new tab)runtime/adapters/metadata.js (opens in a new tab)runtime/codex-storage.js (opens in a new tab)runtime/consent.js (opens in a new tab)runtime/continuation-notice.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
trtc, tencent-rtc, audio-video, real-time-communication, sdk-integration
14 skills in this plugin
/ai-oral-coach-skillBuild an AI English speaking coach powered by Tencent Cloud TRTC Conversational AI (voice-first).
Agent-driven — users never touch a terminal. Two paths:
Path A Quick Start — 3-screen SPA (scenario practice + sentence correction + reply suggestions + 4-dimension report)
Path B Integrate — backend inbound API + integration code, no UI generated
/trtc-ai-realtime-interpreterBuild real-time AI interpretation powered by Tencent Cloud TRTC Conversational AI (voice-first).
Designed for beginners — no coding experience required. Plain-language guidance throughout.
Two paths available:
Quick Start —— Ready-to-use Vue3 meeting room with real-time AI interpreter (for first-timers who want to see results fast)
Integrate into My System —— Add TRTC-based real-time interpretation backend capabilities to your existing project (no UI generated)
The Coding Agent drives the entire process in the chat window. Users never touch a terminal or run scripts manually.
/trtc-ai-customer-service-skillBuild AI customer service powered by Tencent Cloud TRTC Conversational AI (voice-first).
Designed for beginners — no coding experience required. Plain-language guidance throughout.
Two paths available:
Quick Start —— Ready-to-use voice agent UI + ticket dashboard (for first-timers who want to see results fast)
Integrate into My System —— Add TRTC Conversational AI backend capabilities to your existing project (no UI generated)
The Coding Agent drives the entire process in the chat window. Users never touch a terminal or run scripts manually.
npx claudepluginhub tencent-rtc/agent-skills --plugin trtc-ai-setupOther plugins' skills for the same job