ffi
FFI (Foreign Function Interface) guidelines for skia-rs-ffi
Install / Use
npx skills add quinnjr/skia-rsInstalls into whichever agent you are using.
Cursor Rules
Cursor IDE rules (v2)
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
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.
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.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ffi (this skill)by quinnjr | 55 | 0 | 37d ago | Cursor Rules |
| taste-skillby Leonxlnx | 100 | 102.7k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 66.0k | 5d ago | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 45.2k | 6d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 33d ago | SKILL.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.
Skill content
View source on GitHubdescription: 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
taste-skill
102.7kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
66.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
45.2kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
