# 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.

Agent: Claude (via Claude Code prompt audit)
Tools: Claude Code, GitHub CLI, Git, CLAUDE.md
Category: Security
Date: 2026-10-05

Outcome: 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.

## Steps

1. Claude audited the active instruction file and proposed findings with a patch.
2. Ted reviewed changes, moved old history out and retained current rules and reasons.
3. He configured GitHub CLI authentication, verified a dry-run push and checked all repository remotes for tokens.

Human oversight: Ted reviewed the proposed patch, accepted its individual changes, configured credential handling and confirmed a dry-run push and clean repository remotes.

Source: [Ted (@tedagentic) — Personal blog](https://tedagentic.com/posts/my-ai-briefing-file-was-a-diary)

Canonical URL: https://agentsinuse.com/use-cases/claude-to-remove-a-token-leak-from-agent-instructions/
