Agent skill

Abstract Domain Explorer

by ArabelaTso in ArabelaTso/Skills-4-SE

Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and…

Apache-2.0Auto-check passedSecurity

Install Abstract Domain Explorer

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill abstract-domain-explorer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE abstract-domain-explorer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/abstract-domain-explorer .claude/skills/abstract-domain-explorer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
abstract-domain-explorer
GitHub stars
253
Token cost
~2.4k tokens
SKILL.md length
1,075 words
Files
3 (incl. references)
Skills in repo
170
Repo updated
First seen
Licence
Apache-2.0

At a glance

Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and…

  • Works in 6 steps: Select Appropriate Domain(s) → Initialize Abstract State → Apply Transfer Functions → …
  • Analyzing program properties
  • SKILL.md covers Overview, Analysis Workflow, Analysis Examples and Domain Comparison, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Abstract Domain Explorer is an agent skill from ArabelaTso/Skills-4-SE. Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and relationships. Use when analyzing program properties, inferring loop invariants, detecting potential errors, or understanding variable relationships through static analysis.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/abstract_domains.md` and `references/api_reference.md`).

It sits in Security, covering Static analysis and SAST. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Analyzing program properties
  • Inferring loop invariants
  • Detecting potential errors
  • Understanding variable relationships through static analysis

Example prompts

  • “Use the abstract-domain-explorer skill to apply abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign…”
  • “/abstract-domain-explorer”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Select Appropriate Domain(s)
  2. Initialize Abstract State
  3. Apply Transfer Functions
  4. Handle Loops with Widening
  5. Refine with Narrowing (Optional)
  6. Extract Invariants

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are c).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Abstract Domain Explorer loads about 2.4k tokens when it runs, and up to ~6.3k if it reads all its reference files. Until then it costs about 99 tokens; SKILL.md has 1,075 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 1,075 words, ~2,361 tokens.

Download SKILL.mdSave it as .claude/skills/abstract-domain-explorer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
abstract-domain-explorer
description
Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and relationships. Use when analyzing program properties, inferring loop invariants, detecting potential errors, or understanding variable relationships through static analysis.

Abstract Domain Explorer

Overview

This skill applies abstract interpretation to statically analyze programs using various abstract domains. It infers invariants, value ranges, and relationships between variables without executing the code. Different domains offer different trade-offs between precision and efficiency.

Analysis Workflow

Follow these steps to analyze programs with abstract domains:

1. Select Appropriate Domain(s)

Choose based on analysis goals:

Interval Domain:

  • Use for: Range analysis, bounds checking, array indexing
  • Precision: Low to medium
  • Cost: Very efficient
  • Example: Determine if x ∈ [0, 100]

Sign Domain:

  • Use for: Sign analysis, division by zero detection
  • Precision: Low
  • Cost: Very efficient
  • Example: Determine if x is positive, negative, or zero

Congruence Domain:

  • Use for: Modular arithmetic, alignment analysis
  • Precision: Medium (for specific patterns)
  • Cost: Efficient
  • Example: Determine if x ≡ 0 (mod 4)

Octagon Domain:

  • Use for: Relational analysis, loop invariants with simple relationships
  • Precision: Medium to high
  • Cost: Moderate (O(n³) operations)
  • Example: Infer x ≤ y + 5, x + y ≤ 10

Polyhedra Domain:

  • Use for: Complex linear relationships, precise invariants
  • Precision: High
  • Cost: Expensive (exponential worst-case)
  • Example: Infer 2x + 3y ≤ z + 10

Reduced Product:

  • Use for: Combining strengths of multiple domains
  • Precision: Higher than individual domains
  • Cost: Sum of component costs
  • Example: Intervals × Congruence for precise range with modular constraints
2. Initialize Abstract State

Set initial values for program entry:

  • Constants: Exact values (e.g., x = 5 → x ∈ [5, 5])
  • Inputs: Top element (e.g., user input → x ∈ [-∞, +∞])
  • Uninitialized: Bottom element (unreachable)

Example:

c
int x = 0;        // x ∈ [0, 0]
int y = input();  // y ∈ [-∞, +∞]
3. Apply Transfer Functions

For each statement, compute abstract semantics:

Assignment (x = e):

  • Evaluate expression e in abstract domain
  • Update abstract state for x

Condition (assume c):

  • Refine abstract state based on condition
  • Intersect with constraint

Join (control flow merge):

  • Compute least upper bound of incoming states
  • Used after if-else, at loop headers

Example (Intervals):

c
x = y + 5;        // If y ∈ [a, b], then x ∈ [a+5, b+5]
assume(x > 10);   // If x ∈ [a, b], then x ∈ [max(a, 11), b]
4. Handle Loops with Widening

For loops, apply widening to ensure termination:

  1. Compute first iteration
  2. Compute second iteration
  3. Apply widening operator (∇)
  4. Check for convergence
  5. Continue until fixpoint reached

Example:

c
int x = 0;
while (x < 100) {
    x = x + 1;
}
  • Iteration 0: x ∈ [0, 0]
  • Iteration 1: x ∈ [0, 1]
  • Widening: x ∈ [0, +∞]
  • Refine with condition: x ∈ [0, 99] in loop
  • Exit: x ∈ [100, 100]
5. Refine with Narrowing (Optional)

Apply narrowing to improve precision:

  • Iterate a few more times (typically 1-3)
  • Use narrowing operator (△)
  • Refine over-approximations from widening
6. Extract Invariants

Identify inferred properties:

  • Value ranges for each variable
  • Relationships between variables
  • Loop invariants
  • Preconditions for safe operations

Report format:

  • Variable: abstract value
  • Invariants: logical formulas
  • Safety properties: bounds checks, division by zero, etc.

Analysis Examples

Example 1: Range Analysis with Intervals

Code:

c
int x = 0;
int y = 100;
while (x < 10) {
    x = x + 1;
    y = y - 1;
}
// What are the values of x and y here?

Analysis (Interval Domain):

  • Entry: x ∈ [0, 0], y ∈ [100, 100]
  • Loop iterations with widening:
    • Iter 0: x ∈ [0, 0], y ∈ [100, 100]
    • Iter 1: x ∈ [0, 1], y ∈ [99, 100]
    • Widening: x ∈ [0, +∞], y ∈ [-∞, 100]
    • Refine with x < 10: x ∈ [0, 9], y ∈ [-∞, 100]
  • Narrowing: y ∈ [91, 100]
  • Exit: x ∈ [10, 10], y ∈ [90, 90]

Inferred Invariants:

  • Loop: x ∈ [0, 9], y ∈ [91, 100]
  • Exit: x = 10, y = 90
  • Implicit: x + y = 100 (not captured by intervals alone)
Example 2: Relational Analysis with Octagons

Code:

c
int x = 0;
int y = 0;
while (x < 10) {
    x = x + 1;
    y = y + 1;
}

Analysis (Octagon Domain):

  • Entry: x = 0, y = 0, x - y = 0
  • Loop iterations:
    • Maintains x - y = 0 throughout
    • x ∈ [0, 10], y ∈ [0, 10]
  • Exit: x = 10, y = 10, x = y

Inferred Invariants:

  • x = y (captured by octagon)
  • x ∈ [0, 10], y ∈ [0, 10]

Advantage over Intervals: Intervals would only infer x ∈ [0, 10], y ∈ [0, 10] but miss the relationship x = y.

Example 3: Linear Relationships with Polyhedra

Code:

c
int x = 0, y = 0, z = 0;
while (x < 10) {
    x = x + 1;
    y = y + 2;
    z = x + y;
}

Analysis (Polyhedra Domain):

  • Entry: x = 0, y = 0, z = 0
  • Loop iterations:
    • Infers: y = 2x, z = x + y, z = 3x
    • x ∈ [0, 10]
  • Exit: x = 10, y = 20, z = 30

Inferred Invariants:

  • y = 2x
  • z = x + y
  • z = 3x
  • x ∈ [0, 10]

Advantage over Octagons: Polyhedra can express y = 2x, which octagons cannot.

Show full SKILL.md (449 more words)Show less
Example 4: Modular Arithmetic with Congruence

Code:

c
int sum = 0;
for (int i = 0; i < 100; i++) {
    sum = sum + 3;
}

Analysis (Congruence Domain):

  • Entry: sum ≡ 0 (mod 3), i ≡ 0 (mod 1)
  • Loop: sum ≡ 0 (mod 3) maintained
  • Exit: sum ≡ 0 (mod 3)

Analysis (Interval Domain):

  • Exit: sum ∈ [0, 300]

Combined (Reduced Product):

  • sum ∈ [0, 300] and sum ≡ 0 (mod 3)
  • Refined: sum ∈ {0, 3, 6, 9, ..., 297, 300}
  • Exact: sum = 300

Inferred Invariants:

  • sum is always divisible by 3
  • sum ∈ [0, 300]
Example 5: Division by Zero Detection with Sign

Code:

c
int x = read_input();
int y = x * x;
int z = 100 / y;  // Safe?

Analysis (Sign Domain):

  • x: ⊤ (unknown sign)
  • y = x * x: ≥0 (non-negative)
  • Problem: y could be 0 if x = 0
  • Division 100 / y: potential division by zero

Analysis (Interval Domain):

  • x: [-∞, +∞]
  • y: [0, +∞]
  • Problem: 0 ∈ [0, +∞]
  • Division 100 / y: potential division by zero

Inferred Property:

  • Unsafe: Division by zero possible when x = 0
Example 6: Array Bounds Checking

Code:

c
int arr[10];
int i = 0;
while (i < 10) {
    arr[i] = 0;  // Safe?
    i = i + 1;
}

Analysis (Interval Domain):

  • Loop: i ∈ [0, 9]
  • Array access: arr[i] where i ∈ [0, 9]
  • Array bounds: [0, 9]
  • Safe: i always within bounds

Inferred Property:

  • No array bounds violation
Example 7: Nested Loops with Octagons

Code:

c
int i = 0, j = 0;
while (i < 10) {
    j = 0;
    while (j < i) {
        j = j + 1;
    }
    i = i + 1;
}

Analysis (Octagon Domain):

  • Outer loop: i ∈ [0, 10]
  • Inner loop: j ∈ [0, i], j ≤ i
  • Exit: i = 10, j = 9, j ≤ i

Inferred Invariants:

  • j ≤ i (relational invariant)
  • i ∈ [0, 10]
  • j ∈ [0, 9]

Domain Comparison

DomainPrecisionCostRelationshipsBest For
SignVery LowO(1)NoneSign errors, division by zero
IntervalLow-MediumO(1)NoneRange analysis, bounds checking
CongruenceMediumO(1)NoneModular patterns, alignment
OctagonMedium-HighO(n³)±x ± y ≤ cSimple relational invariants
PolyhedraHighExponentialLinearComplex linear relationships
Reduced ProductHigherSum of componentsCombinedPrecise analysis with multiple aspects

Choosing the Right Domain

Start with Intervals if:

  • You need range information
  • Efficiency is critical
  • No relationships needed

Use Octagons if:

  • You need simple relationships (x ≤ y + c)
  • Loop invariants involve variable pairs
  • Moderate cost acceptable

Use Polyhedra if:

  • Complex linear relationships needed
  • Precision is critical
  • Small programs or specific code sections
  • Cost is acceptable

Use Reduced Products if:

  • Multiple aspects needed (range + modular)
  • Willing to pay combined cost
  • Need precision from multiple domains

Use Sign if:

  • Only sign information needed
  • Very large programs
  • Quick analysis required

Use Congruence if:

  • Modular arithmetic patterns
  • Alignment analysis
  • Complement to intervals

Constraints

MUST:

  • Select appropriate domain(s) for analysis goals
  • Apply transfer functions correctly
  • Use widening for loops to ensure termination
  • Report inferred invariants clearly
  • Indicate precision limitations of chosen domain

MUST NOT:

  • Claim exact values when domain gives approximations
  • Ignore widening (may not terminate)
  • Use expensive domains unnecessarily
  • Report unsound results

Resources

references/abstract_domains.md

Comprehensive reference covering:

  • Abstract interpretation fundamentals
  • Detailed domain specifications (intervals, octagons, polyhedra, sign, congruence)
  • Domain operations and transfer functions
  • Widening and narrowing techniques
  • Reduced product domains
  • Fixpoint computation
  • Complete analysis examples

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/abstract-domain-explorer of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • references/abstract_domains.md
  • references/api_reference.md

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Abstract Domain Explorer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Abstract Domain Explorer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Abstract Domain Explorer this skillArabelaTso/Skills-4-SE253—~2.4kAutomated safety check: PassApache-2.0
Semgrepvigolium/piolium1401 repos~2.4kAutomated safety check: NotesMIT
C To AstNarwhal-Lab/MagicSkills316—~1.1kAutomated safety check: PassMIT
Semgrep Security Scantrailofbits/skills7.4k—~3.7kAutomated safety check: NotesCC-BY-SA-4.0
LLM Sast ScannerSunWeb3Sec/llm-sast-scanner287—~6.2kAutomated safety check: PassNone
Sast SemgrepAgentSecOps/SecOpsAgentKit2202 repos~2.4kAutomated safety check: PassCustom licence

Similar skills

  • Semgrep

    vigolium/piolium

    Run Semgrep static analysis scan on a codebase using parallel subagents.

    140 GitHub starsUsed in 1 repo~2.4k tokens
    SecurityAuto-check: notes
  • C To Ast

    Narwhal-Lab/MagicSkills

    Parse C source code into an Abstract Syntax Tree (AST). An agent skill from Narwhal-Lab/MagicSkills.

    316 GitHub stars~1.1k tokensUpdated 6 mo ago
    SecurityAuto-check passed
  • Semgrep Security Scan

    trailofbits/skills

    Official

    Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file.

    7.4k GitHub stars~3.7k tokensUpdated 2 days ago
    SecurityAuto-check: notes
  • LLM Sast Scanner

    SunWeb3Sec/llm-sast-scanner

    General-purpose Static Application Security Testing (SAST) skill for code vulnerability analysis.

    287 GitHub stars~6.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Sast Semgrep

    AgentSecOps/SecOpsAgentKit

    Static application security testing (SAST) using Semgrep for vulnerability detection, security code review, and secure coding guidance with OWASP and CWE framework mapping.

    220 GitHub starsUsed in 2 repos~2.4k tokens
    SecurityAuto-check passed
  • Wp Phpstan

    Automattic/agent-skills

    A skill your agent uses when configuring, running, or fixing PHPStan static analysis in WordPress projects (plugins/themes/sites): phpstan.neon setup, baselines, WordPress-specific typing, and…

    211 GitHub starsUsed in 1 repo~1k tokens
    SecurityAuto-check passed

More from ArabelaTso/Skills-4-SE

All 170 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Abstract Domain Explorer

What does Abstract Domain Explorer do?

Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and…. Abstract Domain Explorer is an agent skill from ArabelaTso/Skills-4-SE. Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and relationships.

When should I use Abstract Domain Explorer?

Abstract Domain Explorer fits situations like: analyzing program properties; inferring loop invariants; detecting potential errors; understanding variable relationships through static analysis.

How do I install Abstract Domain Explorer in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill abstract-domain-explorer -a claude-code`. Or copy the skill folder (skills/abstract-domain-explorer in ArabelaTso/Skills-4-SE) into .claude/skills/abstract-domain-explorer in your project. Claude Code loads it when a task matches its description.

How do I install Abstract Domain Explorer in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill abstract-domain-explorer -a codex`. Or copy the skill folder (skills/abstract-domain-explorer in ArabelaTso/Skills-4-SE) into .agents/skills/abstract-domain-explorer in your project. Codex loads it when a task matches its description.

Can I use Abstract Domain Explorer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill abstract-domain-explorer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/abstract-domain-explorer, .gemini/skills/abstract-domain-explorer, .github/skills/abstract-domain-explorer and .opencode/skills/abstract-domain-explorer in your project.

What does Abstract Domain Explorer need to run?

SKILL.md names no scripts, command-line tools or credentials: Abstract Domain Explorer is instructions for the agent only.

Does Abstract Domain Explorer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Abstract Domain Explorer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Abstract Domain Explorer use?

Abstract Domain Explorer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Abstract Domain Explorer use?

About 2.4k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.9k tokens, read only when the agent opens those files.

What are the alternatives to Abstract Domain Explorer?

Skills that share tags, products or a category with Abstract Domain Explorer: Semgrep (vigolium/piolium, 140 stars), C To Ast (Narwhal-Lab/MagicSkills, 316 stars), Semgrep Security Scan (trailofbits/skills, 7.4k stars) and LLM Sast Scanner (SunWeb3Sec/llm-sast-scanner, 287 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Abstract Domain Explorer?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 170 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.