boutique-best-practices

boutique-best-practices is a skill for Claude Code from mergesort/Boutique. It costs 56 tokens per session (1,789 once invoked), scanned A, original, MIT.

A practical guide to using Boutique, a Swift library for saving app data, with Swift 6 and SwiftUI.

In plain words
What is it for?
Use it when migrating to Swift 6, diagnosing Boutique issues, adding dependency injection, or testing with preview data stores.
Why use it?
It explains how to avoid concurrency errors and observation problems when Boutique's storage types are used in modern Swift code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the boutique plugin — 4 skills shipped together

Good fit Use it when migrating to Swift 6, diagnosing Boutique issues, adding dependency injection, or testing with preview data stores.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mergesort/boutique/boutique-best-practices
About the project

Boutique is a Swift persistence library that stores app state through property wrappers and a memory-and-disk caching layer. It helps developers build state-driven SwiftUI, UIKit, and AppKit apps with offline storage. The catalogue add-ons provide coding-agent workflows for using or developing with Boutique.

mergesort/Boutique · 1,133 stars · on GitHub · build.ms

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.

Any agent
npx skills add mergesort/Boutique --skill boutique-best-practices
Clone the repo
git clone --depth 1 https://github.com/mergesort/Boutique

Made for: Claude Code.

Or install boutique, the plugin that ships this one along with the rest of its 4 skills.

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 boutique-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/mergesort/boutique/boutique-best-practices/github.svg)](https://agentmods.dev/skills/mergesort/boutique/boutique-best-practices)
Your own site
<a href="https://agentmods.dev/skills/mergesort/boutique/boutique-best-practices"><img src="https://agentmods.dev/badge/skills/mergesort/boutique/boutique-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for boutique-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/mergesort/boutique/boutique-best-practices"><img src="https://agentmods.dev/badge/skills/mergesort/boutique/boutique-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,789 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00056 $0.01789
Opus 5 $0.00028 $0.00894
Sonnet 5 $0.00011 $0.00358
Haiku 4.5 $0.00006 $0.00179

Measured 13d ago against content hash 39a71de91e3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

boutique-best-practices 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 13d 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.

plugins/boutique/skills/boutique-best-practices/SKILL.md · 258 lines

How it starts

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

Boutique Best Practices

Use this skill when migrating to Swift 6, troubleshooting concurrency issues, setting up tests, or following Boutique's recommended patterns.

Swift 6 and @MainActor Isolation

Boutique's Store, StoredValue, and SecurelyStoredValue are all @MainActor isolated. In Swift 6 with strict concurrency, this means:

  • All store operations (insert, remove, removeAll) must be called from a @MainActor context.
  • Controllers that use @Stored, @StoredValue, or @SecurelyStoredValue are implicitly @MainActor since the property wrappers are @MainActor.
  • SwiftUI views are already @MainActor, so no extra annotation is needed there.

Calling store operations from non-MainActor contexts

// From a background task or non-isolated function
func syncData() async throws {
    let data = try await self.api.fetchData() // Can run off main actor
    try await self.controller.updateStore(with: data) // MainActor hop happens automatically
}

@ObservationIgnored (Critical)

When using @Stored, @StoredValue, or @SecurelyStoredValue inside an @Observable class, you must mark them with @ObservationIgnored.

Why

Store, StoredValue, and SecurelyStoredValue are themselves @Observable. If you place an @Observable property inside another @Observable class without @ObservationIgnored, SwiftUI may track changes at both levels, leading to redundant view updates or unexpected behavior.

Correct pattern

@Observable
final class NotesController {
    @ObservationIgnored
    @Stored var notes: [Note]

    init(store: Store<Note>) {
        self._notes = Stored(in: store)
    }
}

@Observable
final class Preferences {
    @ObservationIgnored
    @StoredValue(key: "theme")
    var theme: Theme = .light

    @ObservationIgnored
    @SecurelyStoredValue<String>(key: "authToken")
    var authToken
}

Incorrect (missing @ObservationIgnored)

// DO NOT do this
@Observable
final class NotesController {
    @Stored var notes: [Note] // Missing @ObservationIgnored
}

Read the full file on GitHub · 258 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. 13d ago First seen · 258 lines · 56 tokens per session scan A 39a71de91e3a

Subscribe to this mod's changes

boutique-best-practices is a skill published in the GitHub repository mergesort/Boutique (1,133 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 1,789 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

swift-expert

Expert-level Swift development for iOS, macOS with SwiftUI, Combine, and modern Swift 5.9+. Use when the user mentions iOS, macOS, SwiftUI, Combine, async await, or Apple platforms, or when the task involves Modern Swift Features, Basics and Optionals, Functions and Closures, or Structs and Classes.

personamanagmentlayer/pcl · 76 tokens

building-apple-platform-products

Builds, tests, and archives Swift packages and Xcode projects for Apple platforms. Use when running xcodebuild, swift build, or swift test commands, discovering schemes and targets, or selecting simulator destinations for iOS, macOS, tvOS, watchOS, or visionOS.

rhyean88/apple-platform-build-tools-claude-code-plugin · 64 tokens

Swift Patterns

Use this skill when working on Swift projects (SwiftPM packages, iOS/macOS apps) and you want consistent patterns for concurrency, structure, and safety.

AmariahAK/atlarix-skills · 2 tokens

building-apple-platform-products

Builds, tests, archives, and deploys Swift packages and Xcode projects for Apple platforms. Use when running xcodebuild, swift build, swift test, xcrun simctl, xcrun devicectl, or any xcrun developer tool. Covers project discovery, simulator management, physical device deployment, code signing, profiling…

kylehughes/apple-platform-build-tools-claude-code-plugin · 82 tokens

swift

Swift programming patterns for iOS and macOS.

miles990/claude-software-skills · 11 tokens

swift_expert

Swift and iOS/macOS specialist. Protocol-oriented programming and SwiftUI patterns.

ApexIQ/skillsmith · 20 tokens