Agents In Use
What’s new todayLast update
1005 additions

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.

FROM THE SOURCE

Original prompt

Shared by the source author. See source notes for context.

/checkup prompt-audit

What happened

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.

Reported by Ted (@tedagentic) — Personal blog

How the agent did it

  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.

Where a person stepped in

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

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 5 Oct 2026

Source checked 14 Oct 2026

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.