react-native-mmkv

审查 · 64
已收录

Fast synchronous key-value storage for React Native via react-native-mmkv (Nitro-backed). Covers creating and configuring MMKV instances, reading/writing all value types (string, number, boolean, buffer), React hooks for reactive UI, value-change listeners, encryption, AsyncStora

Verified installs0
Stars161
版本1.0.0
质量69/100 · 有潜力
信任64/100 · 仅限沙盒
审计78/100 · 高风险

供给资产档案

编程与开发 Agent

代码审查、仓库分析、测试、CI、GitHub、DevOps 与开发工作流 Skill。

浏览赛道

场景

Database and SQL

I need my agent to inspect database schemas, write SQL, and explain query results.

适配 Agent

Claude Code + CLI + Codex

适用于 Codex、Claude Code、Cursor、CLI 或自定义 Agent。

安装

就绪

npx skills add margelo/react-native-skills --skill react-native-mmkv

维护状态

新鲜

距上次推送 1 天

风险

高风险

Dependency or permission surface needs review

GitHub 质量

161

69/100 质量 · 72/100 信任

覆盖标签

编程Database and SQL设计与创意agent-skill

审查说明

Dependency or permission surface needs review · Permission surface may require sandboxing

Agent 采用评分卡

一眼查看信任、审计与安装准备度

这些分数综合公开仓库元数据、OpenAgentSkill 审查信号、维护新鲜度与安装准备度。它用于候选筛选,不替代人工审查。

质量

有潜力
69

有用的候选项,但采用前应与替代方案比较。

信任

仅限沙盒
64

有用但信任信号不足或混杂的候选项。在结果闭环证明任务匹配前,请保持在隔离工作区内使用。

审计

高风险
78

对安装准备度、安全元数据、维护情况与采用风险的机器可读审查。

OpenAgentSkill 信任评分 v5

仅限沙盒

仅在沙盒中运行,并在用于真实工作前比较接近的替代方案。

CodexClaude CodeCursorOpenAgentSkill CLI

Stars

161 个 GitHub Stars

仓库活跃度

161 个 Star,7 个 Fork

维护状态

距上次推送 1 天

许可证

MIT

安装

npx skills add margelo/react-native-skills --skill react-native-mmkv

安装安全性

标准软件包或运行时安装路径

权限范围

secrets or environment access, shell or command execution

Agent 结果

暂未有 Agent 结果数据

文档

README/SKILL.md 上下文充分

风险摘要

生产前审查

  • Financial research output is not financial advice; require human review before any live investment decision.
  • This skill may touch real-money trading, broker, wallet, or exchange operations; use only in a sandbox with explicit approval.
  • Quality score needs review
  • Permission surface needs review: secrets or environment access, shell or command execution

安装准备度

安装路径可用

  • 安装路径可用
  • 仓库证据可用
  • 已声明许可证
  • 暂无 Agent 验证结果证据

Agent 可读元数据

这个 Skill 的机器可读决策数据。

使用此区块或内嵌 JSON 判断 Agent 是否应安装该 Skill、选择替代方案,或先请求人工审查。

打开 JSON

适用任务

  • Database and SQL 工作流
  • Claude Code 团队
  • builders willing to evaluate younger projects
  • Understand table relationships

适用 Agent

CodexClaude CodeCursorOpenAgentSkill CLICLI

安装决策

命令
npx skills add margelo/react-native-skills --skill react-native-mmkv
策略
阻止
人工审查

信任与风险

信任
64/100
审计
78/100
风险级别
高风险

结果闭环

端点
/api/agent/outcome
事件 ID
resolve
结果
5

安装命令

npx skills add margelo/react-native-skills --skill react-native-mmkv

不适用场景

  • 需要厂商支持 SLA 的团队
  • 没有内部安全审查的高合规环境
  • 当前元数据中未发现重大风险信号
  • Audit risk risky exceeds max_risk=medium
  • 高风险权限提示:Shell 或命令执行

Agent 安全 v2

46/100 · 避免自动安装

Blocked for auto-install阻止

This skill should not be selected by an agent without explicit human security review.

Do not auto-install. Inspect the source, dependencies, and permission surface first.

通过 API 解析

Shell 或命令执行

Skill 元数据引用了终端、CLI、Shell、子进程或命令执行工作流。

网络访问

Skill 可能访问远程页面、API、仓库或外部服务。

文件系统访问

Skill 可能读取或写入项目文件、文档、生成产物或本地工作区状态。

数据库访问

Skill 可能检查 Schema、查询数据库或处理持久化存储。

  • Audit risk risky exceeds max_risk=medium
  • 高风险权限提示:Shell 或命令执行
  • Dependency or permission surface needs review

安装目标

在你的 Agent 工作流中安装此 Skill

通过公开安装端点获取命令、安全清单、目标提示词和该 Skill 的规范链接。

skill install

OpenAgentSkill CLI

Resolve policy, run the source installer safely, and report a verified install receipt.

$ npx --yes https://github.com/Leon-Drq/openagentskill/releases/download/cli-v0.2.1/openagentskill-0.2.1.tgz install margelo-react-native-mmkv

Agent 解析计划

让 Agent 在安装前验证匹配度。

Resolve API 返回首选 Skill、替代方案、安全策略、审计说明、安装目标和可直接执行的提示词,无需抓取此页面。

打开文本计划

Agent 应检查

  • 从 Resolve API 检查任务匹配与替代方案。
  • 检查审计评分、信任评分和安全策略警告。
  • 检查 Codex、Claude Code、Cursor 或 CLI 的安装目标兼容性。

复制提示词

Task: Use react-native-mmkv in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20react-native-mmkv%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/margelo-react-native-mmkv/install
Install command: npx skills add margelo/react-native-skills --skill react-native-mmkv
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.

Agent 交接

把安装路径交给 Agent,而不是再给一个目录页。

通过公开安装端点获取命令、安全清单、目标提示词和该 Skill 的规范链接。

打开安装 API

Agent 提示词

Use react-native-mmkv for this task. Review https://www.openagentskill.com/api/skills/margelo-react-native-mmkv/install, then install with: npx skills add margelo/react-native-skills --skill react-native-mmkv

Registry 元数据

用于自动选择 Skill 的 Agent 可读档案。

本页通过 Registry API 提供相同的决策、信任、审计、场景和安装信号,让 Agent 无需抓取界面即可排序。

打开 Manifest

适配 Agent

70/100

Database and SQL

平台

Claude Code

审计报告

高风险 · 78/100

对安装准备度、安全元数据、维护情况与采用风险的机器可读审查。

查看审计报告查看评估报告

Agent 决策面板

Fallback candidate for Database and SQL

先用此 Skill 做原型验证,并保留备选方案。

70
就绪度
原型验证
阶段

栈中角色

备选候选

主要匹配

Database and SQL

信任标签

先做原型验证

安装路径

命令已就绪

适用场景

  • Database and SQL 工作流
  • Claude Code 团队
  • builders willing to evaluate younger projects

证据

  • 仓库近期活跃
  • 已提供安装命令或 GitHub 仓库
  • 69/100 质量档案
  • 4 个 OpenAgentSkill 交互事件

先审查

  • 当前元数据中未发现重大风险信号

实施路径

  1. 1在沙盒 Agent 中安装它,并端到端完成一次Database and SQL任务。
  2. 2Compare output quality, latency, and failure behavior against at least one alternative.
  3. 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.

信任档案

仅限沙盒

有用但信任信号不足或混杂的候选项。在结果闭环证明任务匹配前,请保持在隔离工作区内使用。

64
OpenAgentSkill 信任评分

GitHub 采用度

信息

161 个 GitHub Stars

Star/Fork 活跃度

检查

161 个 Star,7 个 Fork; 当前元数据中没有议题活跃度信息

近期维护

通过

距上次推送 1 天

许可证清晰度

通过

MIT

积极信号

  • AI 审查已通过
  • 安装路径可用
  • 仓库证据可用
  • 近期维护的仓库
  • 安装命令未发现明显高风险模式
  • 结果闭环已就绪,但需要首次真实 Agent 运行

安装前审查

  • Financial research output is not financial advice; require human review before any live investment decision.
  • This skill may touch real-money trading, broker, wallet, or exchange operations; use only in a sandbox with explicit approval.
  • Quality score needs review
  • Permission surface needs review: secrets or environment access, shell or command execution
  • Stars/forks activity: 161 stars, 7 forks; issue activity unavailable in current metadata
  • Dependency/runtime risk: command execution surface, external package install surface
  • Permission surface: secrets or environment access, shell or command execution
  • 暂未有真实 Agent 结果报告
  • 无人值守安装前需要人工审查

建议操作

仅在沙盒中运行,并在用于真实工作前比较接近的替代方案。

质量档案

有潜力 适用于 Agent 工作流的候选

有用的候选项,但采用前应与替代方案比较。

69
GitHub Stars
161
新鲜度
1 天前
安装就绪
许可证
MIT

工作流匹配

在这些场景使用此 Skill

工作流匹配

加入完整工作流

替代方案短名单

安装前对比

可能适合该任务的相近 Skill。

对比全部

概览

--- name: react-native-mmkv description: Fast synchronous key-value storage for React Native via react-native-mmkv (Nitro-backed). Covers creating and configuring MMKV instances, reading/writing all value types (string, number, boolean, buffer), React hooks for reactive UI, value-change listeners, encryption, AsyncStorage migration, and state-management integrations (zustand, redux-persist, jotai, react-query). Also covers storage limits, multi-process mode, and the V4 upgrade from the class-based API. license: MIT metadata: author: margelo scope: react-native-mmkv tags: react-native, mmkv, storage, key-value, encryption, hooks, zustand, redux, jotai, react-query, async-storage, migration, nitro-modules ---

# react-native-mmkv

A focused reference for AI coding assistants working in a project that uses `react-native-mmkv`. Answer using the real APIs from this library — not invented ones — by routing to the matching `references/*.md` file below.

## Mental model

`react-native-mmkv` is a high-performance, synchronous key-value storage library for React Native, backed by Tencent's [MMKV](https://github.com/Tencent/MMKV) C++ engine via Nitro Modules (JSI). It is ~30x faster than AsyncStorage.

The three things that trip people up:

1. **Everything is synchronous.** No `await`, no Promises. `storage.getString('key')` returns the value immediately. This is the whole point — MMKV memory-maps files and reads/writes in-process. 2. **It's a key-value store, not a database.** All data is cached in memory. Keep total size under ~100 MB; for larger datasets use [react-native-nitro-sqlite](https://github.com/margelo/react-native-nitro-sqlite) or WatermelonDB. There is no fixed storage limit — but memory warnings will fire if you go too large. 3. **V4 is a breaking rewrite.** The constructor changed from `new MMKV()` to `createMMKV()`, `.delete()` became `.remove()`, and `react-native-nitro-modules` is now a required peer dependency. See the [upgrade guide](./references/upgrade-v4.md).

> **V4 requires React Native 0.75+.** It works on both the New Architecture and the old architecture (Nitro is backwards compatible).

## Routing table — problem to reference

Load the matching file from `references/` before writing code. Each reference cites real APIs from the library.

| User is asking about… | Read | |---|---| | Creating an MMKV instance, configuration options (`id`, `path`, `encryptionKey`, `mode`, `readOnly`, `compareBeforeSet`), the `createMMKV()` factory | [`references/create-instance.md`](./references/create-instance.md) | | Getting/setting values, all data types (string, number, boolean, buffer, objects via JSON), key management (`contains`, `getAllKeys`, `remove`, `clearAll`), `size`, `trim`, `importAllFrom` | [`references/crud-operations.md`](./references/crud-operations.md) | | React hooks (`useMMKVString`, `useMMKVNumber`, `useMMKVBoolean`, `useMMKVBuffer`, `useMMKVObject`, `useMMKV`, `useMMKVListener`, `useMMKVKeys`), reactive UI | [`references/hooks.md`](./references/hooks.md) | | Listening for value changes outside of React, `addOnValueChangedListener`, cleaning up listeners | [`references/listeners.md`](./references/listeners.md) | | Encryption (`encrypt`, `decrypt`, `recrypt`), AES-128 vs AES-256, `encryptionKey` config | [`references/encryption.md`](./references/encryption.md) | | Migrating from AsyncStorage, data transfer pattern, completion flag | [`references/migrate-from-async-storage.md`](./references/migrate-from-async-storage.md) | | zustand persist middleware, redux-persist, jotai `atomWithMMKV`, react-query persister, MobX | [`references/state-management.md`](./references/state-management.md) | | V4 upgrade, breaking changes from V3, `new MMKV()` → `createMMKV()`, `.delete()` → `.remove()` | [`references/upgrade-v4.md`](./references/upgrade-v4.md) | | Storage size limits, memory warnings, when to use a database instead | [`references/limits-and-gotchas.md`](./references/limits-and-gotchas.md) |

If the question doesn't match any row, read [`references/create-instance.md`](./references/create-instance.md) first — most setup questions start there.

## Installation

```bash npm install react-native-mmkv react-native-nitro-modules cd ios && pod install ```

Expo: ```bash npx expo install react-native-mmkv react-native-nitro-modules npx expo prebuild ```

After install, rebuild the app. No additional native wiring is required.

## Quick reference — full MMKV instance API

```ts import { createMMKV, existsMMKV, deleteMMKV } from 'react-native-mmkv'

const storage = createMMKV({ id: 'my-store' })

// Properties (read-only) storage.id // string storage.length // number of keys storage.byteSize // total file size in bytes storage.size // (deprecated — use byteSize) storage.isReadOnly // boolean storage.isEncrypted // boolean

// Write storage.set('key', 'string' | 42 | true | arrayBuffer)

// Read storage.getString('key') // string | undefined storage.getNumber('key') // number | undefined storage.getBoolean('key') // boolean | undefined storage.getBuffer('key') // ArrayBuffer | undefined

// Keys storage.contains('key') // boolean storage.getAllKeys() // string[] storage.remove('key') // boolean (NOTE: was .delete() in V3) storage.clearAll() // void

// Encryption storage.encrypt('password') storage.encrypt('password', 'AES-256') storage.decrypt() storage.recrypt('newPassword' | undefined) // (deprecated — use encrypt()/decrypt())

// Maintenance storage.trim() // free unused space storage.importAllFrom(otherStorage) // returns count imported

// Listeners const sub = storage.addOnValueChangedListener((key) => { ... }) sub.remove()

// Static helpers existsMMKV('my-store') // boolean deleteMMKV('my-store') // boolean ```

## Testing

A mocked MMKV instance is automatically used when testing with Jest or Vitest. Use `createMMKV()` as normal in tests — no manual mocking needed.

## Verifying the skill is loaded

Good test questions:

- *"How do I persist zustand state with MMKV?"* → should produce a `StateStorage` adapter using `storage.set`, `storage.getString`, `storage.remove` — not AsyncStorage wrappers. - *"How do I migrate from AsyncStorage to MMKV?"* → should show the batch-copy pattern with a completion flag, not a drop-in replacement. - *"What's the storage limit?"* → should explain there's no fixed limit, but data is memory-mapped so keep it under ~100 MB; use SQLite for larger datasets.

## References

| File | Description | |------|-------------| | [create-instance.md](./references/create-instance.md) | `createMMKV()` factory, all configuration options | | [crud-operations.md](./references/crud-operations.md) | Set/get all types, key management, objects, buffers | | [hooks.md](./references/hooks.md) | All React hooks for reactive MMKV usage | | [listeners.md](./references/listeners.md) | `addOnValueChangedListener`, cleanup | | [encryption.md](./references/encryption.md) | Encrypt/decrypt instances, AES options | | [migrate-from-async-storage.md](./references/migrate-from-async-storage.md) | Full migration pattern from AsyncStorage | | [state-management.md](./references/state-management.md) | zustand, redux-persist, jotai, react-query, MobX | | [upgrade-v4.md](./references/upgrade-v4.md) | V3 → V4 breaking changes and migration | | [limits-and-gotchas.md](./references/limits-and-gotchas.md) | Storage limits, multi-process, logging, common pitfalls |

## Problem → Reference Mapping

| Problem | Reference | Action | |---------|-----------|--------| | Don't know where to start | [create-instance.md](./references/create-instance.md) | Create instance with `createMMKV()` | | Need reactive UI updates | [hooks.md](./references/hooks.md) | Use `useMMKVString` / `useMMKVObject` etc. | | Encrypting sensitive data | [encryption.md](./references/encryption.md) | Call `storage.encrypt(key)` | | App uses AsyncStorage, want to switch | [migrate-from-async-storage.md](./references/migrate-from-async-storage.md) | Batch migrate then swap calls | | Zustand/Redux/Jotai persistence | [state-management.md](./references/state-management.md) | Wire adapter for your state lib | | Upgrading from V3 to V4 | [upgrade-v4.md](./references/upgrade-v4.md) | `new MMKV()` → `createMMKV()`, `.delete()` → `.remove()` | | Storage growing too large | [limits-and-gotchas.md](./references/limits-and-gotchas.md) | Trim or move to SQLite | | Multi-process data sharing | [limits-and-gotchas.md](./references/limits-and-gotchas.md) | Set `mode: 'multi-process'` |

技术详情

版本
1.0.0
许可证
MIT
最近更新
2026年8月21日
发布时间
2026年8月21日

决策摘要

备选候选

70
就绪
原型验证
阶段

仓库近期活跃

审计

安装审查

安装与采用审查

78
高风险
安全性
75/100
维护状态
100/100
安装
92/100
打开完整审计查看评估报告

Agent 验证证据

Agent 验证证据

来自解析、审查、安装和一次小范围运行后的结果报告。

0
已验证
Needs first agent run自动安装: 先审查最近: 未知
成功率
近期失败
结果
0
输出质量
失败
0
不相关
0
安装次数
0
风险拦截
0
需要配置
0
生产环境
0

暂时没有 Agent 结果数据。首次 Agent 执行可以通过 /api/agent/outcome 报告成功、需要设置、风险拦截、失败或不相关。

安装

加入 Agent 工作流

免费且开源. 在生产 Agent 中安装前请先审查报告。

增长闭环

分享工具包

X

为 react-native-mmkv 准备的场景化草稿,可手动发布到 X。

策展说明
A practical pick for design or creative work:

react-native-mmkv: Fast synchronous key-value storage for React Native via react-native-mmkv (Nitro-backed). Covers creating and configuring M...

161 stars

https://www.openagentskill.com/skills/margelo-react-native-mmkv?ref=x
打开 X 草稿
可选:带安装命令的回复
Listing + install path for react-native-mmkv:
https://www.openagentskill.com/skills/margelo-react-native-mmkv?ref=x

Install: npx skills add margelo/react-native-skills --skill react-native-mmkv
打开回复草稿

收录来源

Registry 收录

可认领

此列表来自公开来源,维护者认领获批前不会标记为官方。

创作者
margelo
收录方
OpenAgentSkill 社区索引

归属链接指向公开仓库或创作者主页。创作者可认领列表以更新所有权信号。

认领此 Skill

所有者认领

认领此 Skill 页面

这条 Registry 收录 列表归属于 margelo,但尚未标记为官方。认领后可增加已验证所有者信号,使后续发布、安装和审计更新更值得信赖。

创作者外链工具包

将证据徽章加入你的 README

在开发者评估仓库的位置展示规范页面、当前信任与审计信号,以及真实的 Agent 验证证据。

[![Listed on OpenAgentSkill](https://www.openagentskill.com/api/badge/margelo-react-native-mmkv?metric=listed&label=Listed)](https://www.openagentskill.com/skills/margelo-react-native-mmkv)
[![OpenAgentSkill Trust](https://www.openagentskill.com/api/badge/margelo-react-native-mmkv?metric=trust&label=Trust)](https://www.openagentskill.com/skills/margelo-react-native-mmkv)
[![OpenAgentSkill Audit](https://www.openagentskill.com/api/badge/margelo-react-native-mmkv?metric=audit&label=Audit)](https://www.openagentskill.com/skills/margelo-react-native-mmkv/audit)
[![Agent Proven](https://www.openagentskill.com/api/badge/margelo-react-native-mmkv?metric=proven&label=Agent%20Proven)](https://www.openagentskill.com/skills/margelo-react-native-mmkv)

作者

M

margelo

@margelo

平台适配

健康信号

GitHub Stars
161
质量评分
39/100
最近 GitHub 推送
2026年8月21日
框架提示
未知
OpenAgentSkill 浏览量
4
复制安装命令
0
跳转点击
0

社区信号

告诉我们这个 Skill 是否对你的 Agent 工作流有帮助。汇总反馈会持续改善排序。

信任与安全

仅限沙盒

64
  • GitHub 采用度161 个 GitHub Stars信息
  • Star/Fork 活跃度161 个 Star,7 个 Fork; 当前元数据中没有议题活跃度信息检查
  • 近期维护距上次推送 1 天通过
  • 许可证清晰度MIT通过
  • README/SKILL.md 完整度元数据包含足够的用法与工作流上下文通过
  • 依赖与运行时风险command execution surface, external package install surface检查