Web3 Testing
wshobson/agents
Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking.
Guide for testing Scalus smart contracts. An agent skill from scalus3/scalus.
$ npx skills add scalus3/scalus --skill contract-test -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install scalus3/scalus contract-test --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/scalus3/scalus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/scalus-skills/skills/contract-test .claude/skills/contract-test && rm -rf skills-srcUse ~/.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/
Install the "contract-test" agent skill from https://github.com/scalus3/scalus/tree/master/scalus-skills/skills/contract-test into .claude/skills/contract-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-test", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/scalus3/scalus/tree/master/scalus-skills/skills/contract-testType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add scalus3/scalus --skill contract-test -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install scalus3/scalus contract-test --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scalus3/scalus.git skills-src && mkdir -p .agents/skills && cp -r skills-src/scalus-skills/skills/contract-test .agents/skills/contract-test && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "contract-test" agent skill from https://github.com/scalus3/scalus/tree/master/scalus-skills/skills/contract-test into .agents/skills/contract-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-test", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add scalus3/scalus --skill contract-test -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install scalus3/scalus contract-test --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scalus3/scalus.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/scalus-skills/skills/contract-test .cursor/skills/contract-test && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "contract-test" agent skill from https://github.com/scalus3/scalus/tree/master/scalus-skills/skills/contract-test into .cursor/skills/contract-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-test", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/scalus3/scalus.git --path scalus-skills/skills/contract-test--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add scalus3/scalus --skill contract-test -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install scalus3/scalus contract-test --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scalus3/scalus.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/scalus-skills/skills/contract-test .gemini/skills/contract-test && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "contract-test" agent skill from https://github.com/scalus3/scalus/tree/master/scalus-skills/skills/contract-test into .gemini/skills/contract-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-test", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install scalus3/scalus contract-testInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add scalus3/scalus --skill contract-test -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/scalus3/scalus.git skills-src && mkdir -p .github/skills && cp -r skills-src/scalus-skills/skills/contract-test .github/skills/contract-test && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "contract-test" agent skill from https://github.com/scalus3/scalus/tree/master/scalus-skills/skills/contract-test into .github/skills/contract-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-test", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add scalus3/scalus --skill contract-test -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install scalus3/scalus contract-test --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scalus3/scalus.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/scalus-skills/skills/contract-test .opencode/skills/contract-test && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "contract-test" agent skill from https://github.com/scalus3/scalus/tree/master/scalus-skills/skills/contract-test into .opencode/skills/contract-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-test", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
contract-testGuide for testing Scalus smart contracts. An agent skill from scalus3/scalus.
Contract Test is an agent skill from scalus3/scalus. Guide for testing Scalus smart contracts. Use when writing unit, property, budget, or Emulator tests for Cardano validators.
Its SKILL.md is about 1.6k 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 and Integration testing. The repository describes itself as: Scalus - Smart contracts & dApps Development Platform for Cardano. The licence is Apache-2.0.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 073969c. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are scala and bash).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
scalus.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Contract Test loads about 1.6k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 549 words of instructions outside code blocks.
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.
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.
The full file from scalus3/scalus at commit 073969c, republished under its Apache-2.0 licence (© scalus3). 549 words, ~1,582 tokens.
.claude/skills/contract-test/SKILL.md (or your agent's skills folder).Before writing test code from memory, fetch https://scalus.org/llms-api.txt and check the testkit signatures you plan to use.
In the Scalus repo, read scalus-site/content/<path>.mdx; in any other project, fetch https://scalus.org/docs/<path>.md.
Testing fundamentals:
testing/unit-testing - ScalusTest trait, property-based testingsmart-contracts/evaluating-script - Script evaluation patternstesting/debugging - Debugging techniquesIntegration testing:
testing/emulator - in-memory Emulator testingtesting/local-devnet - Yaci DevKit integration testslocal-development skill for the full Emulator + TxBuilder loop.Study existing tests before writing new ones:
https://scalus.org/llms-examples.txt - validators with their tests; HtlcTest.scala is the reference style.scalus-examples/jvm/src/test/scala/scalus/examples/.Emulator test with ScalusTest (the standard pattern; see HtlcTest):
class MyValidatorTest extends AnyFunSuite, ScalusTest {
private given env: CardanoInfo = TestUtil.testEnvironment
private val contract = MyContract.compiled.withErrorTraces
test("valid spend succeeds") {
val provider = Emulator.withAddresses(Seq(Alice.address, Bob.address))
val utxos = provider.findUtxos(address = Alice.address).await().toOption.get
// build a transaction with txBuilder, then:
assert(provider.submit(tx).await().isRight)
}
}Assertions from scalus.testing.kit:
assertScriptFail(expectedError) { buildTx } - expect a validator failureassertEvalResult(expected)(program) - check an evaluation resultBudget assertions from scalus.testing.dsl.EvalTestDsl:
.assertBudgetWithin(memory, steps) - upper bound.assertBudgetEquals(memory, steps) - exact pin (baseline tests)Pin convention:
budget: test in scalus-core that pins mem, cpu
and the mainnet fee: assertEvalWithBudgetAndFee(code, arg, expected, ExUnits(memory = m, steps = s), Coin(fee))
from scalus.testing.kit.EvalTestKit. Pass the input as arg (it goes in as Data) so constant
folding cannot remove the work being measured.ExUnits of every transaction, and the fee where the test
already does (result.budget.fee == Coin(2398) in HtlcTest). Wrap a pin in
ScalaCompilerVersion.baseline(pre38 = ..., since38 = ...) only when the two compiler generations
differ; otherwise write the bare value.ExUnits(memory = 27127, steps = 11_541882), named parameters, _ at the million boundary.Property-based testing: ScalusTest provides generators (e.g. genByteStringOfN); use ScalaCheck forAll for on-chain function properties.
Negative cases: three idioms; pick one per test, do not mix them:
HtlcTest): keep the default evaluator and wrap the build in
assertScriptFail(expectedError) { buildTx }. The builder runs the script while balancing,
throws, and the helper matches expectedError against the script logs, so pass the
validator's own error constant.EditableNftValidatorTest): build with
TxBuilder(env, PlutusScriptEvaluator.constMaxBudget(env)) so the builder skips script
evaluation, then provider.submit(tx).await() and assert(result.isLeft). Use it when the
transaction must get past the builder (for example, to reach the ledger's own checks).VestingValidatorTest): build a ScriptContext by hand, run
compiled.runScript(ctx) and assert(result.isFailure, "..."). For an on-chain helper
evaluated directly, assertEvalFailsWithMessage[OnchainError](msg)(expr) checks the message.assertScriptFail(HtlcValidator.InvalidReceiverPreimage) {
txCreator.reveal(utxos = utxos, lockedUtxo = lockedUtxo, preimage = wrongPreimage, ...)
}Negative-test convention: every safety operation the validator uses gets one Fail: ... test
where the UNSAFE input fails. The transaction is valid apart from the one change. Minimum set:
validFromOrFail / validToOrFail: an unbounded validity range (Interval.always) fails.hasSameTokensAndAtLeastAda and exact value checks: an output whose value is below the expected
amount fails; native tokens stripped from the continuing output fails.findContinuingOutputOrFail: an output with the script payment credential but a different
staking credential fails; a second output to the script address fails.findUniqueOrFail on inputs: a second own input in the same transaction fails (each script run
must fail, see "double satisfaction" in VestingValidatorTest).mint.hasOnly / onlyBurnsUnder: an extra token name under the policy fails; a burn action that
mints nothing fails.hasNft / hasPaidTagged: quantity 2 of the beacon fails; one tagged output claimed by two
script instances fails.Shape of one case (unit path, VestingValidatorTest "Fail: continuing output redirects the staking credential"):
val hijacked = Address(
ScriptCredential(contractHash),
Option.Some(StakingCredential.StakingHash(Credential.PubKeyCredential(attackerPKH)))
)
val outputs = List(TxOut(hijacked, Value.lovelace(remaining), OutputDatum.OutputDatum(datum.toData)))
val result = compiled.runScript(ScriptContext(txInfo = txInfo(outputs), redeemer = redeemer.toData, scriptInfo = spending))
assert(result.isFailure, "Redirecting the staking credential must fail")In a user project: sbt test or scala-cli test ..
In the Scalus repo:
sbtn scalusJVM/test # Core tests
sbtn scalusExamplesJVM/test # Example tests
sbtn scalusCardanoLedgerJVM/test # Ledger tests
sbtn scalusCardanoLedgerIt/test # Integration tests (requires Docker)AnyFunSuite) with ScalaCheck for property-based tests.Test/fork := true).© scalus3, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in scalus-skills/skills/contract-test of scalus3/scalus.
Open the folder on GitHubat commit 073969c
Contract Test 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Contract Test this skillscalus3/scalus | 105 | — | ~1.6k | Automated safety check: Pass | Apache-2.0 | |
| Web3 Testingwshobson/agents | 40k | 11 repos | ~2k | Automated safety check: Pass | MIT | |
| Solana Development Playbookinternet-court/internet-court-skill | 6.4k | — | ~3k | Automated safety check: Pass | MIT | |
| Fork TestOriginProtocol/origin-dollar | 153 | — | ~1.2k | Automated safety check: Pass | MIT | |
| DevchainNethereum/Nethereum | 2.3k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Hybrid Cloud Test Gengetsentry/sentry | 45k | — | ~2.6k | Automated safety check: Pass | Custom licence |
wshobson/agents
Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking.
internet-court/internet-court-skill
End-to-end Solana development guide covering wallet connection, Anchor and Pinocchio programs, Codama clients, local testing, security checks and RPC lookups with curl.
OriginProtocol/origin-dollar
Generate Foundry fork tests for contracts that need real on-chain integration coverage.
Nethereum/Nethereum
Help users run a local Ethereum dev chain, write integration tests, fork networks, debug transactions, or replace Hardhat/Anvil with Nethereum DevChain (.NET).
getsentry/sentry
Generate hybrid cloud tests for the Sentry codebase. An agent skill from getsentry/sentry.
proffesor-for-testing/agentic-qe
Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing.
scalus3/scalus
Optimize Scalus/Cardano smart contracts for execution budget (CPU steps and memory).
scalus3/scalus
Security review for Scalus/Cardano smart contracts. An agent skill from scalus3/scalus.
scalus3/scalus
Guide for developing Scalus smart contracts. An agent skill from scalus3/scalus.
scalus3/scalus
A skill your agent uses when developing or testing Scalus smart contracts with the local Emulator and TxBuilder.
scalus3/scalus
A skill your agent uses when writing or changing a Pretty typeclass instance (paiges Doc DSL) in scalus-core, for example in scalus/utils/Pretty.scala or the cardano/ledger types.
Categories
Guide for testing Scalus smart contracts. An agent skill from scalus3/scalus. Contract Test is an agent skill from scalus3/scalus. Guide for testing Scalus smart contracts.
Contract Test fits situations like: emulator tests for Cardano validators; tasks that involve Smart contracts; tasks that involve Integration testing.
Run `npx skills add scalus3/scalus --skill contract-test -a claude-code`. Or copy the skill folder (scalus-skills/skills/contract-test in scalus3/scalus) into .claude/skills/contract-test in your project. Claude Code loads it when a task matches its description.
Run `npx skills add scalus3/scalus --skill contract-test -a codex`. Or copy the skill folder (scalus-skills/skills/contract-test in scalus3/scalus) into .agents/skills/contract-test in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add scalus3/scalus --skill contract-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/contract-test, .gemini/skills/contract-test, .github/skills/contract-test and .opencode/skills/contract-test in your project.
SKILL.md names no scripts, command-line tools or credentials: Contract Test is instructions for the agent only. Our summary lists: Docker.
SKILL.md names 1 domain. In commands or code: scalus.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
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.
Contract Test is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Contract Test: Web3 Testing (wshobson/agents, 40k stars), Solana Development Playbook (internet-court/internet-court-skill, 6.4k stars), Fork Test (OriginProtocol/origin-dollar, 153 stars) and Devchain (Nethereum/Nethereum, 2.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
scalus3 (a GitHub organization) maintains it in scalus3/scalus, which has 105 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 6, 2026.
Source: scalus3/scalus on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.