API Exploration
Developmentapi-explorationAPI Exploration is an Agent Skill for development published in the sozercan/kaset repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use when a task needs a new or modified YouTube Music API call, response parser validation, authenticated endpoint investigation, or fixture capture; explore endpoints with `swift run api-explorer` before changing production code.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/sozercan/kaset/blob/HEAD/.agents/skills/api-exploration/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/api-exploration, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
API Exploration
Use this skill when a task needs a new or modified YouTube Music API call, response parser validation, authenticated endpoint investigation, or fixture capture.
Guardrails
- Always enhance
Sources/APIExplorer/main.swift; do not write one-off scripts for endpoint exploration. - Never commit real cookies, SAPISID values, tokens, or account identifiers. Redact anything sensitive in notes, fixtures, and examples.
- Prefer API endpoints over WebView whenever the functionality already exists in
YTMusicClient.
Workflow
- Start with
swift run api-explorer authif the task touches sign-in-backed endpoints. - Check what already exists with
swift run api-explorer list. - Probe the endpoint with
browse,action, orcontinuationbefore touching production code. - Save representative payloads with
-owhen parser work or regression tests need fixtures. - Update
docs/api-discovery.mdif you confirm a new endpoint, parameter, or auth constraint.
Common Commands
swift run api-explorer auth
swift run api-explorer list
swift run api-explorer browse FEmusic_home -v
swift run api-explorer browse FEmusic_liked_playlists -v
swift run api-explorer action search '{"query":"never gonna give you up"}'
Landmarks
Sources/APIExplorer/main.swiftdocs/api-discovery.mdTests/KasetTests/Fixtures/
Authenticated exploration reads the debug cookie export from ~/Library/Application Support/Kaset/cookies.dat.