Unlocking AI Superpowers: A Workflow for AI-Assisted Coding with Cloud Code and GitHub
Over the past few weeks, I have been developing a new web app using an AI-assisted coding workflow that leverages Cloud Code and GitHub. This approach has truly unlocked new superpowers in my development process. In this post, I’ll share the workflow I use, why it works, and dive into the details of each phase: planning, creating, testing, and deploying code with AI assistance.
The High-Level AI Coding Workflow
At its core, my workflow follows a simple cycle:
- Plan: I create GitHub issues that define the work to be done. Cloud Code uses detailed slash commands to process these issues, breaking down large tasks into small, atomic steps using scratch pads.
- Create: Claude Code (the AI assistant) writes the code based on the plan, commits the changes, and opens a pull request (PR).
- Test: Testing happens in two ways — running automated test suites and using Puppeteer to simulate browser interactions for UI changes.
- Deploy: After tests pass, the PR is reviewed and merged, triggering continuous integration (CI) workflows and deployment.
Once an issue is completed and merged, I clear the AI’s context window to start fresh on the next issue, keeping the process clean and efficient.
Why Use a Workflow Like This?
Writing code is just one part of the software development life cycle (SDLC), which traditionally follows the phases of plan, create, test, and deploy. AI coding assistants like Claude Code excel when integrated into a well-defined workflow that mirrors these phases.
My workflow is heavily inspired by GitHub Flow, a lightweight branching model designed for small teams—which, in this case, is one human developer plus one AI assistant. This approach ensures that AI-generated code is managed, reviewed, and deployed systematically, reducing errors and maintaining code quality.
Phase 1: Creating and Refining GitHub Issues
The process begins with well-crafted GitHub issues outlining precise, granular tasks. Initially, I used dictation tools and Claude to convert high-level ideas into a requirements document, then generated GitHub issues from there.
Key insight: The quality of issues directly impacts AI performance. Early on, I learned that vague or large issues led to suboptimal results. Breaking down work into very specific, atomic issues made it easier for Claude Code to produce accurate and reliable code. This phase requires human attention, acting much like an engineering manager—refining specs, prioritizing tasks, and clarifying requirements.
Phase 2: Setting Up Your Foundation
Before rapid development can begin, you need a solid foundation:
- Test Suite & Continuous Integration: I set up automated tests and CI using GitHub Actions, ensuring that tests run with every commit Claude makes.
- Puppeteer for UI Testing: Puppeteer allows Claude to interact with the app’s UI in a browser, simulating clicks and form submissions to verify front-end changes.
- GitHub CLI: Installing the GitHub CLI enables Cloud Code to interact programmatically with GitHub, handling issues, commits, and PRs.
This setup ensures that AI-generated code is continuously validated, reducing bugs and maintaining stability.
Phase 3: Planning with Custom Slash Commands
The heart of the workflow is a custom slash command I created for Cloud Code to process issues. This command breaks down into four parts: plan, create code, test, and deploy.
- The planning stage is the most critical and involved. Claude Code uses the GitHub CLI to fetch issue details and searches previous work and pull requests to avoid duplication.
- I leverage “think harder” prompt techniques to encourage the AI to deeply analyze the task and break it into manageable subtasks documented in scratch pads.
- This detailed planning guides the AI’s code generation and testing, improving accuracy and relevance.
Phase 4: Creating, Testing, and Deploying Code
Once the plan is ready, Claude Code writes the code and commits changes directly to a feature branch. Then:
- The test suite runs automatically via CI.
- Puppeteer performs UI tests if needed.
- Claude opens a pull request for review.
Human Review & AI Collaboration
While Claude can handle commits and PR creation, human oversight remains essential. I read PRs, leave comments, and sometimes use another custom slash command to have Claude review the PR in the style of coding experts like Sandy Mets, which helps identify maintainability improvements and catch subtle issues.
There have been moments when I trusted Claude to handle everything and merged PRs after tests passed, but I remain cautious. Good tests are my safety net, catching regressions and ensuring that new features don’t break existing functionality.
Managing Context and Workflow Efficiency
After merging a PR, I use a /clear command to wipe Claude’s context window. This “cold start” approach means each issue must be self-contained, with all necessary information included. It keeps token usage efficient and reduces the risk of confusion from lingering context.
Exploring GitHub Actions and Parallel Work with Work Trees
Anthropic recently introduced Claude integration via GitHub Actions, letting you tag Claude directly within GitHub to handle small tasks like copy edits or minor tweaks. However, for large feature development, I prefer using the console version of Claude Code, which gives better control and cost efficiency.
Work Trees for Parallel AI Agents
Work trees allow running multiple instances of Claude on different branches in parallel—like multitabling in online poker. Each instance works independently in its own directory, enabling concurrent feature development.
In practice, I found this approach a bit cumbersome due to repeated permission approvals and extra management overhead. For my current project size, a single AI instance handling one issue at a time works best.
Final Thoughts: Finding Your Balance Between Human and AI Roles
This workflow highlights the complementary roles of human developers and AI assistants:
- Humans: Spend significant effort in planning, refining issues, and reviewing code to maintain quality and direction.
- AI: Handles code creation, testing, committing, and even PR reviews, accelerating development speed.
Finding the right balance depends on your project size, complexity, and trust in AI-generated code. With a strong foundation and clear processes, you can empower AI to take on the heavy lifting while you focus on high-level decisions and quality assurance.
Want to Learn More?
If you found this workflow interesting, you might also enjoy my video on Claude Code Pro Tips, where I share deeper insights and practical advice for working effectively with AI coding assistants.
Harnessing AI coding assistants like Claude Code within a structured workflow can transform how you build software—unlocking new efficiencies and superpowers you never thought possible. Give this approach a try, and see how AI can become your ultimate coding partner.