Added reference prompts for agent and tool implementations: agents/explore/ - Codebase exploration agent prompt agents/plan/ - Plan mode with system reminders agents/task/ - Task execution agent prompt agents/ - Main system prompt reference tools/file/ - Read, Edit, Write, Glob tool descriptions tools/shell/ - Bash with git commit/PR instructions tools/search/ - Grep, WebSearch, WebFetch descriptions Source: gitea:library/claude-code-system-prompts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
84 lines
4.7 KiB
Markdown
84 lines
4.7 KiB
Markdown
<!--
|
|
name: 'Tool Description: ReadFile'
|
|
description: Tool description for reading files
|
|
ccVersion: 2.0.14
|
|
variables:
|
|
- DEFAULT_READ_LINES
|
|
- MAX_LINE_LENGTH
|
|
- CAN_READ_PDF_FILES
|
|
- BASH_TOOL_NAME
|
|
-->
|
|
Reads a file from the local filesystem. You can access any file directly by using this tool.
|
|
Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.
|
|
|
|
Usage:
|
|
- The file_path parameter must be an absolute path, not a relative path
|
|
- By default, it reads up to ${DEFAULT_READ_LINES} lines starting from the beginning of the file
|
|
- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters
|
|
- Any lines longer than ${MAX_LINE_LENGTH} characters will be truncated
|
|
- Results are returned using cat -n format, with line numbers starting at 1
|
|
- This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.${CAN_READ_PDF_FILES()?`
|
|
- This tool can read PDF files (.pdf). PDFs are processed page by page, extracting both text and visual content for analysis.`:""}
|
|
- This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
|
|
- This tool can only read files, not directories. To read a directory, use an ls command via the ${BASH_TOOL_NAME} tool.
|
|
- You can call multiple tools in a single response. It is always better to speculatively read multiple potentially useful files in parallel.
|
|
- You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
|
|
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.
|
|
|
|
|
|
---
|
|
|
|
|
|
<!--
|
|
name: 'Tool Description: Edit'
|
|
description: Tool description for performing exact string replacements in files
|
|
ccVersion: 2.0.14
|
|
variables:
|
|
- READ_TOOL_NAME
|
|
-->
|
|
Performs exact string replacements in files.
|
|
|
|
Usage:
|
|
- You must use your \`${READ_TOOL_NAME}\` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file.
|
|
- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the old_string or new_string.
|
|
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
|
|
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
|
|
- The edit will FAIL if \`old_string\` is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use \`replace_all\` to change every instance of \`old_string\`.
|
|
- Use \`replace_all\` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
|
|
|
|
|
|
---
|
|
|
|
|
|
<!--
|
|
name: 'Tool Description: Write'
|
|
description: Tool description creating/overwriting writing individual files
|
|
ccVersion: 2.0.14
|
|
variables:
|
|
- READ_TOOL_NAME
|
|
-->
|
|
Writes a file to the local filesystem.
|
|
|
|
Usage:
|
|
- This tool will overwrite the existing file if there is one at the provided path.
|
|
- If this is an existing file, you MUST use the ${READ_TOOL_NAME} tool first to read the file's contents. This tool will fail if you did not read the file first.
|
|
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
|
|
- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.
|
|
- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.
|
|
|
|
|
|
---
|
|
|
|
|
|
<!--
|
|
name: 'Tool Description: Glob'
|
|
description: Tool description for file pattern matching and searching by name
|
|
ccVersion: 2.0.14
|
|
-->
|
|
- Fast file pattern matching tool that works with any codebase size
|
|
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
|
|
- Returns matching file paths sorted by modification time
|
|
- Use this tool when you need to find files by name patterns
|
|
- When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead
|
|
- You can call multiple tools in a single response. It is always better to speculatively perform multiple searches in parallel if they are potentially useful.
|