surshar / claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Built by Anthropic · github.com/anthropics
Document the permissionMode agent frontmatter field (added in v2.0.43) with kebab-case values for consistency: - default: inherit from parent conversation - ask: always prompt for permission - accept-edits: auto-accept file edits Note backwards compatibility with camelCase 'acceptEdits' while establishing kebab-case as the preferred format to match CLI flags.
| @@ -42,6 +42,7 @@ | ||
| 42 | 42 | model: inherit |
| 43 | 43 | color: blue |
| 44 | 44 | tools: ["Read", "Write", "Grep"] |
| 45 | +permissionMode: default | |
| 45 | 46 | --- |
| 46 | 47 | |
| 47 | 48 | You are [agent role description]... |
| @@ -159,6 +160,41 @@ | ||
| 159 | 160 | - Testing: `["Read", "Bash", "Grep"]` |
| 160 | 161 | - Full access: Omit field or use `["*"]` |
| 161 | 162 | |
| 163 | +### permissionMode (optional) | |
| 164 | + | |
| 165 | +Control how permission prompts are handled for the agent. | |
| 166 | + | |
| 167 | +**Format:** String | |
| 168 | + | |
| 169 | +**Options:** | |
| 170 | +- `default` - Inherit permission mode from parent conversation (default behavior) | |
| 171 | +- `ask` - Always prompt for permission before tool use | |
| 172 | +- `accept-edits` - Auto-accept file edits without prompting | |
| 173 | + | |
| 174 | +```yaml | |
| 175 | +permissionMode: accept-edits | |
| 176 | +``` | |
| 177 | + | |
| 178 | +**Default:** If omitted, inherits from parent conversation settings | |
| 179 | + | |
| 180 | +**Backwards compatibility:** `acceptEdits` is also accepted but `accept-edits` (kebab-case) is preferred for consistency with CLI flags. | |
| 181 | + | |
| 182 | +**Use cases:** | |
| 183 | +- Agents performing many file operations: Use `accept-edits` | |
| 184 | +- Security-sensitive agents: Use `ask` to ensure oversight | |
| 185 | +- General purpose: Omit field to inherit conversation settings | |
| 186 | + | |
| 187 | +**Example:** | |
| 188 | +```yaml | |
| 189 | +--- | |
| 190 | +name: code-generator | |
| 191 | +description: Use this agent when... | |
| 192 | +model: inherit | |
| 193 | +color: green | |
| 194 | +permissionMode: accept-edits | |
| 195 | +--- | |
| 196 | +``` | |
| 197 | + | |
| 162 | 198 | ## System Prompt Design |
| 163 | 199 | |
| 164 | 200 | The markdown body becomes the agent's system prompt. Write in second person, addressing the agent directly. |
| @@ -355,6 +391,7 @@ | ||
| 355 | 391 | | model | Yes | inherit/sonnet/opus/haiku | inherit | |
| 356 | 392 | | color | Yes | Color name | blue | |
| 357 | 393 | | tools | No | Array of tool names | ["Read", "Grep"] | |
| 394 | +| permissionMode | No | default/ask/accept-edits | accept-edits | | |
| 358 | 395 | |
| 359 | 396 | ### Best Practices |
| 360 | 397 |