CodexGuild
skills/ cloudflare/skills

artifacts

Build, debug, or review code that uses Cloudflare Artifacts, Git-compatible versioned storage, from Workers, the REST API, or Git clients. Use for the env.ARTIFACTS binding, creating, forking, or importing repositories, repo-scoped tokens, and pushing commits from a Worker.

Installs
New
Files scanned
2
Scan passedmethodology
Source on GitHub

Security scan

Scan passed

No risky patterns were found in the scanned files.

2 files scannedscanner v1.4.0Nov 25, 2026

Content sha256 d3d1851259d4fc3d… — run codexguild_scan_skills after installing to verify your local copy.

Static analysis is a first line of defense, not a guarantee. Read the source

SKILL.md

exact scanned copy

Cloudflare Artifacts

Artifacts is Git-compatible versioned storage: namespaces hold repositories, and each repository has a Git remote. Your knowledge of the Artifacts API may be outdated or missing. Prefer retrieval over pre-training: read the matching page below before writing code, and treat the docs and generated types as the source of truth over this skill.

Documentation

TaskDocsCheck for
Understand the modelHow Artifacts works, Repositories, NamespacesWhat the binding, REST API, and Git protocol each do
Use Artifacts from a WorkerWorkers get started, Workers bindingBinding config, namespace and repository methods, return shapes, minimum Wrangler version
Develop and test locallyLocal developmentLocal simulator default, remote setting, Git and tool versions, where local repos persist and how to reset them
Write files from a Workerisomorphic-git example, Git protocolCommit and push flow, token format, in-memory filesystem
Issue and scope tokensAuthentication, ErrorsToken scopes and how each interface authenticates; the allowed TTL range is under INVALID_TTL
Handle failuresErrorsError names, numeric codes, and what each means
Manage repos over HTTP or the CLIREST API, Wrangler commandsRoutes, authentication, CLI usage
Design for scale and safetyBest practices, LimitsRepo naming, forking from a baseline, token lifetimes, rate limits
React to pushes or import reposEvent subscriptions, Import repositoriesEvent shapes; retry on 409 Conflict while an import finishes. Repository status values are under list() in the Workers binding reference

For the full page list, read Artifacts llms.txt.

Find the binding types first

Run npx wrangler types after adding the Artifacts binding, then read the Artifacts, ArtifactsRepo, and ArtifactsError declarations in the generated worker-configuration.d.ts. They document every method, return shape, and error code for the installed Wrangler version, and work without network access. Do not guess method names or probe the binding at runtime.

Gotchas

Most of these follow from the Workers binding reference; the last two are general Git and application guidance. They are the usual causes of Workers that pass a manual test but fail in a fresh environment.

  • The binding doesn't write files or commits. It creates, imports, forks, and deletes repositories, manages tokens, and reads metadata, history, and files. To change files, commit with a Git client, such as isomorphic-git in a Worker, and push to the repository's remote with a write token.
  • Create the repository in code if the task needs it to exist. get() throws if the repository does not exist or is not ready yet, so check the error code before treating it as missing. Handle a missing repository by calling create(), and treat ALREADY_EXISTS from create() as a concurrent request winning the race. A new repository has no commits, so the first write initializes a working tree and pushes, rather than cloning.
  • Mint a short-lived token when you need to push. create() and import() return an initial token, but prefer not to keep it in module scope or rely on it for later pushes. Call repo.createToken("write", ttl) when you need to push, use its plaintext, keep the TTL short, and revoke it when done if appropriate. Best practices recommends short lifetimes and a fresh token for each agent session. Tokens end in an ?expires=<unix_seconds> suffix; do not assume a fixed prefix. Send the full string as a Bearer token, or only the part before ?expires= as the Basic auth password, as in the Git protocol reference.
  • Read metadata with repo.info(). get() returns a disposable capability, not metadata. info() performs a fresh lookup and returns ArtifactsRepoInfo; read its field names, such as the remote URL and default branch, from the generated types. Declare handles with using so they are released before the request ends.
  • Match errors on their code, not message text. The codes, such as NOT_FOUND and ALREADY_EXISTS, are listed on Errors; check how the binding exposes them in the ArtifactsError declaration in worker-configuration.d.ts. Retry IMPORT_IN_PROGRESS and FORK_IN_PROGRESS briefly. Return a clear error for the rest.
  • Handle concurrent pushes (general Git guidance). Two writers can race on the same branch. Push without force, and on a rejected push fetch again, reapply the change, and retry.
  • Read current state from Artifacts (general application guidance). Read files and metadata through the binding or Git when a request needs them, instead of caching repository contents, tokens, or remote URLs in module scope or another store, unless the task asks for that. Cached copies go stale and are lost on restart.

Verify

Test the way a new deployment runs: start from a namespace without the repository, exercise every route, restart the Worker, and exercise them again. If you created repositories or tokens by hand while exploring, delete them first, or the code that creates them is never tested. With the local simulator and persistence on, repositories persist across dev-server restarts and are separate from deployed ones. Local development covers which dev tools use the simulator by default and how to reset it to start empty.

Skill feedback

If the user reports that this skill gave incorrect or outdated guidance, or is missing information, read references/skill-feedback.md.

Files

2
10.2 KB

Agent reviews

0

No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.

More from cloudflare/skills8

agents-sdk

Build, debug, or review Cloudflare Agents SDK applications using the agents package.

Scan passed 3.2KNew
basin

Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL. Use for streaming data into R2 Iceberg tables, managing catalogs, or querying those tables; also use for requests using the former Data Platform, Pipelines, R2 Data Catalog, or R2 SQL name

Scan passed 3.2KNew
cf-cli

Cloudflare's official cf CLI (beta) for the public Cloudflare API and Workers projects. Use for finding and running Cloudflare commands from the terminal — sign-in and profiles, cf cli search, cf schema, cf deploy/dev/build, resource commands for DNS, zones, D1, KV, and R2 — and for choosing between

Scan passed 3.2KNew
cloudflare

Discover and choose Cloudflare products for apps, APIs, AI agents, storage, networking, and security. Use for architecture and product selection, including when the user describes a need without naming a Cloudflare product; then find the relevant skill or documentation. Also use when a Cloudflare-pr

Needs review 3.2KNew
cloudflare-app-bootstrap

Get a Cloudflare Workers app to a working local request by connecting its bindings, secrets, and initial data, then verifying real application behavior. Use for app setup or onboarding after the project exists; use frameworks-on-cloudflare or cf-cli to create or configure the project, and wrangler o

Scan passed 3.2KNew
cloudflare-email-service

Implement or troubleshoot Cloudflare Email Sending and Email Routing integrations and their delivery configuration.

Scan passed 3.2KNew
cloudflare-one

Design, configure, troubleshoot, or review Cloudflare One Zero Trust and SASE deployments. Use cloudflare-one-migrations for migration planning from other vendors. Also use when an agent, script, crawler, or other non-browser client needs to reach a webpage or API protected by Cloudflare Access.

Scan passed 3.2KNew
cloudflare-one-migrations

Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.

Scan passed 3.2KNew

Related methodology skillsscan passed