Agent skill

direct-tests

Write and run fast direct mode tests for GenLayer intelligent contracts.

Internet Court1,389★ · +222/wk · 1 repos on radarProfile →
claude-codecodexcan modify filesNOASSERTION
Install
npx skills add internet-court/internet-court-skill --skill direct-tests --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 5 KB
Bundled scripts: none
Allowed tools: -Bash-Read-Write-Edit
Path: vendored/genlayer/direct-tests/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,536 · +147 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Direct Mode Tests Write fast, in-memory tests for intelligent contracts. No server, no Docker — tests run in ~30-50ms. ## Running Tests ```bash pytest tests/direct/ -v pytest tests/direct/test_specific.py -v pytest tests/direct/test_specific.py::test_one_case -v ``` ## Fixtures Available from `genlayer-test` pytest plugin: ```python def test_example(direct_vm, direct_deploy, direct_alice, direct_bob): # direct_vm — VMContext with cheatcodes # direct_deploy — deploy a contract file # direct_alice — test address # direct_bob — test address pass ``` All fixtures: `direct_vm`, `direct_deploy`, `direct_alice`, `direct_bob`, `direct_charlie`, `direct_owner`, `direct_accounts` ## Basic Test Pattern ```python def test_set_and_get(direct_vm, direct_deploy, direct_alice): contract = direct_deploy("contracts/my_contract.py") direct_vm.sender = direct_alice contract.set_data("hello") result = contract.get_data(direct_alice) assert result == "hello" ``` ## Mocking Web Requests For contracts that call `gl.nondet.web.get()`: ```python import json def test_with_web_mock(direct_vm, direct_deploy, direct_alice): contract = direct_deploy("contracts/my_contract.py") direct_vm.sender = direct_alice #

What's inside
Steps it walks through
  1. Running Tests
  2. Fixtures
  3. Basic Test Pattern
  4. Mocking Web Requests
  5. Full mock format (when you need headers/method control)
  6. Mocking LLM Responses
  7. Clearing Mocks
  8. VMContext Cheatcodes
  9. Test Organization
  10. What to Test in Direct Mode
  11. Common Patterns
  12. Testing access control
  13. Testing state transitions
  14. Reusable mock helpers (conftest.py)
Ships with 2 files
  • LICENSE
  • agents/openai.yaml
Commands it runs
pytest tests/direct/ -v
pytest tests/direct/test_specific.py -v
pytest tests/direct/test_specific.py::test_one_case -v
More from internet-court-skill
All skills →
About this skill
What does the direct-tests skill do?

Write and run fast direct mode tests for GenLayer intelligent contracts.

How do I install it?

Run `npx skills add internet-court/internet-court-skill --skill direct-tests --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From internet-court/internet-court-skill, a repository with 1,536 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going