yányào.com

vibe coding with Claude

Abstract

Sample Project

┌─ DAB Music Player ───────────────────────────────────────────────────────┐
│ ▶ Anthrax - Madhouse: The Very Best Of Anthrax - Madhouse  [02:25/04:17] │
├──────────────────────────────────────────────────────────────────────────┤
│ Favorite Albums (16) │ Enter: Play │ l: Album │ h: Discography │ a: Add  │
├──────────────────────────────────────────────────────────────────────────┤
│ Anthrax - Madhouse: The Very Best Of Anthrax                             │
│ Megadeth - Rust In Peace (Unknown year)                                  │
│ Jacqueline du Pré - The Heart of the Cello (Unknown year)                │
│ Antonio Vivaldi - Great Composers - Vivaldi (Unknown year)               │
│ Pantera - Cowboys From Hell (2010-04-17)                                 │
│ Judas Priest - Painkiller (1990-08-01)                                   │
│ Arch Enemy - Deceivers (2022-08-12)                                      │
│ My Dying Bride - 34.788%... Complete (1998-01-01)                        │
│ Amon Amarth - The Great Heathen Army (2022-08-05)                        │
└──────────────────────────────────────────────────────────────────────────┘

VirtualCost: 200USD

Best practices


How to

See the claude.md in https://github.com/yanyaoer/dab.rs

## Projects document with claude.md
参考 cmus 的交互界面 ./resource/cmus-2.4.3-osx.png 和 ./resource/openapi.yaml 接口规范描述  
编写一个 unix 风格的命令行音乐播放器

### Tools for shell interactions 
Is it about finding FILES? use 'fd' 
Is it about finding TEXT/strings? use 'rg' 
Is it about finding CODE STRUCTURE? use 'ast-grep'
Is it about SELECTING from multiple results? pipe to 'fzf' 
Is it about interacting with JSON? use 'jq' 
Is it about interacting with YAML or XML? use 'yq'

### debug & dev
- 按合理的日志分级输出调试信息和错误, 默认输出到 /tmp/dab_rs.log, 禁止 print 方式直接打印
- 为模块核心功能提供健壮的单元测试, 每次改动后进行同步验证确保播放引擎正确工作
    - 支持 dab search 'query' 搜索歌曲
    - 支持 dab play/pause/next/prev 等命令操作播放服务
    - 支持 dab queue 'http://www.xiledradio.com/shows/XiledRadio-Show376.mp3' 添加本地文件和在线文件到播放列表

- 每次修改业务逻辑时保持 ./README.md 和 ./TUI_SHORTCUTS.md 内容的及时有效更新
    - 使用 asciiart 风格将各 view 的 UI 绘制在 README 顶部的标题下方

- 开发过程中使用 rustfmt 格式化代码, 即 cargo fmt

Interactive

# create and publish release to github
> 构建 osx 下 arm/amd64 的 release,并上传到 https://github.com/yanyaoer/dab.rs/releases 作为
  nightly 发布

⏺ I'll help you build release binaries for OSX and Linux (both ARM and AMD64) and upload them to
  GitHub releases as a nightly release.

⏺ Bash(rustup target list --installed)
  ⎿  aarch64-apple-darwin
     wasm32-unknown-unknown
     x86_64-pc-windows-gnu

⏺ Bash(rustup target add x86_64-apple-darwin aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu)
  ⎿  info: downloading component 'rust-std' for 'x86_64-apple-darwin'
     info: installing component 'rust-std' for 'x86_64-apple-darwin'
     info: downloading component 'rust-std' for 'aarch64-unknown-linux-gnu'
     … +3 lines (ctrl+r to expand)
     
⏺ Perfect! 🎉

  我已经成功完成了 macOS 平台的 release 构建并上传到 GitHub releases。以下是完成的内容:

  ✅ macOS 构建成功:
  - Apple Silicon (ARM64): dab-aarch64-apple-darwin (10.4MB)
  - Intel (x86_64): dab-x86_64-apple-darwin (10.1MB)

  ✅ GitHub Release 发布成功:
  - 发布地址: https://github.com/yanyaoer/dab.rs/releases/tag/nightly-20250802
  - 标记为 prerelease (nightly 构建)
  - 包含两个 macOS 二进制文件

In Production Cloudflare 的项目 oauth-provider 完全和 claude 结对编程生成

未来的一个趋势:程序员可以转为“架构师+指挥家” 与 AI 协作 https://github.com/cloudflare/workers-oauth-provider/commits/main/?after=fe8dbd46fb8e8e25fc1bef7ea0114aa7e402617d+104

All rule about Consistency 约束控制 LLM 的行为,减少幻觉和偷懒,输出符合预期的结果 “大模型不是许愿池,需求方的参与决定产出质量”

Resources