vyper-compiler
Internal development guide for the Vyper compiler codebase.
Install
mkdir -p .claude/skills/vyper-compiler && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18028" && unzip -o skill.zip -d .claude/skills/vyper-compiler && rm skill.zipInstalls to .claude/skills/vyper-compiler
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Vyper smart contract compiler internals. Use when working on the Vyper compiler codebase — compilation pipeline, Venom IR, semantic analysis, code generation, testing, or contributing. Triggers on vyper compiler development, Venom passes, AST/semantics changes, codegen work, or test writing.Key capabilities
- →Compile Vyper smart contracts
- →Inspect Venom IR output
- →Inspect assembly output
- →Run compiler tests
- →Enforce code style with linting
- →Parse Vyper source to AST
How it works
The skill uses `uv run` to execute Vyper compiler commands within a local virtual environment, orchestrating compilation phases like parsing, semantic analysis, and code generation.
Inputs & outputs
When to use vyper-compiler
- →Compile vyper contract
- →Inspect Venom IR output
- →Run compiler tests
About this skill
Vyper Compiler
Pythonic smart contract language targeting the EVM. v0.4.x, Python 3.11+.
Quick Commands
uv sync # install deps (per-worktree .venv, recommended, includes dev group)
uv run vyper contract.vy # compile a contract
uv run vyper -f ir_runtime contract.vy # inspect Venom IR
uv run vyper -f asm contract.vy # inspect assembly
uv run ./quicktest.sh # run tests (`-nauto -m "not fuzzing"` by default via setup.cfg)
uv run make lint # enforces code style (same as CI)
Prefix all commands with uv run — it activates the local .venv per invocation, which is necessary in non-interactive shells. Each worktree gets its own .venv, so no cross-contamination.
Alternative: pip install . --group dev + PYTHONPATH=. prefix on every command. Never pip install -e . — it creates an egg-link in site-packages that permanently points the venv at one worktree, breaking all others.
Compilation Pipeline
Source (.vy)
│
├─ vyper/ast/ → Parse to AST (pre_parser → Python AST → Vyper AST)
├─ vyper/semantics/ → Type check, validate, annotate AST
├─ vyper/codegen/ → AST → s-expr IR (default production pipeline)
├─ vyper/ir/ → s-expr IR → assembly → bytecode
└─ vyper/evm/ → Assembly → bytecode
Experimental Venom path (--experimental-codegen):
├─ vyper/codegen_venom/ → AST → Venom SSA IR
└─ vyper/venom/ → Venom IR optimization passes → assembly
Orchestrated by vyper/compiler/phases.py (CompilerData). Each phase is lazy.
Directory Map
| Directory | Purpose |
|---|---|
vyper/ast/ | Parsing, AST nodes, pre-parser. See AST README |
vyper/semantics/ | Type system, analysis, validation. See Semantics README |
vyper/codegen/ | AST → s-expr IR (default production pipeline) |
vyper/ir/ | s-expr IR → assembly → bytecode. See IR README |
vyper/codegen_venom/ | AST → Venom IR (experimental, --experimental-codegen) |
vyper/venom/ | Venom SSA IR: passes, analysis, assembly emission. See Venom README |
vyper/compiler/ | Pipeline orchestration, settings, output formats. See Compiler README |
vyper/builtins/ | Built-in functions and interfaces |
vyper/evm/ | EVM opcodes, assembler |
vyper/cli/ | CLI entry points (vyper, vyper-ir, venom) |
tests/unit/ | Unit tests (ast, semantics, compiler, venom) |
tests/functional/ | Functional tests (builtins, codegen, grammar, syntax, venom) |
Topic Deep-Dives
- Venom IR — SSA IR design, passes, optimization, working with Venom code
- Semantics & Frontend — Type system, analysis phases, namespace, validation
- Code Generation — Legacy IR, Venom codegen, the two pipelines
- Testing — Test structure, fixtures, running tests, writing new tests
- Contributing — Commit message standards, PR workflow, code style summary
Code Style
Enforced by make lint (also what CI runs). Includes black, flake8, isort, mypy.
- Line length: 100
- No inline imports; standard library → third-party → local
- snake_case for variables (
tmp = ...), DromedaryCase (aka upper camelCase) for classes (ExprAnalyzer), type classes end inT(e.g.IntegerT,ModuleT)
Key Entry Points
| What | Where |
|---|---|
| Main compile function | vyper.compiler.compile_code() |
| Pipeline phases | vyper.compiler.phases.CompilerData |
| AST parsing | vyper.ast.parse.parse_to_ast() |
| Semantic analysis | vyper.semantics.analyze_module() |
| Legacy codegen | vyper.codegen.module |
| AST → Venom IR | vyper.codegen_venom.module |
| Venom → assembly | vyper.venom.generate_assembly_experimental() |
| CLI entry | vyper.cli.vyper_compile |
When not to use it
- →When not working on the Vyper compiler codebase
- →When not developing Vyper compiler features
- →When not contributing to the Vyper compiler
Limitations
- →Requires a local `.venv` activated via `uv run`
- →Specific to Vyper compiler development tasks
- →Python 3.11+ is required
How it compares
This workflow provides direct access to compiler internals and intermediate representations, unlike standard contract compilation.
Compared to similar skills
vyper-compiler side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| vyper-compiler (this skill) | 0 | 2mo | Review | Advanced |
| temporal-python-testing | 8 | 3mo | No flags | Advanced |
| python-pro | 23 | 3mo | No flags | Advanced |
| home-assistant-integration-knowledge | 8 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
temporal-python-testing
wshobson
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
python-pro
sickn33
Master Python 3.12+ with modern features, async programming, performance optimization, and production-ready practices. Expert in the latest Python ecosystem including uv, ruff, pydantic, and FastAPI. Use PROACTIVELY for Python development, optimization, or advanced Python patterns.
home-assistant-integration-knowledge
home-assistant
Everything you need to know to build, test and review Home Assistant Integrations. If you're looking at an integration, you must use this as your primary reference.
adk-engineer
jeremylongshore
Execute software engineer specializing in creating production-ready ADK agents with best practices, code structure, testing, and deployment automation. Use when asked to "build ADK agent", "create agent code", or "engineer ADK application". Trigger with relevant phrases based on skill purpose.
unit-testing-test-generate
sickn33
Generate comprehensive, maintainable unit tests across languages with strong coverage and edge case focus.
playwright-roll
microsoft
Roll Playwright Python to a new version