Register and share your invite link to earn from video plays and referrals.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture ๆŠ•็จฟใฏๅ€‹ไบบใฎๆ„่ฆ‹ใงใ™ใ€‚
Joined May 2026
286 Following    469 Followers
# 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#
Show more