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.01653 |
| Opus 5 | $0.00075 | $0.00826 |
| Sonnet 5 | $0.00030 | $0.00331 |
| Haiku 4.5 | $0.00015 | $0.00165 |
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 9d 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.
- 9d 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 yesterday), licensed MIT. It adds 150 tokens to every session and 1,653 once invoked, about $0.0007 per session on Opus 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.
Other skills, from other repositories
dotfiles
Chezmoi dotfiles conventions and patterns. Use when modifying dotfiles, adding new managed files, working with chezmoi templates, or syncing agent skills and subagents through agentspec.
use-notion
Reference for using the Notion API via the notion-agent subagent. Use to expore and update Notion workspace content.
orchestrate-agents
Orchestrate multiple agent CLIs (Claude, Codex, Antigravity) via tmux with a shared fleet store, dispatching one guardian subagent per pane. Survey-first: inspects and adopts existing tmux sessions, windows, and agent panes before creating anything new. Use when running a multi-agent session, dispatching parallel…
assess-quality
Foundational quality framework: the five questions (readable, easy to start, expands without bloat, consistent, intentional) every other dev skill is judged against, plus the dual-audience and workshop principles. Use when onboarding to a project, defining a quality bar, setting an assessment checklist, or arbitrating…
create-oss-skill
Create well-formed Agent Skills following the agentskills.io specification. Scaffold directories, write SKILL.md files, bundle scripts, and structure instructions for progressive disclosure. Use when creating a new skill, reviewing skill structure, optimizing a skill description, or setting up evals for skill quality.
extend-oss-skills-to-claude
Extend standard agentskills.io skills with Claude Code-specific features. Invocation control, subagent execution, dynamic context injection, string substitutions, model/effort overrides, and deployment scoping. Use when adapting a portable skill for Claude Code, adding Claude-specific frontmatter, setting up subagent…