---
title: "Durable Objects"
type: skill
id: "cloudflare-skills/cloudflare-developer/durable-objects"
category: "Engineering"
publisher: "Cloudflare"
license: "Apache-2.0"
source: "https://github.com/cloudflare/skills/tree/1f2cd0a"
canonical: "https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/durable-objects"
open_in_pho: "https://pho.chat/customize?item=cloudflare-skills%2Fcloudflare-developer%2Fdurable-objects&utm_source=labs&utm_medium=skill-page&utm_campaign=skills-library"
---

# Durable Objects

Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

Source: Cloudflare (Apache 2.0), copied at a pinned commit. Free to use. Part of the Phở Skills library (https://labs.pho.chat/en/skills).
Skill set: Cloudflare developer platform (https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer.md).

## What it covers
- Retrieval Sources
- When to Use
- Reference Documentation
- Core Principles
  - Use Durable Objects For
  - Do NOT Use For
- Quick Reference
  - Wrangler Configuration
  - Basic Durable Object Pattern
- Critical Rules
- Authorization
- Anti-Patterns (NEVER)
- Stub Creation
- Storage Operations
- Alarms
- Testing
- Skill feedback

## Other skills in this set
- [Discover and build with Cloudflare](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/cloudflare.md): 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…
- [Workers best practices](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/workers-best-practices.md): Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.
- [Wrangler CLI](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/wrangler.md): Run or troubleshoot Wrangler CLI commands in projects that have a wrangler.jsonc, wrangler.json, or wrangler.toml file, including local development, Previews, deployment, and resource management…
- [Cloudflare CLI (cf)](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/cf-cli.md): 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…
- [Cloudflare Agents SDK](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/agents-sdk.md): Build, debug, or review Cloudflare Agents SDK applications using the agents package.
- [Next.js on Cloudflare](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/nextjs-on-cloudflare.md): Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext. Use when starting a Next.js project on Cloudflare, moving an existing app to Workers, choosing between vinext and OpenNext…
- [Web Performance Audit](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/web-perf.md): Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.
- [Workers profiling](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/workers-profiling.md): Profile or debug CPU usage and memory allocation in deployed Cloudflare Workers and Durable Objects. Then use this information to optimize your code.
- [Cloudflare Email Service](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/cloudflare-email-service.md): Implement or troubleshoot Cloudflare Email Sending and Email Routing integrations and their delivery configuration.
- [Cloudflare One](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/cloudflare-one.md): Design, configure, troubleshoot, or review Cloudflare One Zero Trust and SASE deployments. Use cloudflare-one-migrations for migration planning from other vendors.
- [Cloudflare One Migrations](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/cloudflare-one-migrations.md): Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.
- [Gateway Workers](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/gateway-workers.md): Build, debug, or review Cloudflare Workers invoked by the Forward action in Gateway HTTP policies, including the GatewayMiddleware entrypoint, Gateway types, context, and continuation.
- [Sandbox SDK — stable package](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/sandbox-stable.md): Build or maintain Cloudflare Sandbox apps on the stable @cloudflare/sandbox package. Use sandbox-next for preview apps and sandbox-migrate-to-next for stable-to-preview migrations.
- [Sandbox SDK — @next (1.0 preview)](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/sandbox-next.md): Build or maintain Cloudflare Sandbox apps on @cloudflare/sandbox@next (SDK 1.0 preview). Use sandbox-migrate-to-next when porting a stable app.
- [Migrate stable → Sandbox SDK 1.0 preview (@next)](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/sandbox-migrate-to-next.md): Migrate Cloudflare Sandbox apps from stable @cloudflare/sandbox to @cloudflare/sandbox@next (SDK 1.0 preview). Use sandbox-next for apps already on the preview.
- [Cloudflare Basin](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/basin.md): 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…
- [Cloudflare K2](https://labs.pho.chat/en/skills/cloudflare-skills/cloudflare-developer/k2.md): Build and troubleshoot Cloudflare K2 or K2 Streams durable logs. Use for stream setup, producing from Workers or HTTP, configuring retention and inputs, and consuming through subscriptions.

## Use it
- In Phở: open https://pho.chat/customize?item=cloudflare-skills%2Fcloudflare-developer%2Fdurable-objects&utm_source=labs&utm_medium=skill-page&utm_campaign=skills-library and press Try, or add it so Phở loads it whenever a request matches. Phở works with your own API key (OpenAI, Anthropic, Google and others).
- Full instructions (original SKILL.md, unchanged): https://labs.pho.chat/skills/raw/cloudflare-skills/cloudflare-developer/skills/durable-objects/SKILL.md
- Original files: https://github.com/cloudflare/skills/tree/1f2cd0a (Apache 2.0).
- Full machine-readable index: https://labs.pho.chat/skills.json
