SkillAgentSearch skills...

ffi

FFI (Foreign Function Interface) guidelines for skia-rs-ffi

Install / Use

npx skills add quinnjr/skia-rs

Installs into whichever agent you are using.

About this skill
📐

Cursor Rules

Cursor IDE rules (v2)

Quality Score

55/100

Supported Platforms

Cursor

Our assessment of ffi

ffi scores 55/100 on our quality scale, 4248th of 4,606 Development & Engineering skills we index.

Its Cursor Rules is 1.7 KB long, split into 4 sections with 1 code example: moderately detailed.

It has no GitHub stars yet, so there is no community track record; judge it on its content.

Substance
20/30
Structure
12/20
Description
8/15
Adoption
0/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 37 days ago, so ffi is actively maintained.
  • Our last check on 2026-09-14 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 80/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

ffi compared with similar skills

All 4 of these similar skills score higher than ffi; compare them before choosing.

SkillScoreStarsUpdatedFormat
ffi (this skill)by quinnjr55037d agoCursor Rules
taste-skillby Leonxlnx100102.7ktodayCLAUDE.md
ai-job-searchby ai-job-search-dev10066.0k5d agoCLAUDE.md
claude-howtoby luongnv8910045.2k6d agoCLAUDE.md
algorithmic-artby anthropics100177.9k33d agoSKILL.md

Frequently asked questions

How do I install ffi?
Run npx skills add quinnjr/skia-rs. The install tabs above show the steps for each supported agent.
Which AI agents does ffi work with?
It is written for Cursor, as a Cursor Rules file. Other agents that read the same format can often use it too.
Is ffi safe to use?
It declares no license and scores 80/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is ffi still maintained?
The repository was last updated 37 days ago, so ffi is actively maintained.

description: FFI (Foreign Function Interface) guidelines for skia-rs-ffi globs: ["crates/skia-rs-ffi/**"] alwaysApply: false

FFI Guidelines

C API Design

  • All FFI functions in skia-rs-ffi
  • Use opaque pointers for complex types
  • Follow Skia's C API naming: sk_{type}_{method}
  • Always check for null pointers
// skia-rs-ffi/src/lib.rs

/// Create a new paint object.
///
/// # Safety
/// Returns a valid pointer that must be freed with `sk_paint_delete`.
#[no_mangle]
pub unsafe extern "C" fn sk_paint_new() -> *mut Paint {
    Box::into_raw(Box::new(Paint::new()))
}

/// Delete a paint object.
///
/// # Safety
/// `paint` must be a valid pointer returned by `sk_paint_new`.
#[no_mangle]
pub unsafe extern "C" fn sk_paint_delete(paint: *mut Paint) {
    if !paint.is_null() {
        drop(Box::from_raw(paint));
    }
}

/// Set the paint color.
///
/// # Safety
/// `paint` must be a valid pointer.
#[no_mangle]
pub unsafe extern "C" fn sk_paint_set_color(paint: *mut Paint, color: u32) {
    if let Some(p) = paint.as_mut() {
        p.set_color32(Color(color));
    }
}

Type Mappings

| Skia C++ | Rust | C FFI | |----------|------|-------| | SkScalar | Scalar (f32) | float | | SkPoint | Point | sk_point_t | | SkRect | Rect | sk_rect_t | | SkColor | Color | uint32_t | | SkMatrix | Matrix | sk_matrix_t | | SkPath* | *mut Path | sk_path_t* | | SkPaint* | *mut Paint | sk_paint_t* | | SkCanvas* | *mut Canvas | sk_canvas_t* |

Safety Requirements

  • All FFI functions must be marked unsafe
  • Document safety requirements in doc comments
  • Check for null pointers before dereferencing
  • Use #[repr(C)] for all FFI-visible structs

Related Skills

View on GitHub
GitHub Stars0
CategoryDevelopment
Updated1mo ago
Forks0

Trust signals

80/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium1 low