# Skip Frameworks

> Integrating optional Skip frameworks into a project. Covers Firebase, SQLite, Keychain, WebView, audio/video, device sensors, Lottie animations, FFI, and other frameworks. Includes Package.swift dependencies, skip.yml configuration, and usage examples.

- **Type:** Skill
- **Install:** `agentstack add skill-skiptools-skills-skip-frameworks`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [skiptools](https://agentstack.voostack.com/s/skiptools)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [skiptools](https://github.com/skiptools)
- **Source:** https://github.com/skiptools/skills/tree/main/plugins/skip-app-design/skills/skip-frameworks

## Install

```sh
agentstack add skill-skiptools-skills-skip-frameworks
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Skip Frameworks

Use this skill when adding optional frameworks to a Skip project.

## Adding a Framework

1. Add package dependency to `Package.swift`
2. Add product to target dependencies
3. Configure `Skip/skip.yml` if Android-specific Gradle dependencies are needed
4. Import the module in Swift code

`Package.swift` is the source of truth for both iOS and Android builds — never use Xcode's "Add Package…" menu, which only updates Xcode's tracking and not Skip's Gradle generation. For the broader project layout (which target gets which product, where view code vs. model code lives, when to split into two modules), see [skip-project-creation](../skip-project-creation/SKILL.md).

## Skip frameworks vs. pure-Swift SwiftPM packages

There are two kinds of dependency a Skip project can pull in, and they behave differently on Android.

**Skip frameworks.** A SwiftPM package that contains a `Sources//Skip/skip.yml` file is *Skip-aware*. The build plugin sees the `skip.yml`, generates the corresponding Gradle module, and builds it for Android automatically. All the frameworks listed in this skill (SkipSQL, SkipFirebase, etc.) are Skip frameworks.

**Pure-Swift SwiftPM packages.** A package without a `skip.yml` is not Skip-aware. Skip Lite modules **cannot consume pure-Swift packages on Android** — the transpiler has nothing to transpile against. On iOS the package compiles normally; on Android it's excluded from the build.

If you want a pure-Swift package only on iOS, gate it with the `condition:` argument:

```swift
.target(name: "MyApp", dependencies: [
    .product(
        name: "Lottie",
        package: "lottie-ios",
        condition: .when(platforms: [.macOS, .iOS])  // iOS-only
    ),
])
```

Without the `condition:`, the Lite build fails on Android with "no such Gradle dependency." With it, the Android build excludes the dependency and any code that references `Lottie` must be guarded with `#if !SKIP`.

Skip Fuse modules can consume pure-Swift packages directly because the Swift Android SDK compiles them natively — no transpilation needed. Be aware that the pure-Swift package's own dependencies and platform support must extend to Android, which most don't.

## Framework Reference

Consult the detailed reference files:
- ./references/firebase.md -- Firebase setup, auth, Firestore, messaging, crashlytics
- ./references/data-storage.md -- SkipSQL, SkipKeychain, UserDefaults
- ./references/media-web.md -- SkipWeb, SkipAV, SkipMotion

## Quick Reference

### SkipSQL — SQLite

```swift
// Package.swift
.package(url: "https://source.skip.tools/skip-sql.git", from: "1.0.0"),
.product(name: "SkipSQL", package: "skip-sql"),
```

```swift
import SkipSQL
let db = try SQLContext(path: dbPath)
try db.execute(sql: "CREATE TABLE items (id INTEGER PRIMARY KEY, name TEXT)")
try db.execute(sql: "INSERT INTO items (name) VALUES (?)", parameters: [.text("Widget")])
```

### SkipKeychain — Secure Storage

```swift
// Package.swift
.package(url: "https://source.skip.tools/skip-keychain.git", "0.0.0"../Skip/skip.yml` via the `build:` block. The syntax mirrors the structure of a Gradle build script.

```yaml
skip:
  mode: 'transpiled'

build:
  contents:
    - block: 'dependencies'
      contents:
        - 'implementation("io.livekit:livekit-android:2.24.0")'
        - 'implementation("com.google.android.gms:play-services-location:21.3.0")'
```

Each entry under the `dependencies` block is a literal Gradle declaration. `implementation(...)`, `api(...)`, `testImplementation(...)` all work.

To add a Maven repository or override the default plugin set, use `settings:` (parallel structure):

```yaml
settings:
  contents:
    - block: 'dependencyResolutionManagement'
      contents:
        - block: 'repositories'
          contents:
            - 'maven("https://maven.example.com/releases")'
```

Useful when a library is hosted outside Maven Central / Google's Maven repo.

### Full `skip.yml` schema

| Key | Purpose |
|---|---|
| `skip.mode` | `'transpiled'` (Lite), `'native'` (Fuse), or `'automatic'` |
| `skip.bridging` | Fuse-only. `true` for auto-bridging; or `{auto: true, options: 'kotlincompat'}` |
| `skip.kotlinPackage` | Override the Kotlin package name derived from the Swift module name |
| `skip.resources` | Custom resource paths and processing mode |
| `skip.dynamicroot` | Fuse-only. Magic namespace prefix for `AnyDynamicObject` (see [skip-fuse](../skip-fuse/SKILL.md)) |
| `build.contents` | Gradle build-script additions (dependencies, plugins, etc.) |
| `settings.contents` | Gradle settings-script additions (repositories, plugin management) |

## Cross-references

- [skip-project-creation](../skip-project-creation/SKILL.md) — `Package.swift` layout, when to split into UI and Model modules, where each framework's setup code typically lands.
- [skip-lite-transpilation](../skip-lite-transpilation/SKILL.md) — rules to follow when the framework's example code goes into a transpiled module.
- [building-skip-ui](../building-skip-ui/SKILL.md) — when a framework ships UI components (SkipWeb, SkipMotion, SkipAV), how to integrate them in a SwiftUI view.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [skiptools](https://github.com/skiptools)
- **Source:** [skiptools/skills](https://github.com/skiptools/skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-skiptools-skills-skip-frameworks
- Seller: https://agentstack.voostack.com/s/skiptools
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
