protocol-design
Skill0 starsChanged 6 months agoApache-2.0View on GitHub
Use when selecting and designing communication protocol stacks for IoT or embedded systems. Covers physical layer selection, transport and application protocols, security layers, message format design, and error resilience. Do not use for firmware architecture (use embedded-architecture) or fleet-scale operations (use fleet-management).
In this repository65 other files it gives its agents.
- a11y-auditSkill
- i18n-reviewSkill
- interaction-designSkill
- journey-mappingSkill
- ml-workflowSkill
- pipeline-designSkill
- schema-evaluationSkill
- api-designSkill
- codebase-contextSkill
- distributed-patternsSkill
- schema-designSkill
- design-system-architectureSkill
- motion-designSkill
- visual-auditSkill
- adr-templateSkill
- changelog-designSkill
- documentation-planSkill
- crypto-reviewSkill
- pqc-readinessSkill
- protocol-analysisSkill
- e2e-testingSkill
- pattern-analysisSkill
- testing-strategySkill
- finance-close-checklistSkill
- finance-controls-auditSkill
- finance-journal-entriesSkill
- finance-reconciliationSkill
- finance-tax-researchSkill
- finance-variance-analysisSkill
- audit-trail-designSkill
- compliance-reviewSkill
- data-classificationSkill
- growth-engineeringSkill
- messaging-strategySkill
- monetization-designSkill
- cost-analysisSkill
- deployment-planSkill
- finops-analysisSkill
- observability-designSkill
- ai-evaluationSkill
- prompt-engineeringSkill
- rag-architectureSkill
- device-integrationSkill
- navigation-designSkill
- platform-auditSkill
- formal-specSkill
- invariant-analysisSkill
- competitive-analysisSkill
- enterprise-search-strategySkill
- library-evaluationSkill
- technology-radarSkill
- embedded-architectureSkill
- fleet-managementSkill
- edge-case-enumerationSkill
- failure-mode-analysisSkill
- threat-modelSkill
- analytics-designSkill
- impact-estimationSkill
- mvp-scopingSkill
- caching-strategySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 39
No user-provided values are used in commands or file paths.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Protocol Design
Purpose
Select and design the communication protocol stack for an IoT/embedded system, including physical layer selection, transport protocol, application protocol, and security layer.
Scope Constraints
Evaluates protocol options against device requirements and produces stack recommendations. Does not implement protocol drivers or radio firmware. Does not perform RF testing or spectrum analysis.
Inputs
- Device hardware capabilities (radio modules available)
- Communication requirements (range, bandwidth, latency, power)
- Network topology (star, mesh, point-to-point)
- Security requirements (encryption, authentication, integrity)
- Ecosystem requirements (Matter certification, HomeKit, Alexa)
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: Define Communication Requirements
Quantify what the protocol must deliver:
- Range: Indoor (10m), building (50m), campus (500m), wide-area (km+)
- Bandwidth: Bytes/second needed for typical and peak traffic
- Latency: Maximum acceptable end-to-end delay
- Power budget: mA available for radio operations, duty cycle
- Topology: Star (hub-spoke), mesh (multi-hop), point-to-point
- Device density: How many devices in one radio neighborhood
Step 2: Select Physical/Link Layer
Choose the radio technology:
| Protocol | Range | Bandwidth | Power | Topology | Best For |
| BLE 5.0 | 50m | 2Mbps | Low | Star/mesh | Wearables, sensors, phones |
| Thread | 50m | 250kbps | Low | Mesh | Home automation (Matter) |
| Zigbee | 100m | 250kbps | Low | Mesh | Legacy home automation |
| Wi-Fi | 50m | High | High | Star | High-bandwidth, powered devices |
| LoRaWAN | 15km | 0.3-50kbps | Very low | Star | Wide-area, low-frequency |
| Cellular (LTE-M/NB-IoT) | km+ | Moderate | Medium | Star | Asset tracking, remote |
Step 3: Select Application Protocol
Choose how data is structured and exchanged:
- MQTT: Pub/sub, lightweight, great for telemetry. Needs TCP (Wi-Fi/cellular).
- CoAP: REST-like over UDP, ideal for constrained devices. Built-in discovery.
- HTTP/REST: Universal but heavy. Only for powered devices with good connectivity.
- Custom binary: Maximum efficiency but maintenance burden. Use Protobuf or CBOR instead of raw binary.
Step 4: Design Security Layer
Layer security into the stack:
- Transport encryption: TLS 1.3 (TCP), DTLS (UDP), or link-layer encryption (BLE bonding)
- Authentication: Device certificates, pre-shared keys, or OAuth 2.0 device flow
- Integrity: Message signing, sequence numbers to prevent replay
- Key management: How are keys provisioned, rotated, and revoked?
Step 5: Design Message Format
Define the wire format:
- Serialization: JSON (readable, large), CBOR (compact, schemaless), Protobuf (compact, schema-required)
- Envelope: Header (device ID, message type, sequence, timestamp) + payload
- Size budget: Maximum message size for the chosen transport
- Fragmentation: How to handle messages larger than MTU
Step 6: Design Error Handling and Resilience
Plan for communication failures:
- Retry strategy: Exponential backoff with jitter
- QoS levels: At-most-once, at-least-once, exactly-once — which is needed?
- Offline queuing: Buffer messages during disconnection, sync on reconnect
- Connection management: Keepalive intervals, reconnection strategy
Progress Checklist
- Step 1: Communication requirements quantified
- Step 2: Physical/link layer selected with rationale
- Step 3: Application protocol chosen
- Step 4: Security layer designed with key management
- Step 5: Message format defined within MTU budget
- Step 6: Error handling and resilience strategy complete
Compaction resilience: If context was lost during a long session, re-read the Inputs section to reconstruct what system is being analyzed, check the Progress Checklist for completed steps, then resume from the earliest incomplete step.
Output Format
# Protocol Architecture
## Requirements Summary
| Requirement | Value |
|-------------|-------|
| Range | [X meters/km] |
| Bandwidth | [X bytes/sec] |
| Latency | [X ms max] |
| Power budget | [X mA avg] |
| Topology | [Star/Mesh/P2P] |
## Protocol Stack
| Layer | Choice | Rationale |
|-------|--------|-----------|
| Physical/Link | [BLE/Thread/Wi-Fi/etc.] | [Why] |
| Transport | [TCP/UDP/none] | [Why] |
| Security | [TLS/DTLS/link-layer] | [Why] |
| Application | [MQTT/CoAP/custom] | [Why] |
| Serialization | [JSON/CBOR/Protobuf] | [Why] |
## Message Format[Header: device_id (4B) | msg_type (1B) | seq (2B) | timestamp (4B)] [Payload: CBOR-encoded application data] [Total: ~128 bytes typical, 512 bytes max]
## Security Design
| Aspect | Approach |
|--------|----------|
| Encryption | [Method] |
| Authentication | [Method] |
| Key management | [Provisioning and rotation strategy] |
## Error Handling
| Scenario | Strategy |
|----------|----------|
| Message lost | [Retry/QoS approach] |
| Disconnection | [Offline queue + sync] |
| Server unreachable | [Backoff + local operation] |Handoff
- Hand off to embedded-architecture if firmware task decomposition or memory layout decisions arise from protocol stack requirements.
- Hand off to cipher/crypto-review if cryptographic implementation concerns are identified during security layer design.
Quality Checks
- Protocol selection is justified against requirements (not just "we always use MQTT")
- Power consumption of radio operations is calculated against battery budget
- Security covers encryption, authentication, and key management
- Message format fits within the chosen transport's MTU
- Error handling addresses disconnection, retry, and offline operation
- Ecosystem requirements (Matter, HomeKit) are satisfied by protocol choice
Evolution Notes
<!-- Observations appended after each use -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

