OffchainLabs/arbitrum-docs / .agents/skills/arbitrum-best-practices
arbitrum-best-practices
VerifiedArbitrum L2 development best practices. Use when implementing bridges, Orbit chains, SDK integrations, or debugging cross-chain transactions. Triggers on Arbitrum, L2, rollup, bridge, retryable, Orbit, Nitro, or cross-chain contexts.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.1 KB |
| rules/bridge-l1-l2-messaging.md | markdown | 1.3 KB |
| rules/bridge-l2-l1-messaging.md | markdown | 1.3 KB |
| rules/bridge-retryable-lifecycle.md | markdown | 1.2 KB |
| rules/chain-anytrust-vs-rollup.md | markdown | 1.3 KB |
| rules/debug-retryable-failure.md | markdown | 1.5 KB |
| rules/gas-l1-data-costs.md | markdown | 1.1 KB |
| rules/naming-arbitrum-terminology.md | markdown | 1.1 KB |
| rules/rpc-cast-transaction.md | markdown | 1.2 KB |
| rules/sdk-gateway-registration.md | markdown | 1.3 KB |
| rules/security-bridge-validation.md | markdown | 1.4 KB |
SKILL.md
View on GitHub---
name: arbitrum-best-practices
description: Arbitrum L2 development best practices. Use when implementing bridges, Orbit chains, SDK integrations, or debugging cross-chain transactions. Triggers on Arbitrum, L2, rollup, bridge, retryable, Orbit, Nitro, or cross-chain contexts.
---
# Arbitrum Best Practices
High-level principles for Arbitrum L2 development. Each rule captures a single concept with focused code examples.
## When to Apply
Reference these rules when:
- Implementing token bridging (deposits/withdrawals)
- Deploying or configuring Orbit chains
- Using Arbitrum SDK for L1-L2 messaging
- Debugging cross-chain transactions
- Optimizing gas for L2 execution
## Rules by Priority
### CRITICAL
| Rule | Concept |
|------|---------|
| `bridge-l1-l2-messaging` | Use SDK for L1-to-L2 messages |
| `bridge-l2-l1-messaging` | L2-to-L1 messages require challenge period |
| `bridge-retryable-lifecycle` | Retryable tickets expire after 7 days |
| `chain-anytrust-vs-rollup` | Choose rollup for high-value, AnyTrust for throughput |
### HIGH
| Rule | Concept |
|------|---------|
| `sdk-gateway-registration` | Register tokens before bridging |
| `security-bridge-validation` | Validate all bridge inputs |
| `rpc-cast-transaction` | Use cast for transaction debugging |
### MEDIUM
| Rule | Concept |
|------|---------|
| `gas-l1-data-costs` | Account for L1 data costs in gas estimates |
| `debug-retryable-failure` | Debug retryables by status |
### LOW
| Rule | Concept |
|------|---------|
| `naming-arbitrum-terminology` | Use canonical Arbitrum terminology |
## Rule Structure
Each rule follows a minimal format:
- Brief explanation of the concept
- Incorrect code example
- Correct code example
- Reference link for deep dives
## ArbitrumDocs MCP Integration
Verify rules against current documentation:
```text
mcp__arbitrumDocs__search-arbitrum-docs: Search for topic updates
mcp__arbitrumDocs__ask-question-about-arbitrum: Ask specific questions
```
## Full Rule Reference
Each rule is a file under `rules/` beside this file; open the file for the full text and examples.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |