protocol-analysis
Use when analyzing cryptographic protocol security by modeling state machines, enumerating transitions, and identifying desynchronization, replay, downgrade…
Skill by dtsong
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dtsong-protocol-analysis-66a902
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security, finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/protocol-analysis
What's inside
- Skill name
protocol-analysis- Description
- Use when analyzing cryptographic protocol security by modeling state machines, enumerating transitions, and identifying desynchronization, replay, downgrade, and session binding vulnerabilities. Covers protocol handshakes, session management, and negotiation integrity. Do not use for implementation-level crypto review (use crypto-review) or post-quantum assessment (use pqc-readiness).
- License
- MIT
- Instructions
- 117 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Protocol Analysis
## Purpose
Model cryptographic protocols as state machines, enumerate state transitions, and identify vulnerabilities including desynchronization, replay attacks, downgrade attacks, and session binding failures.
## Scope Constraints
Reads protocol specifications, message sequence diagrams, and implementation source code. Does not modify files or execute code. Does not interact with live protocol endpoints or perform active testing.
## Inputs
- Protocol specification or implementation under analysis
- Message sequence diagrams or protocol description
- Participant roles and trust relationships
- Security properties the protocol should provide (authentication, confidentiality, integrity, forward secrecy)
- Deployment context (network model, adversary capabilities)
## Input Sanitization
No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.
## Procedure
### Step 1: Model Protocol State Machine
Define the protocol as a state machine for each participant:
- Enumerate all states (initial, waiting, authenticated, established, error, closed)
- Define all valid transitions with triggering messages
- Identify terminal states and error recovery paths
- Document state variables maintained at each state (keys, nonces, sequence numbers)
### Step 2: Enumerate State Transitions
For each state transition, document:
- Triggering condition (message received, timeout, local event)
- Validation checks performed before transition
- State variables updated during transition
- Messages sent as a result of transition
- What happens on invalid input at this state
### Step 3: Check for Desync and Replay
Analyze the protocol for synchronization vulnerabilities:
- **Replay**: Can any message be replayed to cause a state transition? Are nonces/timestamps checked?
- **Desynchronization**: Can an attacker cause participants to disagree on the current state?
- **Reordering**: Is message ordering enforced? Can out-of-order messages cause incorrect state transitions?
- **Reflection**: Can messages from one direction be reflected back to the sender?
- **Interleaving**: Can messages from different sessions be mixed?
### Step 4: Verify Session Binding
Check that protocol sessions are properly bound:
- Session identifiers are unique and unpredictable
- All messages within a session are cryptographically bound to the session ID
- Channel binding prevents man-in-the-middle relay (TLS channel binding, etc.)
- Session resumption does not weaken security properties
- Concurrent sessions do not share mutable state
### Step 5: Assess Downgrade Resistance
Analyze the protocol's resistance to version/algorithm downgrade:
- Is the version/algorithm negotiation authenticated?
- Can an attacker force a weaker cipher suite?
- Is there a mechanism to prevent rollback to older protocol versions?
- Are negotiation messages included in the session transcript hash?
- Are there minimum security floor requirements that cannot be negotiated away?
> **Compaction resilience**: If context was lost during a long session, re-read the Inputs section to reconstruct what system is being analyzed, then resume from the earliest incomplete step.
## Output Format
### Protocol State Machine
```
[Initial] ──ClientHello──→ [WaitServerHello]
│
ServerHello│
▼
[WaitFinished]
│
Finished│
▼
[Established]
```
### State Transition Table
| Current State | Input | Validation | Next State | Output | Notes |
|---------------|-------|------------|------------|--------|-------|
| Initial | ClientHello | Version check | WaitServerHello | — | Nonce generated |
| ... | ... | ... | ... | ... | ... |
### Vulnerability Assessment
| ID | Category | Description | Severity | Recommendation |
|----|----------|-------------|----------|----------------|
| P1 | Replay | ServerHello lacks nonce binding | High | Include client nonce in server response |
| ... | ... | ... | ... | ... |
### Security Properties Verification
- [ ] Mutual authentication: [Verified/Failed/N/A]
- [ ] Forward secrecy: [Verified/Failed/N/A]
- [ ] Replay resistance: [Verified/Failed/N/A]
- [ ] Downgrade resistance: [Verified/Failed/N/A]
## Handoff
- Hand off to crypto-review if cryptographic implementation issues are discovered during protocol analysis.
- Hand off to prover/formal-spec if the protocol requires formal verification of state machine properties.
## Quality Checks
- [ ] Complete state machine modeled for all participants
- [ ] All state transitions have explicit validation checks
- [ ] Invalid input handling defined for every state
- [ ] Replay resistance verified (nonce/timestamp checking)
- [ ] Session binding verified (session ID, channel binding)
- [ ] Downgrade resistance verified (authenticated negotiation)
- [ ] Error states do not leak information or allow recovery to an insecure state
## Evolution Notes
<!-- Observations appended after each use -->From dtsong/claude-code-windows-setup, MIT.
More from dtsong/claude-code-windows-setup
- 0.445score
cicd-generation
dtsong
Use when creating GitHub Actions workflows, adding CI/CD to a project, or reviewing pipeline security.
SkillDFreshness: D★ 2Claude Code +9 - 0.440score
pqc-readiness
dtsong
Use when assessing a system's readiness for post-quantum cryptography migration, inventorying classical crypto usage, mapping NIST-standardized PQC…
SkillDFreshness: D★ 2Claude Code +9 - 0.440score
crypto-review
dtsong
Use when reviewing cryptographic implementations for algorithm choice correctness, key management soundness, side-channel resistance, and crypto agility…
SkillDFreshness: D★ 2Claude Code +9 - 0.439score
code-search
dtsong
Fast codebase searches using grep/glob.
SkillDFreshness: D★ 2Claude Code +9 - 0.429score
Schema Evaluation
dtsong
Evaluate and design data warehouse schemas — star, snowflake, data vault, OBT — with grain definition, SCD strategies, and normalization trade-offs
SkillDFreshness: D★ 2Claude Code +9 - 0.426score
Codebase Context
dtsong
Deep infrastructure analysis and context briefing for all council agents
SkillDFreshness: D★ 2Claude Code +9 - 0.426score
Schema Design
dtsong
Migration-ready database schema design with normalization and indexing strategies
SkillDFreshness: D★ 2Claude Code +9 - 0.426score
Design System Architecture
dtsong
Token hierarchy, theming strategy, and cross-platform consistency
SkillDFreshness: D★ 2Claude Code +9 - 0.426score
Motion Design
dtsong
Animation principles, micro-interaction specs, and reduced-motion support
SkillDFreshness: D★ 2Claude Code +9 - 0.426score
Visual Audit
dtsong
Structured visual design critique with specific actionable feedback
SkillDFreshness: D★ 2Claude Code +9 - 0.426score
Changelog Design
dtsong
Changelog entries and migration guides for breaking changes with version strategy
SkillDFreshness: D★ 2Claude Code +9 - 0.426score
Pattern Analysis
dtsong
Audit codebase patterns and conventions, evaluate proposed changes for consistency
SkillDFreshness: D★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Feb 21, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from dtsong
- 0.445score
cicd-generation
dtsong
Use when creating GitHub Actions workflows, adding CI/CD to a project, or reviewing pipeline security.
SkillDFreshness: D★ 2Claude Code +9 - 0.440score
crypto-review
dtsong
Use when reviewing cryptographic implementations for algorithm choice correctness, key management soundness, side-channel resistance, and crypto agility…
SkillDFreshness: D★ 2Claude Code +9 - 0.440score
pqc-readiness
dtsong
Use when assessing a system's readiness for post-quantum cryptography migration, inventorying classical crypto usage, mapping NIST-standardized PQC…
SkillDFreshness: D★ 2Claude Code +9 - 0.439score
code-search
dtsong
Fast codebase searches using grep/glob.
SkillDFreshness: D★ 2Claude Code +9 - 0.434score
dockerfile-generation
dtsong
Build minimal, secure Dockerfiles with verification-first workflow.
SkillDFreshness: D★ 2Claude Code +9 - 0.434score
git-workflows
dtsong
Safe day-to-day git workflows for branching, sync, and cleanup.
SkillDFreshness: D★ 2Claude Code +9
Cite this page
protocol-analysis skill. Agent Mart. https://agentmart.dev/skills/dtsong-protocol-analysis-66a902 (last updated 2026-10-24)