dialyzer-analysis

Diagnose and fix Dialyzer warnings and type discrepancies in Erlang and Elixir code.

187|20|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/TheBushidoCollective/han --skill dialyzer-analysis
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dialyzer-analysis
Source: https://github.com/TheBushidoCollective/han/tree/main/jutsu/jutsu-dialyzer/skills/dialyzer-analysis
Command: npx skills add https://github.com/TheBushidoCollective/han --skill dialyzer-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dialyzer reveals type and spec issues; this Skill guides systematic analysis and fixes.

Core Features & Use Cases

  • Basic specs and type patterns
  • Handling common warnings and unknown functions
  • Best practices for type analysis in Elixir/Erlang

Quick Start

Add @specs to functions and run mix dialyzer to inspect warnings.

Frequently Asked Questions about dialyzer-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze and fix Dialyzer warnings in my Elixir project?▼

Dialyzer static analysis identifies type and spec issues in Elixir and Erlang code. Add @spec annotations to functions, run `mix dialyzer`, then review warnings for pattern-match gaps, unmatched returns, and type mismatches. Fix by refining specs, handling union types correctly, and ensuring functions match their declared signatures.

What are common Dialyzer warnings and how do I resolve them?▼

Common warnings include no-return functions, unmatched returns, unknown functions, and pattern-match coverage gaps. Resolve by adding missing @spec definitions, verifying function existence and arity, handling edge cases in pattern matching, and correctly defining union and opaque types per success typing principles.

Do I need to add @spec to every function to use Dialyzer?▼

No. Dialyzer performs success typing inference without explicit specs, but @spec annotations improve coverage and catch more issues. Adding specs to public functions and complex internal functions yields the most value; gradual adoption is supported.

How do I handle opaque and remote types in Dialyzer?▼

Define opaque types with @opaque in your module and reference remote types using the `module.type()` syntax. Dialyzer enforces that opaque types are only constructed and destructed through their defining module's functions, preventing invalid type operations across modules.

Can Dialyzer work with existing Erlang projects?▼

Yes. Dialyzer analyzes both Erlang and Elixir code. Apply the same @spec and @type patterns in Erlang using module attributes, run analysis across your codebase, and incrementally fix warnings following the same success typing and type consistency principles.

What should I do if Dialyzer reports unknown function warnings?▼

Unknown function warnings occur when Dialyzer cannot locate a function definition or its spec. Verify the function exists, check module name and arity, ensure dependencies are dialyzed, and add missing @spec declarations. Use a .plt file to cache precompiled type information for dependencies.