Agent skill

Test Smart Contract Invariants

by cyberful in cyberful/cyberful

Test executable smart-contract properties with deterministic, offline Foundry harnesses over a confined source snapshot.

AGPL-3.0Auto-check passedBackend & APIs

Install Test Smart Contract Invariants

skills CLI
$ npx skills add cyberful/cyberful --skill test-smart-contract-invariants -a claude-code

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

GitHub CLI
$ gh skill install cyberful/cyberful test-smart-contract-invariants --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/cyberful/cyberful.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cyberful/builtin/skills/test-smart-contract-invariants .claude/skills/test-smart-contract-invariants && 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
test-smart-contract-invariants
GitHub stars
135
Token cost
~745 tokens
SKILL.md length
240 words
Files
9 (incl. scripts, references, assets)
Skills in repo
85
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Test executable smart-contract properties with deterministic, offline Foundry harnesses over a confined source snapshot.

  • An authorization
  • SKILL.md covers Define the property and state…, Run the packaged offline… and Interpret and deliver
  • Runs Python scripts from its folder
  • Economic hypothesis can be expressed as a fuzz

What it does

Test Smart Contract Invariants is an agent skill from cyberful/cyberful. Test executable smart-contract properties with deterministic, offline Foundry harnesses over a confined source snapshot. Use when an authorization, accounting, state-machine, upgrade, token, oracle, or economic hypothesis can be expressed as a fuzz, invariant, or regression test.

Its SKILL.md is about 750 tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts, reference files and assets (for example `agents/openai.yaml`, `assets/smart-contract-invariant-campaign.example.json` and `assets/smart-contract-invariant-campaign.schema.json`).

It sits in Backend & APIs, covering Smart contracts and Accounting and bookkeeping. The repository describes itself as: Cyberful is an open-source AI Red Team for discovering, exploiting, verifying, and remediating vulnerabilities. The licence is AGPL-3.0.

When your agent uses it

  • An authorization
  • Economic hypothesis can be expressed as a fuzz
  • Regression test

Example prompts

  • “/test-smart-contract-invariants”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit ec598a6. 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

    Ships 2 files in scripts/ (Python), which the agent can run.

    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

Test Smart Contract Invariants loads about 745 tokens when it runs, and up to ~1.2k if it reads all its reference files. Until then it costs about 78 tokens; SKILL.md has 240 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~745
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.2k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from cyberful/cyberful at commit ec598a6, republished under its AGPL-3.0 licence (© cyberful). 240 words, ~745 tokens.

Download SKILL.mdSave it as .claude/skills/test-smart-contract-invariants/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
test-smart-contract-invariants
description
Test executable smart-contract properties with deterministic, offline Foundry harnesses over a confined source snapshot. Use when an authorization, accounting, state-machine, upgrade, token, oracle, or economic hypothesis can be expressed as a fuzz, invariant, or regression test.
metadata.domain
application-security
metadata.subdomain
smart-contract-invariant-testing
metadata.triggers
test smart contract invariants, Foundry invariant harness, Solidity fuzz property test, reproduce contract accounting failure, smart contract regression proof
metadata.tags
smart-contracts, Solidity, Foundry, invariant-testing, fuzzing, regression

Test Smart Contract Invariants

Turn one supported security hypothesis into an executable property and controlled counterexample. A broad fuzz campaign is not a substitute for a precise invariant, faithful state setup, or impact interpretation.

Define the property and state model

State the conserved, monotonic, authorization, isolation, liveness, or transition property; relevant actors; reachable setup; bounded actions; external assumptions; and failure oracle. Read references/invariant-harness-method.md before choosing handlers, ghost state, exclusions, or counterexample interpretation.

Keep protocol-wide risk in assess-smart-contract-security, source tracing in audit-smart-contract-security, and interactive Foundry/Anvil operation in operate-evm-security-toolchain. This skill owns the property and replayable harness evidence.

Run the packaged offline harness when appropriate

Stage scripts/run_smart_contract_invariant_harness.py, its manifest, and assets/smart-contract-invariant-campaign.example.json. The harness snapshots a bounded local tree through no-follow descriptors; invokes fixed forge test --offline with FFI disabled; denies child networking at the OS boundary; and retains bounded raw output with the snapshot digest and exact deterministic seed. It preserves only validated runtime-owned compiler-cache variables and refuses when the required compiler is absent offline.

The JSON campaign records attribution and bounds, never authority. Only use a source directory already placed in the engagement workarea under the active mission. Do not add dependency retrieval, forks, RPC endpoints, private keys, or model-selected executables.

Interpret and deliver

Minimize a failing sequence without changing its reachable preconditions. Record seed, pattern, source digest, compiler and Foundry evidence, setup, action sequence, state delta, violated property, and whether the counterexample demonstrates security impact or only a harness/configuration defect.

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

Files

SKILL.md and 8 other files (scripts, references, assets) in cyberful/builtin/skills/test-smart-contract-invariants of cyberful/cyberful.

  • SKILL.md
  • agents/openai.yaml
  • assets/smart-contract-invariant-campaign.example.json
  • assets/smart-contract-invariant-campaign.schema.json
  • assets/smart-contract-invariant-evidence.schema.json
  • references/invariant-harness-method.md
  • scripts/manifest.json
  • scripts/run_smart_contract_invariant_harness.py
  • tests/test_run_smart_contract_invariant_harness.py

Open the folder on GitHubat commit ec598a6

Compare with similar skills

Test Smart Contract Invariants 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.

Test Smart Contract Invariants compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Smart Contract Invariants this skillcyberful/cyberful135—~745Automated safety check: PassAGPL-3.0
Fizz Convertpashov/skills1.2k2 repos~3.7kAutomated safety check: PassMIT
Solana Devsolana-foundation/solana-dev-skill573—~3.8kAutomated safety check: PassMIT
Feynman Auditor0xiehnnkta/nemesis-auditor2431 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…

    573 GitHub stars~3.8k tokensUpdated 2 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.

    243 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.

    442 GitHub stars~3.7k tokensUpdated 24 days ago
    Backend & APIsAuto-check passed

More from cyberful/cyberful

All 85 skills in this repo
  • Audit infrastructure-as-code artifacts for unsafe defaults, policy gaps, privilege exposure, control drift, and deployment-impact evidence.

    135 GitHub stars~649 tokensUpdated 1 mo ago
    Auto-check passed
  • Audit Kubernetes admission and policy-as-code enforcement against local workload manifests, exception paths, namespace scope, and deployment evidence.

    135 GitHub stars~610 tokensUpdated 1 mo ago
    Auto-check passed
  • Audit PCI DSS penetration-test methodology, scope, internal and external reports, segmentation results, tester independence, remediation, retesting, retention, and multi-tenant support evidence.

    135 GitHub stars~1k tokensUpdated 1 mo ago
    Auto-check passed
  • Operate Content Discovery

    cyberful/cyberful

    Design and interpret advanced content discovery with ffuf and complementary web fuzzers.

    135 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Operate Network Recon

    cyberful/cyberful

    Build a high-fidelity network and service inventory using Nmap, Masscan, packet capture, DNS, and protocol-specific follow-up.

    135 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Operate Sast Toolchain

    cyberful/cyberful

    Operate Semgrep and source-oriented static analysis as a hypothesis, coverage, and regression system during advanced code audits.

    135 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Test Smart Contract Invariants

What does Test Smart Contract Invariants do?

Test executable smart-contract properties with deterministic, offline Foundry harnesses over a confined source snapshot. Test Smart Contract Invariants is an agent skill from cyberful/cyberful. Test executable smart-contract properties with deterministic, offline Foundry harnesses over a confined source snapshot.

When should I use Test Smart Contract Invariants?

Test Smart Contract Invariants fits situations like: an authorization; economic hypothesis can be expressed as a fuzz; regression test.

How do I install Test Smart Contract Invariants in Claude Code?

Run `npx skills add cyberful/cyberful --skill test-smart-contract-invariants -a claude-code`. Or copy the skill folder (cyberful/builtin/skills/test-smart-contract-invariants in cyberful/cyberful) into .claude/skills/test-smart-contract-invariants in your project. Claude Code loads it when a task matches its description.

How do I install Test Smart Contract Invariants in Codex?

Run `npx skills add cyberful/cyberful --skill test-smart-contract-invariants -a codex`. Or copy the skill folder (cyberful/builtin/skills/test-smart-contract-invariants in cyberful/cyberful) into .agents/skills/test-smart-contract-invariants in your project. Codex loads it when a task matches its description.

Can I use Test Smart Contract Invariants 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 cyberful/cyberful --skill test-smart-contract-invariants -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-smart-contract-invariants, .gemini/skills/test-smart-contract-invariants, .github/skills/test-smart-contract-invariants and .opencode/skills/test-smart-contract-invariants in your project.

What does Test Smart Contract Invariants need to run?

Going by SKILL.md and its folder, Test Smart Contract Invariants needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Test Smart Contract Invariants 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 Test Smart Contract Invariants 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Test Smart Contract Invariants use?

Test Smart Contract Invariants is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Smart Contract Invariants use?

About 745 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 425 tokens, read only when the agent opens those files.

What are the alternatives to Test Smart Contract Invariants?

Skills that share tags, products or a category with Test Smart Contract Invariants: Fizz Convert (pashov/skills, 1.2k stars), Solana Dev (solana-foundation/solana-dev-skill, 573 stars), Feynman Auditor (0xiehnnkta/nemesis-auditor, 243 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 Test Smart Contract Invariants?

cyberful (a GitHub organization) maintains it in cyberful/cyberful, which has 135 GitHub stars. The repository holds 85 skills in this directory. The repository was last updated on August 24, 2026.

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