Annotez un plan écrit par Claude Code, puis demandez-lui de traiter vos remarques : un skill lui apprend les annotations de zdkmd. Il ne traite que celles à traiter, garde leurs Renvois dans le texte et résout chacune d'une ligne → qui dit ce qu'il a fait, sans rien supprimer.
SKILL.md
---
name: zdkmd-annotations
description: Read and process the zdkmd annotations of Markdown documents, review remarks written in the file itself as HTML comments (a mark `<!--zdkmd:k3f9-->` after the passage, the annotation `<!-- zdkmd:k3f9 open ...` at the end of the document). Use when asked to process, answer or resolve annotations ("process the zdkmd annotations", "deal with the annotations of this document", "traite les annotations de ce document", "réponds aux annotations"), and whenever a Markdown file you read or edit contains `zdkmd:` comments, so as to keep them intact.
---
# zdkmd annotations
zdkmd is a Markdown reader for the terminal. Its users annotate passages of a document while they read it, and zdkmd writes each annotation in the file itself, as two HTML comments that a rendered Markdown does not show. The `open` annotations are requests for you; the others are not.
## Format
An annotation has two parts that share its **reference**, four characters `[a-z0-9]` (`k3f9` below), unique in the document.
The **mark**, an HTML comment right after the passage annotated, glued to its last word:
```markdown
The export runs every night at 2 a.m.<!--zdkmd:k3f9--> and takes ten minutes.
```
After a link, inline code, a formula or an image, the mark follows the whole element; after the closing `**`, `*` or `~~` of an emphasis that ends the passage. After a heading, a code block, a Mermaid diagram, a `$$` formula or the frontmatter, the mark stands alone on the next line, with the `> ` of the quote or callout around it, or the indent of the list item.
The **annotation**, an HTML comment at the end of the document, after everything else:
```markdown
<!-- zdkmd:k3f9 open 2026-11-04 Fabrice
> runs every night at 2 a.m.
What if the export fails? To be specified.
See also RG-017.
-->
```
- First line: `<!-- zdkmd:`, the reference, the state, the date of creation (`YYYY-MM-DD`), then the author (the rest of the line, optional), separated by single spaces.
- The state: `open` (a request, to be dealt with), `resolved` (closed) or `permanent` (a remark to keep, which asks for nothing).
- Second line, after `> `: the **quoted passage**, the text annotated as it was shown, on one line. It ends where the mark stands.
- Then the text of the remark, on as many lines as needed, blank lines included, up to the `-->` alone on its line.
- In the quoted passage and in the text, `-->` is written `--\>` and `--!>` is written `--!\>`, since either would end the comment. The escape is reversible: a `--` or `--!` followed by backslashes then `>` takes one more backslash when written, and loses one when read.
A `zdkmd:` comment inside a code block or inline code, like the examples above, is not an annotation.
## Finding the annotations to process
```sh
rg 'zdkmd:[a-z0-9]{4} open'
```
lists the first lines of the open annotations under the current folder (`rg -l` for the files only). It never matches a mark alone, and its matches inside a code block are not annotations. An annotation whose state is none of `open`, `resolved` and `permanent` (written by hand, or by a newer zdkmd) is listed by zdkmd as open: `rg 'zdkmd:[a-z0-9]{4} '` lists every annotation; ask the user before processing such an annotation, and never rewrite its state on your own.
## Rules
1. Process only the `open` annotations: they are the only requests. A `permanent` annotation is a remark to keep: give it no follow-up and never change its state. A `resolved` annotation is closed, unless the user reopens it.
2. For each open annotation, find its mark, read the quoted passage and the remark, and do what the remark asks in the document. When it is unclear, or asks for a decision that belongs to the user, ask rather than guess, and leave it `open`.
3. Keep the mark: when you rewrite the passage, put its mark back right after the new passage, glued to its last word, without space. Never move a mark to another passage, never add a mark, never change a reference.
4. Once done, change the state from `open` to `resolved` on the first line, and add at the end of the text one line that starts with `→ ` and says what you did:
```markdown
<!-- zdkmd:k3f9 resolved 2026-11-04 Fabrice
> runs every night at 2 a.m.
What if the export fails? To be specified.
See also RG-017.
→ Added the section "Failures": two retries, then an alert to the on-call team.
-->
```
5. Never delete an annotation, even a resolved one, and never delete a mark: the user deletes the resolved annotations from zdkmd.
6. Do not touch the quoted passage, the reference, the date nor the author, even after rewriting the passage: zdkmd then shows the annotation as "text changed since".
7. Escape `-->` as `--\>`, and `--!>` as `--!\>`, in your `→ ` line.
8. Leave the annotations at the end of the document, in their order; in a merge conflict between two annotations of different references, keep both blocks.
9. Two blocks of the same reference are the same annotation changed on two branches, both kept at a merge: zdkmd writes on neither. Do not process it: show both blocks to the user, ask which text and state to keep, then merge them into one block, with that reference, and keep its mark.
An annotation whose mark is missing (lost when its passage was rewritten) is detached: process it from its quoted passage the same way, without writing a mark; the user can reattach it from zdkmd.
When asked to process the annotations of a document, process every open annotation of that document, then say in a few lines which ones you resolved and which ones stay open, and why.
Chaque annotation va en fin de document : deux branches qui en ajoutent une chacune y entrent en conflit. Gardez les deux blocs, en supprimant les lignes <<<<<<<, ======= et >>>>>>>, avec une ligne vide entre les deux commentaires. Deux blocs de même référence sont la même annotation changée sur les deux branches : zdkmd liste le second en double et n'écrit sur aucun ; n'en gardez qu'un, fusionné.