solidity-coding

solidity-coding is a skill for Claude Code, Codex from 0xlayerghost/solidity-agent-kit. It costs 66 tokens per session (4,149 once invoked), scanned A, original, MIT.

A set of coding rules for Solidity, the programming language used for Ethereum smart contracts, including standards for contract structure, errors, documentation, and initialization decisions.

In plain words
What is it for?
Use it when writing or reviewing Solidity contracts, documenting public functions, handling errors, indexing events, and choosing how contract state is initialized.
Why use it?
It helps developers make consistent implementation choices when a contract sets up addresses, business values, or user roles. It also defines safeguards for common Solidity code details.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing or reviewing Solidity contracts, documenting public functions, handling errors, indexing events, and choosing how contract state is initialized.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/0xlayerghost/solidity-agent-kit/solidity-coding
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add 0xlayerghost/solidity-agent-kit --skill solidity-coding
Clone the repo
git clone --depth 1 https://github.com/0xlayerghost/solidity-agent-kit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for solidity-coding

README.md
[![agentmods](https://agentmods.dev/badge/skills/0xlayerghost/solidity-agent-kit/solidity-coding/github.svg)](https://agentmods.dev/skills/0xlayerghost/solidity-agent-kit/solidity-coding)
Your own site
<a href="https://agentmods.dev/skills/0xlayerghost/solidity-agent-kit/solidity-coding"><img src="https://agentmods.dev/badge/skills/0xlayerghost/solidity-agent-kit/solidity-coding/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for solidity-coding

Your own site · 80×15
<a href="https://agentmods.dev/skills/0xlayerghost/solidity-agent-kit/solidity-coding"><img src="https://agentmods.dev/badge/skills/0xlayerghost/solidity-agent-kit/solidity-coding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.04149
Opus 5.5 $0.00026 $0.01660
Sonnet 5.5 $0.00013 $0.00830
Haiku 4.5 $0.00007 $0.00415

Measured 27d ago against content hash 122bd6f0b92c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

solidity-coding scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 27d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/solidity-coding/SKILL.md · 327 lines

How it starts

The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Solidity Coding Standards

Language Rule

  • Always respond in the same language the user is using. If the user asks in Chinese, respond in Chinese. If in English, respond in English.

Coding Principles

  • Pragma: Use pragma solidity ^0.8.19; — keep consistent across all files in the project
  • Dependencies: OpenZeppelin Contracts 4.9.x, manage imports via remappings.txt
  • Error Handling: Prefer custom errors over require strings — saves gas and is more expressive
    • Define: error InsufficientBalance(uint256 available, uint256 required);
    • Use: if (balance < amount) revert InsufficientBalance(balance, amount);
  • Documentation: All public / external functions must have NatSpec (@notice, @param, @return)
  • Event Indexing: Only add indexed to address type parameters — add comment if indexing other types
  • Special Keywords: immutable / constant / unchecked / assembly must have inline comment explaining why

Initialization Strategy

When a contract involves state initialization (external addresses, business parameters, role assignments), DO NOT default to any single approach. Follow this workflow:

Workflow

  1. Evaluate: Is the contract upgradeable? Are all dependencies known at deploy time? Are there cross-contract deployment order constraints?
  2. Present options: Show the developer the three initialization schemes below with their trade-offs
  3. Let the developer choose: Do not assume a scheme — different projects and contracts have different needs
  4. Implement: Apply the chosen scheme with the safety rules listed below

Scheme Comparison

Scheme A: Constructor Only Scheme B: Initializer Only Scheme C: Hybrid
Approach All init in constructor params Deploy empty, call initialize() after Constructor handles known params; initialize() handles post-deploy dependencies
Atomicity Deploy fails = nothing exists, no dangerous half-init state Risk of "deployed but not initialized" window Partially atomic — constructor part is safe, initializer part has the window
Front-run risk None — constructor cannot be front-run initialize() can be front-run if unprotected Only the initializer portion has risk
Gas One tx for deploy + init Deploy tx + N init txs Deploy tx + 1 init tx
Flexibility Low — all params must be known at deploy time High — can set dependencies after other contracts deploy Medium — split between deploy-time and post-deploy
Upgradeable Not compatible with proxy patterns Required for UUPS / Transparent Proxy Partial — constructor sets proxy-safe params, initializer for the rest

Read the full file on GitHub · 327 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 27d ago Changed · +21 lines 122bd6f0b92c
  2. 1mo ago Changed · +6 lines 587a702baa31
  3. 1mo ago First seen · 300 lines · 66 tokens per session scan A 8f397436567f

Subscribe to this mod's changes

solidity-coding is a skill published in the GitHub repository 0xlayerghost/solidity-agent-kit (4 stars, last pushed 27d ago), licensed MIT. It adds 66 tokens to every session and 4,149 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

propfund

Trade on PropFund, the decentralized on-chain prop firm for AI agents. Two layers: PropFund SCREENS you (a free evaluation, then a virtual "funded" probation leg that builds an immutable on-chain record — pool-as-counterparty, no real firm capital), and AgentDesk PAYS you (once your record clears the bar you graduate…

NO7r34L/PropFund.eth · 0 tokens

programmable-v4-hook-builder

Build, repair, validate, submit, or track a complete Programmable Uniswap v4 Custom launch through the public V3 API. Use when the user names Programmable and wants implementation or launch work for a hook, token, multi-contract graph, app, game, service, or hybrid. Do not use for explanation-only questions, unrelated…

programmablehq/PROGRAMMABLE · 90 tokens

web3-bug-classes

Complete reference for all 10 DeFi smart contract bug classes. Use this when hunting for specific vulnerability types, need attack patterns for accounting desync, access control, incomplete path, off-by-one, oracle manipulation, ERC4626 vaults, reentrancy, flash loans, signature replay, or proxy/upgrade bugs.

Awarexone/web3-bug-bounty-hunting-ai-skills · 72 tokens

web3-methodology-research

External research synthesis from Trail of Bits, SlowMist, ConsenSys, Immunefi, and Cyfrin. Use this for advanced audit methodology, Echidna/Medusa fuzzing setup, Slither custom detector writing, attack pattern deep dives, or the 4-phase learning roadmap.

Awarexone/web3-bug-bounty-hunting-ai-skills · 66 tokens

web3-poc-foundry

Complete Foundry PoC writing guide + all cheatcodes + DeFiHackLabs reproduction patterns. Use this when building a proof of concept exploit, setting up a fork test, using Foundry cheatcodes, or reproducing a known DeFi hack for learning.

Awarexone/web3-bug-bounty-hunting-ai-skills · 59 tokens

web3-triage-report

Bug triage validation system, Immunefi report format, and 20 real paid bounty examples dissected. Use this when validating a finding before submitting, writing an Immunefi report, checking if a bug is actually valid, or studying real examples of paid vulnerabilities.

Awarexone/web3-bug-bounty-hunting-ai-skills · 59 tokens