skip to content
Mansoor's Blog
Table of Contents

Ever wondered how Claude Code manages to be so much more than just a chat interface? How it can actually execute commands, analyze code, and work with your filesystem intelligently? The secret lies in a sophisticated collection of system tools that transform Claude from a conversational AI into a powerful coding agent.

In this blog post I will reveal the exact system prompts Claude code uses. I dug through Claude’s compiled source code and found more than 25 system tool prompts. I will also explain how these tools are beneficial and can be used to our advantage.

What Makes Agentic AI Actually Work?

So, what exactly is agentic AI?.Think of Agentic AI as a highly skilled developer who can do the following:

  • Execute commands in the terminal
  • Analyze and modify code intelligently
  • Search through codebases efficiently
  • Provide educational insights while working
  • Collaborate with you on complex tasks

But here’s the thing: without the right system tools, an AI agent is just a very knowledgeable parrot. The real power comes from the specialized prompts that tell Agents how to use its capabilities safely and effectively.

The System Tool Arsenal

Let me walk you through the comprehensive toolkit that makes Claude Code so powerful along with links to its system prompts:

Execution Tools

This is the workhorse tool that actually runs commands in your terminal with the ability to sandbox commands when needed adding aditional security.

Terminal window
# Claude knows to use sandbox=true for read-only operations
ls -la src/components/ # Runs immediately, no approval needed
# But switches to sandbox=false for operations that modify files
npm run build # Requires explicit approval

Before executing commands, Claude analyzes them to determine if the output should be summarized. This prevents you from drowning in verbose logs:

<should_summarize>true</should_summarize>
<reason>Output contains verbose build logs with only final status being important</reason>
<summary>
## Overview
Build completed successfully with 2 warnings
## Errors
- Warning: Unused import in utils.ts
- Warning: Missing type annotation in helper.ts
## Verbatim Output
βœ“ Build completed in 2.3s
</summary>

Intelligence & Learning Tools

This tool transforms Claude from a code executor into an educational partner. It provides insights about implementation choices and encourages collaborative learning:

πŸ’‘ **Insight ─────────────────────────────────────**
β€’ Using React.memo here prevents unnecessary re-renders when props haven't changed
β€’ The custom hook pattern separates business logic from UI concerns
β€’ TypeScript's discriminated unions ensure type safety across different states
─────────────────────────────────────────────────

Before diving into implementation, Claude creates structured plans and validates that the environment is ready:

πŸ“‹ **Implementation Plan**
1. Set up component structure with TypeScript interfaces
2. Implement core logic with error handling
3. Add comprehensive tests
4. Update documentation
βœ… **Environment Check**
- TypeScript compiler available
- Test framework configured
- Required dependencies installed

Search & Discovery Tools

Instead of slow find commands, Claude uses optimized file matching:

**File Search Results**
Found 15 TypeScript files matching pattern: **/*.ts
- src/components/Button.tsx
- src/utils/helpers.ts
- src/types/index.ts

Intelligently extracts and validates file paths from various sources:

**Extracted Paths**
- Valid: src/components/Header.tsx
- Valid: public/images/logo.svg
- Invalid: /etc/passwd (security restriction)

Knowledge Management Tools

Claude can remember important information across sessions and reference it when relevant:

**Memory Context**
Previous session: Implemented user authentication system
Key decisions: Used JWT tokens, bcrypt for password hashing
Current task: Adding password reset functionality

Save the current state of your work session for later reference:

**Session Snapshot Saved**
- Current working directory: /project/src
- Open files: 3
- Recent commands: 15
- Context: Building React component library

Workflow Tools

Claude can create sophisticated CI/CD workflows:

# Claude automatically generates this GitHub Actions workflow
on:
issue_comment:
types: [created]
pull_request_review:
types: [submitted]
jobs:
claude:
if: contains(github.event.comment.body, '@claude')
runs-on: ubuntu-latest
steps:
- name: Run Claude Code
uses: anthropics/claude-code-action@beta

When a task requires specialized knowledge, Claude can launch specialized agents:

**Launching Specialized Agent**
Agent: Code Review Specialist
Focus: Security analysis, performance optimization
Context: Pull request #123 with database schema changes

Utility & Helper Tools

Handle complex refactoring across multiple files:

**Multi-File Edit Plan**
- Update interface in types.ts
- Modify implementation in service.ts
- Update tests in service.test.ts
- Fix imports in index.ts

This is my favourite tool where Claude can track complex tasks with dependencies and progress:

**Todo List**
- [x] Set up project structure
- [x] Install dependencies
- [ ] Implement core functionality
- [ ] User authentication
- [ ] Data validation
- [ ] Error handling
- [ ] Write tests
- [ ] Deploy to staging

Other Tools

Here are the remaining tool prompts that I did not mention above:

How These Tools Work Together

The beauty of this system is how the tools complement each other. Here’s a real-world example:

Scenario: Implementing a New Feature

  1. Plan and Ready to Code β†’ Creates implementation plan and validates environment
  2. Fast File Matching β†’ Finds relevant existing code
  3. Execute Bash Commands β†’ Runs tests and builds
  4. Analyze Bash Commands β†’ Summarizes verbose output
  5. Multiple Edits β†’ Makes changes across multiple files
  6. Insights β†’ Provides educational context
  7. Memory β†’ Remembers decisions for future reference

How is this useful to me?

You can you use these examples to maximize the utilization of these tools by good prompting. This also provides a base foundation for others developers to create even better and pwoerful tools.

Final Thoughts

I hope this is useful information to you. Full disclaimer: I did use AI to clean the system prompts. Even with AI it took me a week to find, extract, and process all the information into a single place.


Want to explore these tools yourself? Check out the reference section where I’ve documented all the system prompts I discovered.