Command Palette

Search for a command to run...

Назад к скиллам
скилл № 37493

blockchain-patterns

Use this skill when asked about blockchain design patterns, token standards, upgradeable contracts, oracle patterns, layer 2 scaling patterns, cross-chain…

БесплатноБез исполняемых скриптов
j4flmaoот 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

  1. Pattern category (token/upgrade/oracle/bridge/scaling)
  2. Problem statement + when to use
  3. Implementation approach with trade-offs
  4. Security considerations and known pitfalls
  5. 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

  1. Identify the architectural problem category (tokenization, upgradeability, scaling, cross-chain, oracle integration)
  2. Gather requirements: security level, upgrade frequency, throughput needs, cost constraints
  3. Survey available patterns with similar use cases in production
  4. Select primary pattern and fallback alternatives

Phase 2: Architecture Design

  1. Design component architecture: which contracts/modules implement which concerns
  2. Define storage layout with upgradeability considerations (unstructured storage for proxies)
  3. Specify interfaces following established standards (ERC, IBC, ULN)
  4. Design initialization sequence with proper access controls

Phase 3: Implementation Strategy

  1. Select reference implementation (OpenZeppelin, Solady, or protocol-specific)
  2. Implement core pattern with standardized interfaces
  3. Add security controls: pause mechanism, rate limits, access control
  4. Implement extension interfaces for future compatibility

Phase 4: Integration and Testing

  1. Test pattern with all standard interfaces (ERC-165 support)
  2. Fork-test against mainnet state (simulate real-world interactions)
  3. Audit pattern interactions (composability risks, circular dependencies)
  4. 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
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • 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), без исполняемых скриптов.

Похожие скиллы

Сравнить blockchain-patterns с