architecture

architecture is a cursor rule for Cursor from quinnjr/skia-rs. It costs 758 tokens per session, scanned A, original, Apache-2.0.

Architecture rules for Skia-RS, a Rust implementation of the Skia 2D graphics library, organized into separate crates for drawing, text, images, GPU backends, PDFs, and related components.

In plain words
What is it for?
Use them when adding or changing Rust crates for paths, paint, canvases, text, image formats, SVG, PDF, GPU rendering, FFI, or benchmarks.
Why use it?
They explain where each part of the graphics library belongs and how the workspace is divided.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when adding or changing Rust crates for paths, paint, canvases, text, image formats, SVG, PDF, GPU rendering, FFI, or benchmarks.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/quinnjr/skia-rs/architecture
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/quinnjr/skia-rs

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for architecture

README.md
[![agentmods](https://agentmods.dev/badge/rules/quinnjr/skia-rs/architecture.svg)](https://agentmods.dev/rules/quinnjr/skia-rs/architecture)
Your own site
<a href="https://agentmods.dev/rules/quinnjr/skia-rs/architecture"><img src="https://agentmods.dev/badge/rules/quinnjr/skia-rs/architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 758 This file is loaded in full into every session.
When invoked 758 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00758 $0.00758
Opus 5 $0.00379 $0.00379
Sonnet 5 $0.00152 $0.00152
Haiku 4.5 $0.00076 $0.00076

Measured 6d ago against content hash c162d8423f7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/architecture.mdc · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skia-RS Architecture

Skia-RS is a 100% Rust implementation of Google's Skia 2D graphics library, designed for API compatibility with the original C++ Skia library. The project provides both a native Rust API and C FFI bindings for cross-language interoperability.

Workspace Structure

skia-rs/
├── crates/
│   ├── skia-rs-core/     # Foundation: Scalar, Point, Rect, Color, Matrix, ImageInfo
│   ├── skia-rs-path/     # Path geometry: Path, PathBuilder, PathOps, PathEffects
│   ├── skia-rs-paint/    # Styling: Paint, Shaders, BlendModes, Filters
│   ├── skia-rs-canvas/   # Drawing: Canvas, Surface, Picture recording
│   ├── skia-rs-text/     # Typography: Font loading, text shaping, layout
│   ├── skia-rs-gpu/      # GPU backends: Vulkan, OpenGL, WebGPU
│   ├── skia-rs-codec/    # Image I/O: PNG, JPEG, GIF, WebP
│   ├── skia-rs-svg/      # SVG support: parsing and rendering
│   ├── skia-rs-pdf/      # PDF generation
│   ├── skia-rs-ffi/      # C API bindings for FFI
│   ├── skia-rs-safe/     # High-level ergonomic Rust API
│   └── skia-rs-bench/    # Performance benchmarks
├── fuzz/                 # Fuzz testing with cargo-fuzz/libFuzzer
├── skia/                 # Official Skia submodule (reference)
└── TODO.md              # Development roadmap

Crate Dependencies

skia-rs-core (no internal deps)
    ↓
skia-rs-path (depends on: core)
    ↓
skia-rs-paint (depends on: core, path)
    ↓
skia-rs-canvas (depends on: core, path, paint)
    ↓
skia-rs-text (depends on: core, path, paint)
    ↓
skia-rs-gpu (depends on: core, path, paint, canvas)
skia-rs-codec (depends on: core)
skia-rs-svg (depends on: core, path, paint, canvas)
skia-rs-pdf (depends on: core, path, paint, canvas, text)
    ↓
skia-rs-ffi (depends on: all above)
skia-rs-safe (depends on: all above, re-exports)

File Organization

Each crate should follow this structure:

crates/skia-rs-{name}/
├── Cargo.toml
├── src/
│   ├── lib.rs          # Module declarations and re-exports
│   ├── {feature}.rs    # Feature implementations
│   └── ...

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 84 lines · 758 tokens per session scan A c162d8423f7f

Subscribe to this mod's changes

architecture is a cursor rule published in the GitHub repository quinnjr/skia-rs (34 stars, last pushed 18d ago), licensed Apache-2.0. It adds 758 tokens to every session, about $0.0038 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.