/xuanran-seo-blog-writer:cost-guardfrom xuanran-seo-blog-writer
Budget enforcement. Estimate → check → log → summary. Daily total + per-init + per-article + per-image-batch caps from config.yaml. Triggered by every API call upstream.
Ships in xuanran-seo-blog-writer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Implementation: scripts/_core/cost_ledger.py.
This skill is mostly a wrapper to expose cost-guard ops via slash commands.
# Estimate cost for an upcoming API call
python -m scripts._core.cost_ledger --estimate --model claude-opus-4-7 --in 5000 --out 2000
# Get current day's spend summary
python -m scripts._core.cost_ledger --summary --period day --json
# Reset today's ledger (admin only)
python -m scripts._core.cost_ledger --reset-today
cost_limits:
daily_total_usd: 50
per_init_usd: 1.5
per_article_usd: 3.0
per_image_batch_usd: 2.0
hooks/pre_tool_use_cost_guard.py enforces caps before Bash commandsscripts/_core/cost_ledger.pyhooks/pre_tool_use_cost_guard.pyWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cost-guard, budget-enforcement, api-cost-tracking, cost-ledger
npx claudepluginhub xuanranl/loamwright-seo-skill --plugin xuanran-seo-blog-writer75 skills in this plugin
/ai-overview-recovery4-phase recovery when Google AI Overview drops an article. Measure damage → diagnose skip reason → rewrite → T+7/14/28 monitor. Triggered by drift-detector AIO loss alert OR /aio-recovery command./ai-visibility-trackerActive probe of ChatGPT/PPLX/Claude/Gemini to check if our article is cited. Compares to projects/{slug}/geo-baseline.json. Triggered by /ai-visibility command or daily/weekly schedule./batch-articleRun /article end-to-end for a list of keywords. Each keyword goes through the FULL pipeline (research → plan → build → optimize → publish → monitor baseline). Use for agency-scale operations — drop 10-500 keywords, get 10-500 published articles. Resumable across sessions.Other plugins' skills for the same job