Claude Code Routines Tunes CLI Performance 2.4x in 20+ PRs

Claude Code's Routines feature can be used for continuous autonomous optimization. A developer (u/yamadashy) set it up on a 2-hour cron schedule to tune their open-source CLI tool Repomix. Over 20+ PRs, the runtime improved by 2.4x.
Key Components
- Automated Tuning via Routines: A prompt defines performance goals; Claude Code's Routines run every 2 hours, generates changes and opens PRs.
- Benchmark Workflow (GitHub Actions): A custom workflow runs multi-OS measurements to validate each AI-suggested change before merging.
- Merge Flow: AI suggestions are picked up and merged into main after passing benchmarks.
The exact prompt used is shared in the article, along with all configuration files. Everything is open source — no paid tiers required. Repomix is the CLI that was optimized; Claude Code Routines and the benchmark workflow are also free to try.
For developers using AI coding agents, this demonstrates a practical CI loop: let AI continuously propose optimizations, validate against real benchmarks, and merge only improvements.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude Skills: 12 Strict Coding Rule Packs for TypeScript, Rust, Swift, Go, JS, Postgres, and Audits
12 markdown files with opinionated, version-aware rules for TS, Rust, Swift, Go, JS, Postgres, security, performance, testing, code review, GitHub standards, and git commits. MIT, free, no signup.

Mneme: A PreToolUse Hook That Blocks Claude Code Edits Violating Architecture Decisions
Mneme is a PreToolUse hook for Claude Code that checks every Edit/Write/MultiEdit against a local decisions file before disk writes, blocking violations without manual intervention.

SkyClaw Adds Encrypted Chat-Based API Key Setup for AI Agents
SkyClaw implements AES-256-GCM encrypted key ingestion through chat, intercepting key commands at the system layer so the LLM never sees API keys and using one-time key encryption so messaging platforms only see ciphertext.

MCP Server Enables Claude to Create and Run Custom Tools at Runtime
A developer built an MCP server where Claude can create, update, and run new tools without redeployment. The system uses five core tools and executes custom JavaScript/TypeScript code in a Deno sandbox with ~50ms cold start.