Introduction
One of the challenges many Claude Code users experience is "repeatedly executing the same prompts daily." It's not uncommon to have similar patterns in routine development tasks such as code reviews, refactoring, and test generation.
This article provides a detailed explanation of how to efficiently automate repetitive prompts in Claude Code using Prompt Scheduler, along with real development scenarios.
Disclaimer
The Prompt Scheduler introduced in this article is an open-source tool that I personally developed. I want to clearly state that this is an independent personal development project with no connection whatsoever to Anthropic's Claude or Claude Code. Please use at your own risk.
Typical Patterns of Repetitive Prompts
1. Daily Development Routines
Morning Code Reviews:
{"prompt": "Review yesterday's commits and suggest improvements", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "10m"}
{"prompt": "Check new code for security vulnerabilities", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "15m"}
{"prompt": "Identify performance bottlenecks", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "10m"}
{"prompt": "Organize technical challenges for today's tasks", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "5m"}
2. Feature Development Cycles
Standard Flow for New Feature Development:
{"prompt": "Plan technical design from feature specifications", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "20m"}
{"prompt": "Propose database schema changes", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "15m"}
{"prompt": "Implement API endpoints", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "25m"}
{"prompt": "Implement frontend components", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "20m"}
{"prompt": "Create unit and integration tests", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "15m"}
3. Code Quality Improvement Routines
Weekly Quality Enhancement:
{"prompt": "Analyze code complexity and propose improvements", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "20m"}
{"prompt": "Identify technical debt and prioritize", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "15m"}
{"prompt": "Update dependencies and security audit", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "10m"}
{"prompt": "Identify and improve documentation gaps", "tmux_session": "/tmp/tmux-1000/default", "sent": "false", "sent_timestamp": null, "default_wait": "10m"}
Development Efficiency Improvement Through Automation
Before: Manual Repetitive Work
# Morning work (approximately 30 minutes)
# 1. Start Claude Code
# 2. Enter "Review yesterday's commits..." - execute - wait
# 3. Enter "Check new code for security..." - execute - wait
# 4. Enter "Identify performance bottlenecks..." - execute - wait
# 5. Enter "Organize technical challenges for..." - execute - wait
Problems:
- Time loss due to manual input
- Insufficient variation in prompt content
- Irregular execution timing
- Execution omissions due to forgetfulness
After: Efficiency Through Automation
# Morning preparation (completed in 1 minute)
npm run run
# Or execute with time limits
tsx src/claude-schedule.ts run --stop-at 9am --mode sequential
Improvement Effects:
- 90% reduction in manual work time
- Consistent quality prompt execution
- Habit formation through scheduled execution
- Increased focus time for other important tasks
CLI Tool Design Philosophy
Why CLI?
Developer-Friendly Reasons:
- Compatibility with Existing Workflows: Extension of terminal work
- Automation Compatibility: Integration with shell scripts, cron, CI/CD
- Lightweight: No GUI required, fast startup
- Extensibility: Easy pipeline processing and batch execution
CLI Design Features
# Simple and memorable commands
npm run run # Execute
npm run next # Execute next
npm run status # Status check
npm run reset # Reset
npm run help # Help
# Flexible option specification
tsx src/claude-schedule.ts run --mode sequential --hours 2 --stop-at 5pm
Significance of Hashtag #CLI
Identity as CLI Tool:
- Design specialized for command line operations
- Functionality based on scripting and automation assumptions
- Natural integration into developers' daily workflows
Flexible Scheduling with Time Management Features
Control Within Business Hours
# Execute within business hours from 9 AM to 5 PM
tsx src/claude-schedule.ts run --stop-at 5pm
# Focused execution for morning 2 hours only
tsx src/claude-schedule.ts run --hours 2 --mode sequential
Overnight Batch Processing
# Long-term overnight execution (aggressively ignoring limits)
tsx src/claude-schedule.ts run --ignore-approaching-limit --hours 8
# Execute until 3 AM
tsx src/claude-schedule.ts run --stop-at 3am --mode sequential
Project-Specific Management System
Parallel Processing of Multiple Projects
# Project A (Frontend)
tsx src/claude-schedule.ts run --prompt-file ~/projects/frontend/daily-routine.jsonl
# Project B (Backend)
tsx src/claude-schedule.ts run --prompt-file ~/projects/backend/weekly-review.jsonl
# Project C (DevOps)
tsx src/claude-schedule.ts run --prompt-file ~/projects/devops/infrastructure-check.jsonl
File Structure Example
~/development/
├── project-a/
│ ├── daily-review.jsonl
│ ├── feature-development.jsonl
│ └── bug-fix-routine.jsonl
├── project-b/
│ ├── weekly-analysis.jsonl
│ └── performance-check.jsonl
└── shared/
├── security-audit.jsonl
└── code-quality.jsonl
Practical Operation Patterns
Pattern 1: Morning Routine Automation
#!/bin/bash
# morning-routine.sh
echo "🌅 Starting morning development routine..."
# Background execution during email checking
tsx src/claude-schedule.ts run \
--prompt-file ~/routines/morning-check.jsonl \
--mode sequential \
--stop-at 9am &
# Status check after 30 minutes
sleep 1800
npm run status
Pattern 2: Phased Feature Development
# feature-development.sh
# Design phase (2 hours)
tsx src/claude-schedule.ts run \
--prompt-file design-phase.jsonl \
--hours 2
# Implementation phase (4 hours)
tsx src/claude-schedule.ts run \
--prompt-file implementation-phase.jsonl \
--hours 4
# Testing phase (2 hours)
tsx src/claude-schedule.ts run \
--prompt-file testing-phase.jsonl \
--hours 2
Pattern 3: Weekly Quality Improvement
# weekly-quality-improvement.sh
# Execute Friday afternoons
if [ $(date +%u) -eq 5 ]; then
tsx src/claude-schedule.ts run \
--prompt-file ~/routines/weekly-quality.jsonl \
--stop-at 6pm \
--ignore-approaching-limit
fi
Progress Tracking and Effect Measurement
Quantitative Effect Measurement
# Check execution history
npm run status
# Time analysis of completed tasks
tsx src/claude-schedule.ts status --prompt-file daily-routine.jsonl | grep "SENT"
Measurable Indicators:
- Work time comparison before and after automation
- Prompt execution consistency
- Reduction rate of execution omissions
- Development speed improvement
Qualitative Improvement Evaluation
Improved Points:
- Enhanced code review comprehensiveness
- Early detection of technical issues
- Standardization of development processes
- Improved overall team code quality
Summary
Repetitive prompt automation in Claude Code dramatically improved developers' daily operations efficiency.
Key Points:
- Routine Task Automation: Automatic execution of daily and weekly repetitive tasks
- Time Management Optimization: Execution control aligned with business hours and focus time
- Project-Specific Management: Parallel management and individual optimization of multiple projects
- CLI Design Benefits: Natural integration with developer workflows
Value of #CLI:
- High productivity through command line operations
- Integration with existing toolchains
- Further automation possibilities through scripting
Repetitive prompt automation realizes a paradigm shift from "work efficiency" to "development process optimization" in Claude Code development.
GitHub: https://github.com/prompt-scheduler/cli
Installation: curl -fsSL https://raw.githubusercontent.com/prompt-scheduler/cli/main/install.sh | bash