[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EN7CH3DXV1PN9B27F76TNH":3,"skill-same:01M7EN7CH3DXV1PN9B27F76TNH":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":47},"01M7EN7CH3DXV1PN9B27F76TNH","persistence",null,"Choose and wire LangGraph persistence: checkpoint savers, stores, thread config, SQLite\u002FPostgres backends, and safe serde settings.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: persistence\ndescription: \"Choose and wire LangGraph persistence: checkpoint savers, stores,\n  thread config, SQLite\u002FPostgres backends, and safe serde settings.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: MIT\n---\n\n# Persistence\n\nUse this sub-skill when a task asks an agent to persist LangGraph state, resume a graph thread, choose a checkpoint backend, add long-term memory, debug checkpoint configuration, or harden checkpoint serialization.\n\n## Route Here When\n\n- A graph needs memory across `invoke`, `stream`, `batch`, `ainvoke`, or `astream` calls.\n- A stateless graph must become a persistent threaded graph with `thread_id` config.\n- The task mentions checkpointers, checkpoints, checkpoint savers, `checkpoint_id`, `checkpoint_ns`, pending writes, or time travel.\n- A local app needs SQLite checkpoints or a production app needs Postgres checkpoints.\n- A graph needs a key-value store such as `InMemoryStore` or semantic memory search.\n- The error involves `PostgresSaver`, `SqliteSaver`, async saver imports, psycopg row factories, missing setup, or msgpack deserialization warnings.\n\nFor graph compilation and runtime invocation patterns, pair this with [graph-runtime](..\u002Fgraph-runtime\u002FSKILL.md). For agent templates and tool-calling agents that need memory, pair with [prebuilt-agents](..\u002Fprebuilt-agents\u002FSKILL.md). For deployment-managed checkpointers, pair with the `cli-deployment` sibling sub-skill when present. For hosted thread APIs, pair with the `sdk-clients` sibling sub-skill when present.\n\n## Core Decision Flow\n\n1. Decide whether the app needs checkpoints, a store, or both:\n   - Checkpoints persist graph execution state by thread and are passed to `builder.compile(checkpointer=...)`.\n   - Stores persist long-term key-value memory across threads and are passed to `builder.compile(store=...)` when graph nodes access a store.\n2. Pick the checkpoint saver:\n   - `InMemorySaver` from `langgraph.checkpoint.memory` for debugging and tests only.\n   - `SqliteSaver` from `langgraph.checkpoint.sqlite` for lightweight local sync persistence.\n   - `AsyncSqliteSaver` from `langgraph.checkpoint.sqlite.aio` for async SQLite graph execution.\n   - `PostgresSaver` from `langgraph.checkpoint.postgres` for durable sync production persistence.\n   - `AsyncPostgresSaver` from `langgraph.checkpoint.postgres.aio` for async production persistence.\n3. Require thread configuration whenever a compiled graph uses a checkpointer:\n   - Minimum config: `{\"configurable\": {\"thread_id\": \"user-or-session-id\"}}`.\n   - Optional resume point: add `\"checkpoint_id\": \"...\"`.\n   - Optional namespace: add `\"checkpoint_ns\": \"...\"` when isolating checkpoint streams inside one thread.\n4. Harden deserialization before reading untrusted or long-lived checkpoint databases:\n   - Prefer setting `LANGGRAPH_STRICT_MSGPACK=true` in the runtime environment.\n   - Or pass `JsonPlusSerializer(allowed_msgpack_modules=[(\"package.module\", \"ClassName\")])` to the saver.\n5. Validate with a tiny graph and a repeated `thread_id` before changing application logic.\n\n## Common Patterns\n\n### Debug or Test Checkpoints\n\n```python\nfrom langgraph.checkpoint.memory import InMemorySaver\n\ncheckpointer = InMemorySaver()\ngraph = builder.compile(checkpointer=checkpointer)\nconfig = {\"configurable\": {\"thread_id\": \"debug-thread\"}}\nresult = graph.invoke(input_state, config)\n```\n\n`InMemorySaver(*, serde=None, factory=defaultdict)` stores checkpoints in process memory. Do not recommend it for production because data is lost when the process exits.\n\n### Local SQLite Checkpoints\n\n```python\nfrom langgraph.checkpoint.sqlite import SqliteSaver\n\nwith SqliteSaver.from_conn_string(\"checkpoints.sqlite\") as checkpointer:\n    graph = builder.compile(checkpointer=checkpointer)\n    graph.invoke(input_state, {\"configurable\": {\"thread_id\": \"local-user-1\"}})\n```\n\nUse sync `SqliteSaver` only with sync graph methods. For `ainvoke`, `astream`, or async apps, import `AsyncSqliteSaver` from `langgraph.checkpoint.sqlite.aio`; it requires `aiosqlite`.\n\n### Durable Postgres Checkpoints\n\n```python\nfrom langgraph.checkpoint.postgres import PostgresSaver\n\nwith PostgresSaver.from_conn_string(DB_URI) as checkpointer:\n    checkpointer.setup()\n    graph = builder.compile(checkpointer=checkpointer)\n    graph.invoke(input_state, {\"configurable\": {\"thread_id\": \"customer-123\"}})\n```\n\nCall `setup()` the first time a Postgres checkpoint database is used so migrations and checkpoint tables exist. For manual psycopg connections, use `autocommit=True` and `row_factory=dict_row`.\n\n### Long-Term Store Memory\n\n```python\nfrom langgraph.store.memory import InMemoryStore\n\nstore = InMemoryStore()\nstore.put((\"users\", \"123\"), \"prefs\", {\"theme\": \"dark\"})\nitem = store.get((\"users\", \"123\"), \"prefs\")\n```\n\n`InMemoryStore(*, index=None)` supports namespaced key-value storage and optional semantic search. It is in-memory and process-local; use it for tests, demos, and memory logic development before selecting a durable store backend.\n\n## References\n\n- [Checkpointing](references\u002Fcheckpointing.md): saver selection, thread config, SQLite\u002FPostgres wiring, metadata queries, and serde security.\n- [In-Memory Store](references\u002Fstore-memory.md): `InMemoryStore` namespaces, filters, optional vector search, and async methods.\n- [Troubleshooting](references\u002Ftroubleshooting.md): dependency, config, sync\u002Fasync, Postgres row factory, setup, and security failures.\n- [Memory checkpoint smoke script](scripts\u002Fsmoke_memory_checkpoint.py): self-contained check for package imports, `InMemorySaver`, thread config, and checkpoint listing.\n\n## Validation Checklist\n\n- Run `python skills\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002Fscripts\u002Fsmoke_memory_checkpoint.py --help` to confirm the bundled script is discoverable.\n- Run `python skills\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002Fscripts\u002Fsmoke_memory_checkpoint.py` in an environment with `langgraph` installed.\n- Confirm repeated graph calls reuse the same `thread_id` when continuity is expected.\n- Confirm sync apps use sync savers and async apps use async savers.\n- Confirm SQLite apps have `langgraph-checkpoint-sqlite` installed and async SQLite apps also have `aiosqlite`.\n- Confirm Postgres apps have `langgraph-checkpoint-postgres`, psycopg connectivity, `setup()`, and correct row factory settings.\n- Confirm checkpoint data from shared or persistent databases is read with strict msgpack or an explicit allowlist.\n\n## Do Not\n\n- Do not tell future agents to read source repository files or tests at runtime.\n- Do not use `InMemorySaver` or `InMemoryStore` as durable production persistence.\n- Do not call sync saver methods from async graph execution; use the matching async saver.\n- Do not omit `thread_id` when compiling with a checkpointer.\n- Do not create manual Postgres connections without `autocommit=True` and `row_factory=dict_row`.\n- Do not suppress serde warnings without either strict mode or an intentional allowlist.\n","# Persistence\n\nUse this sub-skill when a task asks an agent to persist LangGraph state, resume a graph thread, choose a checkpoint backend, add long-term memory, debug checkpoint configuration, or harden checkpoint serialization.\n\n## Route Here When\n\n- A graph needs memory across `invoke`, `stream`, `batch`, `ainvoke`, or `astream` calls.\n- A stateless graph must become a persistent threaded graph with `thread_id` config.\n- The task mentions checkpointers, checkpoints, checkpoint savers, `checkpoint_id`, `checkpoint_ns`, pending writes, or time travel.\n- A local app needs SQLite checkpoints or a production app needs Postgres checkpoints.\n- A graph needs a key-value store such as `InMemoryStore` or semantic memory search.\n- The error involves `PostgresSaver`, `SqliteSaver`, async saver imports, psycopg row factories, missing setup, or msgpack deserialization warnings.\n\nFor graph compilation and runtime invocation patterns, pair this with [graph-runtime](..\u002Fgraph-runtime\u002FSKILL.md). For agent templates and tool-calling agents that need memory, pair with [prebuilt-agents](..\u002Fprebuilt-agents\u002FSKILL.md). For deployment-managed checkpointers, pair with the `cli-deployment` sibling sub-skill when present. For hosted thread APIs, pair with the `sdk-clients` sibling sub-skill when present.\n\n## Core Decision Flow\n\n1. Decide whether the app needs checkpoints, a store, or both:\n   - Checkpoints persist graph execution state by thread and are passed to `builder.compile(checkpointer=...)`.\n   - Stores persist long-term key-value memory across threads and are passed to `builder.compile(store=...)` when graph nodes access a store.\n2. Pick the checkpoint saver:\n   - `InMemorySaver` from `langgraph.checkpoint.memory` for debugging and tests only.\n   - `SqliteSaver` from `langgraph.checkpoint.sqlite` for lightweight local sync persistence.\n   - `AsyncSqliteSaver` from `langgraph.checkpoint.sqlite.aio` for async SQLite graph execution.\n   - `PostgresSaver` from `langgraph.checkpoint.postgres` for durable sync production persistence.\n   - `AsyncPostgresSaver` from `langgraph.checkpoint.postgres.aio` for async production persistence.\n3. Require thread configuration whenever a compiled graph uses a checkpointer:\n   - Minimum config: `{\"configurable\": {\"thread_id\": \"user-or-session-id\"}}`.\n   - Optional resume point: add `\"checkpoint_id\": \"...\"`.\n   - Optional namespace: add `\"checkpoint_ns\": \"...\"` when isolating checkpoint streams inside one thread.\n4. Harden deserialization before reading untrusted or long-lived checkpoint databases:\n   - Prefer setting `LANGGRAPH_STRICT_MSGPACK=true` in the runtime environment.\n   - Or pass `JsonPlusSerializer(allowed_msgpack_modules=[(\"package.module\", \"ClassName\")])` to the saver.\n5. Validate with a tiny graph and a repeated `thread_id` before changing application logic.\n\n## Common Patterns\n\n### Debug or Test Checkpoints\n\n```python\nfrom langgraph.checkpoint.memory import InMemorySaver\n\ncheckpointer = InMemorySaver()\ngraph = builder.compile(checkpointer=checkpointer)\nconfig = {\"configurable\": {\"thread_id\": \"debug-thread\"}}\nresult = graph.invoke(input_state, config)\n```\n\n`InMemorySaver(*, serde=None, factory=defaultdict)` stores checkpoints in process memory. Do not recommend it for production because data is lost when the process exits.\n\n### Local SQLite Checkpoints\n\n```python\nfrom langgraph.checkpoint.sqlite import SqliteSaver\n\nwith SqliteSaver.from_conn_string(\"checkpoints.sqlite\") as checkpointer:\n    graph = builder.compile(checkpointer=checkpointer)\n    graph.invoke(input_state, {\"configurable\": {\"thread_id\": \"local-user-1\"}})\n```\n\nUse sync `SqliteSaver` only with sync graph methods. For `ainvoke`, `astream`, or async apps, import `AsyncSqliteSaver` from `langgraph.checkpoint.sqlite.aio`; it requires `aiosqlite`.\n\n### Durable Postgres Checkpoints\n\n```python\nfrom langgraph.checkpoint.postgres import PostgresSaver\n\nwith PostgresSaver.from_conn_string(DB_URI) as checkpointer:\n    checkpointer.setup()\n    graph = builder.compile(checkpointer=checkpointer)\n    graph.invoke(input_state, {\"configurable\": {\"thread_id\": \"customer-123\"}})\n```\n\nCall `setup()` the first time a Postgres checkpoint database is used so migrations and checkpoint tables exist. For manual psycopg connections, use `autocommit=True` and `row_factory=dict_row`.\n\n### Long-Term Store Memory\n\n```python\nfrom langgraph.store.memory import InMemoryStore\n\nstore = InMemoryStore()\nstore.put((\"users\", \"123\"), \"prefs\", {\"theme\": \"dark\"})\nitem = store.get((\"users\", \"123\"), \"prefs\")\n```\n\n`InMemoryStore(*, index=None)` supports namespaced key-value storage and optional semantic search. It is in-memory and process-local; use it for tests, demos, and memory logic development before selecting a durable store backend.\n\n## References\n\n- [Checkpointing](references\u002Fcheckpointing.md): saver selection, thread config, SQLite\u002FPostgres wiring, metadata queries, and serde security.\n- [In-Memory Store](references\u002Fstore-memory.md): `InMemoryStore` namespaces, filters, optional vector search, and async methods.\n- [Troubleshooting](references\u002Ftroubleshooting.md): dependency, config, sync\u002Fasync, Postgres row factory, setup, and security failures.\n- [Memory checkpoint smoke script](scripts\u002Fsmoke_memory_checkpoint.py): self-contained check for package imports, `InMemorySaver`, thread config, and checkpoint listing.\n\n## Validation Checklist\n\n- Run `python skills\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002Fscripts\u002Fsmoke_memory_checkpoint.py --help` to confirm the bundled script is discoverable.\n- Run `python skills\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002Fscripts\u002Fsmoke_memory_checkpoint.py` in an environment with `langgraph` installed.\n- Confirm repeated graph calls reuse the same `thread_id` when continuity is expected.\n- Confirm sync apps use sync savers and async apps use async savers.\n- Confirm SQLite apps have `langgraph-checkpoint-sqlite` installed and async SQLite apps also have `aiosqlite`.\n- Confirm Postgres apps have `langgraph-checkpoint-postgres`, psycopg connectivity, `setup()`, and correct row factory settings.\n- Confirm checkpoint data from shared or persistent databases is read with strict msgpack or an explicit allowlist.\n\n## Do Not\n\n- Do not tell future agents to read source repository files or tests at runtime.\n- Do not use `InMemorySaver` or `InMemoryStore` as durable production persistence.\n- Do not call sync saver methods from async graph execution; use the matching async saver.\n- Do not omit `thread_id` when compiling with a checkpointer.\n- Do not create manual Postgres connections without `autocommit=True` and `row_factory=dict_row`.\n- Do not suppress serde warnings without either strict mode or an intentional allowlist.\n",{"name":5,"license":15,"metadata":24,"description":7,"disable-model-invocation":26},{"disco-role":25},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Flanggraph\u002Fsub-skills\u002Fpersistence",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":26},[37,40,43],{"tool":38,"command":39},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill persistence",{"tool":41,"command":42},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill persistence",{"tool":44,"command":45},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill persistence","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002FSKILL.md",[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fcheckpointing.md","REFERENCE","参考文档",8169,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002Freferences\u002Fcheckpointing.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fstore-memory.md",5096,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002Freferences\u002Fstore-memory.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Ftroubleshooting.md",6693,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Flanggraph\u002Fsub-skills\u002Fpersistence\u002Freferences\u002Ftroubleshooting.md",[63,71,76,83,90,97],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":70},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":70},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":70},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":70},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":70},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]