Cloudflare's AI creates production security library, details human-AI collaboration.
Cloudflare details how Claude AI coded 95% of a critical security library, showcasing unprecedented human-AI software collaboration.
June 10, 2025

A significant development in AI-assisted software engineering has emerged as Cloudflare, a major web performance and security company, revealed that a substantial portion of a new, production-ready software library was coded by Anthropic's AI model, Claude.[1][2] The project, an OAuth 2.1 provider library for Cloudflare Workers, was spearheaded by Cloudflare lead engineer Kenton Varda, who, despite initial skepticism about AI's coding capabilities, found the AI's output surprisingly effective.[1][2][3] In a move lauded for its transparency, Cloudflare has made the entire development process, including the specific prompts given to Claude and the subsequent AI-generated code, available through the project's open-source commit history on GitHub.[1][4][2]
The library, built using TypeScript/JavaScript, implements the OAuth 2.1 standard, a critical security component for authentication.[1] Varda, who described himself as a former AI skeptic, embarked on the project expecting to highlight the limitations of AI in generating complex, reliable code.[2][3] However, he stated that he "ended up proving myself wrong" as Claude, specifically identified in reports as Claude Sonnet 3.7, generated the vast majority of the functional code for the library.[1][4] This achievement is notable as it represents one of the first major instances of a security-sensitive library being primarily built with AI assistance for a production environment.[1] The development, which Varda estimated would have taken weeks or months if coded manually, was completed in a matter of days with Claude's help, at a remarkably low computational cost.[1][3]
A key aspect of this project is the public documentation of the human-AI interaction. By including the prompts within the git commit messages, Cloudflare has provided a detailed record of how engineers guided Claude, refined its output, and intervened when necessary.[4] Analysis of these commits reveals an iterative process. For instance, an initial prompt included a substantial block of code demonstrating how the library would be used, a "prompt by example" technique designed to minimize ambiguity regarding method signatures and practical considerations.[4] This approach, as noted by observers, is akin to "describing a dance and demonstrating the choreography."[4] The commit history also showcases the back-and-forth nature of the collaboration, with engineers providing feedback like, "You did X, but we should do Y. pls fix," and iterating on Claude's suggestions.[4] This transparency offers a valuable "archaeological record" of human-AI collaboration in software development, transforming git history from a mere record of changes into a record of intent.[4]
Despite the AI's significant contribution, human oversight remained paramount throughout the project.[1][4] Cloudflare emphasized that "Claude’s output was thoroughly reviewed by Cloudflare engineers with careful attention paid to security and compliance with standards." Every line of AI-generated code was meticulously cross-referenced with relevant RFCs (Request for Comments, which are technical and organizational documents for the internet) by security experts experienced with those standards.[1][2][3] This rigorous review process was crucial, as Claude did introduce errors. For example, in one instance, the AI included a "backup" encryption key that could have compromised the end-to-end encryption by making the key available without requiring a token for unwrapping; this was caught and corrected by human reviewers.[5] Other limitations observed included difficulties with debugging complex issues, context retention after multiple iterations, and less effectiveness in novel problem-solving compared to implementing standard patterns.[1] Sometimes, restarting conversations with Claude from scratch proved more efficient than attempting to correct its mistakes within an existing dialogue.[1] Around 95% of the code was AI-generated, but human engineers were essential for guiding the AI, creating prompts, providing strategic direction, and handling tasks like code styling and removing unused methods, which AI models still struggle with.[4] Independent reviews of the released code have noted its generally good structure but also pointed out some potential issues, such as a broad CORS (Cross-Origin Resource Sharing) policy and an incorrect implementation of Basic authentication, underscoring the continued need for expert human scrutiny even with advanced AI assistance.[6]
The Cloudflare-Claude collaboration carries significant implications for the AI industry and the future of software development. It demonstrates that AI can be a powerful accelerator for certain development tasks, especially when guided by experienced engineers.[1] The project serves as a practical case study, highlighting both the current capabilities and limitations of AI in coding.[1] While AI can handle routine implementation, human expertise remains indispensable for architectural design, complex problem-solving, security validation, and overall quality assurance.[1][6] The developer community has had mixed reactions, with some viewing it as a validation of AI's potential to significantly speed up development and others raising concerns about job displacement or a false sense of productivity if the extensive review time negates speed advantages.[1] This project suggests a shift towards a collaborative model where AI acts as a sophisticated tool, augmenting human engineers rather than replacing them entirely.[1] Cloudflare's transparency in this endeavor, by sharing the prompts and the iterative process, provides a valuable learning resource for other organizations exploring AI-assisted development, particularly for security-critical applications.[1][4] As AI models continue to evolve, this project will likely be a reference point for establishing best practices in leveraging AI for software creation, emphasizing a balance between AI-driven generation and meticulous human validation.[1]
Research Queries Used
Claude AI wrote code for Cloudflare developer reveals prompts
Cloudflare AI generated code Claude prompts
Albert Wenger Cloudflare AI coding prompts
Cloudflare Workers AI Gateway Claude prompts
Cloudflare use of Claude AI for code generation
Implications of AI writing production code Cloudflare