A Claude Code Case Study

From Zero to Rain

How a complete macOS audio synthesis application was built in 13 minutes using Claude Code with --dangerously-skip-permissions + Plan Mode

SwiftUI AVFoundation Audio Synthesis Real-time DSP
13
Minutes Total
12
Files Created
~800
Lines of Code
1
Human Prompt
Human Interaction What the human actually did
1

Started Claude Code & Entered Plan Mode

Ran yoloclaude (alias for claude --dangerously-skip-permissions), then pressed Shift+Tab three times to enter Plan Mode. Then typed a detailed description of the rain synthesizer app requirements (~2-3 minutes to compose).

14:47:34 UTC

2

Approved the Plan

Reviewed Claude's implementation plan and clicked "Approve" to exit Plan Mode and begin implementation. Single click.

14:52:53 UTC

3

Watched & Waited

Observed Claude autonomously write 12 files, run the build, encounter errors, fix them, and rebuild successfully. No intervention needed.

14:52:53 - 14:59:47 UTC (~7 minutes)

Total Human Effort: ~3 minutes writing the prompt + 1 click to approve the plan

The --dangerously-skip-permissions flag made the single-click approval possible

Understanding the Workflow

This page documents a real coding session where Claude Code built a complete macOS application. The key to this workflow is a powerful command combination:

$ yoloclaude # aliased to: claude --dangerously-skip-permissions

--dangerously-skip-permissions enables fully autonomous execution after plan approval.

Then press Shift+Tab three times to enter Plan Mode before sending the prompt.

Human

What Humans Do

  • • Start Claude with the right flags
  • • Write detailed requirements
  • • Review and approve the plan
  • • Watch it build (optional)
  • • Test the final result
Autonomous

What Claude Does

  • • Explore existing codebase
  • • Design architecture
  • • Write implementation plan
  • • Create all source files
  • • Build, debug, and fix errors

Key Takeaways

Human Action

The Initial Prompt

The human started Claude Code in Plan Mode and entered this detailed prompt. Notice how it specifies the technical requirements clearly but leaves implementation details to Claude:

H
Human 14:47:34 UTC

Create a macOS app written in Swift, using SwiftUI and AVFoundation, that synthesizes rain sounds.

The audio engine should manage a number of raindrops. The raindrops should be created with some minor randomization of timing but the average rate should be controllable using a slider in the user-interface so that average rates between 20 per minute and 4000 per minute are possible.

Each raindrop should be synthesised using AVAudioSourceNode and the generation should involve a separate "impact" sound, followed by a small delay, followed by an exponentially decaying "bubble" oscillation. The user interface should include sliders to adjust the impact amplitude, the delay duration, the bubble amplitude, the bubble frequency and the bubble decay rate. As with the timing, each of these parameters should have minor randomisation so the drops do not all sound mechanically identical. As the sliders are adjusted, a SwiftUI Chart should show a sample waveform for the raindrop based on the current settings.

To fill out the overall "rain" soundscape, the audio engine should also implement pink, brown and white noise generators whose amplitude can also be controlled via sliders in the user interface.

I used Xcode to create the template project here, so it should build and run properly. But it's just the basic from Xcode, so use that as the basis. Don't bother writing any tests though. Right now we want to focus just on the functionality.

The Complete Timeline

Human actions vs. Autonomous Claude actions

Human Action Required human input
Autonomous Claude worked independently
Human Action #1

14:47:34 UTC

Started with the Magic Command

The human started Claude Code with a special alias and entered Plan Mode manually:

$ yoloclaude

# aliased to: claude --dangerously-skip-permissions

--dangerously-skip-permissions This is the key. After plan approval, Claude can execute any tool without asking permission. This enabled the fully autonomous 7-minute implementation.
Shift+Tab ×3 Pressed three times to enter Plan Mode. Forces Claude to research and design before writing any code. Creates a checkpoint for human approval.

Without --dangerously-skip-permissions, Claude would have asked for permission before every file write, every bash command, every edit. The human would have clicked "approve" 50+ times instead of once.

Autonomous: Exploration

14:47:43 - 14:48:31 (48 seconds)

Claude Explored the Codebase

Claude immediately recognized this was a complex task. It launched an Explore agent to understand the existing project structure - all without any human input.

Task Tool Launching Explore Agent

"Explore the Sigh macOS app project structure. I need to understand what files exist..."

What the Explore Agent Found:

  • • Fresh Xcode 16 project with basic SwiftUI template
  • • macOS 26.0 deployment target
  • • App Sandbox enabled (security)
  • • No existing audio code - completely blank slate
  • • Bundle ID: com.saygoodnight.Sigh
Autonomous: Architecture Design

14:48:31 - 14:51:54 (3 minutes 23 seconds)

Claude Designed the Solution

With the codebase understood, Claude launched a Plan agent to design a comprehensive architecture. This is where the real thinking happened - completely autonomously.

Task Tool Launching Plan Agent

"Design a comprehensive implementation plan for a macOS rain sound synthesizer..."

The Plan Agent Designed:

File Structure
Sigh/
├── Audio/
│   ├── AudioEngine.swift
│   ├── RaindropSynthesizer.swift
│   ├── RaindropScheduler.swift
│   ├── NoiseGenerator.swift
│   └── AudioConstants.swift
├── Models/
│   └── RaindropParameters.swift
├── ViewModels/
│   └── SynthesizerViewModel.swift
└── Views/
    ├── RaindropControlsView.swift
    ├── NoiseControlsView.swift
    ├── WaveformChartView.swift
    └── LabeledSlider.swift
Key Decisions
  • • Pre-allocated pool of 64 raindrops
  • • Voss-McCartney algorithm for pink noise
  • • Atomic operations for thread safety
  • • Observable pattern for UI binding
  • • XORShift for fast random generation
The Raindrop Synthesis Formula
raindrop(t) = impact(t) + bubble(t - delay)

impact(t) = A_impact * e^(-t/tau_impact) * noise(t)
bubble(t) = A_bubble * e^(-t/tau_bubble) * sin(2*pi*f_bubble*t)
Human Action #2

14:52:53 UTC

Approved the Plan

Claude called ExitPlanMode and presented the implementation plan for approval. The human reviewed the plan and clicked "Approve" to begin implementation.

Plan written to: ~/.claude/plans/delegated-jingling-haven.md

← Human clicked this

Why This Matters: Plan Mode is the checkpoint where humans review Claude's approach before any code is written. This single approval unlocked the entire autonomous implementation that followed.

Autonomous: Implementation

14:52:53 - 14:58:18 (5 minutes 25 seconds)

Claude Wrote All the Code

With the plan approved, Claude began fully autonomous implementation. It created a todo list with 13 items and systematically worked through each one - no human input required.

Todo List Progress (All Autonomous)

Create Audio/AudioConstants.swift 14:53:40
Create Models/RaindropParameters.swift 14:54:00
Create Audio/RaindropSynthesizer.swift 14:54:37
Create Audio/RaindropScheduler.swift 14:55:09
Create Audio/NoiseGenerator.swift 14:55:43
Create Audio/AudioEngine.swift 14:56:07
Create ViewModels/SynthesizerViewModel.swift 14:56:38
Create Views/LabeledSlider.swift 14:56:58
Create Views/WaveformChartView.swift 14:57:16
Create Views/RaindropControlsView.swift 14:57:36
Create Views/NoiseControlsView.swift 14:57:53
Update ContentView.swift 14:58:18

Sample Code: Raindrop Synthesis

func generateSample() -> Float {
    var output: Float = 0.0

    // Impact phase - exponentially decaying noise
    let impactDurationSamples: UInt32 = 50
    if sampleIndex < delaySamples + impactDurationSamples {
        noiseState ^= noiseState << 13
        noiseState ^= noiseState >> 17
        noiseState ^= noiseState << 5
        let noise = Float(Int32(bitPattern: noiseState)) / Float(Int32.max)
        output += impactAmplitude * currentImpactEnvelope * noise
        currentImpactEnvelope *= impactDecayRate
    }

    // Bubble phase - exponentially decaying sine wave
    if sampleIndex >= delaySamples {
        output += bubbleAmplitude * currentBubbleEnvelope * sin(bubblePhase)
        bubblePhase += bubblePhaseIncrement
        if bubblePhase > 2.0 * .pi {
            bubblePhase -= 2.0 * .pi
        }
        currentBubbleEnvelope *= bubbleDecayRate
    }

    sampleIndex += 1
    return output
}
Autonomous: Build & Debug

14:58:18 - 14:59:47 (1 minute 29 seconds)

Claude Fixed Its Own Errors

The first build attempt failed with two errors. Without any human help, Claude read the error messages, identified the issues, fixed them, and rebuilt successfully.

Error 1: Array Swap Access
error: overlapping accesses to 'dropPool',
but modification requires exclusive access
Auto-fixed Changed swap(&dropPool[i], &dropPool[j]) to dropPool.swapAt(i, j)
Error 2: Actor Isolation
error: main actor-isolated static method
cannot be called from outside of the actor
Auto-fixed Added nonisolated keyword to static helper methods

BUILD SUCCEEDED

At 14:59:47, the app compiled successfully. Total autonomous work: ~7 minutes from plan approval to working app.

Human Action #3

After 14:59:47

Tested the Application

The human ran the built application to verify it worked as specified. The rain synthesizer played audio, all sliders functioned, and the waveform chart updated in real-time.

Session Summary

Human Total Effort
  • ~3 minutes writing prompt
  • 1 click to approve plan
  • Watched progress for ~7 min
Claude Autonomous Work
  • Explored codebase (48 sec)
  • Designed architecture (3:23)
  • Wrote 12 files (5:25)
  • Fixed 2 build errors (1:29)

Tools Claude Used Autonomously

Task Sub-Agents

Launches specialized agents for complex work. Used Explore agent to analyze the codebase and Plan agent to design the architecture.

Write File Creation

Creates new files with specified content. Used 12 times to create all the Swift source files and the implementation plan.

TodoWrite Progress Tracking

Maintains a visible todo list that updates in real-time. Shows what Claude is working on and what's completed.

Bash Commands

Executes shell commands. Used to create directories, run xcodebuild, and check for errors.

Read File Reading

Reads file contents for analysis. Used to examine existing code and understand what needed to be modified.

Edit Code Fixes

Makes targeted edits to existing files. Used twice to fix the compilation errors during the debugging phase.

The Final Application

Sigh - Rain Sound Synthesizer

A fully functional macOS application that generates realistic rain sounds through procedural audio synthesis. Features include:

  • Raindrop rate: 20-4000 drops/minute
  • Impact + delay + bubble synthesis
  • Parameter randomization (+/- 15%)
  • Real-time waveform preview
  • Pink noise (Voss-McCartney)
  • Brown noise (integrated white)
  • White noise (XORShift)
  • Play/pause control

Files Created

Sigh/
├── Audio/
│   ├── AudioConstants.swift      (45 lines)
│   ├── AudioEngine.swift         (65 lines)
│   ├── NoiseGenerator.swift      (82 lines)
│   ├── RaindropScheduler.swift   (95 lines)
│   └── RaindropSynthesizer.swift (100 lines)
├── Models/
│   └── RaindropParameters.swift  (25 lines)
├── ViewModels/
│   └── SynthesizerViewModel.swift (160 lines)
├── Views/
│   ├── ContentView.swift         (60 lines)
│   ├── LabeledSlider.swift       (35 lines)
│   ├── NoiseControlsView.swift   (30 lines)
│   ├── RaindropControlsView.swift (50 lines)
│   └── WaveformChartView.swift   (25 lines)
└── SighApp.swift                 (existing)

Tips for Using Claude Code

Do This

  • ✓ Use --dangerously-skip-permissions + Plan Mode
  • ✓ Give detailed requirements upfront
  • ✓ Review plans carefully before approving
  • ✓ Watch the todo list for progress
  • ✓ Let Claude debug its own errors

Avoid This

  • ✗ Interrupting mid-implementation
  • ✗ Vague or incomplete requirements
  • ✗ Skipping the planning phase
  • ✗ Not providing context about existing code
  • ✗ Expecting perfection on first attempt