aimgr resource validate is the creator-focused validation entry point for all resource types:
skillagentcommandpackage
Use it before repo add, repo sync, or sharing resources with other teams.
aimgr resource validate <resource-id-or-path> [flags]Target resolution order:
- If
<resource-id-or-path>exists on disk, aimgr validates it as a path target. - Otherwise aimgr expects a canonical ID in
type/nameform (for exampleskill/my-skill).
Used for:
- skills
- agents
- commands
Static validation checks resource structure/content only.
Package validation always includes:
- Static package schema validation (
name,description,resources, JSON shape) - Contextual reference validation for each package resource reference
Contextual validation resolves package references against a validation context (source root, local repo, or repo manifest).
Validate canonical IDs and package references against a specific local source tree.
aimgr resource validate --source-root ./my-resources skill/my-skill
aimgr resource validate --source-root ./my-resources package/release-bundleLoad source context from an ai.repo.yaml (local path or supported URL form).
aimgr resource validate --repo-manifest ./ai.repo.yaml package/release-bundleFor canonical ID resolution, aimgr checks local path sources in the manifest.
When validating canonical IDs, aimgr resolves context in this order:
--source-root- local repo (if available)
--repo-manifest
If none are available, canonical-ID validation fails with a context error.
Supported formats:
table(default)jsonyaml
Examples:
aimgr resource validate ./skills/my-skill --format=table
aimgr resource validate skill/my-skill --source-root ./resources --format=json
aimgr resource validate package/release-bundle --repo-manifest ./ai.repo.yaml --format=yamlJSON/YAML include structured fields such as:
target,resolved_path,resolved_idresource_type,mode,context,validdiagnostics[],summary
aimgr resource validate uses three exit codes:
0: validation passed1: validation failed (resource/schema/reference problems)2: usage/context/setup error (invalid target/flags, missing context, manifest/context load failure)
Path-based:
aimgr resource validate ./skills/skill-creatorCanonical ID:
aimgr resource validate --source-root ./resources skill/skill-creatorPath-based:
aimgr resource validate ./agents/code-reviewer.mdCanonical ID:
aimgr resource validate --source-root ./resources agent/code-reviewerPath-based:
aimgr resource validate ./commands/release/deploy.mdCanonical ID:
aimgr resource validate --source-root ./resources command/release/deployPath-based (explicit context):
aimgr resource validate ./packages/release-bundle.package.json --source-root ./resourcesCanonical ID (manifest-backed context):
aimgr resource validate package/release-bundle --repo-manifest ./ai.repo.yamlValidation is read-only and does not mutate your live repository state.
- Static validation reads only the target resource.
- Contextual package validation builds transient validation state from provided roots/manifest sources.
- Validation does not run repository mutation operations (
repo add,repo sync, metadata writes, etc.).
This makes resource validate safe for local preflight checks and CI validation.
Symptom:
- package validation fails with unresolved resource references.
Typical causes:
- typo in package resource ID
- referenced resource not present in selected context roots
Fixes:
- Check canonical resource IDs in
resources[]. - Ensure the right context is provided (
--source-rootor--repo-manifest). - Use the diagnostic suggestion text (includes likely canonical IDs when available).
Symptom:
- canonical target resolves to a path that does not exist, or package refs do not match actual canonical names.
Typical causes:
- wrong resource type/name (
skill/foovscommand/foo) - nested command ID mismatch (for example
command/team/deployexpected,command/deployprovided)
Fixes:
- Verify the ID follows the canonical
type/namescheme. - For nested resources, include the full canonical name.
- Re-run with
--format=jsonto inspectresolved_id, diagnostics, and suggestions.
Symptom:
- validating
type/namefails with a context-required error.
Fixes:
- Provide
--source-root <path>; or - Provide
--repo-manifest <path-or-url>; or - Run where a local aimgr repo is available and initialized.
Without any context, canonical IDs cannot be mapped to actual files.