Answer: To show a code diff, use `Code` with `format: 'diff'`, where `source` is one or more unified diff hunks. Status: Confirmed Entry: tool/claude-code/features/mod-code-diff-element Revision: 2 Digest: sha256:66f850ea6368d3df (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:14Z Last changed: 2026-11-14T12:19:27Z (example source: @@ -1,3 +1,3 @@\n # Mods\n-A mod is a plugin.\n+A mod is a plugin that runs code.\n Read on. → '@@ -1,3 +1,3 @@\n # Mods\n-A mod is a plugin.\n+A mod is a plugin that runs code.\n Read on.') Last verified: 2026-11-20T12:23:42Z Next check: 2026-11-21T12:23:42Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of format | 'diff' | [1] | 2026-11-20 source | one or more unified diff hunks | [1] | 2026-11-20 example source | '@@ -1,3 +1,3 @@\n # Mods\n-A mod is a plugin.\n+A mod is a plugin that runs code.\n Read on.' | [1] | 2026-11-20 Sources: [1] Anthropic. "Interface gallery for mods". https://code.claude.com/docs/en/plugins/mods/gallery.md Role: primary. Accessed: 2026-11-20T12:23:42Z Quote: "With `format: 'diff'`, `source` is one or more unified diff hunks:" (Supports: format) Quote: "`source` is one or more unified diff hunks" (Supports: source) Quote: "source: '@@ -1,3 +1,3 @@\n # Mods\n-A mod is a plugin.\n+A mod is a plugin that runs code.\n Read on.'" (Supports: example source) Published: 2026-11-20T03:41:00Z Snapshot SHA-256: 44a9f8dc72c7ea0abb7e12f93f65b8be0d37fa7d852ee18eeb6fedc07e20dc2b (captured 2026-11-14T12:19:26Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-14T12:19:27Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:23:42Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:23:42Z Last attempt: 2026-11-20T12:23:42Z Notes and limitations: Extracted automatically from a single official source (section "`Code` as a diff"). Related: https://latestn.com/tool/claude-code/features/mod-image-in-tmux How do I draw an image inside tmux in a Claude Code mod? https://latestn.com/tool/claude-code/features/mod-keyboard-focus-hotkeys How do I handle keyboard focus and hotkeys for controls in a Claude Code mod pane? https://latestn.com/tool/claude-code/features/mod-markdown-element How do I display Markdown text in a Claude Code mod interface? https://latestn.com/tool/claude-code/features/internal-adoption-playbook How do I get my team to adopt Claude Code internally? https://latestn.com/tool/claude-code/features/keep-state-in-mod How do I keep a value in $.state across redraws and sessions in a Claude Code mod? https://latestn.com/tool/claude-code/features/mobile-limitations What are the limitations of using Claude Code on mobile? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-14T12:19:27Z | changed | example source: @@ -1,3 +1,3 @@\n # Mods\n-A mod is a plugin.\n+A mod is a plugin that runs code.\n Read on. → '@@ -1,3 +1,3 @@\n # Mods\n-A mod is a plugin.\n+A mod is a plugin that runs code.\n Read on.' | [1] 2026-11-14T12:19:27Z | changed | format: diff → 'diff' | [1] 2026-11-13T03:05:14Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/features/mod-code-diff-element/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/features/mod-code-diff-element POST: https://latestn.com/dispute/tool/claude-code/features/mod-code-diff-element with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/features/mod-code-diff-element?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I show a code diff in a Claude Code mod interface? Revision 2, last verified 2026-11-20T12:23:42Z. https://latestn.com/tool/claude-code/features/mod-code-diff-element (accessed 2026-11-21T09:50:26Z). @misc{LatestN_tool_claude_code_features_mod_code_diff_element_r2, title = {How do I show a code diff in a Claude Code mod interface?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/features/mod-code-diff-element}}, note = {Revision 2; digest sha256:66f850ea6368d3df; last verified 2026-11-20T12:23:42Z; accessed 2026-11-21T09:50:26Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/features/mod-code-diff-element