Android/APIExample-Compose/.agent/skills/query-cases/SKILL.md
Query and browse existing API example cases in the APIExample-Compose Android demo — lists cases by group, finds which case demonstrates a specific Agora API, checks list position availability, and resolves display names from string resources. Use when: someone asks what Compose cases exist, which APIs are demonstrated, wants to find a case by name or API (e.g. takeSnapshot, setClientRole), needs to know the current list position before adding a new case, or wants to know if a feature is already implemented in Compose. Registration is manual via Examples.kt — no @Example annotation. Keywords: list cases, find case, query cases, Examples.kt, BasicExampleList, AdvanceExampleList, available cases, existing cases, which case, is there a case, Compose case, Jetpack Compose.
npx skillsauth add agoraio/api-examples query-casesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Unlike APIExample, this project does NOT use reflection. Cases are manually registered in:
app/src/main/java/io/agora/api/example/compose/model/Examples.kt
Two lists define the groups:
val BasicExampleList = listOf(
Example(R.string.example_join_channel_video) { JoinChannelVideo() },
// …
)
val AdvanceExampleList = listOf(
Example(R.string.example_live_streaming) { LiveStreaming() },
// …
)
List position is display order — there is no index field. String keys use the example_ prefix.
Before reading files, ask:
Read ARCHITECTURE.md (the samples/ section of the Directory Layout). It contains a pre-built index of all cases with group, position, display name, and key API — no file scanning needed for most queries.
Use ARCHITECTURE.md as the primary source. Fall back to reading Examples.kt only when:
description field)Examples.kt immediately before final outputFile: app/src/main/java/io/agora/api/example/compose/model/Examples.kt
Parse BasicExampleList and AdvanceExampleList. Each entry is:
Example(R.string.example_your_case_name) { YourCaseName() }
Position in the list (1-based) is the display order. There is no index field and no disabled/commented-out mechanism equivalent to //@Example.
Resolve R.string.example_* from app/src/main/res/values/strings.xml:
R.string.example_video_snapshot → <string name="example_video_snapshot">Video Snapshot</string>
Case implementations are in app/src/main/java/io/agora/api/example/compose/samples/. The KDoc above each public Composable lists key APIs:
/**
* Demonstrates how to take a snapshot of the local video stream.
*
* Key APIs used:
* - RtcEngine.takeSnapshot()
*/
@Composable
fun VideoSnapshot() { … }
Use this to answer "which case uses X?" without reading the full implementation. If no KDoc, scan the function body for the API name.
Full listing — table format:
| Group | Position | Case Name | File | Key APIs | |-------|----------|-----------|------|----------| | Basic | 1 | Join Channel Video | JoinChannelVideo.kt | joinChannel(), setupLocalVideo() | | Advanced | 3 | Video Snapshot | VideoSnapshot.kt | takeSnapshot() |
For a specific query, return only matching rows.
For a position query, list current entries in the target list and identify the next available slot:
AdvanceExampleList has 12 entries → next position: 13 (append at end)
Before returning any position/registration-conflict result, re-read Examples.kt and recompute from the current list entries.
@Example annotations — this project uses manual registration in Examples.kt, not reflection.item_ string prefix — Compose cases use example_ prefix; item_ belongs to APIExample.nav_graph.xml for case registration — Compose navigation is position-based and requires no nav graph changes.development
Add a new API example or modify an existing one. Covers both creation and modification scenarios, including dialog class structure, message map registration, and ARCHITECTURE.md updates.
development
Code review for API examples. Ensures examples follow project conventions, handle lifecycle correctly, manage threads safely, and use APIs properly.
development
Add a new API example or modify an existing one. Covers both creation and modification scenarios, including file structure, registration, and ARCHITECTURE.md updates.
development
Code review for API examples. Ensures examples follow project conventions, handle lifecycle correctly, manage threads safely, and use APIs properly.