diag

Executes RPC calls, log queries, and RDS queries with chained assertions via the Watchdog Diag platform.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill diag-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diag
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/diag
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill diag-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It lets you test RPC interfaces, search service logs, and query RDS databases through the Watchdog Diag platform with assertion-based validation, without manually building notebooks or encoding requests. ## Core Features & Use Cases - RPC Call Testing: Invoke any PSM method with a JSON request built from its IDL definition, with optional assertions on response fields. - Log Query: Search Diag platform logs by keywords or LogID across one or more PSMs, with time ranges and include/exclude filters. - RDS Query: Run parameterized SELECT/EXPLAIN queries against RDS databases with assertions and optional direct-connect mode. - Use Case: When verifying a fix on a PSM, query the method definition via /bam-api, call the RPC with assertions on BaseResp.StatusCode, then pull related error logs by LogID in the same troubleshooting session. ## Quick Start Ask the agent to call a specific PSM method through Diag with given parameters and assert that the response StatusCode equals zero.

Frequently Asked Questions about diag

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test an RPC interface with assertions using Diag?

Use the rpc_call action with the target PSM, method, and a request JSON built from the method's IDL definition. Add an assertions array with field, operator, and value entries, and the result returns an assert_matched field indicating whether all conditions passed.

How do I query service logs by LogID or keywords?

Use the log_query action with one or more PSMs. Providing a logid switches to LogID query mode; otherwise use include_keywords and exclude_keywords with a time_range like 1h to run a keyword search.

How do I build the request body for a Diag RPC call?

Construct the request JSON strictly from the method's IDL definition. If the IDL is not in the local repository, query the PSM's interface definition through the /bam-api skill, then confirm the parameters with the user before sending.

What SQL statements does Diag RDS query support?

The rds_query action only supports SELECT and EXPLAIN statements; DML such as INSERT, UPDATE, and DELETE is not allowed. Parameterized queries are supported via the args array, including array parameters for IN clauses.

Does Diag work in the BOE environment?

No, the BOE environment does not support Diag functionality. RPC calls, log queries, and RDS queries must target other regions such as Singapore-Central, US-East, or China-North.

Why does my Diag RDS query need a region with datacenter?

The region parameter uses the format VRegion/dc, such as Singapore-Central/alisg, to route the query to the correct datacenter. If only the VRegion is given, a default datacenter mapping is applied automatically.