Agent skill

Erc1155 Patterns

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when building multi-token contracts with ERC-1155.

MITAuto-check passedBackend & APIs

Install Erc1155 Patterns

skills CLI
$ npx skills add ccashwell/evm-cortex --skill erc1155-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex erc1155-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/erc1155-patterns .claude/skills/erc1155-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
erc1155-patterns
GitHub stars
131
Token cost
~1.5k tokens
SKILL.md length
179 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building multi-token contracts with ERC-1155.

  • Building multi-token contracts with ERC-1155
  • SKILL.md covers Standard Interface, Implementation Pattern, URI Handling and Batch Operations, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Smart contracts

What it does

Erc1155 Patterns is an agent skill from ccashwell/evm-cortex. Use when building multi-token contracts with ERC-1155. Covers batch operations, URI handling, supply tracking, hybrid fungible and non-fungible patterns, and game item architectures.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Smart contracts. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Building multi-token contracts with ERC-1155
  • Tasks that involve Smart contracts

Example prompts

  • “/erc1155-patterns”

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are solidity).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Erc1155 Patterns loads about 1.5k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 179 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 179 words, ~1,493 tokens.

Download SKILL.mdSave it as .claude/skills/erc1155-patterns/SKILL.md (or your agent's skills folder).
name
erc1155-patterns
description
Use when building multi-token contracts with ERC-1155. Covers batch operations, URI handling, supply tracking, hybrid fungible and non-fungible patterns, and game item architectures.

ERC-1155 Multi-Token Patterns

Standard Interface

solidity
interface IERC1155 {
    function balanceOf(address account, uint256 id) external view returns (uint256);
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external view returns (uint256[] memory);
    function setApprovalForAll(address operator, bool approved) external;
    function isApprovedForAll(address account, address operator) external view returns (bool);
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;
    function safeBatchTransferFrom(
        address from, address to, uint256[] calldata ids,
        uint256[] calldata amounts, bytes calldata data
    ) external;
}

Implementation Pattern

solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import {ERC1155Supply} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import {ERC1155URIStorage} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

contract GameItems is ERC1155, ERC1155Supply, ERC1155URIStorage, Ownable {
    // Token type constants
    uint256 public constant GOLD = 0;       // fungible
    uint256 public constant SILVER = 1;     // fungible
    uint256 public constant SWORD = 2;      // non-fungible (supply = 1 each)
    uint256 public constant SHIELD = 3;     // semi-fungible

    uint256 private _nextUniqueId = 1000;

    mapping(uint256 tokenId => uint256 maxSupply) public caps;

    constructor(string memory baseUri) ERC1155(baseUri) Ownable(msg.sender) {
        caps[GOLD] = type(uint256).max;
        caps[SILVER] = type(uint256).max;
        caps[SWORD] = 100;
        caps[SHIELD] = 500;
    }

    function mintFungible(address to, uint256 id, uint256 amount) external onlyOwner {
        require(totalSupply(id) + amount <= caps[id], "Cap exceeded");
        _mint(to, id, amount, "");
    }

    function mintBatch(address to, uint256[] calldata ids, uint256[] calldata amounts)
        external onlyOwner
    {
        for (uint256 i = 0; i < ids.length; i++) {
            require(totalSupply(ids[i]) + amounts[i] <= caps[ids[i]], "Cap exceeded");
        }
        _mintBatch(to, ids, amounts, "");
    }

    function mintUnique(address to, string calldata tokenUri) external onlyOwner returns (uint256) {
        uint256 tokenId = _nextUniqueId++;
        caps[tokenId] = 1;
        _mint(to, tokenId, 1, "");
        _setURI(tokenId, tokenUri);
        return tokenId;
    }

    function uri(uint256 tokenId) public view override(ERC1155, ERC1155URIStorage) returns (string memory) {
        return super.uri(tokenId);
    }

    function _update(address from, address to, uint256[] memory ids, uint256[] memory values)
        internal override(ERC1155, ERC1155Supply)
    {
        super._update(from, to, ids, values);
    }
}

URI Handling

ERC-1155 uses a single URI template with {id} substitution:

https://api.example.com/tokens/{id}.json

The {id} is replaced with the lowercase hex token ID, zero-padded to 64 characters: https://api.example.com/tokens/0000000000000000000000000000000000000000000000000000000000000001.json

For per-token URIs, use ERC1155URIStorage:

solidity
_setURI(tokenId, "ipfs://QmUniqueHash");
// Emits URI(value, tokenId)

Batch Operations

Batch transfers save significant gas compared to individual transfers:

solidity
// Transfer multiple token types in one tx
uint256[] memory ids = new uint256[](3);
uint256[] memory amounts = new uint256[](3);
ids[0] = GOLD;     amounts[0] = 100;
ids[1] = SILVER;   amounts[1] = 50;
ids[2] = SWORD;    amounts[2] = 1;

gameItems.safeBatchTransferFrom(alice, bob, ids, amounts, "");

Gas savings: batch of 10 transfers costs ~60% of 10 individual transfers.

Receiver Interface

Contracts receiving ERC-1155 tokens must implement:

solidity
interface IERC1155Receiver {
    function onERC1155Received(
        address operator, address from,
        uint256 id, uint256 value, bytes calldata data
    ) external returns (bytes4);

    function onERC1155BatchReceived(
        address operator, address from,
        uint256[] calldata ids, uint256[] calldata values, bytes calldata data
    ) external returns (bytes4);
}

Hybrid Fungible + Non-Fungible Pattern

Use ID ranges to distinguish token types:

solidity
// IDs 0-999: fungible tokens (can have supply > 1)
// IDs 1000+: unique NFTs (supply == 1)

function isFungible(uint256 id) public pure returns (bool) {
    return id < 1000;
}

function isNonFungible(uint256 id) public view returns (bool) {
    return id >= 1000 && totalSupply(id) == 1;
}

ERC-1155 vs ERC-721 Decision

FactorERC-721ERC-1155
Token typesOne per contractMany per contract
Batch transfersNot nativeBuilt-in
Gas (deploy)LowerHigher
Gas (batch ops)HigherMuch lower
Marketplace supportUniversalGrowing
Fungible supportNoYes

Choose ERC-1155 when: multiple token types, game items, mixed fungible/non-fungible, batch operations needed.

Security Checklist

  • Implement both onERC1155Received and onERC1155BatchReceived in receiver contracts
  • Validate array lengths match in batch operations
  • Track supply with ERC1155Supply if caps are needed
  • Use _update hook for custom transfer logic (not _beforeTokenTransfer)
  • Test supportsInterface for ERC-1155 and ERC-165
  • Guard against reentrancy (safe transfers call external code)

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/erc1155-patterns of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Erc1155 Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Erc1155 Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Erc1155 Patterns this skillccashwell/evm-cortex131—~1.5kAutomated safety check: PassMIT
Fizz Convertpashov/skills1.2k2 repos~3.7kAutomated safety check: PassMIT
Solana Devsolana-foundation/solana-dev-skill571—~3.8kAutomated safety check: PassMIT
Feynman Auditor0xiehnnkta/nemesis-auditor2441 repos~11kAutomated safety check: PassMIT
Smart Contract Auditgreatpie/smart-contract-audit-skill101—~1.1kAutomated safety check: PassNone
RadarAuditware/radar154—~2.1kAutomated safety check: PassGPL-3.0

Similar skills

  • Fizz Convert

    pashov/skills

    Convert English-language properties in PROPERTIES.md (produced by the Fizz skill) into Solidity assertions inside the existing fuzz harness, then flip their checkboxes.

    1.2k GitHub starsUsed in 2 repos~3.7k tokens
    Backend & APIsAuto-check passed
  • Solana Dev

    solana-foundation/solana-dev-skill

    A skill your agent uses when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my…

    571 GitHub stars~3.8k tokensUpdated 5 days ago
    Backend & APIsAuto-check passed
  • Feynman Auditor

    0xiehnnkta/nemesis-auditor

    Deep business logic bug finder using the Feynman technique. An agent skill from 0xiehnnkta/nemesis-auditor.

    244 GitHub starsUsed in 1 repo~11k tokens
    Backend & APIsAuto-check passed
  • Smart Contract Audit

    greatpie/smart-contract-audit-skill

    Script-backed, out-of-box auditing workflow for Solidity/EVM repositories based on EVMbench detect/patch/exploit methodology.

    101 GitHub stars~1.1k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • Radar

    Auditware/radar

    Use radar for smart contract security analysis, AST generation, and detection template development.

    154 GitHub stars~2.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Solidity Auditor

    Gabson0x/bountyforge

    Security audit of Solidity code while you develop. An agent skill from Gabson0x/bountyforge.

    443 GitHub stars~3.7k tokensUpdated 21 days ago
    Backend & APIsAuto-check passed

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    ccashwell/evm-cortex

    A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.

    131 GitHub stars~25k tokensUpdated 7 days ago
    Auto-check passed
  • Aave Integration

    ccashwell/evm-cortex

    A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.

    131 GitHub stars~1.3k tokensUpdated 7 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 7 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 7 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed
  • Audit Depth Analysis

    ccashwell/evm-cortex

    A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

    131 GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check passed

Categories

Questions about Erc1155 Patterns

What does Erc1155 Patterns do?

A skill your agent uses when building multi-token contracts with ERC-1155. Erc1155 Patterns is an agent skill from ccashwell/evm-cortex. Use when building multi-token contracts with ERC-1155.

When should I use Erc1155 Patterns?

Erc1155 Patterns fits situations like: building multi-token contracts with ERC-1155; tasks that involve Smart contracts.

How do I install Erc1155 Patterns in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill erc1155-patterns -a claude-code`. Or copy the skill folder (skills/erc1155-patterns in ccashwell/evm-cortex) into .claude/skills/erc1155-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Erc1155 Patterns in Codex?

Run `npx skills add ccashwell/evm-cortex --skill erc1155-patterns -a codex`. Or copy the skill folder (skills/erc1155-patterns in ccashwell/evm-cortex) into .agents/skills/erc1155-patterns in your project. Codex loads it when a task matches its description.

Can I use Erc1155 Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill erc1155-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/erc1155-patterns, .gemini/skills/erc1155-patterns, .github/skills/erc1155-patterns and .opencode/skills/erc1155-patterns in your project.

What does Erc1155 Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Erc1155 Patterns is instructions for the agent only.

Does Erc1155 Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Erc1155 Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Erc1155 Patterns use?

Erc1155 Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Erc1155 Patterns use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Erc1155 Patterns?

Skills that share tags, products or a category with Erc1155 Patterns: Fizz Convert (pashov/skills, 1.2k stars), Solana Dev (solana-foundation/solana-dev-skill, 571 stars), Feynman Auditor (0xiehnnkta/nemesis-auditor, 244 stars) and Smart Contract Audit (greatpie/smart-contract-audit-skill, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Erc1155 Patterns?

ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.

Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.