AN

analyze-rust-ffi-crate-surface

Maps C-visible symbols from Rust FFI crates to identify their usage within C code.

Install

mkdir -p .claude/skills/analyze-rust-ffi-crate-surface && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2649" && unzip -o skill.zip -d .claude/skills/analyze-rust-ffi-crate-surface && rm skill.zip

Installs to .claude/skills/analyze-rust-ffi-crate-surface

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.

Determine which parts of the C codebase use Rust-defined C symbols. Use this when you want to understand which C code files may be impacted by changes to a Rust FFI crate.
171 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Compile list of FFI symbols from Rust crate
  • Identify C modules referencing Rust symbols
  • Categorize symbol usage by type
  • Flag symbols used only in C/C++ unit tests

How it works

The tool parses Rust source files to extract FFI symbols and scans the C codebase to identify where these symbols are called or referenced.

Inputs & outputs

You give it
Path to Rust crate or file
You get back
Report detailing symbol usage and C module impact

When to use analyze-rust-ffi-crate-surface

  • Audit impact of Rust FFI changes on C code
  • Identify usage of Rust-exported functions in C
  • Verify type usage across C/Rust boundaries
  • Generate FFI symbol dependency reports

About this skill

Analyze Rust FFI Crate Surface

Compile a list of all C-visible symbols defined in a given Rust FFI crate or file (e.g. an extern "C" fn annotated with #[unsafe(no_mangle)] or a type definition). Then determine which parts of the C codebase use these symbols.

Arguments

  • <path>: Path to the Rust crate or file.
  • <path 1> <path 2>: Multiple Rust crates/files.

If the path doesn't start with src/, assume it to be in the src/redisearch_rs/c_entrypoint directory. E.g. numeric_range_tree_ffi becomes src/redisearch_rs/numeric_range_tree_ffi. If the path points to a directory, review the documentation of all Rust files in that directory.

Instructions

  • Read the relevant Rust source files.
  • Compile a list of all the FFI symbols defined they expose (e.g. extern "C" fn annotated with #[unsafe(no_mangle)] or type definitions). You can use the corresponding auto-generated header file in src/redisearch_rs/headers, if it helps.
  • For each symbol, determine which modules in the C codebase use it:
    • For functions, look for calls to the function in the C codebase.
    • For types, check out if they are used as function arguments, field types, or in type casts.

Emit a report that lists, for each symbol, the following information:

  • The symbol name.
  • The module(s) in the C codebase that use it.
  • The type(s) of the symbol (function, type, etc.).
  • If it's only used in C/C++ unit tests (i.e. under `tests/)

Auto-generated header files

Each *_ffi Rust crate has a corresponding auto-generated header file in src/redisearch_rs/headers, generated from rustdoc by the cheadergen CLI (configured in src/redisearch_rs/cheadergen.toml, invoked from src/redisearch_rs/CMakeLists.txt). The auto-generated header file includes all the FFI symbols defined by the Rust crate, no matter the sub-module they are defined in.

When not to use it

  • Analyzing non-FFI Rust code
  • Projects without C/Rust integration

Prerequisites

cheadergen CLICMakeLists.txt configuration

Limitations

  • Requires specific directory structure or pathing
  • Depends on auto-generated header files

How it compares

Unlike manual grepping, this tool correlates Rust-defined symbols with specific C module usage and type definitions.

Compared to similar skills

analyze-rust-ffi-crate-surface side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
analyze-rust-ffi-crate-surface (this skill)43moNo flagsIntermediate
architect-review1094moNo flagsAdvanced
solid-principles579moNo flagsIntermediate
codex322moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

architect-review

sickn33

Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD. Reviews system designs and code changes for architectural integrity, scalability, and maintainability. Use PROACTIVELY for architectural decisions.

109320

solid-principles

SmidigStorm

Enforce SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) in object-oriented design. Use when writing or reviewing classes and modules.

57236

codex

Lucklyric

Invoke Codex CLI for complex coding tasks requiring high reasoning capabilities. This skill should be invoked when users explicitly mention "Codex", request complex implementation challenges, advanced reasoning, or need high-reasoning model assistance. Automatically triggers on codex-related requests and supports session continuation for iterative development.

32238

error-handling-patterns

wshobson

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

35170

deepwiki-rs

sopaco

AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.

25170

senior-fullstack

davila7

Comprehensive fullstack development skill for building complete web applications with React, Next.js, Node.js, GraphQL, and PostgreSQL. Includes project scaffolding, code quality analysis, architecture patterns, and complete tech stack guidance. Use when building new projects, analyzing code quality, implementing design patterns, or setting up development workflows.

35110

Search skills

Search the agent skills registry