Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

solidity

/solidity

Stosuje dobre praktyki bezpiecznego i oszczędnego gazowo tworzenia kontraktów Solidity oraz integracji frontendu Web3: utwardzanie przed reentrancy i błędami kontroli dostępu, optymalizacja gazu, testy Hardhat i Foundry.

Repozytorium
skills ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
08.10.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 08.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Stosuje dobre praktyki bezpiecznego i oszczędnego gazowo tworzenia kontraktów Solidity oraz integracji frontendu Web3: utwardzanie przed reentrancy i błędami kontroli dostępu, optymalizacja gazu, testy Hardhat i Foundry.

Oryginalny opis (EN)

Best practices for secure, gas-efficient Solidity smart contract development and Web3 frontend integration. Use when writing or reviewing Solidity contracts, hardening against reentrancy and access-control bugs, optimizing gas usage, setting up Hardhat/Foundry testing and static analysis, or wiring a React frontend to wallets, providers, and on-chain transactions.

Jak działa

  1. Core Principles
  2. Code Structure & Security
  3. Security Best Practices
  4. Gas Optimization
  5. Tools & Analysis
  6. Advanced Patterns
  7. Testing & Quality
  8. Web3 Frontend Integration
Sekcje z nagłówków SKILL.md, w oryginale · 71 linii, 402 słów
Podgląd SKILL.md
---
name: solidity
description: "Best practices for secure, gas-efficient Solidity smart contract development and Web3 frontend integration. Use when writing or reviewing Solidity contracts, hardening against reentrancy and access-control bugs, optimizing gas usage, setting up Hardhat/Foundry testing and static analysis, or wiring a React frontend to wallets, providers, and on-chain transactions."
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Solidity

This skill covers best practices for Solidity smart contract development, including security patterns, gas optimization, testing/tooling, and integrating contracts with a Web3 React frontend.

## Core Principles

- Cut the fluff. Code or detailed explanations only
- Maintain brevity while prioritizing accuracy and depth
- Answer first, explain later when needed

## Code Structure & Security

- Use explicit visibility modifiers and NatSpec documentation
- Apply function modifiers to reduce redundancy
- Follow naming conventions:
  - CamelCase for contracts
  - PascalCase for interfaces (prefix with "I")
- Implement Interface Segregation Principle
- Use proxy patterns for upgradeable contracts
- Emit comprehensive events for state changes
- Follow Checks-Effects-Interactions pattern against reentrancy

## Security Best Practices

- Use OpenZeppelin's AccessControl for permissions
- Require Solidity 0.8.0+ for overflow/underflow protection
- Use Pausable pattern for circuit breakers
- Implement ReentrancyGuard for additional protection
- Use SafeERC20 for token interactions
- Employ pull-over-push payment patterns
- Implement timelocks and multisig controls for sensitive operations

## Gas Optimization

- Optimize gas consumption (deployment and runtime)
- Use immutable variables for constructor-set values
- Use custom errors instead of revert strings
- Pack storage variables efficiently
- Use appropriate data types

## Tools & Analysis

- Integrate Slither and Mythril for static analysis
- Leverage Hardhat's testing and development environment
- Implement robust CI/CD pipelines
- Use pre-commit linting tools

## Advanced Patterns

- Chainlink VRF for randomness
- Strategic assembly use with extensive documentation
- State machine patterns for complex logic
- ERC20Snapshot, ERC20Permit, and ERC20Votes for specialized tokens

## Testing & Quality

- Comprehensive unit, integration, and end-to-end testing
- Property-based testing approaches
- High coverage targets
- Regular security audits

## Web3 Frontend Integration

- Keep frontend code that talks to contracts type-safe and explicit — generate TypeScript types from ABIs (e.g. via TypeChain or wagmi/viem codegen) rather than hand-writing contract call signatures
- Treat wallet connection, chain/network state, and transaction status as explicit, typed state (connected/connecting/wrong-network/error), not implicit booleans
- Surface transaction lifecycle clearly in the UI: submitted, pending confirmation, confirmed, reverted — never assume a submitted transaction succeeded
- Validate and simulate transactions (e.g. `eth_call`/gas estimation) before prompting the user to sign, to catch reverts early
- Never trust client-side reads of contract state for authorization decisions — always re-verify on-chain in the contract itself
- Handle provider/RPC failures and user rejection of signature requests as expected, recoverable error states

Wersje

RepozytoriumWynikLicencja
Ta strona · Mindrally/skills90Apache-2.0
TerminalSkills/skills100Apache-2.0
G1Joshi/Agent-Skills100MIT
cyfrin/solskill100AGPL-3.0

Migawka bazy z 13.11.2026 · wersja paczki 8535de5dd86e (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100web3-testing
    Testuje kontrakty Solidity w Hardhat i Foundry: testy jednostkowe, integracyjne i fork mainnetu.
  • 100solidity-guide
    Podpowiada zasady Solidity i Ethereum: optymalizację gazu, uaktualnialne kontrakty, standardy testów i typowe pułapki.
  • 100hardhat
    Obsługuje Hardhat 3, środowisko rozwoju smart kontraktów Ethereum: kompilacja Solidity, testy na wbudowanym łańcuchu, wdrożenia z Ignition, weryfikacja na eksploratorach, fork mainnetu i analiza gazu oraz pokrycia.
  • 100blockchain-web3
    Pomaga w pracy z smart kontraktami Solidity, Web3, protokołami DeFi, NFT, łańcuchami EVM, narzędziami Hardhat i Foundry, audytem kontraktów oraz integracją portfeli Web3.
  • 100web3-testing
    Testuje smart kontrakty w Hardhat i Foundry: testy jednostkowe, integracyjne i mainnet forking, przy testowaniu kontraktów Solidity, zestawach testów blockchain i walidacji protokołów DeFi.
  • 100web3-testing
    Testuje smart kontrakty w Hardhat i Foundry: testy jednostkowe, integracyjne i mainnet forking, przy testowaniu kontraktów Solidity, zestawach testów blockchain i walidacji protokołów DeFi.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.