# Genvm Lint

Validate GenLayer intelligent contracts with the GenVM linter.

- Repository: https://github.com/internet-court/internet-court-skill (7050 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add internet-court/internet-court-skill --skill genvm-lint -g -a claude-code -y`
Codex: `npx skills add internet-court/internet-court-skill --skill genvm-lint -g -a codex -y`
Cursor: `npx skills add internet-court/internet-court-skill --skill genvm-lint -g -a cursor -y`
Gemini CLI: `npx skills add internet-court/internet-court-skill --skill genvm-lint -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add internet-court/internet-court-skill`

## Description

Validate GenLayer intelligent contracts with the GenVM linter.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# GenVM Lint

Validate intelligent contracts for safety, correctness, and SDK compliance.

## Setup

Requires `genvm-linter` (included in `requirements.txt` for boilerplate projects):

```bash
pip install genvm-linter
```

## Workflow

**Always lint before testing.** Run `genvm-lint check` after writing or modifying a contract. Fix all errors before running tests.

```bash
genvm-lint check contracts/my_contract.py
```

`check` runs both lint (AST safety) and validate (SDK semantics) in one pass.

## Commands

### check (recommended)
```bash
genvm-lint check contracts/my_contract.py
genvm-lint check contracts/my_contract.py --json  # Machine-readable output
```

### lint (fast AST checks only, ~50ms)
```bash
genvm-lint lint contracts/my_contract.py
```

Catches:
- Forbidden imports (`os`, `sys`, `subprocess`, `random`, etc.)
- Non-deterministic patterns (bare `float` usage)
- Contract header structure issues

### validate (SDK semantic checks, ~200ms)
```bash
genvm-lint validate contracts/my_contract.py
```

Validates:
- Types exist in SDK (`TreeMap`, `DynArray`, `Address`, etc.)
- Decorators correctly applied (`@gl.public.view`, `@gl.public.write`)
- Storage fields have valid types (no `dict`/`list`)
- Method signatures correct

### schema (extract ABI)
```bash
genvm-lint schema contracts/my_contract.py
genvm-lint schema contracts/my_contract.py --json
genvm-lint schema contracts/my_contract.py --output abi.json
```

### typecheck (Pyright/Pylance)
```bash
genvm-lint typecheck contracts/my_contract.py
genvm-lint typecheck contracts/my_contract.py --json
genvm-lint typecheck contracts/my_contract.py --strict
```

Runs Pyright with SDK paths auto-configured. Catches type mismatches, missing attributes, undefined variables.

### download (pre-download GenVM artifacts)
```bash
genvm-lint download                    # Latest
genvm-lint download --version v0.2.12  # Specific
genvm-lint download --list             # Show cached
```

## Output Formats

The rest: https://github.com/internet-court/internet-court-skill/blob/HEAD/vendored/genlayer/genvm-lint/SKILL.md
