惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
V
V2EX
博客园 - 【当耐特】
Vercel News
Vercel News
雷峰网
雷峰网
爱范儿
爱范儿
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Microsoft Azure Blog
Microsoft Azure Blog
F
Full Disclosure
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
NISL@THU
NISL@THU
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Attack and Defense Labs
Attack and Defense Labs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
P
Proofpoint News Feed
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
K
Kaspersky official blog
I
InfoQ
Google Online Security Blog
Google Online Security Blog
L
LINUX DO - 最新话题
Project Zero
Project Zero
Engineering at Meta
Engineering at Meta
V
Visual Studio Blog
AI
AI
Schneier on Security
Schneier on Security
B
Blog RSS Feed
T
Tor Project blog
H
Help Net Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Cyber Attacks, Cyber Crime and Cyber Security
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
V2EX - 技术
V2EX - 技术
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
Arctic Wolf
Webroot Blog
Webroot Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Letting Claude Code's Routines continuously tune my CLI's performance
yamadashy · 2026-04-30 · via DEV Community

I had been thinking about what to actually do with Claude Code's Routines feature for a while.
It runs prompts in the cloud on a schedule, which sounds useful, but what's actually worth firing every couple of hours?

What I landed on is performance tuning.
"Did it get faster?" is a question you can answer with numbers, so as long as you have a benchmark in place, the rest can be handed off to an AI. If you have tests, regressions get caught for you. The work happens on a branch, so nothing leaks into main. And a lot of perf wins are "patterned" changes — swapping a dependency, lazy-loading something, cutting an I/O — that don't really need much creative design.

I tried this on Repomix, the CLI I maintain, and the runtime ended up roughly 2.4x faster.

v1.14.0 release notes

It's reproducible enough now that I think it's worth sharing. Below is the prompt I'm using and the benchmark setup that makes it tick.

What Routines are

Claude Code has a feature called Routines that runs prompts in the cloud on a schedule. Point it at a GitHub repository and it pushes results to a branch automatically. Unlike /loop, which runs locally, this keeps going even when you close your laptop.

Routines docs

The setup

You configure Routines from the web UI at claude.ai/code/routines. Mine runs on a 2-hour cron.

Routine setup screen

Here's the prompt I have registered:

# Automated Performance Tuning

Perform performance improvement work.

## Settings

- Working branch: `perf/auto-perf-tuning`
- Base branch: `main`
- Target folder: `src`
- PR title: `perf(core): Automated performance tuning by Claude`
- Improvement threshold: `For a CLI run that takes 1–2 seconds, ignore changes of a few ms; require at least a 2% reduction in total execution time`
- Number of investigation sub-agents: `5`
- Sub-agent model: `sonnet`

## Policy

Improve the performance, or reduce memory usage, of <Target folder> and related code (tests, config, dependencies).
Aim for measurable, impactful changes based on <Improvement threshold>.
Do not make functional changes. Improve performance only, keeping existing behavior intact.

## Progress checklist

- [ ] 1. Branch preparation
- [ ] 2. Check existing PR
- [ ] 3. Investigation & planning
- [ ] 4. Implementation
- [ ] 5. Benchmark & verification
- [ ] 6. Commit
- [ ] 7. Local review
- [ ] 8. Create / update PR

## Steps

### 1. Branch preparation

- If <Working branch> does not exist, create it from the latest <Base branch>. If it exists, check it out.
- Then, if <Base branch> is ahead of <Working branch>, merge <Base branch> in and push. If conflicts occur, resolve them keeping in mind that the corresponding change may have already been picked up elsewhere.

### 2. Check existing PR

- Check whether a PR for <Working branch> already exists.
- If it does, read the PR description and review comments to grasp the context.

### 3. Investigation & planning

First, understand the repository structure and processing flow. Then define <Number of investigation sub-agents> non-overlapping investigation scopes yourself, and launch sub-agents (model: <Sub-agent model>) for each scope in parallel. Aggregate all reports and form an improvement plan.

Choose scopes freely based on the repository's characteristics. Examples:
- Critical path identification (locating bottlenecks)
- I/O & external communication (redundant reads, sync I/O, buffer sizes)
- Data structures & algorithms (complexity, string operations, collection choice)
- Parallelization & async (serialized work that could parallelize, redundant sequential awaits)
- Dependency libraries & init cost (lighter alternatives, lazy loading)

Even if multiple improvements are found, pick only one. Focus on the single highest-impact change for this run.

If no improvement meeting <Improvement threshold> is found, report findings and end the run.

### 4. Implementation

Implement the plan.

### 5. Benchmark & verification

- Run the benchmark and confirm the change meets <Improvement threshold>.
- Then run lint and test, confirming no regressions.
- If <Improvement threshold> is not met, revert the changes and report findings.

### 6. Commit

- Commit with the `perf` prefix.
- Include the change description and benchmark results in the commit body.

### 7. Local review

- Have multiple sub-agents review locally. If issues are raised, fix them and review again. Use amend so the work stays as a single commit.
- Once no more fixes remain, push.

### 8. Create / update PR

- Update the PR if it already exists, otherwise create a new one.
- Create as Draft.
- Title: <PR title>
- Add the change description and benchmark results to the PR body.

Enter fullscreen mode Exit fullscreen mode

A few things I care about in this prompt:

  • The settings section is at the top with placeholders, so I can drop the prompt into another repo and just edit the variables.
  • One run = one improvement. This is the rule I'm strictest about. Multiple changes in one run and you can't tell which one actually moved the needle.
  • The investigation runs 5 sub-agents in parallel, each with a different scope (I/O, memory, dependency weight, etc.). One agent looking at everything tends to be too narrow. I use Sonnet for sub-agents to keep cost in check.
  • If nothing meets the improvement threshold, the run reverts and exits. No filler commits.
  • Sub-agents review locally before push, so I don't burn CI on obvious issues.
  • Everything stacks into one PR (perf/auto-perf-tuning). Having a fresh PR every time would be annoying.

How the measurement works

Inside the routine, Claude Code writes the benchmark on the fly and only commits if the result clears the threshold.

I also have a separate benchmark that runs on every PR, mostly for my own eyes:

perf-benchmark.yml

Roughly what it does:

  • Checks out the PR branch and main into separate directories and builds both
  • Measures pack time on Ubuntu / macOS / Windows (run counts tuned per OS)
  • Posts the diff back to the PR as a comment

The multi-OS bit is to avoid being fooled by environment-specific wins.

Since the routine stacks all its commits onto a single perf/auto-perf-tuning PR, the benchmark history naturally accumulates in that PR's comments:

Benchmark history accumulating on the PR

I also wanted a longer-running view of main, so on every push to main the same benchmark runs and the result is saved to gh-pages via github-action-benchmark.

perf-benchmark-history.yml

The graph is public:

https://yamadashy.github.io/repomix/dev/bench/

Repomix pack time over commits (Linux)

You can read off the staircase-shaped drops, the occasional plateau, and a few sudden cliffs. I find it surprisingly fun to look at. It also makes it pretty obvious that this kind of work is something that pays off as accumulation, not as one big PR.

How changes actually land in main

The routine drops commits onto perf/auto-perf-tuning, which has a Draft PR sitting against it.

https://github.com/yamadashy/repomix/pull/1514

I look at the per-commit benchmark in the PR's comments, find the commits that look promising, and ask Claude Code (in a separate, local session) to "re-implement this from main and open a PR." That goes back through the normal review path.

I don't merge the routine's PR directly. Sometimes a regression sneaks in. Sometimes the change is way bigger than it needs to be for a 2% win. Reviewing commit-by-commit and re-implementing them lets me actually own what goes in.

What I noticed

Ideas keep coming, including counter-intuitive ones

Even when you keep the routine running, it doesn't run out of things to suggest. The most interesting ones are the ones that go against my own gut feel — "this used to be faster with X, but with the current shape it's faster to revert that." The codebase changes around old optimizations, but I rarely revisit them. An AI that only looks at numbers catches that drift more easily than I do.

It pairs well with changes I'd never bother with on my own

20+ PRs ended up in v1.14.0, and individually a lot of them are -2% or -3% kind of things. The kind of change where, if you wrote it by hand, you'd think "...is this really worth typing out?"

But when the implementation and the measurement arrive together, "okay, I'll take it" feels totally reasonable. The cost of accepting small wins drops because the work isn't on me.

What I want to improve

The prompt is fairly minimal right now. Things like "what exactly to measure," "how much regression to tolerate," "what behavior must not change" — I haven't really nailed those down. Tightening them would probably make the AI's calls more accurate.

I also don't have a benchmark scaffold checked into the repo. Right now Claude Code writes one on the fly each run, which works, but having something stable in the repo would mean more reliable measurements and lower token usage. Something to clean up.

Closing thoughts

Setting the benchmark up takes effort, the room for wins shrinks over time, and not everything the AI suggests is good. Reviews still flip a few decisions.

That said, "your PR has grown overnight" is a new kind of experience. You wake up, the PR has a few new optimization commits with benchmark results attached, and your job is just to review.

If this sounds interesting, the easiest place to start is to get a benchmark running on your CI. With that in place, Claude Code's Routines will quietly grow the rest.