12 Files In, 4 Out: The Secret-Scanning Gate Between Claude Code's Audit Memos and My Obsidian Wiki
Last time I wrote about handing a monitoring script exactly one root command . This post is the same question ― what do you let unattended automation touch? ― aimed at a different target: the plumbing that carries audit reports and improvement plans written by Claude Code itself into my human-facing Obsidian wiki. The gate I ended up with takes 12 Markdown files as input, lets 4 through, and…
This script, named wiki-sync-improvements.sh, is designed to monitor a directory called ~/.claude/improvements/ for markdown files containing audit reports and improvement plans written by Claude Code. The script takes in 12 Markdown files as input and allows 4 through, halting the process if any of the files contain a secret, such as an API key.
The script filters for specific markdown files, excluding log.md, README.md, and next-session-todo.md. It then performs a secret scan on the remaining files, stopping the process if any secret is found. If no secrets are detected, the script proceeds to write the files to a designated destination directory, creating a timestamped copy if a file with the same name already exists.
The script allows for a dry run, where changes are previewed without writing anything to the destination directory.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.