我如何使用 Claude 代码提高效率
How I'm Productive with Claude Code

原始链接: https://neilkakkar.com/productive-with-claude-code.html

## 从实施者到基础设施建设者:Tano 的经验 在 Tano 的过去六周里,工作流程的转变显著提高了产出,尽管提交次数并不能很好地衡量进展。关键不在于*使用* AI 代理,而在于构建*基础设施*来赋能它们。 最初,作者手动执行所有标准的开发任务——这个过程被认为是“繁重的工作”。这促使创建了一个 Claude Code 技能 (`/git-pr`),自动化 PR 创建并改进描述,从而释放了认知带宽。进一步的收益来自于切换到 SWC,实现亚秒级的服务器重启,消除了测试期间破坏性的上下文切换。 通过利用 Claude 的预览功能进行 UI 验证,进一步增强了委托能力,允许代理自我纠正并减少瓶颈。最后,一个解决端口冲突的工作树系统实现了并行开发,同时支持多个活跃的功能。 这种演变将作者的角色从个人贡献者转变为基础设施架构师,专注于消除摩擦并最大限度地提高代理效率。每一次改进都揭示了下一个瓶颈,凸显了一个持续优化的循环。结果是一个紧密循环、快节奏的工作流程,工程本身成为了主要的乐趣来源。

## Claude 代码与生产力辩论 (Hacker News 总结) 最近 Hacker News 的讨论围绕一篇博客文章展开,文章详细描述了一位开发者使用 Claude 代码提高生产力的经验。作者报告了更高的提交频率和更快的特性实现速度,但评论很快转向了对 *如何* 衡量生产力的批判性考察。 许多评论者认为,仅仅增加代码输出(提交、代码行数)是一种有缺陷的指标,这呼应了 90 年代人们对管理层优先考虑数量而非质量的担忧。重点转移到优化 *影响* – 更少的错误、更短的审查周期,以及最终的业务/人类价值。 并行使用多个 AI 代理等策略被讨论,但人们担心管理它们会增加认知负担,以及由于匆忙审查可能导致代码质量下降。 许多用户强调了仔细规划、强大的测试和人工监督的重要性,以避免“技术债务凯斯勒综合症”。 最终,对话表明人们对仅仅关注输出指标持怀疑态度,并希望采取更全面的方法来衡量人工智能在软件开发中的益处,许多人质疑提高的“生产力”是否仅仅是工作量转移,而不是真正的改进。
相关文章

原文

It’s been about 6 weeks since I joined Tano, and this is what my commit history looks like:

Commit history graph over the last 6 weeks

Commits are a terrible metric for output, but they’re the most visible signal I have. Something real changed in how I work, and the commit count is a side effect.

So, what has changed?

Automating the grunt work

When I joined Tano, I was making every pull request by hand. Stage changes, write the commit message, craft the PR description, push, create the PR on GitHub. Standard process, it was fine.

It took me a while to realize this is grunt work. I was so used to doing it that I’d never questioned it.

That was the first real shift: I’m not the implementer anymore. I’m the manager of agents doing the implementation. And managers automate their team’s grunt work.

Then I wrote my first Claude Code skill: /git-pr.

It does everything I used to do, except it does it better. The PR descriptions are more thorough than what I’d write, because it reads the full diff and summarises the changes properly. I’d gotten so used to the drudgery that I’d stopped noticing it was drudgery.

The time saved matters, but the real unlock was the mental overhead removed. Every PR used to be a small context switch: stop thinking about the code, start thinking about how to describe the code. Now I type /git-pr and move on to the next thing.

Killing the wait

Reviewing changes had this annoying loop.

Preview changes locally, go away from what I’m working on, kill the dev server, restart it on the new branch, check it all works, review the code.

The server build took about a minute, which was agonisingly long when I was mid-context-switch. Long enough to break focus, too short to do anything useful.

I switched the build to SWC, and server restarts dropped to under a second. This sparked joy.

It sounds like a small change. It wasn’t. Sub-second restarts mean you never leave the flow. Save a file, the server’s already up, check the preview. There’s no gap where your attention drifts. It’s the difference between a conversation with awkward pauses and one that flows naturally.

Let Claude see what happens

Before this, I checked every UI change. Preview locally, eyeball it, decide if it matches what I expected. It worked, but it meant I was a bottleneck on every feature.

After the Chrome extension kept crashing, I switched to the preview feature in Claude Code. It lets the agent set up a preview, persist session data, and see how the UI actually looks.

I wired it into the workflow: a change isn’t “done” until the agent has verified the UI itself. That meant I could delegate verification and only step in for final review — which also meant agents could run much longer without oversight. They’d catch their own mistakes. That mattered more than I realized at the time.

Parallel everything

Fast rebuilds and automated previews made another friction visible: I could only comfortably work on one thing at a time.

I was reviewing PRs from other agents and teammates. The workflow was painful: check out the PR branch on main, rebuild, test. But that would mess with my uncommitted changes. So I’d stash, checkout, rebuild, test, switch back, pop the stash. Or create a worktree manually, set it up, try to run the preview - only to find the ports clashing with my other running server.

Our app has a frontend and a backend, each needing its own port. Every worktree shared the same environment variables, so they’d all try to bind to the same ports. Running two things at once was a fight.

I built a system around this. Whenever a worktree is created, every server gets assigned ports from a unique range. No collisions. I could run ten previews simultaneously if I wanted.

I went from getting overwhelmed by two parallel branches to running five worktrees at once. My create loop changed: fire off multiple agents on separate worktrees, each building a different feature. They’d only stop once they’d verified the UI themselves.

I’d be heavily involved in planning. Then I’d disappear until code review. Agents catching their own mistakes mattered a lot more with five running at once.

Reviewing got smoother too. No faffing around with setup. No rebuilding. No port conflicts. Just: read, verify, merge. Next.

It’s the infrastructure, not the AI

My role has changed. I used to derive joy from figuring out a complicated problem, spending hours crafting the perfect UI. I still do that sometimes, but a lot less now. What’s become more fun is building the infrastructure that makes the agents effective. Being a manager of a team of ten versus being a solo dev. And like any good manager, you get to claim credit for all the work your “team” does.

These aren’t glamorous problems. They’re plumbing. But plumbing determines whether you’re in flow or wrestling your environment.

The highest-leverage work I’ve done at Tano hasn’t been writing features. It’s been building the infrastructure that turned a trickle of commits into a flood.

The loop

Each of these stages removed a different kind of friction:

  1. /git-pr removed the friction of formatting - turning code changes into a presentable PR.
  2. SWC removed the friction of waiting - the dead time between making a change and seeing it.
  3. The preview removed the friction of verifying changes - I could quickly see what’s happening.
  4. The worktree system removed the friction of context-switching - juggling multiple streams of work without them colliding.

And each time I removed one, the next became visible. When PRs were effortless, I noticed I was wasting time on rebuilds. When rebuilds were instant, I noticed I couldn’t run things in parallel. Classic theory of constraints — fix one, and the system immediately shows you the next one.

The nature of the work changed. I’m not “using a tool that writes code.” I’m in a tight loop: kick off a task, the agent writes code, I check the preview, read the diff, give feedback or merge, kick off the next task. The feedback loop is so tight that there’s no gap for my attention to leak out.

Building things is a different kind of fun now — it’s so fast that the game becomes improving the speed. How much faster can I go? When the loop is tight enough, engineering becomes the entertainment.

联系我们 contact @ memedata.com