How Makefiles Solved My AI Prompt Repetition Problem
Tired of typing the same AI prompts? I discovered Makefiles could solve this - here's how it changed my workflow
Pattern Discovery
Every Claude AI session in Cursor IDE starts the same:
"Remember to do X"
"Format commits like Y"
"Follow pattern Z"
Repeating. Every. Single. Time.
Then I found it: Makefiles are prompts that execute.
The Shift
Old Way (Manual Prompts)
Me: "Look at my previous commits, learn the pattern, then commit"
AI: "Let me check..."
Me: "Remember: action-oriented, learned: prefix, co-author"
AI: "Got it..."
New Way (Makefile Prompts)
commit:
@git log --grep="learned:" -n 5
@git diff --cached --stat
@echo "Pattern: learned: [discovery]"
@echo "Format: action-oriented (delete, separate, hide)"
Now:
make commit
AI sees pattern. AI follows pattern. No prompting.
Why It Works
Makefiles = Terminal orchestration with bash Claude AI = Terminal native in Cursor IDE Result = Perfect vibe coding match
Claude AI doesn't need instructions. It needs context that executes in terminal.
Real Example
My commit workflow:
commit:
@echo "════════════════════════════════════════"
@echo "COMMIT PROTOCOL"
@echo "════════════════════════════════════════"
@git status --short
@git log --grep="^learned:" --oneline -n 5
@for i in 0 1 2 3 4; do \
git log --grep="^learned:" --skip=$$i -n 1 --format="%B" | head -6; \
echo "────────────────────────────────────"; \
done
@git diff --cached --stat
@echo "REMINDERS:"
@echo "- Action-oriented (delete, separate, hide)"
@echo "- What pattern emerged?"
@echo "- Purpose over process"
The AI sees:
Current state
Historical patterns
Expected format
Core principles
No prompting. Just execution.
The Philosophy
Prompts = Temporary instructions Makefiles = Permanent patterns
Think about it:
Prompts disappear after use
Makefiles persist in the repo
Prompts need repeating
Makefiles self-document
Discovered Patterns
# Logging with automatic cleanup
run:
app 2>&1 | tee /dev/tty | sed 's/\x1b\[[0-9;]*m//g' > log
# Multi-platform builds
build:
@if [ -d "ios" ]; then xcodebuild; fi
@if [ -f "package.json" ]; then npm build; fi
@if [ -f "Cargo.toml" ]; then cargo build; fi
Each Makefile command = Encoded knowledge.
Core Insight
Stop writing prompts. Start writing makefiles.
Claude AI already knows terminal and bash. Let it orchestrate in Cursor IDE.
Implementation
Identify repeated AI instructions
Convert to Makefile targets
Let AI discover patterns from execution
Never prompt again
The Result
My Claude AI sessions in Cursor now:
Me: make commit
AI: [Sees patterns, follows patterns]
Me: make deploy
AI: [Knows the workflow]
Me: make test
AI: [Understands the context]
No prompts. Just commands.
Evolution Through Execution
Git history + Makefiles = Collective memory
Claude AI learns from:
What we did (git history)
How we do it (makefiles with bash)
Why we did it (learned: commits in terminal)
Cultural evolution through code.
Final Pattern
Prompts = What to think
Makefiles = How to act
Git = Why it matters
Stop telling Claude AI what to do. Show it how things are done in terminal.
Makefiles are the way.
Last updated
Was this helpful?