Automating Weekly Duties with Claude Code and TodoWrite¶
Target Audience
- Operators who already use Claude Code but still drive the weekly review manually
- TodoWrite users who want checklists to execute themselves instead of copy-pasting items every week
- Anyone looking to turn newly discovered queries into repeatable follow-up tasks
Key Points¶
- Learn how to capture rising queries such as
claude code todowriteinside a weekly checklist - Execute TodoWrite templates with Claude Code commands, keeping plan status and tasks in sync
- Build a repeatable routine that covers reporting, clean-up, and next-week preparation
Why This Workflow Matters¶
Existing docs explain TodoWrite fundamentals, yet we lacked a concrete walk-through that shows how Claude Code drives a weekly review from start to finish. The following sections close that gap.
End-to-End Overview¶
| Phase | Goal | Claude Code Action | TodoWrite Granularity |
|---|---|---|---|
| 1. Capture signals | Collect new queries and declining pages | codex run to execute the aggregation script | Generate a weekly review ToDo set |
| 2. Execute tasks | Update articles / draft new pieces | Use apply_patch, python, etc. for each item | Mark every task in_progress → completed |
| 3. Wrap-up | Summarise learnings and prep next week | Run mkdocs_partial_build.py and clean-up helpers | Leave results and notes on the completed tasks |
Step 1: Bring Search Signals into TodoWrite¶
1.1 Extract and triage data¶
- Open the weekly GSC analysis report (Markdown) and copy the highlighted queries/pages
- Record new keywords (e.g.,
claude code todowrite,todowriteツール) in the TodoWrite “Research memo” section
Prioritising signals
- Start with queries that logged ≥5 clicks and ≥+4 week-over-week
- If CTR exceeds 20%, keep the existing entrance intact while designing supporting content
1.2 Generate the weekly template¶
Copy last week's review template to create this week's version.
cp todos/weekly-review-template.md \
todos/$(date +%Y-%m-%d)-weekly-review.md
1.3 Initial checklist setup¶
- Flip Phase 1 tasks to
in_progressbefore starting work - Add remarks per query—for example, “update JP pair” or “draft EN summary”—so your future self understands the context
Step 2: Cycle TodoWrite with Claude Code¶
2.1 Decide the execution order¶
- Import the TodoWrite task IDs into the Claude Code Plan as individual steps
- Keep only one item
in_progressat a time; mark both Plan and TodoWrite as soon as the task state changes
2.2 Common command snippets¶
These short snippets cover the typical weekly workflow. Copy them directly into Claude Code; each block stays within ten lines.
# Inspect rising queries (load GSC export as JSON)
python show_query_diff.py \
--input gsc_queries_$(date +%Y%m%d).json
# Partially build only the touched articles
mkdocs build --dirty
# Remove temporary files and logs
git status --short --untracked && git clean -fd --dry-run
2.3 Definition of “done”¶
- Execute → validate → mark the TodoWrite item as
completed - Reflect the same change in the Claude Code Plan
- Check
git status --short --untrackedbefore moving on
Step 3: Reporting and Retrospectives¶
3.1 Document the week¶
- Store weekly notes as Markdown in a dedicated directory
- Map each rising query to the specific action you took; this shortens next week’s prioritisation
3.2 Run a short retrospective¶
- Append observations (CTR changes, follow-up dates) to the completed TodoWrite tasks
- When exporting to Slack or Notion, reuse the TodoWrite JSON to avoid manual drift
Advanced options
- Claude Code Hooks can append log entries automatically when a TodoWrite item switches to `completed` - Register a helper script in Hooks to auto-append completed tasks to a log fileFrequent Pitfalls and Fixes¶
| Symptom | Root Cause | Fix |
|---|---|---|
| Plan and TodoWrite fall out of sync | Task states updated in only one place | Update both tools immediately when the task starts/ends |
| Criteria for picking queries change every week | Selection rules live in someone's head | Save the selection rule in the weekly report directory and reuse it |
| Temporary files build up in the repo | Clean-up postponed until the very end | Run the clean-up snippet during Step 2 every time |
Next Steps¶
- Share the TodoWrite template with your teammates so everyone follows the same weekly routine
- Investigate related queries around
claude code todowriteand plan supporting articles - Produce an English counterpart (this guide) and cross-link it from the JP version for broader coverage