All skills
wshobson avatar

/nft-standards

@be57c0b
by Seth Hobsonwshobson/agents40k stars
4,281

Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.

Use this Skill: https://skilld.dev/gh/wshobson/agents/nft-standards

This session only. Nothing lands on disk.

referencesdetails.md

≈646 tokens on demand. Your agent reads this file only when SKILL.md points to it.

nft-standards — additional patterns and templates

Soulbound Tokens (Non-Transferable)

contract SoulboundToken is ERC721 {
    constructor() ERC721("Soulbound", "SBT") {}

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId,
        uint256 batchSize
    ) internal virtual override {
        require(from == address(0) || to == address(0), "Token is soulbound");
        super._beforeTokenTransfer(from, to, tokenId, batchSize);
    }

    function mint(address to) external {
        uint256 tokenId = totalSupply() + 1;
        _safeMint(to, tokenId);
    }

    // Burn is allowed (user can destroy their SBT)
    function burn(uint256 tokenId) external {
        require(ownerOf(tokenId) == msg.sender, "Not token owner");
        _burn(tokenId);
    }
}

Dynamic NFTs

contract DynamicNFT is ERC721 {
    struct TokenState {
        uint256 level;
        uint256 experience;
        uint256 lastUpdated;
    }

    mapping(uint256 => TokenState) public tokenStates;

    function gainExperience(uint256 tokenId, uint256 exp) external {
        require(ownerOf(tokenId) == msg.sender, "Not token owner");

        TokenState storage state = tokenStates[tokenId];
        state.experience += exp;

        // Level up logic
        if (state.experience >= state.level * 100) {
            state.level++;
        }

        state.lastUpdated = block.timestamp;
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        TokenState memory state = tokenStates[tokenId];

        // Generate metadata based on current state
        return generateMetadata(tokenId, state);
    }

    function generateMetadata(uint256 tokenId, TokenState memory state)
        internal
        pure
        returns (string memory)
    {
        // Dynamic metadata generation
        return "";
    }
}

Gas-Optimized Minting (ERC721A)

import "erc721a/contracts/ERC721A.sol";

contract OptimizedNFT is ERC721A {
    uint256 public constant MAX_SUPPLY = 10000;
    uint256 public constant MINT_PRICE = 0.05 ether;

    constructor() ERC721A("Optimized NFT", "ONFT") {}

    function mint(uint256 quantity) external payable {
        require(_totalMinted() + quantity <= MAX_SUPPLY, "Exceeds max supply");
        require(msg.value >= MINT_PRICE * quantity, "Insufficient payment");

        _mint(msg.sender, quantity);
    }

    function _baseURI() internal pure override returns (string memory) {
        return "ipfs://QmBaseHash/";
    }
}

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides standard Solidity smart contract templates and documentation for NFT standards (ERC-721, ERC-1155) and metadata implementation. No security issues or malicious patterns were found.

  • Socket16d

    1 alert: gptAnomaly

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    1/1 file flagged

  • ZeroLeaks5mo

    2 findings · Score: 80/100

Signed by skilld at be57c0b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 4 months ago
  • erc-721
  • erc-1155
  • nft
  • solidity
  • metadata
  • ethereum
  • royalties
  • smart-contracts
  • web3

README badge

README badge for wshobson/agents/nft-standards

Implements ERC-721 and ERC-1155 NFT standards with metadata handling, minting strategies, royalties (EIP-2981), and marketplace patterns. Use this skill when building NFT contracts, collections, or on-chain/off-chain metadata systems for digital assets.

Generated from the current SKILL.md.

Does this skill cover both ERC-721 and ERC-1155?
Yes. It includes implementation patterns for ERC-721 (single-token standard) and ERC-1155 (multi-token standard), with examples for minting, supply management, and burning.
What metadata approaches are covered?
The skill covers both off-chain metadata (IPFS-based JSON) and on-chain metadata (SVG generation and Base64 encoding stored directly in the contract).
Does this include royalty support?
Yes. The skill implements EIP-2981 royalty standard, allowing you to set a recipient address and fee percentage for secondary sales.
What blockchain or framework does this assume?
The skill uses Solidity and OpenZeppelin contracts; it does not prescribe a specific blockchain, though the examples target EVM-compatible chains.

Generated from the current SKILL.md. These answers refresh after source changes.