# Practical ways to use the Claude Agent SDK
📝 Customize system prompts flexibly with three levels: preset, append, and full replacement.
System Prompt Modification offers three levels of customization via `systemPrompt`: Claude Code preset, append, and custom string replacement.
📌 Title: Modifying System Prompts
🔗 URL:
🧩 Overview
Use `preset: "claude_code"` for the full Claude Code prompt, `append` to add to the preset, or a custom string for complete replacement. Output style files enable cross-CLI/SDK persona reuse.
🛠 How to use it
`system_prompt` accepts three forms: preset with `{"type": "preset", "preset": "claude_code"}`, append with `"append": "extra instructions"`, or a custom string for full replacement. Use `excludeDynamicSections: true` for cross-session prompt cache sharing.
🏗 Practical usage
- For coding agents, use `preset: "claude_code"` for the full prompt with tool guidance and safety rules.
- Append team conventions like "Always add docstrings and type hints to Python" — the safest customization that removes nothing.
- For support bots or data analysis assistants with unique personas, use a custom string for complete replacement.
- Use `excludeDynamicSections: true` to share prompt cache across users/machines and reduce fleet costs.
💡 Use cases
🤖 Claude Code-compatible coding agents
📋 Automatic team convention enforcement
🎭 Custom persona agents
⚠️ Watch out
When using custom string replacement, you must provide your own tool guidance and safety instructions. `excludeDynamicSections` requires TS v0.2.98+ / Python v0.1.58+.
#
ClaudeAgentSDK# #
AI#