Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add magic3007/dotfiles --skill claude-cron-automationgit clone --depth 1 https://github.com/magic3007/dotfilesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/magic3007/dotfiles/claude-cron-automation)<a href="https://agentmods.dev/skills/magic3007/dotfiles/claude-cron-automation"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/claude-cron-automation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/magic3007/dotfiles/claude-cron-automation"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/claude-cron-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00150 | $0.01657 |
| Opus 5.5 | $0.00060 | $0.00663 |
| Sonnet 5.5 | $0.00030 | $0.00331 |
| Haiku 4.5 | $0.00015 | $0.00166 |
Grade B, and why
claude-cron-automation scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
2. Check the log: `tail -f ~/.claude/logs/<script>.log` How it starts
The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claude Code Cron Automation
Problem
Running Claude Code in cron requires solving three challenges that don't apply to interactive sessions:
- cron's minimal PATH doesn't include nvm/node or user binaries
- Shell aliases and functions (like
dsccpro) are unavailable - Third-party API backends need explicit environment variables
Context / Trigger Conditions
- Setting up automated daily/weekly Claude Code tasks via cron
claude -pnon-interactive mode with API backends other than Anthropic/insights,/doctor, or custom prompts need to run on a schedule- cron environment lacks
DEEPSEEK_API_KEY, node, orwechat-reminderin PATH - Need to deliver results via wechat-reminder (Feishu/WeChat)
Solution
1. Crontab Entry Pattern
Always use zsh -l (login shell) to source the user's full environment:
7 22 * * * /bin/zsh -l '/absolute/path/to/script.sh'
The -l flag ensures .zshenv, .zprofile, and .zshrc are sourced, making
API keys and PATH available.
2. Script Self-Setup (Defense in Depth)
Even with zsh -l, include a self-setup section in the script for robustness:
#!/bin/zsh
set -euo pipefail
# Auto-discover nvm/node (covers cron's minimal PATH)
for nvm_dir in "$HOME/.nvm" "/usr/local/nvm"; do
if [[ -s "$nvm_dir/nvm.sh" ]]; then
export NVM_DIR="$nvm_dir"
break
fi
done
NODE_BIN="$HOME/.nvm/versions/node/$(ls "$HOME/.nvm/versions/node/" 2>/dev/null | sort -V | tail -1 || echo '')/bin"
export PATH="$NODE_BIN:$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
# Verify essentials
command -v claude >/dev/null 2>&1 || { echo "claude not found"; exit 1; }
3. Third-Party API Env Vars (Non-Interactive)
Shell aliases like dsccpro don't work in scripts. Use the raw env var pattern
that _claude_with_api expands to:
# DeepSeek API (replaces dsccpro alias)
REPORT=$(
env -u ANTHROPIC_API_KEY \
ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic" \
ANTHROPIC_AUTH_TOKEN="${DEEPSEEK_API_KEY}" \
API_TIMEOUT_MS=600000 \
ANTHROPIC_MODEL="deepseek-v4-pro[1m]" \
ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-pro[1m]" \
ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4-pro[1m]" \
ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-pro[1m]" \
ANTHROPIC_SMALL_FAST_MODEL="deepseek-v4-pro[1m]" \
CLAUDE_CODE_SUBAGENT_MODEL="deepseek-v4-pro[1m]" \
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 \
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 \
claude -p "$PROMPT" \
--print \
--output-format text \
--dangerously-skip-permissions \
--add-dir "$HOME/.claude/projects" \
--add-dir "$HOME/.claude/usage-data" \
2>&1
)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed be69f40c84b4
- 3mo ago First seen · 169 lines · 150 tokens per session scan B dcd8cdf60a2b
claude-cron-automation is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed 5d ago), licensed MIT. It adds 150 tokens to every session and 1,657 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
claude-cron-automation compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| claude-cron-automationmagic3007/dotfiles | Skill | 11 | 5d ago | MIT | B | 150 | Claude Code, Codex |
| dotfilesurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 67 | Claude Code |
| use-thingsooloth/dotfiles | Skill | 24 | today | none | A | 65 | Claude Code |
| achieve-goalooloth/dotfiles | Skill | 24 | today | none | A | 103 | Claude Code |
| use-slackooloth/dotfiles | Skill | 24 | today | none | A | 61 | Claude Code, Codex |
| wrap-up-sessionooloth/dotfiles | Skill | 24 | today | none | A | 50 | Claude Code, Codex |
| rexooloth/dotfiles | Skill | 24 | today | none | A | 30 | Claude Code, Codex |