windows/.agent/skills/upsert-case/SKILL.md
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.
npx skillsauth add agoraio/api-examples upsert-caseInstall 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.
Use this skill when you need to:
Trigger: User requests a new API demo (e.g., "Add a screen sharing example")
Steps:
Basic/ or Advanced/.h and .cpp files for the dialog classCSceneDialogARCHITECTURE.md Case IndexTrigger: User requests changes to an existing example (e.g., "Update JoinChannelVideo to support token")
Steps:
APIExample/APIExample/[Basic|Advanced]/<ExampleName>/.h and .cpp filesARCHITECTURE.md Case Index if APIs changed| File | Action | Notes |
|------|--------|-------|
| APIExample/APIExample/[Basic\|Advanced]/<ExampleName>/C<ExampleName>Dlg.h | Create | Dialog class header |
| APIExample/APIExample/[Basic\|Advanced]/<ExampleName>/C<ExampleName>Dlg.cpp | Create | Dialog class implementation |
| APIExample/APIExample/CSceneDialog.cpp | Modify | Register example in scene list |
| ARCHITECTURE.md | Modify | Add entry to Case Index |
| File | Action | Notes |
|------|--------|-------|
| APIExample/APIExample/[Basic\|Advanced]/<ExampleName>/C<ExampleName>Dlg.h | Modify | Update dialog class |
| APIExample/APIExample/[Basic\|Advanced]/<ExampleName>/C<ExampleName>Dlg.cpp | Modify | Update implementation |
| ARCHITECTURE.md | Modify | Update Case Index if APIs changed |
mkdir APIExample\APIExample\[Basic|Advanced]\<ExampleName>
Example folder name must be PascalCase.
Create APIExample/APIExample/[Basic|Advanced]/<ExampleName>/C<ExampleName>Dlg.h
Use the template from references/example-template.h as a starting point. Replace <ExampleName> with your example name.
Create APIExample/APIExample/[Basic|Advanced]/<ExampleName>/C<ExampleName>Dlg.cpp
Use the template from references/example-template.cpp as a starting point. Replace <ExampleName> with your example name.
Edit APIExample/APIExample/CSceneDialog.cpp and add the example to the scene list:
// In the scene list initialization
m_sceneList.push_back({
_T("ExampleName"),
[](CWnd* pParent) { return new C<ExampleName>Dlg(pParent); }
});
Add a new row to the Case Index table in ARCHITECTURE.md:
| ExampleName | `[Basic|Advanced]/ExampleName/` | `api1()`, `api2()`, `api3()` | Brief description of what this example demonstrates |
Key APIs column: List 2-5 core SDK methods used in this example.
leaveChannel() and release() are called on closeSee references/ directory for code patterns:
lifecycle-pattern.cpp — Proper engine lifecyclemessage-map-pattern.cpp — Message map pattern for thread-safe UI updatesevent-handler-pattern.cpp — Event handler patternDo NOT:
release() — this causes engine leaksC prefix, m_ prefix)CConfigIRtcEngineEventHandler for event handlingleaveChannel() firstAPIExample/APIExample/[Basic|Advanced]/ structureARCHITECTURE.md Case Index after adding/modifying an exampleAfter completing the upsert, verify:
APIExample/APIExample/[Basic|Advanced]/<ExampleName>/)C<ExampleName>Dlg.h (with C prefix)C<ExampleName>Dlg.cppCDialogEx or CDialogIRtcEngineEventHandlerBEGIN_MESSAGE_MAP / END_MESSAGE_MAPCSceneDialogInitializeAgoraEngine() creates engine with correct configJoinChannel() uses token from CConfigLeaveChannel() and release() are called in PostNcDestroy()PostMessage()ARCHITECTURE.md Case Index includes new/updated examplereferences/ directory for C++ code templatesAPIExample/APIExample/Basic/JoinChannelVideoByToken/ for reference implementationdevelopment
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.
development
Guide for implementing video call functionality in business scenarios, including SDK initialization, joining channels, video encoding configuration, and event handling