[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75CMZMJGMP4XBYD7D29P7FD":3,"skill-same:01M75CMZMJGMP4XBYD7D29P7FD":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75CMZMJGMP4XBYD7D29P7FD","crypto-protocol-diagram",null,"Extracts protocol message flow from source code, RFCs, academic papers, pseudocode, informal prose, ProVerif (.pv), or Tamarin (.spthy) models and generates Mermaid sequenceDiagrams with cryptographic annotations. Use when diagramming a crypto protocol, visualizing a handshake or key exchange flow, extracting message flow from a spec or RFC, diagramming a ProVerif or Tamarin model, or drawing sequence diagrams for TLS, Noise, Signal, X3DH, Double Ratchet, FROST, DH, or ECDH protocols.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fcrypto-protocol-diagram\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: crypto-protocol-diagram\ndescription: \"Extracts protocol message flow from source code, RFCs, academic papers, pseudocode, informal prose, ProVerif (.pv), or Tamarin (.spthy) models and generates Mermaid sequenceDiagrams with cryptographic annotations. Use when diagramming a crypto protocol, visualizing a handshake or key exchange flow, extracting message flow from a spec or RFC, diagramming a ProVerif or Tamarin model, or drawing sequence diagrams for TLS, Noise, Signal, X3DH, Double Ratchet, FROST, DH, or ECDH protocols.\"\n---\n\n# Crypto Protocol Diagram\n\nProduces a Mermaid `sequenceDiagram` (written to file) and an ASCII sequence\ndiagram (printed inline) from either:\n\n- **Source code** implementing a cryptographic protocol, or\n- **A specification** — RFC, academic paper, pseudocode, informal prose,\n  ProVerif (`.pv`), or Tamarin (`.spthy`) model.\n\n**Tools used:** Read, Write, Grep, Glob, Bash, WebFetch (for URL specs).\n\nUnlike the `diagramming-code` skill (which visualizes code structure), this skill\nextracts **protocol semantics**: who sends what to whom, what cryptographic\ntransformations occur at each step, and what protocol phases exist.\n\nFor call graphs, class hierarchies, or module dependency maps, use the\n`diagramming-code` skill instead.\n\n## When to Use\n\n- User asks to diagram, visualize, or extract a cryptographic protocol\n- Input is source code implementing a handshake, key exchange, or multi-party protocol\n- Input is an RFC, academic paper, pseudocode, or formal model (ProVerif\u002FTamarin)\n- User names a specific protocol (TLS, Noise, Signal, X3DH, FROST)\n\n## When NOT to Use\n\n- User wants a call graph, class hierarchy, or module dependency map — use `diagramming-code`\n- User wants to formally verify a protocol — use `mermaid-to-proverif` (after generating the diagram)\n- Input has no cryptographic protocol semantics (no parties, no message exchange)\n\n## Rationalizations to Reject\n\n| Rationalization | Why It's Wrong | Required Action |\n|-----------------|----------------|-----------------|\n| \"The protocol is simple, I can diagram from memory\" | Memory-based diagrams miss steps and invert arrows | Read the source or spec systematically |\n| \"I'll skip the spec path since code exists\" | Code may diverge from the spec — both paths catch different bugs | When both exist, run spec workflow first, then annotate code divergences |\n| \"Crypto annotations are optional decoration\" | Without crypto annotations, the diagram is just a message flow — useless for security review | Annotate every cryptographic operation |\n| \"The abort path is obvious, no need for alt blocks\" | Implicit abort handling hides missing error checks | Show every abort\u002Ferror path with `alt` blocks |\n| \"I don't need to check the examples first\" | The examples define the expected output quality bar | Study the relevant example before working on unfamiliar input |\n| \"ProVerif\u002FTamarin models are code, not specs\" | Formal models are specifications — they describe intended behavior, not implementation | Use the spec workflow (S1–S5) for `.pv` and `.spthy` files |\n\n---\n\n## Workflow\n\n```\nProtocol Diagram Progress:\n- [ ] Step 0: Determine input type (code \u002F spec \u002F both)\n- [ ] Step 1 (code) or S1–S5 (spec): Extract protocol structure\n- [ ] Step 6: Generate sequenceDiagram\n- [ ] Step 7: Verify and deliver\n```\n\n---\n\n### Step 0: Determine Input Type\n\nBefore doing anything else, classify the input:\n\n| Signal | Input type |\n|--------|-----------|\n| Source file extensions (`.py`, `.rs`, `.go`, `.ts`, `.js`, `.cpp`, `.c`) | **Code** |\n| Function\u002Fclass definitions, import statements | **Code** |\n| RFC-style section headers (`§`, `Section X.Y`, `MUST`\u002F`SHALL` keywords) | **Spec** |\n| `Algorithm`\u002F`Protocol`\u002F`Figure` labels, mathematical notation | **Spec** |\n| ProVerif file (`.pv`) with `process`, `let`, `in`\u002F`out` | **Spec** |\n| Tamarin file (`.spthy`) with `rule`, `--[...]->` | **Spec** |\n| Plain prose or numbered steps describing a protocol | **Spec** |\n| Both source files and a spec document | **Both** (annotate divergences with `⚠️`) |\n\n- **Code only** → skip to Step 1 below\n- **Spec only** → skip to Spec Workflow (S1–S5) below\n- **Both** → run Spec Workflow first, then use the code-reading steps to verify\n  the implementation against the spec diagram and annotate any divergences with `⚠️`\n- **Ambiguous** → ask the user: \"Is this a source code file, a specification\n  document, or both?\"\n\n---\n\n### Step 1: Locate Protocol Entry Points\n\nGrep for function names, type names, and comments that reveal the protocol:\n\n```bash\n# Find handshake, session, round, phase entry points\nrg -l \"handshake|session_init|round[_0-9]|setup|keygen|send_msg|recv_msg\" {targetDir}\n\n# Find crypto primitives in use\nrg \"sign|verify|encrypt|decrypt|dh|ecdh|kdf|hkdf|hmac|hash|commit|reveal|share\" \\\n    {targetDir} --type-add 'src:*.{py,rs,go,ts,js,cpp,c}' -t src -l\n```\n\nStart reading from the highest-level orchestration function — the one that calls\ninto handshake phases or the main protocol loop.\n\n### Step 2: Identify Parties and Roles\n\nExtract participant names from:\n\n- Struct\u002Fclass names: `Client`, `Server`, `Initiator`, `Responder`, `Prover`,\n  `Verifier`, `Dealer`, `Party`, `Coordinator`\n- Function parameter names that carry state for a role\n- Comments declaring the protocol role\n- Test fixtures that set up two-party or N-party scenarios\n\nMap these to Mermaid `participant` declarations. Use short, readable aliases:\n\n```\nparticipant I as Initiator\nparticipant R as Responder\n```\n\n### Step 3: Trace Message Flow\n\nFollow state transitions and network sends\u002Freceives. Look for patterns like:\n\n| Pattern | Meaning |\n|---------|---------|\n| `send(msg)` \u002F `recv()` | Direct message exchange |\n| `serialize` + `transmit` | Structured message sent |\n| Return value passed to other party's function | Logical message (in-process) |\n| `round1_output` → `round2_input` | Round-based MPC step |\n| Struct fields named `ephemeral_key`, `ciphertext`, `mac`, `tag` | Message contents |\n\nFor **in-process** protocol implementations (where both parties run in the same\nprocess), treat function call boundaries as logical message sends when they\nrepresent what would be a network boundary in deployment.\n\n### Step 4: Annotate Cryptographic Operations\n\nAt each protocol step, identify and label:\n\n| Operation | Diagram annotation |\n|-----------|-------------------|\n| Key generation | `Note over A: keygen(params) → pk, sk` |\n| DH \u002F ECDH | `Note over A,B: DH(sk_A, pk_B)` |\n| KDF \u002F HKDF | `Note over A: HKDF(ikm, salt, info)` |\n| Signing | `Note over A: Sign(sk, msg) → σ` |\n| Verification | `Note over B: Verify(pk, msg, σ)` |\n| Encryption | `Note over A: Enc(key, plaintext) → ct` |\n| Decryption | `Note over B: Dec(key, ct) → plaintext` |\n| Commitment | `Note over A: Commit(value, rand) → C` |\n| Hash | `Note over A: H(data) → digest` |\n| Secret sharing | `Note over D: Share(secret, t, n) → {s_i}` |\n| Threshold combine | `Note over C: Combine({s_i}) → secret` |\n\nKeep annotations concise — use mathematical shorthand, not code.\n\n### Step 5: Identify Protocol Phases\n\nGroup message steps into named phases using `rect` or `Note` blocks:\n\nCommon phases to detect:\n- **Setup \u002F Key Generation**: party key creation, trusted setup, parameter gen\n- **Handshake \u002F Init**: ephemeral key exchange, nonce exchange, version negotiation\n- **Authentication**: identity proof, certificate exchange, signature verification\n- **Key Derivation**: session key derivation from shared secrets\n- **Data Transfer \u002F Main Protocol**: encrypted application data exchange\n- **Finalization \u002F Teardown**: session close, MAC verification, abort handling\n\nDetect abort\u002Ferror paths and show them with `alt` blocks.\n\n---\n\n## Spec Workflow (S1–S5)\n\nUse this path when the input is a specification document rather than source code.\nAfter completing S1–S5, continue with Step 6 (Generate sequenceDiagram) and\nStep 7 (Verify and deliver) from the code workflow above.\n\n### Step S1: Ingest the Spec\n\nObtain the full spec text:\n\n- **File path provided** → read with the Read tool\n- **URL provided** → fetch with WebFetch\n- **Pasted inline** → work directly from conversation context\n\nThen identify the spec format and read\n[references\u002Fspec-parsing-patterns.md](references\u002Fspec-parsing-patterns.md)\nfor format-specific extraction guidance:\n\n| Format | Signals |\n|--------|---------|\n| RFC | `RFC XXXX`, `MUST`\u002F`SHALL`\u002F`SHOULD`, ABNF grammars, section-numbered prose |\n| Academic paper \u002F pseudocode | `Algorithm X`, `Protocol X`, `Figure X`, numbered steps, `←`\u002F`→` in math mode |\n| Informal prose | Numbered lists, \"A sends B ...\", plain English descriptions |\n| ProVerif (`.pv`) | `process`, `let`, `in(ch, x)`, `out(ch, msg)`, `!` (replication) |\n| Tamarin (`.spthy`) | `rule`, `--[ ]->`, `Fr(~x)`, `!Pk(A, pk)`, `In(m)`, `Out(m)` |\n\nIf the spec references a known named protocol (TLS, Noise, Signal, X3DH, Double\nRatchet, FROST), also read\n[references\u002Fprotocol-patterns.md](references\u002Fprotocol-patterns.md) to use its\ncanonical flow as a skeleton and fill in spec-specific details.\n\n### Step S2: Extract Parties and Roles\n\nIdentify all protocol participants. Look for:\n\n- **Named roles** in prose or pseudocode: `Alice`, `Bob`, `Client`, `Server`,\n  `Initiator`, `Responder`, `Prover`, `Verifier`, `Dealer`, `Party_i`,\n  `Coordinator`, `Signer`\n- **Section headers**: \"Parties\", \"Roles\", \"Participants\", \"Setup\", \"Notation\"\n- **ProVerif**: process names at top level (`let ClientProc(...)`, `let ServerProc(...)`)\n- **Tamarin**: rule names and fact arguments (e.g. `!Pk($A, pk)` — `$A` is a party)\n\nMap each role to a Mermaid `participant` declaration. Use short IDs with\ndescriptive aliases (see naming conventions in\n[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)).\n\n### Step S3: Extract Message Flow\n\nTrace what each party sends to whom and in what order. Extraction patterns by format:\n\n**RFC \u002F informal prose:**\n- Arrow notation: `A → B: msg`, `A -> B`\n- Sentence patterns: \"A sends B ...\", \"B responds with ...\", \"A transmits ...\",\n  \"upon receiving X, B sends Y\"\n- Numbered steps: extract in order, inferring sender\u002Freceiver from context\n\n**Pseudocode:**\n- Function signatures with explicit `sender`\u002F`receiver` parameters\n- `send(party, msg)` \u002F `receive(party)` calls\n- Return values passed as inputs to the other party's function in the next step\n\n**ProVerif (`.pv`):**\n- `out(ch, msg)` — send on channel `ch`\n- `in(ch, x)` — receive on channel `ch`, bind to `x`\n- Match `out`\u002F`in` pairs on the same channel to identify message flows\n- `!` (replication) signals a role that handles multiple sessions\n\n**Tamarin (`.spthy`):**\n- `In(m)` premise — receive message `m`\n- `Out(m)` conclusion — send message `m`\n- Rule name and ordering of rules reveal protocol rounds\n- `Fr(~x)` — fresh random value generated by a party\n- `--[ Label ]->` facts — security annotations, not messages\n\nPreserve the ordering and round structure. Group concurrent sends (broadcast)\nusing `par` blocks in the final diagram.\n\n### Step S4: Extract Cryptographic Operations\n\nFor each protocol step, identify the cryptographic operations performed and which\nparty performs them:\n\n| Spec notation | Operation | Diagram annotation |\n|---------------|-----------|-------------------|\n| `keygen()`, `Gen(1^λ)` | Key generation | `Note over A: keygen() → pk, sk` |\n| `DH(a, B)`, `g^ab` | DH \u002F ECDH | `Note over A,B: DH(sk_A, pk_B)` |\n| `KDF(ikm)`, `HKDF(...)` | Key derivation | `Note over A: HKDF(ikm, salt, info) → k` |\n| `Sign(sk, m)`, `σ ← Sign` | Signing | `Note over A: Sign(sk, msg) → σ` |\n| `Verify(pk, m, σ)` | Verification | `Note over B: Verify(pk, msg, σ)` |\n| `Enc(k, m)`, `{m}_k` | Encryption | `Note over A: Enc(k, plaintext) → ct` |\n| `Dec(k, c)` | Decryption | `Note over B: Dec(k, ct) → plaintext` |\n| `H(m)`, `hash(m)` | Hash | `Note over A: H(data) → digest` |\n| `Commit(v, r)`, `com` | Commitment | `Note over A: Commit(value, rand) → C` |\n| ProVerif `senc(m, k)` | Symmetric encryption | `Note over A: Enc(k, m) → ct` |\n| ProVerif `pk(sk)` | Public key derivation | `Note over A: pk = pk(sk)` |\n| ProVerif `sign(m, sk)` | Signing | `Note over A: Sign(sk, m) → σ` |\n\nIdentify security conditions and abort paths:\n\n- Prose: \"if verification fails, abort\", \"only if ...\", \"reject if ...\"\n- Pseudocode: `assert`, `require`, `if ... abort`\n- ProVerif: `if m = expected then ... else 0`\n- Tamarin: contradicting facts or restriction lemmas\n\nThese become `alt` blocks in the final diagram.\n\n### Step S5: Flag Spec Ambiguities\n\nBefore moving to Step 6, check for gaps:\n\n- **Unclear message ordering**: infer from round structure or section order;\n  annotate with `⚠️ ordering inferred from spec structure`\n- **Implied parties**: if a party's role is implied but unnamed, give it a\n  descriptive name and note the inference\n- **Missing steps**: if the spec omits a step that the canonical pattern for\n  this protocol requires, annotate:\n  `⚠️ spec omits [step] — canonical protocol requires it`\n- **Underspecified crypto**: if the spec says \"encrypt\" without specifying\n  the scheme, annotate: `⚠️ encryption scheme not specified`\n- **ProVerif\u002FTamarin**: private channels (`c` declared with `new c` or as a\n  private free name) represent out-of-band channels — note them\n\n---\n\n\u003C!-- Both code path (Steps 1–5) and spec path (Steps S1–S5) continue here -->\n\n### Step 6: Generate sequenceDiagram\n\nProduce Mermaid syntax following the rules in\n[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md).\n\n**Completeness over brevity.** Show every distinct message type. Omit repeated\nloop iterations (use `loop` blocks instead), but never omit a distinct protocol\nstep.\n\n**Correctness over aesthetics.** The diagram must match what the code actually\ndoes. If the code diverges from a known spec, annotate the divergence:\n\n```\nNote over A,B: ⚠️ spec requires MAC here — implementation omits it\n```\n\n### Step 7: Verify and Deliver\n\nBefore delivering:\n\n- [ ] Every participant declared actually sends or receives at least one message\n- [ ] Arrows point in the correct direction (sender → receiver)\n- [ ] Cryptographic operations are on the correct party (the one computing them)\n- [ ] If protocol phases are used, no arrows appear outside a phase block\n- [ ] `alt` blocks cover known abort\u002Ferror paths\n- [ ] Diagram renders without syntax errors (check\n      [references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)\n      for common pitfalls)\n- [ ] If spec divergence found, annotated with `⚠️`\n\n**Write the diagram to a file.** Choose a filename derived from the protocol\nname, e.g. `noise-xx-handshake.md` or `x3dh-key-agreement.md`. Write a\nMarkdown file with this structure:\n\n```markdown\n# \u003CProtocol Name> Sequence Diagram\n\n\\`\\`\\`mermaid\nsequenceDiagram\n    ...\n\\`\\`\\`\n\n## Protocol Summary\n\n- **Parties:** ...\n- **Round complexity:** ...\n- **Key primitives:** ...\n- **Authentication:** ...\n- **Forward secrecy:** ...\n- **Notable:** [spec deviations or security observations, or \"none\"]\n```\n\nAfter writing the file, print an **ASCII sequence diagram** inline in the\nresponse, followed by the Protocol Summary. State the output filename so the\nuser knows where to find the Mermaid source.\n\nFollow all drawing conventions in\n[references\u002Fascii-sequence-diagram.md](references\u002Fascii-sequence-diagram.md),\nincluding the inline output format.\n\n---\n\n## Decision Tree\n\n```\n── Input is a spec document (not code)?\n│  └─ Step S1: identify format, read references\u002Fspec-parsing-patterns.md\n│\n── Input is source code (not a spec)?\n│  └─ Step 1: grep for handshake\u002Fround\u002Fsend\u002Frecv entry points\n│\n── Both spec and code provided?\n│  └─ Run Spec Workflow (S1–S5) first to build canonical diagram,\n│     then read code and annotate divergences with ⚠️\n│\n── Spec is a known protocol (TLS, Noise, Signal, X3DH, FROST)?\n│  └─ Read references\u002Fprotocol-patterns.md and use canonical flow as skeleton\n│\n── Spec is ProVerif (.pv) or Tamarin (.spthy)?\n│  └─ Read references\u002Fspec-parsing-patterns.md → Formal Models section\n│\n── Spec message ordering is ambiguous?\n│  └─ Infer from round\u002Fsection structure, annotate with ⚠️\n│\n── Can't identify parties from spec?\n│  └─ Check \"Parties\"\u002F\"Notation\" sections; for ProVerif read process names;\n│     for Tamarin read rule names and fact arguments\n│\n── Don't know which code files implement the protocol?\n│  └─ Step 1: grep for handshake\u002Fround\u002Fsend\u002Frecv entry points\n│\n── Can't identify parties from struct names?\n│  └─ Read test files — test setup reveals roles\n│\n── Protocol runs in-process (no network calls)?\n│  └─ Treat function argument passing at role boundaries as messages\n│\n── MPC \u002F threshold protocol with N parties?\n│  └─ Read references\u002Fprotocol-patterns.md → MPC section\n│\n── Mermaid syntax error?\n│  └─ Read references\u002Fmermaid-sequence-syntax.md → Common Pitfalls\n│\n└─ ASCII drawing conventions?\n   └─ Read references\u002Fascii-sequence-diagram.md\n```\n\n---\n\n## Examples\n\n**Code path** — `examples\u002Fsimple-handshake\u002F`:\n\n- **`protocol.py`** — two-party authenticated key exchange (X25519 DH +\n  Ed25519 signing + HKDF + ChaCha20-Poly1305)\n- **`expected-output.md`** — exact ASCII diagram and Mermaid file the skill\n  should produce for that protocol\n\n**Spec path (ProVerif)** — `examples\u002Fsimple-proverif\u002F`:\n\n- **`model.pv`** — HMAC challenge-response authentication modeled in ProVerif\n- **`expected-output.md`** — step-by-step extraction walkthrough (parties,\n  message flow, crypto ops) and the exact ASCII diagram and Mermaid file the\n  skill should produce\n\nStudy the relevant example before working on an unfamiliar input.\n\n---\n\n## Supporting Documentation\n\n- **[references\u002Fspec-parsing-patterns.md](references\u002Fspec-parsing-patterns.md)** —\n  Extraction rules for RFC, academic paper\u002Fpseudocode, informal prose, ProVerif,\n  and Tamarin input formats; read during Step S1\n- **[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)** —\n  Participant syntax, arrow types, activations, grouping blocks, escaping rules,\n  and common rendering pitfalls\n- **[references\u002Fprotocol-patterns.md](references\u002Fprotocol-patterns.md)** —\n  Canonical message flows for TLS 1.3, Noise, X3DH, Double Ratchet, Shamir\n  secret sharing, commit-reveal, and generic MPC rounds; use as a reference\n  when comparing implementation against spec\n- **[references\u002Fascii-sequence-diagram.md](references\u002Fascii-sequence-diagram.md)** —\n  Column layout, arrow conventions, self-loops, phase labels, and inline\n  output format for the ASCII diagram\n","# Crypto Protocol Diagram\n\nProduces a Mermaid `sequenceDiagram` (written to file) and an ASCII sequence\ndiagram (printed inline) from either:\n\n- **Source code** implementing a cryptographic protocol, or\n- **A specification** — RFC, academic paper, pseudocode, informal prose,\n  ProVerif (`.pv`), or Tamarin (`.spthy`) model.\n\n**Tools used:** Read, Write, Grep, Glob, Bash, WebFetch (for URL specs).\n\nUnlike the `diagramming-code` skill (which visualizes code structure), this skill\nextracts **protocol semantics**: who sends what to whom, what cryptographic\ntransformations occur at each step, and what protocol phases exist.\n\nFor call graphs, class hierarchies, or module dependency maps, use the\n`diagramming-code` skill instead.\n\n## When to Use\n\n- User asks to diagram, visualize, or extract a cryptographic protocol\n- Input is source code implementing a handshake, key exchange, or multi-party protocol\n- Input is an RFC, academic paper, pseudocode, or formal model (ProVerif\u002FTamarin)\n- User names a specific protocol (TLS, Noise, Signal, X3DH, FROST)\n\n## When NOT to Use\n\n- User wants a call graph, class hierarchy, or module dependency map — use `diagramming-code`\n- User wants to formally verify a protocol — use `mermaid-to-proverif` (after generating the diagram)\n- Input has no cryptographic protocol semantics (no parties, no message exchange)\n\n## Rationalizations to Reject\n\n| Rationalization | Why It's Wrong | Required Action |\n|-----------------|----------------|-----------------|\n| \"The protocol is simple, I can diagram from memory\" | Memory-based diagrams miss steps and invert arrows | Read the source or spec systematically |\n| \"I'll skip the spec path since code exists\" | Code may diverge from the spec — both paths catch different bugs | When both exist, run spec workflow first, then annotate code divergences |\n| \"Crypto annotations are optional decoration\" | Without crypto annotations, the diagram is just a message flow — useless for security review | Annotate every cryptographic operation |\n| \"The abort path is obvious, no need for alt blocks\" | Implicit abort handling hides missing error checks | Show every abort\u002Ferror path with `alt` blocks |\n| \"I don't need to check the examples first\" | The examples define the expected output quality bar | Study the relevant example before working on unfamiliar input |\n| \"ProVerif\u002FTamarin models are code, not specs\" | Formal models are specifications — they describe intended behavior, not implementation | Use the spec workflow (S1–S5) for `.pv` and `.spthy` files |\n\n---\n\n## Workflow\n\n```\nProtocol Diagram Progress:\n- [ ] Step 0: Determine input type (code \u002F spec \u002F both)\n- [ ] Step 1 (code) or S1–S5 (spec): Extract protocol structure\n- [ ] Step 6: Generate sequenceDiagram\n- [ ] Step 7: Verify and deliver\n```\n\n---\n\n### Step 0: Determine Input Type\n\nBefore doing anything else, classify the input:\n\n| Signal | Input type |\n|--------|-----------|\n| Source file extensions (`.py`, `.rs`, `.go`, `.ts`, `.js`, `.cpp`, `.c`) | **Code** |\n| Function\u002Fclass definitions, import statements | **Code** |\n| RFC-style section headers (`§`, `Section X.Y`, `MUST`\u002F`SHALL` keywords) | **Spec** |\n| `Algorithm`\u002F`Protocol`\u002F`Figure` labels, mathematical notation | **Spec** |\n| ProVerif file (`.pv`) with `process`, `let`, `in`\u002F`out` | **Spec** |\n| Tamarin file (`.spthy`) with `rule`, `--[...]->` | **Spec** |\n| Plain prose or numbered steps describing a protocol | **Spec** |\n| Both source files and a spec document | **Both** (annotate divergences with `⚠️`) |\n\n- **Code only** → skip to Step 1 below\n- **Spec only** → skip to Spec Workflow (S1–S5) below\n- **Both** → run Spec Workflow first, then use the code-reading steps to verify\n  the implementation against the spec diagram and annotate any divergences with `⚠️`\n- **Ambiguous** → ask the user: \"Is this a source code file, a specification\n  document, or both?\"\n\n---\n\n### Step 1: Locate Protocol Entry Points\n\nGrep for function names, type names, and comments that reveal the protocol:\n\n```bash\n# Find handshake, session, round, phase entry points\nrg -l \"handshake|session_init|round[_0-9]|setup|keygen|send_msg|recv_msg\" {targetDir}\n\n# Find crypto primitives in use\nrg \"sign|verify|encrypt|decrypt|dh|ecdh|kdf|hkdf|hmac|hash|commit|reveal|share\" \\\n    {targetDir} --type-add 'src:*.{py,rs,go,ts,js,cpp,c}' -t src -l\n```\n\nStart reading from the highest-level orchestration function — the one that calls\ninto handshake phases or the main protocol loop.\n\n### Step 2: Identify Parties and Roles\n\nExtract participant names from:\n\n- Struct\u002Fclass names: `Client`, `Server`, `Initiator`, `Responder`, `Prover`,\n  `Verifier`, `Dealer`, `Party`, `Coordinator`\n- Function parameter names that carry state for a role\n- Comments declaring the protocol role\n- Test fixtures that set up two-party or N-party scenarios\n\nMap these to Mermaid `participant` declarations. Use short, readable aliases:\n\n```\nparticipant I as Initiator\nparticipant R as Responder\n```\n\n### Step 3: Trace Message Flow\n\nFollow state transitions and network sends\u002Freceives. Look for patterns like:\n\n| Pattern | Meaning |\n|---------|---------|\n| `send(msg)` \u002F `recv()` | Direct message exchange |\n| `serialize` + `transmit` | Structured message sent |\n| Return value passed to other party's function | Logical message (in-process) |\n| `round1_output` → `round2_input` | Round-based MPC step |\n| Struct fields named `ephemeral_key`, `ciphertext`, `mac`, `tag` | Message contents |\n\nFor **in-process** protocol implementations (where both parties run in the same\nprocess), treat function call boundaries as logical message sends when they\nrepresent what would be a network boundary in deployment.\n\n### Step 4: Annotate Cryptographic Operations\n\nAt each protocol step, identify and label:\n\n| Operation | Diagram annotation |\n|-----------|-------------------|\n| Key generation | `Note over A: keygen(params) → pk, sk` |\n| DH \u002F ECDH | `Note over A,B: DH(sk_A, pk_B)` |\n| KDF \u002F HKDF | `Note over A: HKDF(ikm, salt, info)` |\n| Signing | `Note over A: Sign(sk, msg) → σ` |\n| Verification | `Note over B: Verify(pk, msg, σ)` |\n| Encryption | `Note over A: Enc(key, plaintext) → ct` |\n| Decryption | `Note over B: Dec(key, ct) → plaintext` |\n| Commitment | `Note over A: Commit(value, rand) → C` |\n| Hash | `Note over A: H(data) → digest` |\n| Secret sharing | `Note over D: Share(secret, t, n) → {s_i}` |\n| Threshold combine | `Note over C: Combine({s_i}) → secret` |\n\nKeep annotations concise — use mathematical shorthand, not code.\n\n### Step 5: Identify Protocol Phases\n\nGroup message steps into named phases using `rect` or `Note` blocks:\n\nCommon phases to detect:\n- **Setup \u002F Key Generation**: party key creation, trusted setup, parameter gen\n- **Handshake \u002F Init**: ephemeral key exchange, nonce exchange, version negotiation\n- **Authentication**: identity proof, certificate exchange, signature verification\n- **Key Derivation**: session key derivation from shared secrets\n- **Data Transfer \u002F Main Protocol**: encrypted application data exchange\n- **Finalization \u002F Teardown**: session close, MAC verification, abort handling\n\nDetect abort\u002Ferror paths and show them with `alt` blocks.\n\n---\n\n## Spec Workflow (S1–S5)\n\nUse this path when the input is a specification document rather than source code.\nAfter completing S1–S5, continue with Step 6 (Generate sequenceDiagram) and\nStep 7 (Verify and deliver) from the code workflow above.\n\n### Step S1: Ingest the Spec\n\nObtain the full spec text:\n\n- **File path provided** → read with the Read tool\n- **URL provided** → fetch with WebFetch\n- **Pasted inline** → work directly from conversation context\n\nThen identify the spec format and read\n[references\u002Fspec-parsing-patterns.md](references\u002Fspec-parsing-patterns.md)\nfor format-specific extraction guidance:\n\n| Format | Signals |\n|--------|---------|\n| RFC | `RFC XXXX`, `MUST`\u002F`SHALL`\u002F`SHOULD`, ABNF grammars, section-numbered prose |\n| Academic paper \u002F pseudocode | `Algorithm X`, `Protocol X`, `Figure X`, numbered steps, `←`\u002F`→` in math mode |\n| Informal prose | Numbered lists, \"A sends B ...\", plain English descriptions |\n| ProVerif (`.pv`) | `process`, `let`, `in(ch, x)`, `out(ch, msg)`, `!` (replication) |\n| Tamarin (`.spthy`) | `rule`, `--[ ]->`, `Fr(~x)`, `!Pk(A, pk)`, `In(m)`, `Out(m)` |\n\nIf the spec references a known named protocol (TLS, Noise, Signal, X3DH, Double\nRatchet, FROST), also read\n[references\u002Fprotocol-patterns.md](references\u002Fprotocol-patterns.md) to use its\ncanonical flow as a skeleton and fill in spec-specific details.\n\n### Step S2: Extract Parties and Roles\n\nIdentify all protocol participants. Look for:\n\n- **Named roles** in prose or pseudocode: `Alice`, `Bob`, `Client`, `Server`,\n  `Initiator`, `Responder`, `Prover`, `Verifier`, `Dealer`, `Party_i`,\n  `Coordinator`, `Signer`\n- **Section headers**: \"Parties\", \"Roles\", \"Participants\", \"Setup\", \"Notation\"\n- **ProVerif**: process names at top level (`let ClientProc(...)`, `let ServerProc(...)`)\n- **Tamarin**: rule names and fact arguments (e.g. `!Pk($A, pk)` — `$A` is a party)\n\nMap each role to a Mermaid `participant` declaration. Use short IDs with\ndescriptive aliases (see naming conventions in\n[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)).\n\n### Step S3: Extract Message Flow\n\nTrace what each party sends to whom and in what order. Extraction patterns by format:\n\n**RFC \u002F informal prose:**\n- Arrow notation: `A → B: msg`, `A -> B`\n- Sentence patterns: \"A sends B ...\", \"B responds with ...\", \"A transmits ...\",\n  \"upon receiving X, B sends Y\"\n- Numbered steps: extract in order, inferring sender\u002Freceiver from context\n\n**Pseudocode:**\n- Function signatures with explicit `sender`\u002F`receiver` parameters\n- `send(party, msg)` \u002F `receive(party)` calls\n- Return values passed as inputs to the other party's function in the next step\n\n**ProVerif (`.pv`):**\n- `out(ch, msg)` — send on channel `ch`\n- `in(ch, x)` — receive on channel `ch`, bind to `x`\n- Match `out`\u002F`in` pairs on the same channel to identify message flows\n- `!` (replication) signals a role that handles multiple sessions\n\n**Tamarin (`.spthy`):**\n- `In(m)` premise — receive message `m`\n- `Out(m)` conclusion — send message `m`\n- Rule name and ordering of rules reveal protocol rounds\n- `Fr(~x)` — fresh random value generated by a party\n- `--[ Label ]->` facts — security annotations, not messages\n\nPreserve the ordering and round structure. Group concurrent sends (broadcast)\nusing `par` blocks in the final diagram.\n\n### Step S4: Extract Cryptographic Operations\n\nFor each protocol step, identify the cryptographic operations performed and which\nparty performs them:\n\n| Spec notation | Operation | Diagram annotation |\n|---------------|-----------|-------------------|\n| `keygen()`, `Gen(1^λ)` | Key generation | `Note over A: keygen() → pk, sk` |\n| `DH(a, B)`, `g^ab` | DH \u002F ECDH | `Note over A,B: DH(sk_A, pk_B)` |\n| `KDF(ikm)`, `HKDF(...)` | Key derivation | `Note over A: HKDF(ikm, salt, info) → k` |\n| `Sign(sk, m)`, `σ ← Sign` | Signing | `Note over A: Sign(sk, msg) → σ` |\n| `Verify(pk, m, σ)` | Verification | `Note over B: Verify(pk, msg, σ)` |\n| `Enc(k, m)`, `{m}_k` | Encryption | `Note over A: Enc(k, plaintext) → ct` |\n| `Dec(k, c)` | Decryption | `Note over B: Dec(k, ct) → plaintext` |\n| `H(m)`, `hash(m)` | Hash | `Note over A: H(data) → digest` |\n| `Commit(v, r)`, `com` | Commitment | `Note over A: Commit(value, rand) → C` |\n| ProVerif `senc(m, k)` | Symmetric encryption | `Note over A: Enc(k, m) → ct` |\n| ProVerif `pk(sk)` | Public key derivation | `Note over A: pk = pk(sk)` |\n| ProVerif `sign(m, sk)` | Signing | `Note over A: Sign(sk, m) → σ` |\n\nIdentify security conditions and abort paths:\n\n- Prose: \"if verification fails, abort\", \"only if ...\", \"reject if ...\"\n- Pseudocode: `assert`, `require`, `if ... abort`\n- ProVerif: `if m = expected then ... else 0`\n- Tamarin: contradicting facts or restriction lemmas\n\nThese become `alt` blocks in the final diagram.\n\n### Step S5: Flag Spec Ambiguities\n\nBefore moving to Step 6, check for gaps:\n\n- **Unclear message ordering**: infer from round structure or section order;\n  annotate with `⚠️ ordering inferred from spec structure`\n- **Implied parties**: if a party's role is implied but unnamed, give it a\n  descriptive name and note the inference\n- **Missing steps**: if the spec omits a step that the canonical pattern for\n  this protocol requires, annotate:\n  `⚠️ spec omits [step] — canonical protocol requires it`\n- **Underspecified crypto**: if the spec says \"encrypt\" without specifying\n  the scheme, annotate: `⚠️ encryption scheme not specified`\n- **ProVerif\u002FTamarin**: private channels (`c` declared with `new c` or as a\n  private free name) represent out-of-band channels — note them\n\n---\n\n\u003C!-- Both code path (Steps 1–5) and spec path (Steps S1–S5) continue here -->\n\n### Step 6: Generate sequenceDiagram\n\nProduce Mermaid syntax following the rules in\n[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md).\n\n**Completeness over brevity.** Show every distinct message type. Omit repeated\nloop iterations (use `loop` blocks instead), but never omit a distinct protocol\nstep.\n\n**Correctness over aesthetics.** The diagram must match what the code actually\ndoes. If the code diverges from a known spec, annotate the divergence:\n\n```\nNote over A,B: ⚠️ spec requires MAC here — implementation omits it\n```\n\n### Step 7: Verify and Deliver\n\nBefore delivering:\n\n- [ ] Every participant declared actually sends or receives at least one message\n- [ ] Arrows point in the correct direction (sender → receiver)\n- [ ] Cryptographic operations are on the correct party (the one computing them)\n- [ ] If protocol phases are used, no arrows appear outside a phase block\n- [ ] `alt` blocks cover known abort\u002Ferror paths\n- [ ] Diagram renders without syntax errors (check\n      [references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)\n      for common pitfalls)\n- [ ] If spec divergence found, annotated with `⚠️`\n\n**Write the diagram to a file.** Choose a filename derived from the protocol\nname, e.g. `noise-xx-handshake.md` or `x3dh-key-agreement.md`. Write a\nMarkdown file with this structure:\n\n```markdown\n# \u003CProtocol Name> Sequence Diagram\n\n\\`\\`\\`mermaid\nsequenceDiagram\n    ...\n\\`\\`\\`\n\n## Protocol Summary\n\n- **Parties:** ...\n- **Round complexity:** ...\n- **Key primitives:** ...\n- **Authentication:** ...\n- **Forward secrecy:** ...\n- **Notable:** [spec deviations or security observations, or \"none\"]\n```\n\nAfter writing the file, print an **ASCII sequence diagram** inline in the\nresponse, followed by the Protocol Summary. State the output filename so the\nuser knows where to find the Mermaid source.\n\nFollow all drawing conventions in\n[references\u002Fascii-sequence-diagram.md](references\u002Fascii-sequence-diagram.md),\nincluding the inline output format.\n\n---\n\n## Decision Tree\n\n```\n── Input is a spec document (not code)?\n│  └─ Step S1: identify format, read references\u002Fspec-parsing-patterns.md\n│\n── Input is source code (not a spec)?\n│  └─ Step 1: grep for handshake\u002Fround\u002Fsend\u002Frecv entry points\n│\n── Both spec and code provided?\n│  └─ Run Spec Workflow (S1–S5) first to build canonical diagram,\n│     then read code and annotate divergences with ⚠️\n│\n── Spec is a known protocol (TLS, Noise, Signal, X3DH, FROST)?\n│  └─ Read references\u002Fprotocol-patterns.md and use canonical flow as skeleton\n│\n── Spec is ProVerif (.pv) or Tamarin (.spthy)?\n│  └─ Read references\u002Fspec-parsing-patterns.md → Formal Models section\n│\n── Spec message ordering is ambiguous?\n│  └─ Infer from round\u002Fsection structure, annotate with ⚠️\n│\n── Can't identify parties from spec?\n│  └─ Check \"Parties\"\u002F\"Notation\" sections; for ProVerif read process names;\n│     for Tamarin read rule names and fact arguments\n│\n── Don't know which code files implement the protocol?\n│  └─ Step 1: grep for handshake\u002Fround\u002Fsend\u002Frecv entry points\n│\n── Can't identify parties from struct names?\n│  └─ Read test files — test setup reveals roles\n│\n── Protocol runs in-process (no network calls)?\n│  └─ Treat function argument passing at role boundaries as messages\n│\n── MPC \u002F threshold protocol with N parties?\n│  └─ Read references\u002Fprotocol-patterns.md → MPC section\n│\n── Mermaid syntax error?\n│  └─ Read references\u002Fmermaid-sequence-syntax.md → Common Pitfalls\n│\n└─ ASCII drawing conventions?\n   └─ Read references\u002Fascii-sequence-diagram.md\n```\n\n---\n\n## Examples\n\n**Code path** — `examples\u002Fsimple-handshake\u002F`:\n\n- **`protocol.py`** — two-party authenticated key exchange (X25519 DH +\n  Ed25519 signing + HKDF + ChaCha20-Poly1305)\n- **`expected-output.md`** — exact ASCII diagram and Mermaid file the skill\n  should produce for that protocol\n\n**Spec path (ProVerif)** — `examples\u002Fsimple-proverif\u002F`:\n\n- **`model.pv`** — HMAC challenge-response authentication modeled in ProVerif\n- **`expected-output.md`** — step-by-step extraction walkthrough (parties,\n  message flow, crypto ops) and the exact ASCII diagram and Mermaid file the\n  skill should produce\n\nStudy the relevant example before working on an unfamiliar input.\n\n---\n\n## Supporting Documentation\n\n- **[references\u002Fspec-parsing-patterns.md](references\u002Fspec-parsing-patterns.md)** —\n  Extraction rules for RFC, academic paper\u002Fpseudocode, informal prose, ProVerif,\n  and Tamarin input formats; read during Step S1\n- **[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)** —\n  Participant syntax, arrow types, activations, grouping blocks, escaping rules,\n  and common rendering pitfalls\n- **[references\u002Fprotocol-patterns.md](references\u002Fprotocol-patterns.md)** —\n  Canonical message flows for TLS 1.3, Noise, X3DH, Double Ratchet, Shamir\n  secret sharing, commit-reveal, and generic MPC rounds; use as a reference\n  when comparing implementation against spec\n- **[references\u002Fascii-sequence-diagram.md](references\u002Fascii-sequence-diagram.md)** —\n  Column layout, arrow conventions, self-loops, phase labels, and inline\n  output format for the ASCII diagram\n",{"name":5,"description":7},"main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fcrypto-protocol-diagram",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add agisota\u002Fold-one --skill crypto-protocol-diagram",{"tool":38,"command":39},"bunx","bunx skills add agisota\u002Fold-one --skill crypto-protocol-diagram",{"tool":41,"command":42},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill crypto-protocol-diagram","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fcrypto-protocol-diagram\u002FSKILL.md",true,[46,52,56,60],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fascii-sequence-diagram.md","REFERENCE","参考文档",2365,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fcrypto-protocol-diagram\u002Freferences\u002Fascii-sequence-diagram.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fmermaid-sequence-syntax.md",7703,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fcrypto-protocol-diagram\u002Freferences\u002Fmermaid-sequence-syntax.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fprotocol-patterns.md",11132,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fcrypto-protocol-diagram\u002Freferences\u002Fprotocol-patterns.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fspec-parsing-patterns.md",11888,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fcrypto-protocol-diagram\u002Freferences\u002Fspec-parsing-patterns.md",[65,72,79,88,95,102],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":83,"licenseFileUrl":84,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]