MCPcopy
hub / github.com/codeaashu/claude-code / getUndercoverInstructions

Function getUndercoverInstructions

src/utils/undercover.ts:39–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39export function getUndercoverInstructions(): string {
40 if (process.env.USER_TYPE === 'ant') {
41 return `## UNDERCOVER MODE — CRITICAL
42
43You are operating UNDERCOVER in a PUBLIC/OPEN-SOURCE repository. Your commit
44messages, PR titles, and PR bodies MUST NOT contain ANY Anthropic-internal
45information. Do not blow your cover.
46
47NEVER include in commit messages or PR descriptions:
48- Internal model codenames (animal names like Capybara, Tengu, etc.)
49- Unreleased model version numbers (e.g., opus-4-7, sonnet-4-8)
50- Internal repo or project names (e.g., claude-cli-internal, anthropics/…)
51- Internal tooling, Slack channels, or short links (e.g., go/cc, #claude-code-…)
52- The phrase "Claude Code" or any mention that you are an AI
53- Any hint of what model or version you are
54- Co-Authored-By lines or any other attribution
55
56Write commit messages as a human developer would — describe only what the code
57change does.
58
59GOOD:
60- "Fix race condition in file watcher initialization"
61- "Add support for custom key bindings"
62- "Refactor parser for better error messages"
63
64BAD (never write these):
65- "Fix bug found while testing with Claude Capybara"
66- "1-shotted by claude-opus-4-6"
67- "Generated with Claude Code"
68- "Co-Authored-By: Claude Opus 4.6 <…>"
69`
70 }
71 return ''
72}
73
74/**
75 * Check whether to show the one-time explainer dialog for auto-undercover.

Callers 3

getPromptContentFunction · 0.85
getPromptContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected