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.
npx skills add bmob/agent-skills --skill bmob-database-swiftgit clone --depth 1 https://github.com/bmob/agent-skillsWrote 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.
[](https://agentmods.dev/skills/bmob/agent-skills/bmob-database-swift)<a href="https://agentmods.dev/skills/bmob/agent-skills/bmob-database-swift"><img src="https://agentmods.dev/badge/skills/bmob/agent-skills/bmob-database-swift/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.
<a href="https://agentmods.dev/skills/bmob/agent-skills/bmob-database-swift"><img src="https://agentmods.dev/badge/skills/bmob/agent-skills/bmob-database-swift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00190 | $0.02865 |
| Opus 5 | $0.00095 | $0.01432 |
| Sonnet 5 | $0.00038 | $0.00573 |
| Haiku 4.5 | $0.00019 | $0.00286 |
Grade A, and why
bmob-database-swift 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bmob Database — Pure Swift SDK
纯 Swift SDK BmobSwiftSDK 面向 iOS 15+ / macOS 12+,使用 Swift Package Manager 或 CocoaPods 安装,API 以 async/await、Bmob.initialize(appKey:)、BmobObject、BmobQuery 为核心。
如果项目使用旧版 Objective-C BmobSDK、BmobSDK.xcframework、Bridging Header 或 saveInBackgroundWithResultBlock,改读 bmob-database-ios。
核心原则
- 先确认 SDK 形态:纯 Swift SDK 的包名是
BmobSwiftSDK,导入模块通常是import BmobSDK;旧 iOS SDK 是 Objective-C framework + Bridging Header。 - 最低环境:Xcode 15.0+、Swift 5.9+、iOS 15.0+、macOS 12.0+。
- 初始化是异步的:启动早期
try await Bmob.initialize(appKey:);业务请求前必要时检查await Bmob.isReady。 - 数据表默认用
BmobObject(className:):字段通过下标读写,更新 / 删除必须带objectId。 - 查询用链式
BmobQuery:whereKey、order、limit、skip、includeKey都返回 query,最后try await find()/get(objectId:)。 - 上线域名必须在初始化前设置:私有云或备案域名用
Bmob.resetDomain(...),顺序在initialize之前。
安全清单
- 示例只放
"YOUR_APP_KEY"/"your-application-id",不要 commit 真实 AppKey。 - 客户端不要携带 Master Key;需要管理能力时改走服务端、REST 管理脚本或 MCP。
- 写入业务表时设置 ACL(如
BmobACL),避免默认权限导致任意用户读写。 - 用户密码只通过
BmobUser注册、登录、改密 API 处理,不要当普通字段更新。 - 文件上传前确认来源、大小、MIME 类型;不要把本地绝对路径写进业务表。
- release 前确认
resetDomain使用备案/私有云域名,且调用顺序早于初始化。
快速开始
安装
Swift Package Manager:
dependencies: [
.package(url: "https://github.com/bmob/BmobSwiftSDK", from: "1.0.6")
],
targets: [
.target(name: "YourApp", dependencies: [
.product(name: "BmobSDK", package: "BmobSwiftSDK")
])
]
CocoaPods:
platform :ios, '15.0'
use_frameworks!
target 'YourApp' do
pod 'BmobSwiftSDK', '~> 1.0.6'
end
初始化
import SwiftUI
import BmobSDK
@main
struct MyApp: App {
init() {
Task {
do {
// 私有云或备案域名必须在 initialize 前设置:
// Bmob.resetDomain("https://your-private-cloud.com")
try await Bmob.initialize(appKey: "YOUR_APP_KEY")
} catch {
print("Bmob 初始化失败: \(error)")
}
}
}
var body: some Scene {
WindowGroup { ContentView() }
}
}
What ships with it
60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/snippets/develop-doc--cocoapods-01.txt 105 B
- references/snippets/develop-doc--swift-package-manager-01.swift 215 B
- references/snippets/develop-doc--上传文件-01.swift 514 B
- references/snippets/develop-doc--下载文件-01.swift 184 B
- references/snippets/develop-doc--从本地路径上传-01.swift 112 B
- references/snippets/develop-doc--保存带关联的对象-01.swift 269 B
- references/snippets/develop-doc--修改密码-01.swift 114 B
- references/snippets/develop-doc--公共读-01.swift 185 B
- references/snippets/develop-doc--关联查询-01.swift 385 B
- references/snippets/develop-doc--内嵌对象-01.swift 203 B
- references/snippets/develop-doc--分页-01.swift 134 B
- references/snippets/develop-doc--创建地理位置-01.swift 67 B
- references/snippets/develop-doc--创建数据对象-01.swift 450 B
- references/snippets/develop-doc--创建用户-01.swift 174 B
- references/snippets/develop-doc--删除文件-01.swift 399 B
- references/snippets/develop-doc--在对象中保存文件-01.swift 289 B
- references/snippets/develop-doc--基本调用-01.swift 399 B
- references/snippets/develop-doc--基础初始化-01.swift 453 B
- references/snippets/develop-doc--基础查询-01.swift 167 B
- references/snippets/develop-doc--复杂返回类型-01.swift 315 B
- references/snippets/develop-doc--字段选择-01.swift 105 B
- references/snippets/develop-doc--常用操作符-01.swift 250 B
- references/snippets/develop-doc--批量操作-01.swift 335 B
- references/snippets/develop-doc--批量操作-02.swift 387 B
- references/snippets/develop-doc--排序-01.swift 305 B
- references/snippets/develop-doc--更新用户信息-01.swift 151 B
- references/snippets/develop-doc--条件查询-01.swift 318 B
- references/snippets/develop-doc--检查初始化状态-01.swift 46 B
- references/snippets/develop-doc--模糊查询-01.swift 316 B
- references/snippets/develop-doc--用户登录-01.swift 332 B
- references/snippets/develop-doc--登出-01.swift 17 B
- references/snippets/develop-doc--矩形区域查询-01.swift 278 B
- references/snippets/develop-doc--短信相关-01.swift 323 B
- references/snippets/develop-doc--第三方登录-01.swift 365 B
- references/snippets/develop-doc--类型安全调用-01.swift 224 B
- references/snippets/develop-doc--组合查询-01.swift 530 B
- references/snippets/develop-doc--统一错误处理-01.swift 387 B
- references/snippets/develop-doc--统计查询-01.swift 156 B
- references/snippets/develop-doc--缓存策略-01.swift 145 B
- references/snippets/develop-doc--自定义域名-私有云-01.swift 131 B
- references/snippets/develop-doc--获取当前用户-01.swift 272 B
- references/snippets/develop-doc--角色权限-01.swift 242 B
- references/snippets/develop-doc--计数-01.swift 157 B
- references/snippets/develop-doc--设置访问权限-01.swift 364 B
- references/snippets/develop-doc--邮箱验证-01.swift 213 B
- references/snippets/develop-doc--错误类型-01.swift 279 B
- references/snippets/develop-doc--附近查询-01.swift 284 B
- references/snippets/quickstart--cocoapods-01.txt 293 B
- references/snippets/quickstart--swift-package-manager-推荐-01.swift 215 B
- references/snippets/quickstart--创建数据-01.swift 268 B
- references/snippets/quickstart--初始化-01.swift 405 B
- references/snippets/quickstart--删除数据-01.swift 94 B
- references/snippets/quickstart--更新数据-01.swift 134 B
- references/snippets/quickstart--查询数据-01.swift 281 B
- references/snippets/quickstart--注册与登录-01.swift 324 B
- references/snippets/quickstart--获取当前用户-01.swift 90 B
- references/snippets/todo-example--1-初始化配置-01.swift 573 B
- references/snippets/todo-example--10-云函数调用示例-01.swift 868 B
- references/snippets/todo-example--11-地理位置示例-01.swift 613 B
- references/snippets/todo-example--2-模型定义-01.swift 1.4 KB
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.
- today Changed · +3 lines a83a1b137ef0
- 8d ago First seen · 224 lines · 190 tokens per session scan A a0fe49b02ce7
bmob-database-swift is a skill published in the GitHub repository bmob/agent-skills (3 stars, last pushed yesterday), licensed MIT. It adds 190 tokens to every session and 2,865 once invoked, about $0.0010 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-31.
Other skills, from other repositories
kotlin-exposed-patterns
JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.
kotlin-ktor-patterns
Ktor server patterns including routing DSL, plugins, authentication, Koin DI, kotlinx.serialization, WebSockets, and testApplication testing.
kotlin-coroutines-flows
Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.
android-development
Android development with Kotlin, Jetpack Compose, and modern Android architecture. Use when building Android apps, implementing Material Design, or following Android best practices.
ios-development
Comprehensive guide for building native Apple platform applications.
kotlin-multiplatform
KMP/CMP shared business logic, Compose Multiplatform, expect/actual, Ktor, SQLDelight, and platform-specific implementations. Use when building cross-platform Kotlin applications for Android, iOS, desktop, or web.