← 返回
开发者工具 中文

Automate

Identify tasks that waste tokens. Scripts don't hallucinate, don't cost per-run, and don't fail randomly. Spot automation opportunities and build them.
识别浪费 Token 的任务。脚本不会产生幻觉、无单次运行成本且不会随机失败。发现自动化机会并构建实现。
ivangdavila ivangdavila 来源
开发者工具 clawhub v1.0.0 1 版本 99905.3 Key: 无需
★ 3
Stars
📥 2,051
下载
💾 27
安装
1
版本
#latest

概述

Core Principle

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:

  • Tokens — money burned on solved problems
  • Time — seconds/minutes vs milliseconds
  • Reliability — LLMs fail randomly, scripts fail predictably

Check signals.md for detection patterns. Check templates.md for common script patterns.


The Automation Test

Before doing any task, ask:

  1. Is this deterministic? Same input → same output every time?
  2. Is this repetitive? Will this happen again?
  3. Is this rule-based? Can I write down the exact steps?

If yes to all three → script it, don't LLM it.


Script vs LLM Decision Matrix

Task typeScriptLLM
------------------------
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

Automation Triggers

When you notice yourself:

  • Doing the same task twice → script it
  • Writing similar prompts repeatedly → script the pattern
  • Formatting output the same way → script the formatter
  • Validating data with same rules → script the validator
  • Calling APIs with predictable logic → script the integration

Automation Proposal Format

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?

Script Standards

When writing automation:

  1. Single purpose — one script, one job
  2. Idempotent — safe to run multiple times
  3. Documented — usage in comments at top
  4. Logged — output what you're doing
  5. Fail loud — exit codes, error messages
  6. No secrets hardcoded — env vars or keychain

Tracking Automations

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

The 3x Rule

If you do something 3 times, it must become a script.

  • 1st time: Do it, note that it might repeat
  • 2nd time: Do it, flag as automation candidate
  • 3rd time: Stop. Write the script first, then run it.

Anti-Patterns

Don'tDo instead
-------------------
Re-prompt for same transformationWrite a script once
Use LLM for data validationWrite validation rules
Burn tokens on formattingUse formatters (prettier, jq, etc.)
Ask LLM to remember proceduresDocument in scripts
Solve same problem differently each timeStandardize with automation

Every script written = permanent token savings. Compound your efficiency.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 20:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,087 📥 815,921
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,386 📥 321,118
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,232 📥 268,425