How to use Claude to remove a token-leaking rule
Claude's prompt audit found a standing token-leaking Git rule. The owner approved changes, configured CLI authentication and checked a dry-run push and remotes.
Original prompt
Shared by the source author. See source notes for context.
/checkup prompt-audit
Reach people exploring AI agents
See placements →Evidence at a glance
Sourced account- Source author
- Ted (@tedagentic)
- Original account
- Read the source ↗
- Published
- Source link checked
- Reported result
- The instruction file was revised and token-in-remote guidance replaced by verified GitHub CLI authentication. A dry-run push worked and local remotes had no embedded tokens.
- Human involvement
- Ted reviewed the proposed patch, accepted its individual changes, configured credential handling and confirmed a dry-run push and clean repository remotes.
A linked account supports attribution. It does not mean we independently reproduced its result.
Report an issue with this case
Open correction emailOpens your email app with the case link included. Nothing is sent automatically.
How the agent did it
- Claude audited the active instruction file and proposed findings with a patch.
- Ted reviewed changes, moved old history out and retained current rules and reasons.
- He configured GitHub CLI authentication, verified a dry-run push and checked all repository remotes for tokens.
Ted used Claude Code's prompt audit on the long-lived instruction file for his automation server. He expected outdated prompting habits, but the agent found stale installation facts, accumulated history and a standing instruction that put a GitHub token into a repository's remote URL.
The audit produced a report and a patch without applying it automatically. Ted reviewed the proposed changes individually. Old cron history moved into a separate file, while the current schedule and the reason to check before restoring removed jobs remained available.
The security correction changed the actual authentication path rather than merely softening the instruction. Ted configured Git to use the GitHub CLI's existing login, confirmed a dry-run push and then replaced the token-bearing procedure. He checked every local repository's remote URL and found no remaining embedded token.
The result was a revised briefing file and verified credential workflow. The audit also preserved contextual rules that still had reasons, rather than simply minimizing word count. The source shows how an old troubleshooting note can become a repeatedly executed instruction, and how human review plus a real push check was needed to establish that its safer replacement worked.
Prompt
Original prompt
Source: Personal blog · Ted (@tedagentic)
Frequently asked questions
What was the security finding?
A standing instruction told the agent to put a live token in Git's remote URL.
Did the audit change files immediately?
No. It proposed a report and patch for approval.
How was the replacement checked?
Ted confirmed a dry-run push and checked local remotes for embedded tokens.
More details
About this account
Claude audited the active instruction file and proposed findings with a patch. Ted reviewed changes, moved old history out and retained current rules and reasons.
Original firsthand account opened. Audit proposed a report and patch without changing files until approval. No general guarantee that prompt auditing prevents credential leakage is claimed. Original prompt excerpt.
Credit: Ted (@tedagentic) — Personal blog
Source published
Added to Agents In Use
Source checked
Tools and topics
Claude Code · GitHub CLI · Git · CLAUDE.md
Credential handling · Instruction audit
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.