blockchain-patterns
Use this skill when asked about blockchain design patterns, token standards, upgradeable contracts, oracle patterns, layer 2 scaling patterns, cross-chain…
от j4flmao★ 47 звёзд на GitHub
Установить blockchain-patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Blockchain Patterns
Purpose
Catalog and guide the selection of blockchain design patterns covering token standards, contract upgradeability, scaling solutions, cross-chain communication, and protocol architecture. This skill enforces standardized pattern selection with documented trade-offs and security implications.
Agent Protocol
Trigger
"blockchain pattern", "token standard", "ERC-20", "ERC-721", "ERC-1155", "ERC-4626", "ERC-4337", "ERC-2612", "ERC-3525", "ERC-3643", "ERC-4907", "ERC-5192", "permit", "upgradeable contract", "proxy pattern", "UUPS", "oracle pattern", "bridge pattern", "layer 2", "state channel", "sidechain", "MEV", "cross-chain", "blockchain design pattern", "smart contract pattern", "vault pattern", "yield-bearing vault", "semi-fungible", "soulbound", "rollup", "validium", "optimistic rollup", "zk-rollup", "IBC", "LayerZero", "light client", "AMM", "constant product", "lending pool", "compound fork", "aave fork", "flash loan", "governance token", "veToken", "vote escrow", "factory pattern", "minimal proxy", "EIP-1167", "EIP-1967", "EIP-1822", "EIP-2535", "diamond pattern", "multi-facet", "federated sidechain", "ZK-bridge", "optimistic bridge", "PBS", "MEV-Boost", "ePBS", "ERC-5218", "NFT rental", "soulbound token", "account abstraction", "ERC-6551", "TBA", "token bound account", "ERC-6909"
Input Context
- Requirement type (token/upgrade/oracle/bridge/scaling)
- Target platform (EVM/Solana/Cosmos)
- Security requirements (trust assumptions, upgradeability need)
- Performance requirements (throughput, latency, cost budget)
- Existing infrastructure (current contracts, bridges, oracles in use)
Output Artifact
Pattern recommendation with:
- Selected pattern with justification against alternatives
- Architecture diagram showing component interactions
- Implementation approach with key contract/system interfaces
- Security analysis with known attacks and mitigations
- Integration guide for existing systems
Response Format
- Pattern category (token/upgrade/oracle/bridge/scaling)
- Problem statement + when to use
- Implementation approach with trade-offs
- Security considerations and known pitfalls
- Code example or reference to canonical implementation
Completion Criteria
- Pattern selection is justified against at least 2 alternatives with comparison table
- Implementation approach covers storage layout for upgradeable patterns, trust assumptions for bridge patterns
- Security analysis identifies 3+ attack vectors with mitigations
- Integration guide covers dependencies, initialization order, and compatibility considerations
- Code example follows established conventions (OpenZeppelin, Solady for EVM)
Max Response Length
4000 tokens
Workflow
Phase 1: Pattern Identification
- Identify the architectural problem category (tokenization, upgradeability, scaling, cross-chain, oracle integration)
- Gather requirements: security level, upgrade frequency, throughput needs, cost constraints
- Survey available patterns with similar use cases in production
- Select primary pattern and fallback alternatives
Phase 2: Architecture Design
- Design component architecture: which contracts/modules implement which concerns
- Define storage layout with upgradeability considerations (unstructured storage for proxies)
- Specify interfaces following established standards (ERC, IBC, ULN)
- Design initialization sequence with proper access controls
Phase 3: Implementation Strategy
- Select reference implementation (OpenZeppelin, Solady, or protocol-specific)
- Implement core pattern with standardized interfaces
- Add security controls: pause mechanism, rate limits, access control
- Implement extension interfaces for future compatibility
Phase 4: Integration and Testing
- Test pattern with all standard interfaces (ERC-165 support)
- Fork-test against mainnet state (simulate real-world interactions)
- Audit pattern interactions (composability risks, circular dependencies)
- Deploy with proper initialization and ownership transfer
Architecture / Decision Trees
Proxy Pattern Comparison
| Feature | UUPS | Transparent | Beacon | Diamond (EIP-2535) |
|---|---|---|---|---|
| Upgrade function | Implementation | Proxy | Beacon | Diamond owner |
| Gas cost per call | Low (1 SLOAD) | Medium (2 SLOAD) | Low (1 SLOAD + beacon read) | Low (1 SLOAD + facet map) |
| Deployment cost | Low (no admin) | High (admin storage) | Medium (beacon deploy) | High (facet setup) |
| Multiple implementations | No (1:1) | No (1:1) | Yes (1:N) | Yes (N:M facets) |
| Storage collision risk | Low | Low (admin at high slot) | Low | Low (diamond storage) |
| Max implementations | 1 | 1 | Unlimited | Unlimited (48 facets) |
| Recommended | Default choice | Legacy projects | Many instances (ERC-1167 clones) | Large, modular protocols |
Token Standard Selection Decision Tree
Decide: Token Standard
├── Fungible token?
│ ├── Standard → ERC-20 + ERC
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/advanced-token-standards.md
- references/blockchain-patterns-advanced.md
- references/blockchain-patterns-fundamentals.md
- references/cross-chain-communication-patterns.md
- references/erc-4626-vault.md
- references/layer2-scaling-patterns.md
- references/mev-and-order-flow.md
- references/oracle-and-bridge-patterns.md
- references/reference_guide_1.md
- references/reference_guide_2.md
- references/reference_guide_3.md
- references/reference_guide_4.md
- references/reference_guide_5.md
- references/reference_guide_6.md
- references/reference_guide_7.md
- references/reference_guide_8.md
- references/token-standards.md
- references/upgradeable-contracts.md
FAQ
Что делает скилл blockchain-patterns?
Use this skill when asked about blockchain design patterns, token standards, upgradeable contracts, oracle patterns, layer 2 scaling patterns, cross-chain communication patterns, and common blockchain architecture patterns. Covers ERC standards (20, 721, 1155, 4626, 4337), proxy patterns (UUPS, transparent, beacon), bridge patterns, state channel patterns, sidechain patterns, and MEV-aware design. Do NOT use for: specific language implementation (use blockchain-application), core protocol design (use blockchain-core), or web3 integration (use blockchain-web3).
Как установить скилл blockchain-patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл blockchain-patterns запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…