MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / getSystemPrompt

Function getSystemPrompt

package/cli.js:997–1021  ·  view source on GitHub ↗
({toolUseContext:q})

Source from the content-addressed store, hash-verified

995- Reference exact documentation URLs in your responses
996- Help users discover features by proactively suggesting related commands, shortcuts, or capabilities
997
998Complete the user's request by providing accurate, documentation-based guidance.`}function pQ_(){if(A16())return`- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.88",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-30T21:59:52Z"}.ISSUES_EXPLAINER}`;return"- When you cannot find an answer or the feature doesn't exist, direct the user to use /feedback to report a feature request or bug"}var uQ_="https://code.claude.com/docs/en/claude_code_docs_map.md",F24="https://platform.claude.com/llms.txt",Gx1="claude-code-guide",U24;var Tx1=y(()=>{IY();qM();NO6();G7();ju();U1();l8();U24={agentType:Gx1,whenToUse:`Use this agent when the user asks questions ("Can Claude...", "Does Claude...", "How do I...") about: (1) Claude Code (the CLI tool) - features, hooks, slash commands, MCP servers, settings, IDE integrations, keyboard shortcuts; (2) Claude Agent SDK - building custom agents; (3) Claude API (formerly Anthropic API) - API usage, tool use, Anthropic SDK usage. **IMPORTANT:** Before spawning a new agent, check if there is already a running or recently completed claude-code-guide agent that you can continue via ${wD}.`,tools:Nj()?[_q,Cq,Sj,$N]:[i9,n3,Cq,Sj,$N],source:"built-in",baseDir:"built-in",model:"haiku",permissionMode:"dontAsk",getSystemPrompt({toolUseContext:q}){let K=q.options.commands,_=[],z=K.filter((H)=>H.type==="prompt");if(z.length>0){let H=z.map((J)=>`- /${J.name}: ${J.description}`).join(`
999`);_.push(`**Available custom skills in this project:**
1000${H}`)}let Y=q.options.agentDefinitions.activeAgents.filter((H)=>H.source!=="built-in");if(Y.length>0){let H=Y.map((J)=>`- ${J.agentType}: ${J.whenToUse}`).join(`
1001`);_.push(`**Available custom agents configured:**
1002${H}`)}let $=q.options.mcpClients;if($&&$.length>0){let H=$.map((J)=>`- ${J.name}`).join(`
1003`);_.push(`**Configured MCP servers:**
1004${H}`)}let A=K.filter((H)=>H.type==="prompt"&&H.source==="plugin");if(A.length>0){let H=A.map((J)=>`- /${J.name}: ${J.description}`).join(`
1005`);_.push(`**Available plugin skills:**
1006${H}`)}let O=Z7();if(Object.keys(O).length>0){let H=g6(O,null,2);_.push(`**User's settings.json:**
1007\`\`\`json
1008${H}
1009\`\`\``)}let w=pQ_(),j=`${mQ_()}
1010${w}`;if(_.length>0)return`${j}
1011
1012---
1013
1014# User's Current Configuration
1015
1016The user has the following custom setup in their environment:
1017
1018${_.join(`
1019
1020`)}
1021
1022When answering questions, consider these configured features and proactively suggest them when relevant.`;return j}}});var TL="ExitPlanMode",kX="ExitPlanMode";function BQ_(){let q=Nj(),K=q?`- Use \`find\` via ${_q} for broad file pattern matching`:`- Use ${i9} for broad file pattern matching`,_=q?`- Use \`grep\` via ${_q} for searching file contents with regex`:`- Use ${n3} for searching file contents with regex`;return`You are a file search specialist for Claude Code, Anthropic's official CLI for Claude. You excel at thoroughly navigating and exploring codebases.
1023
1024=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===

Callers 9

resumeAgentBackgroundFunction · 0.90
callFunction · 0.90
fetchSystemPromptPartsFunction · 0.90
analyzeContextUsageFunction · 0.90
runInProcessTeammateFunction · 0.90
getCacheSharingParamsFunction · 0.90
buildCacheSafeParamsFunction · 0.90
REPLFunction · 0.90

Calls 7

g6Function · 0.85
pQ_Function · 0.85
mQ_Function · 0.85
filterMethod · 0.80
joinMethod · 0.45
pushMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected