do-pattern-implementer

do-pattern-implementer is an agent for Claude Code from secondsky/claude-skills. It costs 41 tokens per session (5,201 once invoked), scanned A, original, MIT.

An automated implementation agent for Cloudflare Durable Objects, stateful server-side components used for coordination and real-time applications. It reviews existing code and adds specified production patterns for reliability, performance, or maintenance.

In plain words
What is it for?
Use it to add time-to-live cleanup, gradual deployments, RPC metadata, WebSocket improvements, and other requested production patterns.
Why use it?
A working Durable Object may still need cleanup, deployment, metadata, or performance improvements before production use. The agent applies those changes to an existing implementation.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is # ./scripts/check-metrics.sh || { echo "Rollback!"; wrangler versions deploy v1.0.0@100%; exit 1; }.

Part of the cloudflare-durable-objects plugin — 1 skill, 5 commands, 3 agents shipped together

Good fit Use it to add time-to-live cleanup, gradual deployments, RPC metadata, WebSocket improvements, and other requested production patterns.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills
agentmods
npx agentmods add agents/secondsky/claude-skills/do-pattern-implementer

Made for: Claude Code.

Or install cloudflare-durable-objects, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for do-pattern-implementer

README.md
[![agentmods](https://agentmods.dev/badge/agents/secondsky/claude-skills/do-pattern-implementer/github.svg)](https://agentmods.dev/agents/secondsky/claude-skills/do-pattern-implementer)
Your own site
<a href="https://agentmods.dev/agents/secondsky/claude-skills/do-pattern-implementer"><img src="https://agentmods.dev/badge/agents/secondsky/claude-skills/do-pattern-implementer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for do-pattern-implementer

Your own site · 80×15
<a href="https://agentmods.dev/agents/secondsky/claude-skills/do-pattern-implementer"><img src="https://agentmods.dev/badge/agents/secondsky/claude-skills/do-pattern-implementer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,201 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.05201
Opus 5.5 $0.00016 $0.02080
Sonnet 5.5 $0.00008 $0.01040
Haiku 4.5 $0.00004 $0.00520

Measured 1mo ago against content hash 87c2fc292532, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

do-pattern-implementer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request: Request, env: Env): Promise<Response> {
plugins/cloudflare-durable-objects/agents/do-pattern-implementer.md · 867 lines

How it starts

The opening of the file, as written. The whole thing — 867 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Durable Objects Pattern Implementer Agent

Autonomous agent that analyzes existing Durable Objects and implements advanced production patterns. Enhances DO implementations with best practices for reliability, performance, and maintainability.

Trigger Conditions

This agent should be used when:

  • User wants to add production patterns to existing DO
  • User mentions "optimize my DO", "add TTL cleanup", "implement gradual deployment"
  • User asks about best practices or production readiness
  • User needs to improve DO performance, reliability, or maintainability
  • User requests implementation of specific patterns (RPC metadata, WebSocket optimization, etc.)

Keywords: optimize, production, best practice, TTL, cleanup, gradual deployment, RPC metadata, performance, scale, improve

Implementation Process

Phase 1: Analysis

Analyze existing DO implementation to understand current state:

Step 1.1: Locate DO Classes

Find all Durable Object classes in project:

# Find DO class files
grep -r "extends DurableObject" src/ --include="*.ts" -l

# Extract class names
grep -r "export class.*extends DurableObject" src/ --include="*.ts" -o | \
  sed 's/export class \(.*\) extends DurableObject/\1/'

Store:

  • Class names
  • File paths
  • Export statements
Step 1.2: Read DO Implementation

For each DO class, read complete implementation:

cat src/MyDO.ts

Extract:

  • Storage type (SQL vs KV)
  • Methods implemented
  • WebSocket usage (if any)
  • Alarm handler (if any)
  • Constructor complexity
Step 1.3: Detect Current Patterns

Identify what patterns are already implemented:

Pattern Detection Checklist:

# TTL Cleanup
grep -q "setAlarm.*cleanup\|DELETE.*WHERE.*expires" src/MyDO.ts
TTL_IMPLEMENTED=$?

# RPC Metadata
grep -q "RpcTarget" src/
RPC_METADATA=$?

# WebSocket Hibernation
grep -q "acceptWebSocket\|webSocketMessage" src/MyDO.ts
WEBSOCKET=$?

# Performance Optimization
grep -q "CREATE INDEX\|PRAGMA" src/MyDO.ts
INDEXES=$?

# Gradual Deployment
grep -q "version.*split\|canary" wrangler.jsonc
GRADUAL_DEPLOY=$?

Read the full file on GitHub · 867 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 867 lines · 41 tokens per session scan A 87c2fc292532

Subscribe to this mod's changes

do-pattern-implementer is an agent published in the GitHub repository secondsky/claude-skills (231 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 5,201 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.