Validate Response-Agent-as-Code YAML
Validate Response-Agents-as-Code YAML without syncing it. Runs the same parse, schema, and cross-file checks as the GitOps sync engine, so a CI check stays in step with real sync behavior. Typically used to validate agent files in a pull request before they merge.
Request. Post each file as a { path, content } pair. The validator has no access to your repo, so you send the raw file text. Post one file to check it on its own, or a whole directory to also catch cross-file issues like duplicate sync_key values and dependency cycles. Include any prompt .md files referenced by systemPrompt.file so those references resolve.
Response. An overall valid flag, plus per file an errors list (these would block a sync) and a warnings list (non-blocking). Warnings are checks that need live workspace state the request cannot see, such as an unprovided systemPrompt.file or a reference to an agent that is not in the request.
Authentication. Send a bearer token. GitHub OIDC is the recommended method: in GitHub Actions, use the cotool/validate-agents Action, which mints a short-lived, repo-scoped token (no stored secret; the repository must be connected for GitOps sync) that grants validate-only access. A Cotool API key with the tool.manage permission also works for non-GitHub or self-hosted CI, but it is long-lived and inherits the full permissions of the user who created it, so prefer OIDC and treat any API key as a sensitive, least-privilege secret.
Authorizations
API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here
Body
The files to validate. Post one to check it on its own, or a whole directory to also catch cross-file issues. Include any SKILL.md files (under skillsPath) that agents reference, and any prompt .md files referenced by systemPrompt.file; a skill reference whose SKILL.md is not in the request is a warning, not a failure.
1Directory holding standalone SKILL.md skill definitions (default "cotool/skills"). Must match your sync config's skills path so skill files in the request are discovered.
1