In short.
This guide shows developers and platform teams how to manage Claude API resources from repository files, but reliable updates depend on preserving the lockfile that connects files to existing resources. It documents six resource types, dependency resolution, change previews and GitHub Actions automation. Important limitations include restricted adoption of existing resources, no built-in locking for concurrent applies and a dry run that exits successfully even when its plan is blocked. No commands or workflows were executed; costs, license terms and operational results are unknown.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected documentation page at [https://platform.claude.com/docs/en/cli-sdks-libraries/cli/apply.md], including its examples, file-kind inference, lockfile behavior, CI workflow and flag descriptions. Linked pages, repositories, downloads and action implementations are excluded. No explicit license notice appears in the supplied page. Nothing was executed; actual API behavior, example compatibility, deployment outcomes, costs and account eligibility remain unverified.
The overview
identity
Manage resources as code with ant apply is a guide in Claude's platform documentation. Its subject is the ant CLI command that creates and updates Claude API resources from files kept in a repository. The complete source is [https://platform.claude.com/docs/en/cli-sdks-libraries/cli/apply.md].
The resource is instructional documentation, rather than a downloadable agent, skill or standalone application. It covers agents, environments, skills, memory stores, deployments and vaults.
assessment
The guide is useful for teams that want resource configuration to pass through the same review as application code. It explains both the initial creation process and operational details that affect later changes, including external edits, renamed files, partial failures and CI concurrency.
The documented plans, field differences and workspace checks provide useful review controls. They do not establish that an agent performs its task correctly or that an automated deployment is reliable; those outcomes were not assessed.
users
The strongest fit is developers and platform engineers managing several related Claude API resources or promoting reviewed configuration changes through CI. Relative references let a project connect agents, skills, environments and scheduled deployments without manually copying every resource ID.
Beginners can follow the single-agent example if they understand terminal commands, repository files and basic YAML frontmatter. Installation and authentication require separate documentation. Users primarily editing existing resources in the Console should understand the lockfile and export limitations before switching.
capabilities
The guide documents creation and updates from YAML, JSON and Markdown definitions, with skills uploaded as directories containing SKILL.md. It covers interactive approval, detailed previews, dry runs, dependency ordering and references to resources outside the managed project.
Agent and skill references are pinned to the versions applied in that run. Skills can also come from GitHub directories, pinned to a resolved commit until --upgrade is used. Globs can collect skills or insert tool definitions from YAML and JSON files. Vault definitions contain only display_name and optional metadata.
Using it
requirements
The page specifies ant CLI 1.30.0 or later for ant apply, 1.34.0 or later for vault files, and 1.40.0 or later for resource paths under the documented multiagent predefined-agent fields. These are feature-specific minimums, not a statement of the latest available release.
Authentication must reach the organization and workspace recorded in claude-lock.json. A private GitHub skill repository requires GITHUB_TOKEN. The CI example additionally requires GitHub Actions permissions, a federation rule and a service account. Installation details, supported operating systems and account eligibility are not established by this page.
mechanism
Each file describes a resource's configuration. For Markdown agents, frontmatter supplies configuration and the body supplies the system prompt. Relative file references are resolved in dependency order and replaced with API resource IDs. File kind is inferred from an explicit type, the immediate parent directory or a filename prefix; vault filenames are an exception.
The lockfile records resource IDs, versions, API origin, organization, workspace and hashes of previously submitted and returned content. These records let later runs identify resources and detect changes made outside the files. A bare ant apply reconciles tracked files; naming the project directory also includes newly discovered resource files.
setup
After installing and authenticating the CLI using the linked quickstart, work from the repository root. Create an agent definition under agents/, inspect it with ant apply --dry-run agents/summarizer.md, and use ant apply agents/summarizer.md for an interactive application. Commit the resulting claude-lock.json alongside the definition.
For CI, the guide recommends a local first apply before enabling automation. Its GitHub Actions example uses Workload Identity Federation, serializes applies, checks out the latest main branch and commits lockfile changes even after partial failure. The linked authentication setup and action implementations are outside this page's evidence.
example
The simplest example creates agents/summarizer.md with the name Summarizer and model claude-opus-5-5 in its frontmatter, followed by instructions to produce concise summaries. The command ant apply agents/summarizer.md displays a creation plan and requests approval. The documented result records the created agent in claude-lock.json; editing that file and applying again produces an update plan.
A larger example connects a reviewer agent to a summary skill, an engineering lead to the reviewer, and a nightly deployment to an environment and memory store. These are documentation examples, not observed results. Availability of the named model and successful execution of either example are unverified.
Assessment & evidence
limitations
The command cannot generally adopt resources created outside its lockfile. Applying a definition for an existing unmanaged agent creates another agent. The documented exception is a Console Export as code download that includes its own lockfile.
Deleting a file leaves the remote resource in place unless --prune is used; renaming a file declares a new resource. External edits, archival or deletion block application unless --force is supplied. Removing a configuration field clears it only when the API allows that field to be cleared.
Dry runs exit 0 even when a plan is blocked, so exit status alone cannot establish that a change is applicable. Concurrent runs have no lockfile locking, and partial application can leave newly created resources recorded in the lockfile. The guide therefore requires serialized applies and preservation of state after failures.
reasoning
The main reason to use this approach is to connect readable configuration changes with existing code review and automation. Relative dependencies and version pinning can reduce manual coordination when several resources change together. These are expected benefits inferred from the documented mechanism, not measured improvements.
The tradeoff is responsibility for the lockfile and deployment process. File removal does not automatically remove resources, external edits can block changes, and CI must retain state even after failure. This approach fits teams prepared to manage those behaviors explicitly.
alternatives
The page identifies the Claude Console and ant beta:agents create as other ways to create resources. It also describes Console Export as code as a route to definitions with a lockfile that ant apply can subsequently update.
The evidence does not compare these approaches on effort, reliability, cost or feature coverage. No third-party resource-management tools are assessed.
evidence
The evidence is the complete Claude documentation page at [https://platform.claude.com/docs/en/cli-sdks-libraries/cli/apply.md]. It supplies configuration examples, illustrative terminal output, lockfile structure, command flags and a GitHub Actions workflow.
The claims about behavior are documentation claims. No commands, API calls or CI jobs were executed, and the sample output is not an independent test result. Linked API references, authentication guides, repositories and action implementations were not assessed.
Access & freshness
costs
The page supplies no prices, free allowances or billing rules for the CLI, managed agents, environments, memory stores, deployments or vaults. Costs are unknown.
Its scheduled deployment example starts recurring sessions, but the page provides no usage or billing calculation. GitHub Actions costs and any charges associated with running the configured resources are also not established.
rights
The supplied page contains no explicit license or redistribution grant for its documentation or examples. It also does not establish the CLI's license or the terms governing use of the hosted services.
GitHub skill references describe how directories are retrieved and pinned, not what reuse rights those directories grant. Rights for individual skills and other linked materials remain unknown.
freshness
The page was captured on November 15, 2026 at 08:33:56 UTC. It does not state a publication date or last-updated date, so its maintenance history and changes after capture are unknown.
The explicit CLI minimum versions provide compatibility guidance for the described features. They do not establish the current CLI release, continued availability of example model identifiers or present account access.
actions
Begin with one small agent definition and inspect the detailed dry-run plan before applying it. Confirm the target organization and workspace, preserve the resulting lockfile, and review how future edits appear as updates.
Before enabling CI, include the project directory in commands so new files are considered, serialize applies and retain lockfile changes after failures. Inspect dry-run output rather than treating exit code 0 as approval. Resolve service costs and relevant usage terms separately, and understand the consequences of --force and --prune before using them.
