Protocol Handbook

SkillDev tools

Protocol domain knowledge - Lockup (vesting), Flow (streaming), Airdrops (merkle distribution). This skill provides context when implementing business logic, understanding protocol formulas, state transitions, or answering questions about how Sablier protocols work.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Protocol Handbook skill

What this skill tells your AI

The instructions your AI receives, as published by sablier-labs/evm-monorepo in .agents/skills/handbook/SKILL.md and read by ahel’s review.

Protocol concepts essential for writing contracts and understanding business logic.

Protocol Registry

ProtocolPurposeKey ConceptReference
LockupFixed-term token vestingDeposit upfront, stream over defined period.claude/skills/handbook/references/lockup.md
FlowOpen-ended streamingRate-per-second with debt tracking, no end time.claude/skills/handbook/references/flow.md
AirdropsMerkle-based distributionRecipients claim via proofs, optional vesting.claude/skills/handbook/references/airdrops.md
ComptrollerCross-protocol adminGovernance, fees, hook allowlisting.claude/skills/handbook/references/comptroller.md

Adding a new protocol? See Protocol Template below.

Protocol Comparison

AspectLockupFlowAirdrops
End timeFixed at creationOpen-endedCampaign expiry
FundingUpfront deposit requiredFlexible, anytimeUpfront in campaign
CancelationRefunds unstreamed tokensVoid forfeits uncovered debtClawback after grace
NFTYes (stream ID = token)Yes (stream ID = token)No
Use casesVesting, airdropsPayroll, subscriptionsToken launches, rewards

Core Patterns Across Protocols

Value Conservation

All protocols maintain: total_in = total_out + total_remaining

ProtocolInvariant
Lockupdeposited = withdrawn + refunded + (streamed - withdrawn)
Flowbalance + totalWithdrawn = totalDeposited
AirdropscampaignAmount = claimed + unclaimed + clawedBack

Status State Machines

Each protocol has defined status transitions. See individual references for diagrams.

NFT Mechanics (Lockup & Flow)

  • Token ID = Stream ID
  • Owner = Recipient
  • Transfer changes recipient
  • Transferability set at creation (Lockup) or always transferable (Flow)

References


Adding a New Protocol

When implementing a new Sablier protocol, create a reference file following this template:

Reference File Template

Create .claude/skills/handbook/references/{protocol-name}.md:

# {Protocol Name} Protocol

{One-line description of what this protocol does.}

## Core Formula

{The mathematical model driving the protocol}

## Key Concepts

| Concept     | Description  |
| ----------- | ------------ |
| **{Term1}** | {Definition} |
| **{Term2}** | {Definition} |

## Statuses

| Status        | Condition                  |
| ------------- | -------------------------- |
| **{STATUS1}** | {When this status applies} |

## Status Transitions

{ASCII diagram of valid state transitions}

## Key Operations

| Operation | Effect on State |
| --------- | --------------- |
| **{op1}** | {What it does}  |

## Invariants

{List of properties that must always hold}

## NFT Mechanics (if applicable)

{How NFTs relate to protocol entities}

## References

Refer to https://docs.sablier.com/llms-{protocol}.txt for up-to-date documentation.

Checklist for New Protocol

  • Create .claude/skills/handbook/references/{protocol}.md following template
  • Add to Protocol Registry table above
  • Add to Protocol Comparison table
  • Update agent's package structure in solidity-engineer.md
  • Add protocol-specific BTT conventions to .claude/skills/btt-testing/references/sablier-conventions.md
  • Add test conventions to .claude/skills/foundry-testing/references/sablier-conventions.md

Example Invocations

Test this skill with these prompts:

  1. Concept question: "Explain the difference between Lockup Linear and Lockup Dynamic streams"
  2. Formula question: "How is the withdrawable amount calculated in Flow when a stream is insolvent?"
  3. State machine: "What are the valid status transitions for a Lockup stream?"
  4. Business logic: "How does the clawback mechanism work in Airdrops campaigns?"

Signals

GitHub stars
352
Forks
82
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
handbook
Source
github.com/sablier-labs/evm-monorepo