# Clinic API sub-skills

Canonical helpers and examples use `/data-proxy/api/v1`. Capability-preserving helpers hide compatibility transports where the canonical contract does not yet have parity. In org-scoped paths, `{orgID}` is the TiDB Cloud/DBAAS org ID (`tenantID` in a legacy Dashboard response), never Dashboard `orgID`.

| Name | Description | SUBSKILL.md path |
|------|-------------|------------------|
| byoc-diagnostics | Unified BYOC support matrix and canonical customer-side O11y contracts for logs, metrics, Slow Query, Top SQL, live Statements, and physical-only Continuous Profiling inventory. | `byoc-diagnostics/SUBSKILL.md` |
| cluster-metadata | Exact metadata, DBAAS-org list/detail, transparent global/advanced discovery, components, and supported-tier topology. | `cluster-metadata/SUBSKILL.md` |
| data-proxy | Canonical warehouse SQL query/batch/schema/capabilities for supported non-BYOC tiers, persisted Statements, LogStats, and non-BYOC Top RU; NGM fallback for Starter/Essential/shared slow query. | `data-proxy/SUBSKILL.md` |
| metrics | Canonical org/cluster-scoped Prometheus query, query-range, and series APIs; METRICS_SCHEMA references in `metrics/`. | `metrics/SUBSKILL.md` |
| loki | Canonical org/cluster business-log APIs and datasource-scoped Clinic system-log APIs. | `loki/SUBSKILL.md` |
| ticdc | Internal TiCDC changefeed metadata list/detail APIs for Starter, Essential, Dedicated, Premium, and BYOC clusters. | `ticdc/SUBSKILL.md` |
| activity-hub | Canonical org/cluster lifecycle events with query-based cursor pagination. | `activity-hub/SUBSKILL.md` |
| continuous-profiling | Canonical physical-BYOC read-only profiling inventory plus the existing NGM Dedicated/Premium pprof list/download/analysis workflow. | `continuous-profiling/SUBSKILL.md` |
| diagnostic-files | Dedicated plan-replayer and OOM diagnostic ZIP list/download through NGM; not yet migrated to canonical Data Proxy. | `diagnostic-files/SUBSKILL.md` |

Shell entrypoint: `source scripts/clinic-shell.sh`. It loads auth, metadata, activity, SQL/Top RU, BYOC diagnosis, metrics, Loki/system logs, continuous-profiling, and diagnostic-file helpers. Reference: `reference/internal_api_key_guide.md`; history: `changelogs.md`.
