query-cases

Query and browse existing API example cases in the APIExample-Audio Android demo — lists cases by group, finds which case demonstrates a specific Agora audio API, checks sort index availability, and resolves display names from string resources. Use when: someone asks what cases exist, which audio APIs are demonstrated, wants to find a case by name or API (e.g. setVoiceBeautifierPreset, enableSpatialAudio), needs a free sort index before adding a new case, or wants to know if an audio feature is already implemented. This project uses voice-sdk — no video APIs. Keywords: list cases, find case, query cases, @Example, sort index, BASIC, ADVANCED, available cases, existing cases, which case, is there a case, audio case.

342 stars

Best use case

query-cases is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Query and browse existing API example cases in the APIExample-Audio Android demo — lists cases by group, finds which case demonstrates a specific Agora audio API, checks sort index availability, and resolves display names from string resources. Use when: someone asks what cases exist, which audio APIs are demonstrated, wants to find a case by name or API (e.g. setVoiceBeautifierPreset, enableSpatialAudio), needs a free sort index before adding a new case, or wants to know if an audio feature is already implemented. This project uses voice-sdk — no video APIs. Keywords: list cases, find case, query cases, @Example, sort index, BASIC, ADVANCED, available cases, existing cases, which case, is there a case, audio case.

Teams using query-cases should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/query-cases/SKILL.md --create-dirs "https://raw.githubusercontent.com/AgoraIO/API-Examples/main/Android/APIExample-Audio/.agent/skills/query-cases/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/query-cases/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How query-cases Compares

Feature / Agentquery-casesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Query and browse existing API example cases in the APIExample-Audio Android demo — lists cases by group, finds which case demonstrates a specific Agora audio API, checks sort index availability, and resolves display names from string resources. Use when: someone asks what cases exist, which audio APIs are demonstrated, wants to find a case by name or API (e.g. setVoiceBeautifierPreset, enableSpatialAudio), needs a free sort index before adding a new case, or wants to know if an audio feature is already implemented. This project uses voice-sdk — no video APIs. Keywords: list cases, find case, query cases, @Example, sort index, BASIC, ADVANCED, available cases, existing cases, which case, is there a case, audio case.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Query Cases — APIExample-Audio

## How cases are registered

Every case is a Fragment under `app/src/main/java/io/agora/api/example/examples/{basic|advanced|audio}/` with an `@Example` annotation:

```java
@Example(
    index    = 10,       // unique within the group; BASIC: 0–9, ADVANCED: 10+
    group    = ADVANCED,
    name     = R.string.item_xxx,
    actionId = R.id.action_mainFragment_to_xxx,
    tipsId   = R.string.xxx_tips
)
```

A commented-out `@Example` (`//@Example`) means the case is disabled and won't appear in the app.

This project uses `voice-sdk` — all cases are audio-only, no video APIs exist.

---

## Query procedure

### Step 1: Decide scope before scanning

Before listing files, ask:
- **Looking for a specific API?** — scan Javadoc comments for the API name; no need to read all files
- **Need a free sort index?** — collect all `index` values for the target group, then find the gap
- **Listing all cases?** — scan all three directories and collect annotations

### Step 2: Read ARCHITECTURE.md first

Read `ARCHITECTURE.md` (the `examples/` section of the Directory Layout). It contains a pre-built index of all cases with group, index, display name, and key API — no file scanning needed for most queries.

Use ARCHITECTURE.md as the primary source. Fall back to scanning the source directories only when:
- The query requires data not in ARCHITECTURE.md (e.g. full `@Example` field values, `tipsId`)
- ARCHITECTURE.md appears stale (a case exists in source but not in the doc)
- The output involves free-index claims, index collisions, or "is index X available?" decisions — these must be validated from source immediately before final output

### Step 3: Scan case directories (fallback only)

| Directory | Group | Contents |
|-----------|-------|----------|
| `examples/basic/` | BASIC | Core audio join/leave patterns |
| `examples/advanced/` | ADVANCED | Feature-specific audio APIs |
| `examples/audio/` | ADVANCED | Audio visualization (still grouped ADVANCED) |

Each `.java` file is a case. Subdirectories (e.g. `customaudio/`) contain multi-file cases — the main class is the file whose name matches the directory name; if no name match, look for the file containing `@Example`.

### Step 4: Extract `@Example` fields

For each file, read the annotation for `group`, `index`, `name` (string resource ID), and `tipsId`. If the annotation is commented out, the case is disabled.

Resolve display names from `app/src/main/res/values/strings.xml`:
`R.string.item_voice_effects` → `<string name="item_voice_effects">Voice Effects</string>`

### Step 5: Read class Javadoc for API mapping

The Javadoc above each class lists the key APIs demonstrated:

```java
/**
 * This demo demonstrates how to apply voice beautifier effects.
 *
 * Key APIs used:
 * - RtcEngine.setVoiceBeautifierPreset()
 */
```

Use this to answer "which case uses X?" queries without reading the full implementation.

If no Javadoc is present, scan the method body for the API name as a method call. If still not found, note "API mapping unavailable" in the results table.

### Step 6: Present results

Full listing — table format:

| Group | Index | Case Name | File | Key APIs |
|-------|-------|-----------|------|----------|
| BASIC | 0 | Join Channel Audio | JoinChannelAudio.java | joinChannel() |
| ADVANCED | 4 | Voice Effects | VoiceEffects.java | setVoiceBeautifierPreset() |

For a specific query (e.g. "which case uses enableSpatialAudio?"), return only matching rows.

For a free-index query, list all used indices in the target group and identify the next available slot:
> BASIC range: 0–9. ADVANCED range: 10+.
> ADVANCED indices in use: 10, 11, 12, 15, 20 → next free: 13

Before returning any free-index/collision result, re-scan source registration points (`@Example` across `basic/`, `advanced/`, `audio/`) and recompute once from source-of-truth data.

---

## NEVER

- **NEVER** count a commented-out `@Example` (`//@Example`) as an active case — it is disabled and won't appear in the app.
- **NEVER** mix index spaces across groups — `audio/` cases use `group=ADVANCED` but share the same index namespace as `advanced/`; always scan both directories together when finding a free index.
- **NEVER** use filename alone to identify a subdirectory case — the main class is the file whose name matches the directory name; if no match, look for the file with `@Example`.
- **NEVER** report a free index without scanning all three directories (`basic/`, `advanced/`, `audio/`) for the target group — missing one causes index collisions.
- **NEVER** suggest video APIs — this project uses voice-sdk only; video APIs do not exist.

Related Skills

join-channel-video-guide

342
from AgoraIO/API-Examples

Guide for implementing video call functionality in business scenarios, including SDK initialization, joining channels, video encoding configuration, and event handling

upsert-case

342
from AgoraIO/API-Examples

Add a new audio API example case or modify an existing one in the APIExample-Audio Android demo — creates or updates Fragment class, XML layout, string resources, and nav_graph registration. Use when: adding a new Agora audio API demo screen, modifying an existing case's implementation or registration, implementing a new audio feature example in Java + XML layouts, registering a new case via @Example annotation, subclassing BaseFragment for a new audio demo screen, or updating an existing case's strings, layout, or nav entry. This project uses voice-sdk — no video APIs available. Keywords: add case, modify case, update case, new fragment, nav_graph, @Example, BaseFragment, APIExample-Audio, audio case, voice-sdk, new screen, audio demo, upsert case.

review-case

342
from AgoraIO/API-Examples

Review an existing case implementation against project-specific red lines and coding standards. Use after implementing or modifying a case. Use when: reviewing a case for correctness, checking red-line compliance, verifying lifecycle and threading patterns, auditing an existing Fragment. Keywords: review, audit, check, red lines, lifecycle, threading, compliance.

food-database-query

31392
from sickn33/antigravity-awesome-skills

Food Database Query

NutritionClaude

azure-monitor-query-py

31392
from sickn33/antigravity-awesome-skills

Azure Monitor Query SDK for Python. Use for querying Log Analytics workspaces and Azure Monitor metrics.

Cloud ManagementClaude

azure-monitor-query-java

31392
from sickn33/antigravity-awesome-skills

Azure Monitor Query SDK for Java. Execute Kusto queries against Log Analytics workspaces and query metrics from Azure resources.

gold-price-query

3891
from openclaw/skills

This skill retrieves real-time precious metal prices (gold, silver, platinum, palladium, etc.) from https://i.jzj9999.com/quoteh5. It provides bid/ask prices, daily high/low prices, and price trends for 20+ metal types.

Data & Research

tanstack-query-expert

31355
from sickn33/antigravity-awesome-skills

Expert in TanStack Query (React Query) — asynchronous state management. Covers data fetching, stale time configuration, mutations, optimistic updates, and Next.js App Router (SSR) integration.

bigquery-pipeline-audit

28865
from github/awesome-copilot

Audits Python + BigQuery pipelines for cost safety, idempotency, and production readiness. Returns a structured report with exact patch locations.

tanstack-query-expert

24269
from davila7/claude-code-templates

Expert in TanStack Query (React Query) — asynchronous state management. Covers data fetching, stale time configuration, mutations, optimistic updates, and Next.js App Router (SSR) integration.

graph-query

24269
from davila7/claude-code-templates

Query the code graph database to understand component relationships, dependencies, and change impact. Use when the user asks to "find callers", "check dependencies", "what uses this", "show relationships", "find serializers", or when reading code and needing to understand what depends on a component before modifications.

write-query

10671
from anthropics/knowledge-work-plugins

Write optimized SQL for your dialect with best practices. Use when translating a natural-language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a query against a large partitioned table, or getting dialect-specific syntax for Snowflake, BigQuery, Postgres, etc.