Agent skill
backtesting-assertions
Runs Credible Layer assertion backtests against historical transactions. Use when validating assertions on real chain data or known exploits.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/backtesting-assertions
SKILL.md
Backtesting Assertions
Use Credible Layer backtesting to replay historical transactions with assertions enabled.
When to Use
- You want to validate assertions against real mainnet transactions.
- You are testing a known exploit block or incident transaction.
- You need to confirm triggers match real protocol entrypoints.
When NOT to Use
- You only need unit or fuzz tests. Use
testing-assertions. - You are designing invariants or triggers. Use
designing-assertions. - You only need Solidity implementation details. Use
implementing-assertions.
Quick Start
- Create a test that inherits
CredibleTestWithBacktesting. - Configure
BacktestingConfigwith target contract, block range, and assertion selector. - Call
executeBacktestand assert failures are zero. - Run with
--ffior a profile that enables FFI.
Workflow
- Pick a target contract (the assertion adopter address).
- Choose
endBlockandblockRange. - Verify RPC env vars; skip or fallback when missing.
- Prefer
useTraceFilter = trueto detect internal calls. - Use
forkByTxHash = trueonly when debugging state-dependent failures. - Interpret results:
ASSERTION_FAILoften indicates false positives or gas issues. - If many
SKIP, the selector/target does not match; adjust target or selector.
Rationalizations to Reject
- "We only need unit tests." Backtesting catches real-world call patterns.
- "Trace filter is optional." Without it you miss internal calls.
- "forkByTxHash everywhere." It is slow and RPC-heavy; use it for debugging only.
- "RPC isn't needed." Backtesting requires a working RPC and FFI.
References
- Backtesting Template
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?