I was using Claude Code wrong... The Ultimate Workflow

AI JasonAbout 5 min readJul 24, 2025Watch original
THE SUMMARYAI-generated

Cloud Code Deep Dive: Workflow, Customization, and Advanced Tips

Key Concepts: Cloud Code, Cursor, Spec-Driven Development, Hooks, Custom Commands, Kimi K2, AI Coding Agents, Task Tool, To-Do Tool, System Prompt, Token Consumption, Bash Mode, Memory Mode.

1. Introduction to Cloud Code Workflow

The speaker details their transition to using Cloud Code and its impact on coding efficiency. They outline a workflow centered around spec-driven development, leveraging features like hooks and custom commands.

2. Learning to Code Effectively: HubSpot's Free Ebook

  • Resource: A free ebook by Google's principal analytics lead and data scientist is recommended for beginners.
  • Content: The ebook covers fundamentals, choosing the right language, best practices for prompting, debugging, and optimizing code.
  • Roadmap: It provides a detailed roadmap for mastering Python in four months.
  • GPT Integration: Includes a custom GPT with core knowledge of latest packages and learning resources.
  • Link: Available for free download (link in description).

3. Setting Up and Initializing Cloud Code

  • Installation: Install the Cloud Code extension for IDEs like Cursor, VS Code, or Wingsurf.
  • Integration: The extension deeply integrates into the current IDE, detecting the file and selected lines.
  • Initialization: Run the init command to allow Cloud Code to analyze the codebase and dependencies.
  • Permissions: Cloud Code requests permissions for certain commands. The speaker initially used "always auto approve" but later advises against skipping permissions entirely.
  • Skipping Permissions: The --dangerously-skip-permissions flag bypasses permission requests, but is not recommended.

4. Understanding the Cloud MD File (Cursor Rules)

  • Purpose: After scanning, Cloud Code creates a cloud.md file, which functions similarly to Cursor rules.
  • Content: The file automatically detects the tech stack, build commands, architecture, and project structure.
  • Functionality: Every line of text defined in cloud.md is appended to the system message.
  • Example Prompt: The speaker uses a "plan and review mode" prompt, instructing Cloud Code to create a plan before starting work and save it to docloud/task/taskname.md.

5. Spec-Driven Development with Cloud Code

  • Plan Mode: Using shift + tab twice enters plan mode, which uses a special system prompt and limits tool access.
  • Task Breakdown: The plan is broken down into different tasks, with Cloud Code updating the plan as it progresses.
  • Amazon's Kro Workflow: This approach is compared to Amazon's Kro workflow (spec-driven development), which emphasizes requirements and architecture design.

6. Utilizing the Task Tool for Parallel Processing

  • Task Tool Function: Cloud Code uses a "task tool" to launch sub-agents for planning and research.
  • Tool Access: These sub-agents have access to most tools (command line, file operations, web search) except planning-related tools.
  • Token Optimization: Only the summary of findings from the sub-agent is sent back to the parent agent, saving token consumption.
  • Parallel Agents: Cloud Code can be prompted to use the task tool to set up multiple parallel agents for different tasks.

7. Managing Tasks with the To-Do Tool

  • Functionality: The "to-do" tool creates and manages structured task lists with content, ID, priority, and status.
  • Implementation: The entropy team implemented a simple but effective system for managing to-do lists.

8. Customizing Cloud Code with Hooks

  • Hooks Definition: Hooks allow defining programmatic actions that occur when Cloud Code takes certain actions.
  • Stop Hook Example: A basic example is a "stop hook" that plays a system sound when a task is completed.
  • Hook Triggers: Hooks can be triggered before/after tool usage, on new messages, during conversation history compression, or when a sub-agent finishes a task.
  • Post To Use Hook Example: A more sophisticated example is a "post to use" hook that runs a Python script (type_check.py) after Cloud Code modifies or creates files.
  • Type Checking: The type_check.py script checks TypeScript files for errors and sends feedback to Cloud Code if errors are found.
  • Input Data: Each hook comes with a list of different inputs that can be used. For example, the "post to use" input provides data about the tool used, the input agent generated, and the output of the tool.
  • Error Handling: The Python script uses print to send feedback to Cloud Code, with specific exit codes indicating blocking errors.
  • Potential Applications: Hooks can be used for code review, test generation, and documentation updates.

9. Custom Commands for Enhanced Functionality

  • Custom Commands: Cloud Code allows defining custom slash commands.
  • Command Creation: Create a commands folder under cloud and define commands in .md files.
  • Command Execution: Typing / and searching for the command will execute the defined action.
  • Supercloud Package: The speaker recommends the "supercloud" package, which provides pre-defined commands for code analysis, workflow management, and troubleshooting.
  • Installation: Requires setting up a Python project with uv init, adding the package with uv add supercloud, and running uv run python supercloud install.
  • Command Location: All the files will be saved to your docloud settings at user level.

10. Useful Features and Shortcuts

  • /resume: Jumps back to a past conversation history.
  • /export: Copies the entire conversation history.
  • Double Tap Exit: Reverts back to a past point in the conversation history.
  • CC Undo: A package that automatically detects and allows rolling back changes made by Cloud Code.
  • Acceleration Mark (!): Activates bash mode for running commands directly within Cloud Code.
  • Hashtag (#): Activates memory mode for saving information for Cloud Code to remember.

11. Connecting to the Kimi K2 Model

  • Kimi K2: An open-source coding model with similar performance to Cloud 3.5/4 but at a lower cost.
  • Setup: Define the Kimi API key and base URL in the zshrc file (or equivalent for other operating systems).
  • Activation: Run kimi in the terminal to open Cloud Code with the Kimi K2 model.
  • Working Directory: Define claw bash maintain per working directory to be one in the zshrc file to make Cloud Code always remember the current working directory.

12. Conclusion and Call to Action

The speaker summarizes their Cloud Code workflow and encourages viewers to join the AI Builder Club for more in-depth learning and resources. They mention upcoming sessions on rebuilding Cloud Code from scratch to understand best practices for building effective AI coding agents.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.