Agent skill

Static Analysis

by aftermathlabs in aftermathlabs/llvm-msvc

Expertise in LLVM-based static analysis including dataflow analysis, pointer analysis, taint tracking, and program verification.

AGPL-3.0Auto-check passedSecurity

Install Static Analysis

skills CLI
$ npx skills add aftermathlabs/llvm-msvc --skill static-analysis -a claude-code

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

GitHub CLI
$ gh skill install aftermathlabs/llvm-msvc static-analysis --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/aftermathlabs/llvm-msvc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/static-analysis .claude/skills/static-analysis && 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
static-analysis
GitHub stars
438
Token cost
~1.8k tokens
SKILL.md length
376 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Expertise in LLVM-based static analysis including dataflow analysis, pointer analysis, taint tracking, and program verification.

  • Works in 5 steps: Soundness vs Completeness: Understand… → Scalability: Use summaries for large… → Path Sensitivity: Balance precision and… → …
  • Implementing security scanners
  • SKILL.md covers Analysis Categories, LLVM Analysis Infrastructure, Taint Analysis and Pointer Analysis Frameworks, plus 7 more sections
  • Reaches raw.githubusercontent.com

What it does

Static Analysis is an agent skill from aftermathlabs/llvm-msvc. Expertise in LLVM-based static analysis including dataflow analysis, pointer analysis, taint tracking, and program verification. Use this skill when implementing security scanners, bug finders, code quality tools, or performing program analysis research.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security, covering Static analysis and SAST. The repository describes itself as: LLVM fork with explicit compatibility with MSVC 2022 features. The licence is AGPL-3.0.

When your agent uses it

  • Implementing security scanners
  • Code quality tools
  • Performing program analysis research

Example prompts

  • “/static-analysis”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Soundness vs Completeness: Understand trade-offs
  2. Scalability: Use summaries for large codebases
  3. Path Sensitivity: Balance precision and performance
  4. False Positive Management: Prioritize actionable findings
  5. Incremental Analysis: Cache results for faster re-analysis

What it can do on your machine

Read from SKILL.md and the folder at commit bfc7254. 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 cpp).

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • raw.githubusercontent.com

    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

Static Analysis loads about 1.8k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 376 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

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 aftermathlabs/llvm-msvc at commit bfc7254, republished under its AGPL-3.0 licence (© aftermathlabs). 376 words, ~1,814 tokens.

Download SKILL.mdSave it as .claude/skills/static-analysis/SKILL.md (or your agent's skills folder).
name
static-analysis
description
Expertise in LLVM-based static analysis including dataflow analysis, pointer analysis, taint tracking, and program verification. Use this skill when implementing security scanners, bug finders, code quality tools, or performing program analysis research.

Static Analysis Skill

This skill covers static program analysis techniques using LLVM infrastructure for security research, vulnerability detection, and code quality assessment.

Analysis Categories

Dataflow Analysis
  • Forward Analysis: Track values from definitions to uses
  • Backward Analysis: Track from uses back to definitions
  • May/Must Analysis: Conservative vs precise approximations
Control Flow Analysis
  • Dominator Trees: Identify code dominance relationships
  • Post-Dominator Trees: Control dependence analysis
  • Loop Analysis: Detect and characterize loops
Pointer Analysis
  • Flow-Insensitive: Andersen's, Steensgaard's algorithms
  • Flow-Sensitive: Track pointer values at each program point
  • Context-Sensitive: Distinguish calling contexts

LLVM Analysis Infrastructure

Using Built-in Analyses
cpp
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/DominatorTree.h"

void analyze(llvm::Function& F, llvm::FunctionAnalysisManager& FAM) {
    // Get dominator tree
    auto& DT = FAM.getResult<llvm::DominatorTreeAnalysis>(F);
    
    // Get loop info
    auto& LI = FAM.getResult<llvm::LoopAnalysis>(F);
    
    // Get alias analysis
    auto& AA = FAM.getResult<llvm::AAManager>(F);
    
    // Check if two pointers may alias
    llvm::AliasResult AR = AA.alias(Ptr1, Ptr2);
}
Implementing Custom Analysis
cpp
class TaintAnalysis {
    std::set<llvm::Value*> taintedValues;
    
public:
    void markTainted(llvm::Value* V) {
        taintedValues.insert(V);
    }
    
    bool isTainted(llvm::Value* V) {
        return taintedValues.count(V) > 0;
    }
    
    void propagate(llvm::Instruction* I) {
        // Propagate taint through operations
        for (auto& Op : I->operands()) {
            if (isTainted(Op)) {
                markTainted(I);
                break;
            }
        }
    }
};

Taint Analysis

Source-Sink Model
cpp
// Define taint sources (user input, network, files)
bool isTaintSource(llvm::CallInst* CI) {
    llvm::Function* F = CI->getCalledFunction();
    if (!F) return false;
    
    static const std::set<std::string> sources = {
        "read", "recv", "fread", "getenv", "gets", "scanf"
    };
    return sources.count(F->getName().str()) > 0;
}

// Define sensitive sinks (SQL queries, system calls, format strings)
bool isSensitiveSink(llvm::CallInst* CI) {
    llvm::Function* F = CI->getCalledFunction();
    if (!F) return false;
    
    static const std::set<std::string> sinks = {
        "system", "exec", "printf", "strcpy", "memcpy", "sql_query"
    };
    return sinks.count(F->getName().str()) > 0;
}
Interprocedural Analysis
  • Track taint across function boundaries
  • Handle indirect calls via call graph analysis
  • Context-sensitivity for precision

Pointer Analysis Frameworks

Using Andersen's Analysis
cpp
#include "llvm/Analysis/CFLAndersAliasAnalysis.h"

// Check may-alias relationship
void checkAlias(llvm::AAResults& AA, llvm::Value* P1, llvm::Value* P2) {
    switch (AA.alias(P1, P2)) {
        case llvm::AliasResult::NoAlias:
            // Definitely don't alias
            break;
        case llvm::AliasResult::MayAlias:
            // Might alias
            break;
        case llvm::AliasResult::MustAlias:
            // Always alias
            break;
    }
}
Points-To Sets
cpp
// Track what each pointer may point to
class PointsToAnalysis {
    std::map<llvm::Value*, std::set<llvm::Value*>> pointsTo;
    
public:
    void addPointsTo(llvm::Value* ptr, llvm::Value* target) {
        pointsTo[ptr].insert(target);
    }
    
    const std::set<llvm::Value*>& getPointsTo(llvm::Value* ptr) {
        return pointsTo[ptr];
    }
};

Dependency Analysis

Data Dependency Graph (DDG)
cpp
#include "llvm/Analysis/DDG.h"

void buildDDG(llvm::Function& F, llvm::FunctionAnalysisManager& FAM) {
    auto& LI = FAM.getResult<llvm::LoopAnalysis>(F);
    
    for (auto* L : LI) {
        llvm::DataDependenceGraph DDG(*L, FAM.getResult<llvm::AAManager>(F));
        
        for (auto& Node : DDG) {
            // Analyze data dependencies in loop
        }
    }
}
Program Slicing
  • Forward slicing: Find all statements affected by a variable
  • Backward slicing: Find all statements affecting a variable
  • Use for debugging, testing, and security analysis

Major Static Analysis Tools

Comprehensive Frameworks
  • Phasar: Industrial-strength LLVM-based analysis framework
  • SVF: Scalable pointer analysis and value-flow analysis
  • Joern: Code analysis platform with graph queries
  • CodeChecker: Clang-based static analysis integration
Specialized Tools
  • clam: Abstract interpretation framework
  • dg: Dependence graph construction
  • Semgrep: Pattern-based multi-language analysis

Security Analysis Applications

Vulnerability Detection
cpp
// Buffer overflow detection
void checkBufferAccess(llvm::GetElementPtrInst* GEP) {
    // Get array size if available
    llvm::Type* SourceType = GEP->getSourceElementType();
    if (auto* AT = llvm::dyn_cast<llvm::ArrayType>(SourceType)) {
        uint64_t arraySize = AT->getNumElements();
        
        // Check if index might exceed bounds
        llvm::Value* Index = GEP->getOperand(2);
        // Perform range analysis on index
    }
}
Use-After-Free Detection
  • Track allocation/deallocation points
  • Build reaching definitions for pointers
  • Flag uses after free calls
Show full SKILL.md (156 more words)Show less
Information Flow
  • Track sensitive data (passwords, keys, PII)
  • Detect leaks to logs, network, or untrusted sinks
  • Implement declassification rules

Best Practices

  1. Soundness vs Completeness: Understand trade-offs
  2. Scalability: Use summaries for large codebases
  3. Path Sensitivity: Balance precision and performance
  4. False Positive Management: Prioritize actionable findings
  5. Incremental Analysis: Cache results for faster re-analysis

Integration with IDEs

Clangd/LSP Integration
  • Provide real-time analysis feedback
  • Integrate with editor diagnostics
  • Support quick-fix suggestions
CI/CD Integration
  • Run analysis on pull requests
  • Block merges on critical findings
  • Track analysis trends over time

Resources

See Static Analysis and Clang Plugins sections in README.md for comprehensive tool listings and research references.

Getting Detailed Information

When you need detailed and up-to-date resource links, tool lists, or project references, fetch the latest data from:

https://raw.githubusercontent.com/gmh5225/awesome-llvm-security/refs/heads/main/README.md

This README contains comprehensive curated lists of:

  • Static analysis frameworks (Static Analysis section)
  • Pointer analysis and taint tracking tools
  • Program verification and bug finding tools
  • Clang-based code analysis plugins

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

Files

Just SKILL.md in .agents/skills/static-analysis of aftermathlabs/llvm-msvc.

Open the folder on GitHubat commit bfc7254

Compare with similar skills

Static Analysis 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.

Static Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Static Analysis this skillaftermathlabs/llvm-msvc438—~1.8kAutomated safety check: PassAGPL-3.0
Codexqa Code Analyzeropenqa-cn/codexqa152—~1.2kAutomated safety check: PassApache-2.0
Debug Ruleseqra/opentaint162—~1.3kAutomated safety check: PassApache-2.0
Security Architecture Reviewcbrock84/headcount2k—~1.1kAutomated safety check: PassMIT
Triaging Security Findingsbitwarden/ai-plugins154—~2.2kAutomated safety check: PassCustom licence
Trailmark Graph Evolutiontrailofbits/skills7.4k—~3.4kAutomated safety check: PassCC-BY-SA-4.0

Similar skills

  • Codexqa Code Analyzer

    openqa-cn/codexqa

    Queries a local CodexQA symbol graph for change review, regression scope, test gaps, error location, and entry risk.

    152 GitHub stars~1.2k tokensUpdated 4 days ago
    SecurityAuto-check passed
  • Debug Rule

    seqra/opentaint

    Debug a rule or approximation that behaves unexpectedly by tracing where taint is dropped.

    162 GitHub stars~1.3k tokensUpdated today
    SecurityAuto-check passed
  • Reviews a design or change for security before it ships — authentication and authorization, data handling, secrets, dependencies, and the secure-development practices around it.

    2k GitHub stars~1.1k tokensUpdated 20 days ago
    SecurityAuto-check passed
  • Triaging Security Findings

    bitwarden/ai-plugins

    Official

    This skill should be used when the user asks to "triage security findings", "fix an Aikido finding", "review Aikido issues", "dismiss a false positive", "check SAST/IaC alerts", or needs to work…

    154 GitHub stars~2.2k tokensUpdated yesterday
    SecurityAuto-check passed
  • Trailmark Graph Evolution

    trailofbits/skills

    Official

    Compares Trailmark code graphs at two snapshots, such as commits, tags or directories, to surface attack paths, blast radius and taint changes that text diffs miss.

    7.4k GitHub stars~3.4k tokensUpdated 5 days ago
    SecurityAuto-check passed
  • Skylos

    duriantaco/skylos

    Run, interpret, or modify Skylos safely. An agent skill from duriantaco/skylos.

    843 GitHub stars~581 tokensUpdated yesterday
    SecurityAuto-check passed

More from aftermathlabs/llvm-msvc

All 8 skills in this repo
  • Compiler Development

    aftermathlabs/llvm-msvc

    Expertise in compiler development using LLVM infrastructure including frontend design, IR generation, optimization passes, and code generation.

    438 GitHub stars~1.7k tokensUpdated 4 days ago
    Auto-check passed
  • Dynamic Instrumentation

    aftermathlabs/llvm-msvc

    Expertise in LLVM-based dynamic binary instrumentation, runtime tracing, and program monitoring.

    438 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • Llvm Learning

    aftermathlabs/llvm-msvc

    Comprehensive learning resources and tutorials for LLVM, Clang, and compiler development.

    438 GitHub stars~2.1k tokensUpdated 4 days ago
    Auto-check passed
  • Llvm Optimization

    aftermathlabs/llvm-msvc

    Expertise in LLVM optimization passes, performance tuning, and code transformation techniques.

    438 GitHub stars~2.5k tokensUpdated 4 days ago
    Auto-check passed
  • Llvm Security

    aftermathlabs/llvm-msvc

    Expertise in LLVM security features including sanitizers, hardening techniques, exploit mitigations, and secure compilation.

    438 GitHub stars~1.8k tokensUpdated 4 days ago
    Auto-check passed
  • Llvm Tooling

    aftermathlabs/llvm-msvc

    Expertise in LLVM tooling development including Clang plugins, LLDB debugger extensions, Clangd/LSP, and LibTooling.

    438 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed

Questions about Static Analysis

What does Static Analysis do?

Expertise in LLVM-based static analysis including dataflow analysis, pointer analysis, taint tracking, and program verification. Static Analysis is an agent skill from aftermathlabs/llvm-msvc. Expertise in LLVM-based static analysis including dataflow analysis, pointer analysis, taint tracking, and program verification.

When should I use Static Analysis?

Static Analysis fits situations like: implementing security scanners; code quality tools; performing program analysis research.

How do I install Static Analysis in Claude Code?

Run `npx skills add aftermathlabs/llvm-msvc --skill static-analysis -a claude-code`. Or copy the skill folder (.agents/skills/static-analysis in aftermathlabs/llvm-msvc) into .claude/skills/static-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Static Analysis in Codex?

Run `npx skills add aftermathlabs/llvm-msvc --skill static-analysis -a codex`. Or copy the skill folder (.agents/skills/static-analysis in aftermathlabs/llvm-msvc) into .agents/skills/static-analysis in your project. Codex loads it when a task matches its description.

Can I use Static Analysis 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 aftermathlabs/llvm-msvc --skill static-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/static-analysis, .gemini/skills/static-analysis, .github/skills/static-analysis and .opencode/skills/static-analysis in your project.

What does Static Analysis need to run?

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

Does Static Analysis access the network?

SKILL.md names 1 domain. In commands or code: raw.githubusercontent.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Static Analysis 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 Static Analysis use?

Static Analysis is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Static Analysis use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Static Analysis?

Skills that share tags, products or a category with Static Analysis: Codexqa Code Analyzer (openqa-cn/codexqa, 152 stars), Debug Rule (seqra/opentaint, 162 stars), Security Architecture Review (cbrock84/headcount, 2k stars) and Triaging Security Findings (bitwarden/ai-plugins, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Static Analysis?

aftermathlabs (a GitHub organization) maintains it in aftermathlabs/llvm-msvc, which has 438 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 3, 2026.

Source: aftermathlabs/llvm-msvc on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.