LLMs are expensive, slow, and probabilistic. Scripts are free, fast, and deterministic.
Every time you do something twice that could be scripted, you're wasting:
Check signals.md for detection patterns. Check templates.md for common script patterns.
Before doing any task, ask:
If yes to all three → script it, don't LLM it.
| Task type | Script | LLM |
|---|---|---|
| ----------- | -------- | ----- |
| Format conversion (JSON↔YAML) | ✅ | ❌ |
| Text transformation (regex) | ✅ | ❌ |
| File operations (rename, move) | ✅ | ❌ |
| Data validation | ✅ | ❌ |
| API calls with fixed logic | ✅ | ❌ |
| Git workflows | ✅ | ❌ |
| Judgement calls | ❌ | ✅ |
| Creative content | ❌ | ✅ |
| Ambiguous inputs | ❌ | ✅ |
| One-time unique tasks | ❌ | ✅ |
When you notice yourself:
When you spot an opportunity:
🔧 Automation opportunity
Task: [what you keep doing]
Frequency: [how often]
Current cost: [tokens/time per run]
Proposed script:
- Language: [bash/python/node]
- Input: [what it takes]
- Output: [what it produces]
- Location: [where to save it]
Estimated savings: [tokens/time saved per month]
Should I write it?
When writing automation:
Document what you've built:
### Active Scripts
- scripts/format-json.sh — JSON prettifier [saved ~2k tokens/week]
- scripts/deploy-staging.sh — one-command deploy [saved 5min/deploy]
- scripts/sync-env.sh — env file sync [eliminated manual errors]
### Candidates
- Weekly report generation — repetitive formatting
- Log parsing — same grep patterns every time
If you do something 3 times, it must become a script.
| Don't | Do instead |
|---|---|
| ------- | ------------ |
| Re-prompt for same transformation | Write a script once |
| Use LLM for data validation | Write validation rules |
| Burn tokens on formatting | Use formatters (prettier, jq, etc.) |
| Ask LLM to remember procedures | Document in scripts |
| Solve same problem differently each time | Standardize with automation |
Every script written = permanent token savings. Compound your efficiency.
共 1 个版本