home / skills / kienhaminh / anti-chaotic / blockchain-engineer

blockchain-engineer skill

/.agent/skills/blockchain-engineer

This skill guides secure, scalable blockchain engineering from protocol design to smart contract audits and deployment patterns.

npx playbooks add skill kienhaminh/anti-chaotic --skill blockchain-engineer

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
2.4 KB
---
name: blockchain-engineer
description: Use when architecturalizing protocols, developing smart contracts, or auditing security for blockchain systems.
license: MIT
metadata:
  version: "2.0"
---

# Blockchain Engineering Standards

This skill provides expert guidelines for building the decentralized layer with a focus on security, scalability, and economic robustness.

## Core Responsibilities

1.  **Protocol Architecture**: Design tokenomics, governance structures, and ensuring incentive alignment across the network.
2.  **Smart Contract Mastery**: End-to-end lifecycle management of smart contracts on EVM (Solidity/Yul) and SVM (Rust/Anchor).
3.  **Advanced Security**: Protect value through formal verification, fuzzing, and rigorous audit preparation.
4.  **Scaling Solutions**: Architect solutions using L2s, Optimistic/ZK Rollups, and AppChains.

## Technical Standards & Best Practices

### Development Lifecycle

- **Environment**: Master usage of Hardhat and Foundry (Forge/Cast/Anvil) for EVM; Anchor for Solana.
- **Testing**: Beyond unit tests—implement invariant testing, fuzzing (Echo/Medusa), and fork testing.
- **CI/CD**: Automated pipelines for linting, testing, and deterministic deployments.

### Optimization & Quality

- **Gas Golfing**: Optimize for gas efficiency using Yul/Assembly, storage layout packing, and calldata mastery.
- **Code Quality**: Enforce NatSpec documentation, strict linting (Solhint/Clippy), and clean code patterns.

### Deployment & Ops

- **Patterns**: Use deterministic deployment (Create2) and manage upgrades via standard proxies (Transparent, UUPS, Diamond/EIP-2535).
- **Security**: Manage keys via Multi-sig (Gnosis Safe) and Timelocks. Automate ops with scripting.

## Architecture Patterns

- **Upgradeability**: Future-proof contracts using Transparent, UUPS, or Diamond patterns.
- **Interoperability**: Connect chains using Bridges, Atomic Swaps, and CCIP.
- **Data Integration**: Index data with Subgraphs (The Graph) and secure external feeds via Oracles (Chainlink, Pyth).

## Dynamic Stack Loading

- **EVM (Ethereum/Polygon/Arbitrum)**:
  - [EVM Overview](references/evm.md)
  - [Solidity Development](references/solidity.md)
  - [Deployment & Ops](references/deployment.md)
  - [Mechanisms & Internals](references/mechanisms.md)
- **Solana**: (Create `references/solana.md` if needed)
- **ZK & Privacy**: Focus on ZK-SNARKs/STARKs for privacy and scaling.

Overview

This skill encapsulates practical standards and patterns for architecting, implementing, and securing blockchain protocols and smart contracts. It focuses on delivering secure, scalable, and economically coherent systems across EVM and Solana-style stacks. Use it to guide design decisions, development workflows, and audit readiness for production-grade decentralized systems.

How this skill works

The skill inspects and prescribes architecture choices (tokenomics, governance, upgradeability), development toolchains (Hardhat, Foundry, Anchor), and security practices (formal verification, fuzzing, invariant testing). It recommends deployment and ops patterns including deterministic deployment, proxy upgrades, multisig key management and automated CI/CD. It also surfaces integration patterns for cross-chain interoperability, indexing and oracle selection.

When to use it

  • Designing protocol tokenomics, governance, and incentive mechanisms.
  • Authoring or reviewing smart contracts for EVM or Solana targets.
  • Preparing for security audits, including fuzzing and formal verification.
  • Architecting scaling strategies with L2 rollups or app chains.
  • Setting up CI/CD, deterministic deployments, and upgradeable patterns.

Best practices

  • Adopt rigorous testing beyond unit tests: invariant tests, fuzzing, and fork tests.
  • Use Foundry/Hardhat for EVM development and Anchor for Solana; automate via CI pipelines.
  • Enforce code quality with linters, NatSpec docs, and clear storage layout discipline.
  • Optimize gas via calldata patterns, storage packing, and selective Yul/assembly when needed.
  • Manage keys and governance with multisig wallets, timelocks, and deterministic deployment.

Example use cases

  • Designing a token and governance system that aligns incentives for long-term security.
  • Refactoring a legacy contract to an upgradeable UUPS or Diamond pattern with deterministic deploys.
  • Preparing a repository for audit: add fuzzing, formal proofs, and reproducible CI artifacts.
  • Building a cross-chain asset transfer using bridges and atomic swap patterns with oracle safeguards.
  • Scaling a dApp using Optimistic or ZK rollups while integrating subgraph indexing for analytics.

FAQ

Which tools should I start with for EVM development?

Start with Foundry for fast testing and scripting, and Hardhat for plugin ecosystem and deployment scripting; use both where they complement each other.

How do I reduce gas costs without breaking upgradeability?

Prioritize storage layout packing, use immutable design where possible, and isolate gas-optimized routines into separate libraries or contracts while preserving proxy-compatible storage.