[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74F5Q01M5SMNJRVVWN984AS":3,"skill-same:01M74F5Q01M5SMNJRVVWN984AS":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":13,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M74F5Q01M5SMNJRVVWN984AS","mem0-integrate",null,"Integrate Mem0 into an existing repository using a goal-driven, TDD pipeline. Detects the repo's language automatically and asks the user to pick between Mem0 Platform (managed) and Mem0 Open Source (self-hosted). Writes failing tests before any implementation. Produces a local feature branch plus `.mem0-integration\u002F` artifacts consumed by the paired verification skill. TRIGGER when: user says \"integrate mem0\", \"add mem0 to this repo\", \"wire mem0 into \u003Crepo>\", or asks how to add memory to an existing project. DO NOT TRIGGER when: the user wants general SDK usage (use skill:mem0), CLI usage (use skill:mem0-cli), or Vercel AI SDK (use skill:mem0-vercel-ai-sdk). After success, invoke skill:mem0-test-integration to verify in the same workspace (loose coupling).","lzy18001500226\u002FMoSim","lzy18001500226","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F152623587?v=4","01M71ZMEX36NK05B642131DEEK","01M71ZMEXSMX72KPVNJ572G0CM",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FMemory\u002Fmem0\u002Fskills\u002Fmem0-integrate\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FMemory\u002Fmem0\u002Fskills\u002Fmem0-integrate\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: mem0-integrate\ndescription: >\n  Integrate Mem0 into an existing repository using a goal-driven, TDD pipeline.\n  Detects the repo's language automatically and asks the user to pick between\n  Mem0 Platform (managed) and Mem0 Open Source (self-hosted). Writes failing\n  tests before any implementation. Produces a local feature branch plus\n  `.mem0-integration\u002F` artifacts consumed by the paired verification skill.\n  TRIGGER when: user says \"integrate mem0\", \"add mem0 to this repo\", \"wire\n  mem0 into \u003Crepo>\", or asks how to add memory to an existing project.\n  DO NOT TRIGGER when: the user wants general SDK usage (use skill:mem0),\n  CLI usage (use skill:mem0-cli), or Vercel AI SDK (use skill:mem0-vercel-ai-sdk).\n  After success, invoke skill:mem0-test-integration to verify in the same\n  workspace (loose coupling).\nlicense: Apache-2.0\nmetadata:\n  author: mem0ai\n  version: \"0.1.0\"\n  category: ai-memory\n  tags: \"memory, integration, tdd, platform, oss\"\n  mem0_tested_versions: \"mem0ai (PyPI) >=2.0.0,\u003C3.0.0; mem0ai (npm) >=3.0.0,\u003C4.0.0\"\n---\n\n# mem0-integrate\n\nWire Mem0 into an existing repo with a goal-driven, test-first pipeline.\nPairs with `mem0-test-integration` for verification.\n\n## Canonical sources (fetch before deciding anything)\n\nThe skill MUST `WebFetch` these URLs before step 3 and cite them in\n`plan.md`. They are the ground truth — do not rely on ambient knowledge\nof the Mem0 API.\n\n### Agent-ready docs\n- Scope-tagged docs index: https:\u002F\u002Fdocs.mem0.ai\u002Fllms.txt\n- Full docs (single file, deep dives): https:\u002F\u002Fdocs.mem0.ai\u002Fllms-full.txt\n- OpenAPI spec (Platform REST, machine-readable): https:\u002F\u002Fdocs.mem0.ai\u002Fopenapi.json\n- Hosted MCP server: https:\u002F\u002Fmcp.mem0.ai (requires Platform API key)\n- Integrations index: https:\u002F\u002Fdocs.mem0.ai\u002Fintegrations\n\n### Published Mem0 skills — delegate; do not reimplement\nPrefer these over writing your own call-site patterns. Each is a\nstandalone `SKILL.md` with triggers, examples, and version-pinned code.\n\n- SDK (Python + TS, Platform + OSS): https:\u002F\u002Fraw.githubusercontent.com\u002Fmem0ai\u002Fmem0\u002Fmain\u002Fskills\u002Fmem0\u002FSKILL.md\n- CLI: https:\u002F\u002Fraw.githubusercontent.com\u002Fmem0ai\u002Fmem0\u002Fmain\u002Fskills\u002Fmem0-cli\u002FSKILL.md\n- Vercel AI SDK: https:\u002F\u002Fraw.githubusercontent.com\u002Fmem0ai\u002Fmem0\u002Fmain\u002Fskills\u002Fmem0-vercel-ai-sdk\u002FSKILL.md\n- Editor\u002FMCP plugin glue (9 MCP tools): https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0\u002Ftree\u002Fmain\u002Fmem0-plugin\n\n### SDK source (read when docs are ambiguous)\nPublic repo. Cross-check against the `mem0_tested_versions` range in this\nskill's frontmatter if the `main` branch has moved past a major.\n\n- Repo root: https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0\n- Python SDK: https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0\u002Ftree\u002Fmain\u002Fmem0\n- TypeScript SDK: https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0\u002Ftree\u002Fmain\u002Fmem0-ts\n\n### Quickstarts (for bootstrapping unfamiliar stacks)\n- Platform: https:\u002F\u002Fdocs.mem0.ai\u002Fplatform\u002Fquickstart\n- OSS Python: https:\u002F\u002Fdocs.mem0.ai\u002Fopen-source\u002Fpython-quickstart\n- OSS Node: https:\u002F\u002Fdocs.mem0.ai\u002Fopen-source\u002Fnode-quickstart\n- Platform vs OSS comparison: https:\u002F\u002Fdocs.mem0.ai\u002Fplatform\u002Fplatform-vs-oss\n\n## Integration principles (non-negotiable)\n\nThe true goal of this skill is to produce a **PR the maintainers can accept\nwithout argument**. That rules out anything invasive.\n\n1. **Additive, not replacing.** If the target repo already has a memory\n   system, a session store, a user-context layer, or anything named\n   `Memory` \u002F `memory_*`, Mem0 sits **alongside** it, not in place of it.\n   The existing system keeps working unchanged.\n2. **Opt-in by default.** Gate all new Mem0 code behind a feature flag\n   (env var like `MEM0_ENABLED=1`, a config key, or a strategy selector).\n   With the flag unset, behavior is the repo's original behavior,\n   byte-for-byte.\n3. **No breakage.** No removed exports, no renamed public functions,\n   no changed method signatures, no modified existing tests, no changed\n   behavior of existing tests. All pre-existing tests must pass unchanged\n   both with the flag set and unset.\n4. **Minimal dependency surface.** Add `mem0ai` (plus any deps the\n   delegated skill requires) and nothing else. No new vector stores, no\n   graph databases, no provider SDKs the repo does not already use.\n5. **Separable commits.** Code, tests, and config\u002Fdocs land in separate\n   commits so reviewers can cherry-pick.\n6. **The null hypothesis wins.** If no additive, gated fit exists after\n   step 6 (plan), exit with code 1 and a rationale. A bad PR is worse\n   than no PR.\n7. **Backend only.** Mem0 integration lives in server-side code. API keys,\n   memory scope, and user-identity resolution are not safe client-side.\n   If the repo has both backend and frontend, the call sites live in\n   backend files. Frontend-only repos are rejected at preconditions.\n\nEnforced at four gates: **preconditions** (reject frontend-only repos\nand repos where additive fit is impossible), **step 2 comprehension**\n(confirm a backend exists and name candidate surfaces), **step 6 plan\nreview** (reject plans that mutate existing exports or name client-side\ncall sites), and **step 10 self-healing loop** (refuse to \"fix\" principle\nviolations — surface them instead).\n\n## Skill delegation rules\n\nBefore writing any code, check whether a published skill already covers\nthe target stack. If yes, delegate — copy its call-site pattern into\n`plan.md` and into the tests; do not paraphrase.\n\n| Detected in target repo | Delegate to | Why |\n|---|---|---|\n| `@ai-sdk\u002F*` + `ai` in `package.json` | `skills\u002Fmem0-vercel-ai-sdk` | Integration is via `createMem0` provider wrapper, not raw `MemoryClient`. |\n| CLI-only repo (Typer, Commander, Click, Cobra) with no LLM call sites | `skills\u002Fmem0-cli` | Call sites are command handlers, not model wrappers. Consider whether mem0 actually fits first. |\n| Target is an MCP client \u002F editor config (Claude Code, Cursor, Codex settings) | `mem0-plugin` | Wire via MCP server URL + hooks; no SDK code usually needed. |\n| Any other Python or TS repo with an LLM call site | `skills\u002Fmem0` | Default SDK integration path. |\n\nRecord the delegated skill's raw URL in `plan.md` under a\n**\"Delegated skill:\"** field. The test writer in step 7 and the\nimplementation subagent in step 8 both read this field.\n\n## Preconditions\n\nRefuse to start unless ALL of the following are true:\n\n- Current working directory is inside a git repository with a clean index\n  (no uncommitted changes). Protects the user's work — every edit lands on\n  a feature branch, not on top of in-progress changes.\n- Repo has a detectable language (`package.json` \u002F `pyproject.toml` \u002F\n  `requirements.txt`). No language → exit cleanly with a written rationale.\n- Repo has a **backend**. Detected by: a `backend\u002F` or `server\u002F` or `api\u002F`\n  directory; a Python package with FastAPI\u002FFlask\u002FDjango\u002FStarlette; a Node\n  package with Express\u002FFastify\u002FKoa\u002FNestJS\u002FNext-API-routes; an agent-loop\n  framework (LangGraph, LangChain, LlamaIndex, Agno). Frontend-only repos\n  (pure React\u002FVue\u002FSvelte SPAs, static sites, mobile-only) → exit with\n  code 1 and a rationale. Mem0 is not installed client-side.\n- The user has already decided Mem0 fits this repo. This skill does NOT\n  survey the codebase to justify fit — bring a concrete goal. (Step 2\n  *does* read the repo to understand what it does and locate backend\n  integration surfaces; that is mechanics, not fit-justification.)\n\nExit with a written rationale if any precondition fails. Do not try to\n\"make it work anyway.\"\n\n## Pipeline\n\n### 1. Language detection\n\n| Signal | Track |\n|---|---|\n| `package.json` + TypeScript config | Node \u002F TypeScript |\n| `package.json` (no TS config) | Node \u002F JavaScript |\n| `pyproject.toml` or `requirements.txt` | Python |\n\nMonorepo with both → ask which subdirectory to operate in, then recurse.\n\n### 2. Repo comprehension — what does this repo do, and where is the backend?\n\nBefore any decision (product, goal, plan), understand the repo enough\nto locate *where in the backend* the integration belongs. This is not\nfit-surveying — the user already decided Mem0 fits. This is mechanics:\nyou cannot write a plan without knowing what files matter.\n\nRead, in order, with a token budget — do not scan the whole tree:\n\n1. `README.md` (root) + first-page of any `README_*.md` variants.\n2. `CONTRIBUTING.md` \u002F `AGENTS.md` \u002F `CLAUDE.md` at root if present —\n   these often spell out architecture and entry points.\n3. `package.json` \u002F `pyproject.toml` scripts + entry points.\n4. The layout of the top two directory levels (not recursive).\n5. Key config files: `docker-compose.yml`, `Dockerfile`, `Makefile`,\n   `langgraph.json`, `next.config.*`, `nuxt.config.*`.\n\nProduce `.mem0-integration\u002Frepo-summary.md`:\n\n    # Repo comprehension\n\n    **What this repo does:** \u003Cone paragraph in plain English. Who is\n    the end user? What does the app do for them? What LLM \u002F agent\n    behavior is central? Do not list dependencies — describe behavior.>\n\n    **Architecture at a glance:**\n      - Backend: \u003Cpath(s), framework, primary entry point>\n      - Frontend: \u003Cpath(s) if any, framework — for context only; no\n        integration here>\n      - Agent loop \u002F orchestration: \u003CLangGraph? custom? none?>\n      - Existing memory\u002Fsession\u002Fstate systems: \u003Cname them — these are\n        what step 6 Coexistence must preserve>\n\n    **Candidate backend integration surfaces** (ranked, best first):\n      1. `\u003Cbackend-file>:\u003Cline_range>` — \u003Cfunction> — \u003Cone-sentence\n         reason this is where write\u002Fread could slot in without\n         replacing anything existing>\n      2. ...\n      3. ...\n\n    **Not a fit here:** \u003Clist anything the skill considered but ruled\n    out — e.g., \"frontend chat component: client-side, excluded by\n    backend-only rule\"; \"existing memory subsystem X: would require\n    replacement, excluded by additive principle\">\n\n    **Sources read:** \u003Clist the files actually opened, with line counts,\n    so reviewers can verify coverage.>\n\nShow the user the rendered summary and ask: *\"Is this understanding\ncorrect? Which of the candidate surfaces (1, 2, 3 ...) should step 3\nforward target?\"*\n\nGate rules:\n\n- If no backend surface is found → exit code 1. The preconditions\n  should already have caught frontend-only repos; reaching this point\n  means a more subtle miss (e.g., the \"backend\" is actually just a\n  static build). Do not force a fit.\n- If every candidate surface would require replacing an existing\n  memory\u002Fsession system → exit code 1 with the \"additive principle\"\n  rationale. The user can manually point at a non-conflicting location\n  and re-run.\n- User corrections update `repo-summary.md` and re-confirm. Max 3\n  rounds; beyond that, exit code 1.\n\nThe user's chosen surface index is baked into `product.json` as\n`preferred_site` and referenced by steps 5 and 6.\n\n### 3. Product selection — Platform vs OSS (ask with a recommendation)\n\nRead the `## Identify the User's Setup` block in\n`https:\u002F\u002Fdocs.mem0.ai\u002Fllms.txt` for the Platform-first routing rules, then\napply the heuristics below. Ask, but never blank:\n\n- Other managed-service SDKs present (`@clerk\u002F*`, `stripe`, `@supabase\u002F*`,\n  `openai`, `@upstash\u002F*`, `posthog-*`) — 3+ → recommend **Platform**.\n- Local-infra signals (`docker-compose.yml` with postgres \u002F redis \u002F qdrant \u002F\n  neo4j, ollama configs, self-hosted auth) — 2+ → recommend **OSS**.\n- No strong signal → default recommendation: **Platform** (lower integration\n  cost; migration later is supported).\n\nExample:\n\n> I see `stripe`, `@clerk\u002Fnextjs`, and `@supabase\u002Fsupabase-js` — managed\n> services throughout. I recommend **Mem0 Platform** (4-line integration).\n> Override and use open source?\n\nBake the choice into the goal doc in step 5. Do not re-decide later.\n\n### 4. API key check (env-first, then ask)\n\n| Track | Key | Where to find |\n|---|---|---|\n| Platform | `MEM0_API_KEY` | https:\u002F\u002Fapp.mem0.ai |\n| OSS (default LLM) | `OPENAI_API_KEY` | https:\u002F\u002Fplatform.openai.com\u002Fapi-keys |\n\nIf present in env → continue.\nIf `MEM0_API_KEY` is missing AND the track is **Platform** → **default to Agent Mode**: run `mem0 init --agent --agent-caller \u003Cyour-name> --json` (after `pip install mem0-cli` or `npm install -g @mem0\u002Fcli`), substituting your agent identity (e.g. `claude-code`, `cursor`, `codex`). If you forgot to pass `--agent-caller`, run `mem0 identify \u003Cyour-name>` after init. Cache the key to `.env` (with user consent) and continue. Tell the user to claim later with `mem0 init --email \u003Ctheir-email>` — same key, no agent disruption.\nIf missing AND **CI mode** (`MEM0_INTEGRATE_CI=1`) → exit with code 2 and the name of the missing key.\n\nNever echo key values into `trace.jsonl`. Persist to `.env` only with\nexplicit user consent, and append `.env` to `.gitignore` if not already there.\n\nIf the user is on OSS and wants a non-OpenAI LLM, route them to the\n`components\u002Fllms\u002F*` docs and re-run this step with the chosen provider's key.\n\n### 5. Goal doc — the hard gate\n\nWrite `.mem0-integration\u002Fgoal.md` and **require user approval before step 6**.\n\nTemplate:\n\n    # Mem0 Integration Goal\n\n    **What gets stored:** \u003Cone sentence — user utterances? extracted\n    preferences? a specific domain fact like \"dietary restrictions\"?>\n\n    **When it gets retrieved:** \u003Cone sentence — on each user turn? before a\n    specific tool call? at session start?>\n\n    **Why:** \u003Cone sentence — the user-visible behavior change. \"Assistant\n    remembers previous orders across sessions,\" not \"we added memory.\">\n\n    **Product:** Platform | OSS  (locked from step 3, do not change)\n\n    **Delegated skill:** \u003Craw URL of the published skill being used\n    from \"Skill delegation rules\" above, or \"none — custom integration\n    against `skills\u002Fmem0`\">.\n\n    **Out of scope:** \u003Canything explicitly excluded: \"no graph memory,\"\n    \"no multimodal,\" \"no migration from existing store\">\n\nRules:\n\n- User must approve explicitly. If they edit the doc, reload and re-confirm.\n- `goal.md` is the contract the test suite is written against. Never\n  rewrite it after step 6 starts.\n- Max 3 rejection rounds. On the 4th, exit with code 3 and the rejection\n  notes — the integration is not well-specified enough to proceed.\n\n### 6. Integration plan — how and where (hard gate)\n\nGiven `goal.md` is \"what and why,\" this step produces \"where and how\" and\ngets explicit user sign-off before any code is written.\n\nThe skill does a **scoped** read of the repo (no wide survey):\n\n- Grep for the LLM call sites that match the goal (e.g., `openai.chat.`,\n  `anthropic.messages.`, `model.generateContent`, `ChatOpenAI`, `createLLM`).\n- Grep for the user-identity source (`req.user`, `session.user`, `auth()`,\n  `ctx.userId`, cookies).\n- Check `package.json` \u002F `pyproject.toml` \u002F `requirements.txt` for\n  conflicts (e.g., existing `mem0ai` at a different version).\n\nThen write `.mem0-integration\u002Fplan.md`:\n\n    # Mem0 Integration Plan\n\n    **Write pattern:** \u003Cone sentence — e.g., \"After each assistant reply,\n    call client.add([user_msg, assistant_msg], user_id=\u003Csource>).\">\n\n    **Read pattern:** \u003Cone sentence — e.g., \"Before building the LLM prompt,\n    call client.search(query=latest_user_msg, user_id=\u003Csource>, limit=5)\n    and inject results as a system message.\">\n\n    **User identifier source:** \u003Ccode path — e.g., `req.auth.userId`,\n    `session.user.email`, `ctx.params.user_id`. If none, ask the user.>\n\n    **Session scoping:**\n      - user_id: \u003Csource>\n      - agent_id: \u003Cstatic slug | null>\n      - run_id:   \u003Csource | null>\n\n    **Write call site:** `\u003Cfile:line_range>` — inside `\u003Cfunction>`\n    **Read call site:**  `\u003Cfile:line_range>` — inside `\u003Cfunction>`\n\n    **Dependencies to add:**\n      - `\u003Cpackage>@\u003Cversion pinned in frontmatter>`\n\n    **Preserved behavior:** \u003Clist the existing repo behaviors that must\n    keep working after this edit — e.g., \"existing OpenAI streaming still\n    works,\" \"existing Redis session store still used,\" \"existing tests\n    still pass unchanged.\">\n\n    **Coexistence:** \u003Cone bullet per existing system the integration sits\n    alongside. Name the files\u002Fclasses. Example: \"The existing\n    `agents\u002Fmemory\u002Fstorage.py` MemoryStorage class remains untouched and\n    keeps its LangGraph SummarizationEvent flow. Mem0 is added as a\n    parallel long-term-facts store, in a new file, invoked only when\n    MEM0_ENABLED=1 is set.\">\n\n    **Feature flag:** \u003Cthe exact mechanism and the default. Required.\n    Example: `env MEM0_ENABLED=1`, default unset \u002F off; `config.mem0.enabled`,\n    default false. With the flag in its default state, the repo must\n    behave exactly like `main`.>\n\n    **Sources consulted:** \u003Cminimum 2 URLs from \"Canonical sources\" above\n    that informed this plan. At least one `docs.mem0.ai` URL and one\n    delegated-skill URL. Cite the specific section or heading.>\n\n    **E2E recipe:** \u003Chow the verification skill should drive the app\n    end-to-end. Omit only if the repo is a pure library with no runnable\n    entry point — in which case the E2E step will skip with a warning.>\n\n        start:               \u003Cshell command to launch the app locally,\n                              using $PORT for any network port>\n        ready_probe:         \u003Cone of: url=\u003CURL> status=\u003Ccode>  \u002F\n                              log=\"\u003Csubstring to wait for>\"  \u002F\n                              sleep=\u003Cseconds, last resort>>\n        compose_services:    \u003Coptional: whitespace-separated service\n                              names in docker-compose.yml to start first;\n                              use label mem0-e2e: \"true\" to mark them>\n        write_call:          \u003Ccommand that triggers the Mem0 write path\n                              exactly once; ≤ 60s runtime>\n        write_async_wait_ms: \u003Cmilliseconds to wait after write_call for\n                              async memory flush; default 0>\n        read_call:           \u003Ccommand that triggers the Mem0 read path,\n                              typically a fresh session \u002F new request>\n        read_assert:         \u003Csubstring, regex, or jsonpath=\u003Cexpr>=\u003Cvalue>\n                              that MUST appear in read_call's output for\n                              the E2E to pass. Derived from goal.md's\n                              \"What gets stored.\">\n\n    **Rejected alternatives:** \u003Cbriefly, 1–2 bullets — patterns the skill\n    considered but did not pick, and why. Helps the user decide.>\n\nRules:\n\n- Show the user the proposed call sites with 10 lines of context around\n  each before asking for approval.\n- If the skill can't find a plausible call site for either write or read,\n  it exits with code 5 and asks the user to name the file(s) manually\n  (this is the \"no fit here\" signal — don't guess).\n- Max 3 rejection rounds on the plan. On the 4th, exit code 5 with the\n  last plan and the user's notes.\n- If the user edits `plan.md` by hand, reload and re-confirm.\n\n`plan.md` (not `goal.md`) is the contract the subagent implements against\nin step 8.\n\n### 7. Tests first (TDD)\n\nMain agent writes failing tests against `goal.md` in the repo's native\ntest framework:\n\n| Track | Default framework |\n|---|---|\n| Python | `pytest` |\n| TypeScript | `vitest` if detected, else `jest` |\n| JavaScript | same |\n\nTest assertion shapes must match the **canonical signatures**:\n\n- Platform method signatures: `https:\u002F\u002Fdocs.mem0.ai\u002Fopenapi.json`\n  (request body schemas for `\u002Fv1\u002Fmemories\u002F` and `\u002Fv1\u002Fmemories\u002Fsearch\u002F`).\n- OSS method signatures: the delegated skill named in `plan.md`\n  (fetched from its raw URL) or `skills\u002Fmem0\u002FSKILL.md` as the default.\n- Do not hand-roll request shapes. If the delegated skill has an\n  example block, lift it verbatim.\n\nMinimum two test files (paths taken from `plan.md` call sites):\n\n- `test_mem0_write.\u003Cext>` — asserts `add()` is called at the Write call\n  site with the right payload shape (Platform messages-array vs OSS string)\n  and the right `user_id` source.\n- `test_mem0_read.\u003Cext>` — asserts `search()` runs before the Read call\n  site and the result is wired into the LLM prompt \u002F response path.\n\nTests MUST be importable with `MEM0_API_KEY` unset. This is the design\npressure that forces step 8's lazy `MemoryClient()` \u002F `Memory()`\nconstruction — eager module-level init hits the API on import and\nbreaks pre-existing test collection when the key is missing.\n\nRun the tests. They **must fail**. If they pass before any implementation,\nthe tests are wrong — rewrite them.\n\n### 8. Implementation (subagent, fresh context)\n\nSpawn a subagent with:\n\n- **Inputs**: the repo, `goal.md`, `plan.md`, the two test files, and\n  direct URLs to: the delegated skill (from `plan.md`), the SDK source\n  (pinned per `mem0_tested_versions`), `https:\u002F\u002Fdocs.mem0.ai\u002Fllms.txt`,\n  and `https:\u002F\u002Fdocs.mem0.ai\u002Fopenapi.json`.\n- **No access** to main agent's reasoning trace or scratchpad.\n- **System prompt** (verbatim):\n\n      You are implementing a Mem0 integration for an existing repo.\n\n      Read these first:\n      - plan.md           (the mechanical contract)\n      - goal.md           (the intent — do not change it)\n      - the test files    (do not change them either)\n      - \u003Cdelegated skill raw URL from plan.md>\n      - https:\u002F\u002Fdocs.mem0.ai\u002Fllms.txt\n      - https:\u002F\u002Fdocs.mem0.ai\u002Fopenapi.json  (Platform only)\n\n      Constraints — all required, all enforced at review:\n\n      1. Touch only the files named in plan.md's call sites, or add\n         strictly new files.\n      2. Do not remove or rename any existing symbol. Do not change\n         any public signature.\n      3. Do not modify any existing test.\n      4. Gate every line of new Mem0 code behind the feature flag from\n         plan.md. With the flag in its default state, the repo must\n         behave exactly like `main` — byte-for-byte, including stdout\n         and return values.\n      5. Use only the \u003CPlatform | OSS> SDK surface. No new dependencies\n         beyond those listed under plan.md's \"Dependencies to add.\"\n      6. Preserve everything listed under plan.md's \"Preserved behavior\"\n         and \"Coexistence.\"\n      7. Lazy client construction. `MemoryClient()` validates the API\n         key in `__init__` (it makes a network call). Never instantiate\n         it at module-import time — construct on first use inside the\n         request \u002F handler path. The same rule applies to OSS `Memory()`,\n         which can eagerly initialize embedding and LLM providers. Use\n         a function-local singleton (`functools.lru_cache`, a module-level\n         `_client = None` + getter, or DI scope) — never a top-level\n         global. Eager init breaks the pre-existing test suite at\n         collection time whenever the key is missing or invalid, which\n         is a non-invasiveness violation.\n\n      Implement the plan to make the new tests pass while all\n      pre-existing tests continue to pass unchanged.\n\nSubagent returns a diff. Main agent reviews against `plan.md` (the\nmechanical contract) and `goal.md` (the intent):\n\n- Approved → apply the diff, commit.\n- Rejected → return with specific, actionable feedback (not \"try again\").\n- Max 3 review loops. Beyond that → exit code 4 with the last diff and\n  reviewer feedback.\n\n### 9. Commit + handoff\n\nCreate branch `mem0-integrate\u002F\u003Cshort-goal-slug>` and commit in\n**separate commits** so reviewers can cherry-pick:\n\n1. `mem0: add gated dependency` — just the `pyproject.toml` \u002F `package.json`\n   change.\n2. `mem0: add integration module` — the new file(s).\n3. `mem0: wire into \u003Ccall site>` — the call-site edit(s), still gated.\n4. `mem0: add tests` — the new test files.\n\nIf `--no-heal` is set → print `Run \u002Fmem0-test-integration to verify.`\nand exit. Otherwise proceed to step 10.\n\n### 10. Self-healing loop (default ON; disable with `--no-heal`)\n\nRun `\u002Fmem0-test-integration --ci` in a subprocess. If `scorecard.json`\nreports `overall: pass` → done, exit 0.\n\nOtherwise loop:\n\n1. **Categorize the failing check** from `scorecard.json`. Route per\n   category:\n   - `install` \u002F `static_checks` → dependency or import fix.\n   - `unit_tests` → wiring or assertion fix.\n   - `smoke_test` → API key or SDK call-shape fix.\n   - `e2e_test` → recipe, flag-wiring, or integration-point fix.\n   - **Pre-existing test failure (test skill exit code 7,\n     `non_invasive: false` in scorecard) → STOP.** This is a\n     non-invasiveness violation. Do NOT attempt to \"fix\" it (that\n     breaks principle 3). Exit code 6 with rationale.\n\n2. **Spawn a remediation subagent**, fresh context. Inputs:\n   `plan.md`, `goal.md`, `scorecard.md`, `scorecard.json`, the last\n   committed diff, and the relevant log file for the failing category\n   (`test-stdout.log` \u002F `smoke-stdout.log` \u002F `e2e-app.log` \u002F\n   `e2e-calls.log`).\n\n   System prompt (verbatim):\n\n       You are fixing a failing Mem0 integration test.\n\n       Non-negotiable constraints:\n       - Do not modify test files.\n       - Do not remove or rename any existing symbol or signature.\n       - Do not change pre-existing behavior. The feature flag from\n         plan.md must still default to OFF, and with the flag in its\n         default state the repo must behave exactly like main.\n       - Touch only the files named in plan.md's call sites, or add\n         strictly new files.\n       - Return the smallest possible diff that fixes the single\n         failing check listed in scorecard.md. No drive-by cleanup.\n\n3. **Apply the diff**; commit on the same branch with message\n   `mem0-heal: \u003Ccategory> attempt \u003CN>`. Do NOT amend earlier commits\n   (reviewers need the heal trail).\n\n4. **Re-run `\u002Fmem0-test-integration --ci`**. Outcomes:\n   - `overall: pass` → done, exit 0.\n   - Same check still failing → increment attempt counter; loop.\n   - A *different* check now failing → regression. Revert the heal\n     commit (`git revert HEAD --no-edit`), record the regression in\n     `.mem0-integration\u002Fheal-trace.md`, exit code 6.\n\n5. **Bounded iterations.** Default 3 attempts per failing category.\n   Override with `--heal-max N` (hard cap 10). On exhaustion, exit 6\n   with the full attempt trace: each diff, each scorecard, final log\n   tail.\n\n6. **Post-loop summary** written to `.mem0-integration\u002Fheal-trace.md`:\n   which category failed, how many attempts, each diff's intent, final\n   status, and — on success — the delta from initial scorecard to final.\n\n## Artifacts (all under `.mem0-integration\u002F`)\n\n| File | Purpose | Retention |\n|---|---|---|\n| `repo-summary.md` | Repo comprehension + candidate backend surfaces (step 2). | Keep across runs. |\n| `goal.md` | Approved intent. Never rewritten after step 6. | Keep across runs. |\n| `plan.md` | Approved mechanics (where, how, call sites, preserved behavior). | Keep across runs. |\n| `trace.jsonl` | Every tool call, decision, and subagent exchange this run. | Overwritten per run. |\n| `diff.patch` | The committed integration as a reviewable patch. | Overwritten per run. |\n| `heal-trace.md` | Per-attempt record of the self-healing loop (step 10). | Overwritten per run. |\n| `product.json` | `{\"product\": \"platform\"\\|\"oss\", \"language\": \"...\", \"mem0_version\": \"...\", \"write_site\": \"file:line\", \"read_site\": \"file:line\", \"feature_flag\": \"MEM0_ENABLED\"}` — consumed by the verification skill. | Overwritten per run. |\n\n`.mem0-integration\u002F` is added to `.gitignore` on first run. Nothing is\nwritten outside this directory and the repo's source tree.\n\n## Modes\n\n| Mode | Trigger | Behavior |\n|---|---|---|\n| Interactive (default) | TTY present, `MEM0_INTEGRATE_CI` unset | Asks for keys, confirms goal doc, shows recommendations. |\n| CI | `MEM0_INTEGRATE_CI=1` | Requires keys in env, requires `--product`, auto-approves goal doc from `goal.md` if present, fails fast otherwise. |\n\n## Invocation\n\n    \u002Fmem0-integrate                            # interactive, heal ON\n    \u002Fmem0-integrate --no-heal                  # stop after commit; manual verify\n    \u002Fmem0-integrate --heal-max 5               # cap heal attempts per category (default 3)\n    \u002Fmem0-integrate --product platform         # skip the product ask\n    \u002Fmem0-integrate --product oss\n    \u002Fmem0-integrate --ci                       # non-interactive (for test harness)\n\n## Exit codes\n\n| Code | Meaning |\n|---|---|\n| 0 | Success. Feature branch committed; verification skill ready to run. |\n| 1 | Precondition failed (dirty repo, no detectable language, etc.). |\n| 2 | Missing env key in CI mode. |\n| 3 | Goal doc rejected 3+ times — integration is not well-specified. |\n| 4 | Subagent review loop did not converge in 3 rounds. |\n| 5 | Integration plan rejected 3+ times, or no plausible additive call site found. |\n| 6 | Self-healing loop did not converge, detected a non-invasiveness violation, or a pre-existing test failed. |\n\n## Explicitly out of scope\n\n- Surveying the repo for fit points. Humans decide where Mem0 helps before\n  invoking this skill.\n- Replacing any existing memory \u002F session \u002F state system. Always additive\n  and feature-flagged; see \"Integration principles.\"\n- Modifying pre-existing tests, even to \"fix\" them under self-heal. Tests\n  that fail after integration with the flag unset are a non-invasiveness\n  violation, not a bug to patch.\n- Deciding Platform vs OSS silently. Always ask with a recommendation.\n- Switching branches, pushing, or opening PRs. Commits locally and stops\n  (or enters the heal loop, still local).\n- Data migration between stores. Point user at `migration\u002Foss-to-platform`\n  docs if they ask.\n- Provider selection beyond the default LLM for OSS. If they need a custom\n  LLM \u002F embedder \u002F vector store, route to `components\u002F*` docs and re-run\n  step 4 with the new key.\n","# mem0-integrate\n\nWire Mem0 into an existing repo with a goal-driven, test-first pipeline.\nPairs with `mem0-test-integration` for verification.\n\n## Canonical sources (fetch before deciding anything)\n\nThe skill MUST `WebFetch` these URLs before step 3 and cite them in\n`plan.md`. They are the ground truth — do not rely on ambient knowledge\nof the Mem0 API.\n\n### Agent-ready docs\n- Scope-tagged docs index: https:\u002F\u002Fdocs.mem0.ai\u002Fllms.txt\n- Full docs (single file, deep dives): https:\u002F\u002Fdocs.mem0.ai\u002Fllms-full.txt\n- OpenAPI spec (Platform REST, machine-readable): https:\u002F\u002Fdocs.mem0.ai\u002Fopenapi.json\n- Hosted MCP server: https:\u002F\u002Fmcp.mem0.ai (requires Platform API key)\n- Integrations index: https:\u002F\u002Fdocs.mem0.ai\u002Fintegrations\n\n### Published Mem0 skills — delegate; do not reimplement\nPrefer these over writing your own call-site patterns. Each is a\nstandalone `SKILL.md` with triggers, examples, and version-pinned code.\n\n- SDK (Python + TS, Platform + OSS): https:\u002F\u002Fraw.githubusercontent.com\u002Fmem0ai\u002Fmem0\u002Fmain\u002Fskills\u002Fmem0\u002FSKILL.md\n- CLI: https:\u002F\u002Fraw.githubusercontent.com\u002Fmem0ai\u002Fmem0\u002Fmain\u002Fskills\u002Fmem0-cli\u002FSKILL.md\n- Vercel AI SDK: https:\u002F\u002Fraw.githubusercontent.com\u002Fmem0ai\u002Fmem0\u002Fmain\u002Fskills\u002Fmem0-vercel-ai-sdk\u002FSKILL.md\n- Editor\u002FMCP plugin glue (9 MCP tools): https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0\u002Ftree\u002Fmain\u002Fmem0-plugin\n\n### SDK source (read when docs are ambiguous)\nPublic repo. Cross-check against the `mem0_tested_versions` range in this\nskill's frontmatter if the `main` branch has moved past a major.\n\n- Repo root: https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0\n- Python SDK: https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0\u002Ftree\u002Fmain\u002Fmem0\n- TypeScript SDK: https:\u002F\u002Fgithub.com\u002Fmem0ai\u002Fmem0\u002Ftree\u002Fmain\u002Fmem0-ts\n\n### Quickstarts (for bootstrapping unfamiliar stacks)\n- Platform: https:\u002F\u002Fdocs.mem0.ai\u002Fplatform\u002Fquickstart\n- OSS Python: https:\u002F\u002Fdocs.mem0.ai\u002Fopen-source\u002Fpython-quickstart\n- OSS Node: https:\u002F\u002Fdocs.mem0.ai\u002Fopen-source\u002Fnode-quickstart\n- Platform vs OSS comparison: https:\u002F\u002Fdocs.mem0.ai\u002Fplatform\u002Fplatform-vs-oss\n\n## Integration principles (non-negotiable)\n\nThe true goal of this skill is to produce a **PR the maintainers can accept\nwithout argument**. That rules out anything invasive.\n\n1. **Additive, not replacing.** If the target repo already has a memory\n   system, a session store, a user-context layer, or anything named\n   `Memory` \u002F `memory_*`, Mem0 sits **alongside** it, not in place of it.\n   The existing system keeps working unchanged.\n2. **Opt-in by default.** Gate all new Mem0 code behind a feature flag\n   (env var like `MEM0_ENABLED=1`, a config key, or a strategy selector).\n   With the flag unset, behavior is the repo's original behavior,\n   byte-for-byte.\n3. **No breakage.** No removed exports, no renamed public functions,\n   no changed method signatures, no modified existing tests, no changed\n   behavior of existing tests. All pre-existing tests must pass unchanged\n   both with the flag set and unset.\n4. **Minimal dependency surface.** Add `mem0ai` (plus any deps the\n   delegated skill requires) and nothing else. No new vector stores, no\n   graph databases, no provider SDKs the repo does not already use.\n5. **Separable commits.** Code, tests, and config\u002Fdocs land in separate\n   commits so reviewers can cherry-pick.\n6. **The null hypothesis wins.** If no additive, gated fit exists after\n   step 6 (plan), exit with code 1 and a rationale. A bad PR is worse\n   than no PR.\n7. **Backend only.** Mem0 integration lives in server-side code. API keys,\n   memory scope, and user-identity resolution are not safe client-side.\n   If the repo has both backend and frontend, the call sites live in\n   backend files. Frontend-only repos are rejected at preconditions.\n\nEnforced at four gates: **preconditions** (reject frontend-only repos\nand repos where additive fit is impossible), **step 2 comprehension**\n(confirm a backend exists and name candidate surfaces), **step 6 plan\nreview** (reject plans that mutate existing exports or name client-side\ncall sites), and **step 10 self-healing loop** (refuse to \"fix\" principle\nviolations — surface them instead).\n\n## Skill delegation rules\n\nBefore writing any code, check whether a published skill already covers\nthe target stack. If yes, delegate — copy its call-site pattern into\n`plan.md` and into the tests; do not paraphrase.\n\n| Detected in target repo | Delegate to | Why |\n|---|---|---|\n| `@ai-sdk\u002F*` + `ai` in `package.json` | `skills\u002Fmem0-vercel-ai-sdk` | Integration is via `createMem0` provider wrapper, not raw `MemoryClient`. |\n| CLI-only repo (Typer, Commander, Click, Cobra) with no LLM call sites | `skills\u002Fmem0-cli` | Call sites are command handlers, not model wrappers. Consider whether mem0 actually fits first. |\n| Target is an MCP client \u002F editor config (Claude Code, Cursor, Codex settings) | `mem0-plugin` | Wire via MCP server URL + hooks; no SDK code usually needed. |\n| Any other Python or TS repo with an LLM call site | `skills\u002Fmem0` | Default SDK integration path. |\n\nRecord the delegated skill's raw URL in `plan.md` under a\n**\"Delegated skill:\"** field. The test writer in step 7 and the\nimplementation subagent in step 8 both read this field.\n\n## Preconditions\n\nRefuse to start unless ALL of the following are true:\n\n- Current working directory is inside a git repository with a clean index\n  (no uncommitted changes). Protects the user's work — every edit lands on\n  a feature branch, not on top of in-progress changes.\n- Repo has a detectable language (`package.json` \u002F `pyproject.toml` \u002F\n  `requirements.txt`). No language → exit cleanly with a written rationale.\n- Repo has a **backend**. Detected by: a `backend\u002F` or `server\u002F` or `api\u002F`\n  directory; a Python package with FastAPI\u002FFlask\u002FDjango\u002FStarlette; a Node\n  package with Express\u002FFastify\u002FKoa\u002FNestJS\u002FNext-API-routes; an agent-loop\n  framework (LangGraph, LangChain, LlamaIndex, Agno). Frontend-only repos\n  (pure React\u002FVue\u002FSvelte SPAs, static sites, mobile-only) → exit with\n  code 1 and a rationale. Mem0 is not installed client-side.\n- The user has already decided Mem0 fits this repo. This skill does NOT\n  survey the codebase to justify fit — bring a concrete goal. (Step 2\n  *does* read the repo to understand what it does and locate backend\n  integration surfaces; that is mechanics, not fit-justification.)\n\nExit with a written rationale if any precondition fails. Do not try to\n\"make it work anyway.\"\n\n## Pipeline\n\n### 1. Language detection\n\n| Signal | Track |\n|---|---|\n| `package.json` + TypeScript config | Node \u002F TypeScript |\n| `package.json` (no TS config) | Node \u002F JavaScript |\n| `pyproject.toml` or `requirements.txt` | Python |\n\nMonorepo with both → ask which subdirectory to operate in, then recurse.\n\n### 2. Repo comprehension — what does this repo do, and where is the backend?\n\nBefore any decision (product, goal, plan), understand the repo enough\nto locate *where in the backend* the integration belongs. This is not\nfit-surveying — the user already decided Mem0 fits. This is mechanics:\nyou cannot write a plan without knowing what files matter.\n\nRead, in order, with a token budget — do not scan the whole tree:\n\n1. `README.md` (root) + first-page of any `README_*.md` variants.\n2. `CONTRIBUTING.md` \u002F `AGENTS.md` \u002F `CLAUDE.md` at root if present —\n   these often spell out architecture and entry points.\n3. `package.json` \u002F `pyproject.toml` scripts + entry points.\n4. The layout of the top two directory levels (not recursive).\n5. Key config files: `docker-compose.yml`, `Dockerfile`, `Makefile`,\n   `langgraph.json`, `next.config.*`, `nuxt.config.*`.\n\nProduce `.mem0-integration\u002Frepo-summary.md`:\n\n    # Repo comprehension\n\n    **What this repo does:** \u003Cone paragraph in plain English. Who is\n    the end user? What does the app do for them? What LLM \u002F agent\n    behavior is central? Do not list dependencies — describe behavior.>\n\n    **Architecture at a glance:**\n      - Backend: \u003Cpath(s), framework, primary entry point>\n      - Frontend: \u003Cpath(s) if any, framework — for context only; no\n        integration here>\n      - Agent loop \u002F orchestration: \u003CLangGraph? custom? none?>\n      - Existing memory\u002Fsession\u002Fstate systems: \u003Cname them — these are\n        what step 6 Coexistence must preserve>\n\n    **Candidate backend integration surfaces** (ranked, best first):\n      1. `\u003Cbackend-file>:\u003Cline_range>` — \u003Cfunction> — \u003Cone-sentence\n         reason this is where write\u002Fread could slot in without\n         replacing anything existing>\n      2. ...\n      3. ...\n\n    **Not a fit here:** \u003Clist anything the skill considered but ruled\n    out — e.g., \"frontend chat component: client-side, excluded by\n    backend-only rule\"; \"existing memory subsystem X: would require\n    replacement, excluded by additive principle\">\n\n    **Sources read:** \u003Clist the files actually opened, with line counts,\n    so reviewers can verify coverage.>\n\nShow the user the rendered summary and ask: *\"Is this understanding\ncorrect? Which of the candidate surfaces (1, 2, 3 ...) should step 3\nforward target?\"*\n\nGate rules:\n\n- If no backend surface is found → exit code 1. The preconditions\n  should already have caught frontend-only repos; reaching this point\n  means a more subtle miss (e.g., the \"backend\" is actually just a\n  static build). Do not force a fit.\n- If every candidate surface would require replacing an existing\n  memory\u002Fsession system → exit code 1 with the \"additive principle\"\n  rationale. The user can manually point at a non-conflicting location\n  and re-run.\n- User corrections update `repo-summary.md` and re-confirm. Max 3\n  rounds; beyond that, exit code 1.\n\nThe user's chosen surface index is baked into `product.json` as\n`preferred_site` and referenced by steps 5 and 6.\n\n### 3. Product selection — Platform vs OSS (ask with a recommendation)\n\nRead the `## Identify the User's Setup` block in\n`https:\u002F\u002Fdocs.mem0.ai\u002Fllms.txt` for the Platform-first routing rules, then\napply the heuristics below. Ask, but never blank:\n\n- Other managed-service SDKs present (`@clerk\u002F*`, `stripe`, `@supabase\u002F*`,\n  `openai`, `@upstash\u002F*`, `posthog-*`) — 3+ → recommend **Platform**.\n- Local-infra signals (`docker-compose.yml` with postgres \u002F redis \u002F qdrant \u002F\n  neo4j, ollama configs, self-hosted auth) — 2+ → recommend **OSS**.\n- No strong signal → default recommendation: **Platform** (lower integration\n  cost; migration later is supported).\n\nExample:\n\n> I see `stripe`, `@clerk\u002Fnextjs`, and `@supabase\u002Fsupabase-js` — managed\n> services throughout. I recommend **Mem0 Platform** (4-line integration).\n> Override and use open source?\n\nBake the choice into the goal doc in step 5. Do not re-decide later.\n\n### 4. API key check (env-first, then ask)\n\n| Track | Key | Where to find |\n|---|---|---|\n| Platform | `MEM0_API_KEY` | https:\u002F\u002Fapp.mem0.ai |\n| OSS (default LLM) | `OPENAI_API_KEY` | https:\u002F\u002Fplatform.openai.com\u002Fapi-keys |\n\nIf present in env → continue.\nIf `MEM0_API_KEY` is missing AND the track is **Platform** → **default to Agent Mode**: run `mem0 init --agent --agent-caller \u003Cyour-name> --json` (after `pip install mem0-cli` or `npm install -g @mem0\u002Fcli`), substituting your agent identity (e.g. `claude-code`, `cursor`, `codex`). If you forgot to pass `--agent-caller`, run `mem0 identify \u003Cyour-name>` after init. Cache the key to `.env` (with user consent) and continue. Tell the user to claim later with `mem0 init --email \u003Ctheir-email>` — same key, no agent disruption.\nIf missing AND **CI mode** (`MEM0_INTEGRATE_CI=1`) → exit with code 2 and the name of the missing key.\n\nNever echo key values into `trace.jsonl`. Persist to `.env` only with\nexplicit user consent, and append `.env` to `.gitignore` if not already there.\n\nIf the user is on OSS and wants a non-OpenAI LLM, route them to the\n`components\u002Fllms\u002F*` docs and re-run this step with the chosen provider's key.\n\n### 5. Goal doc — the hard gate\n\nWrite `.mem0-integration\u002Fgoal.md` and **require user approval before step 6**.\n\nTemplate:\n\n    # Mem0 Integration Goal\n\n    **What gets stored:** \u003Cone sentence — user utterances? extracted\n    preferences? a specific domain fact like \"dietary restrictions\"?>\n\n    **When it gets retrieved:** \u003Cone sentence — on each user turn? before a\n    specific tool call? at session start?>\n\n    **Why:** \u003Cone sentence — the user-visible behavior change. \"Assistant\n    remembers previous orders across sessions,\" not \"we added memory.\">\n\n    **Product:** Platform | OSS  (locked from step 3, do not change)\n\n    **Delegated skill:** \u003Craw URL of the published skill being used\n    from \"Skill delegation rules\" above, or \"none — custom integration\n    against `skills\u002Fmem0`\">.\n\n    **Out of scope:** \u003Canything explicitly excluded: \"no graph memory,\"\n    \"no multimodal,\" \"no migration from existing store\">\n\nRules:\n\n- User must approve explicitly. If they edit the doc, reload and re-confirm.\n- `goal.md` is the contract the test suite is written against. Never\n  rewrite it after step 6 starts.\n- Max 3 rejection rounds. On the 4th, exit with code 3 and the rejection\n  notes — the integration is not well-specified enough to proceed.\n\n### 6. Integration plan — how and where (hard gate)\n\nGiven `goal.md` is \"what and why,\" this step produces \"where and how\" and\ngets explicit user sign-off before any code is written.\n\nThe skill does a **scoped** read of the repo (no wide survey):\n\n- Grep for the LLM call sites that match the goal (e.g., `openai.chat.`,\n  `anthropic.messages.`, `model.generateContent`, `ChatOpenAI`, `createLLM`).\n- Grep for the user-identity source (`req.user`, `session.user`, `auth()`,\n  `ctx.userId`, cookies).\n- Check `package.json` \u002F `pyproject.toml` \u002F `requirements.txt` for\n  conflicts (e.g., existing `mem0ai` at a different version).\n\nThen write `.mem0-integration\u002Fplan.md`:\n\n    # Mem0 Integration Plan\n\n    **Write pattern:** \u003Cone sentence — e.g., \"After each assistant reply,\n    call client.add([user_msg, assistant_msg], user_id=\u003Csource>).\">\n\n    **Read pattern:** \u003Cone sentence — e.g., \"Before building the LLM prompt,\n    call client.search(query=latest_user_msg, user_id=\u003Csource>, limit=5)\n    and inject results as a system message.\">\n\n    **User identifier source:** \u003Ccode path — e.g., `req.auth.userId`,\n    `session.user.email`, `ctx.params.user_id`. If none, ask the user.>\n\n    **Session scoping:**\n      - user_id: \u003Csource>\n      - agent_id: \u003Cstatic slug | null>\n      - run_id:   \u003Csource | null>\n\n    **Write call site:** `\u003Cfile:line_range>` — inside `\u003Cfunction>`\n    **Read call site:**  `\u003Cfile:line_range>` — inside `\u003Cfunction>`\n\n    **Dependencies to add:**\n      - `\u003Cpackage>@\u003Cversion pinned in frontmatter>`\n\n    **Preserved behavior:** \u003Clist the existing repo behaviors that must\n    keep working after this edit — e.g., \"existing OpenAI streaming still\n    works,\" \"existing Redis session store still used,\" \"existing tests\n    still pass unchanged.\">\n\n    **Coexistence:** \u003Cone bullet per existing system the integration sits\n    alongside. Name the files\u002Fclasses. Example: \"The existing\n    `agents\u002Fmemory\u002Fstorage.py` MemoryStorage class remains untouched and\n    keeps its LangGraph SummarizationEvent flow. Mem0 is added as a\n    parallel long-term-facts store, in a new file, invoked only when\n    MEM0_ENABLED=1 is set.\">\n\n    **Feature flag:** \u003Cthe exact mechanism and the default. Required.\n    Example: `env MEM0_ENABLED=1`, default unset \u002F off; `config.mem0.enabled`,\n    default false. With the flag in its default state, the repo must\n    behave exactly like `main`.>\n\n    **Sources consulted:** \u003Cminimum 2 URLs from \"Canonical sources\" above\n    that informed this plan. At least one `docs.mem0.ai` URL and one\n    delegated-skill URL. Cite the specific section or heading.>\n\n    **E2E recipe:** \u003Chow the verification skill should drive the app\n    end-to-end. Omit only if the repo is a pure library with no runnable\n    entry point — in which case the E2E step will skip with a warning.>\n\n        start:               \u003Cshell command to launch the app locally,\n                              using $PORT for any network port>\n        ready_probe:         \u003Cone of: url=\u003CURL> status=\u003Ccode>  \u002F\n                              log=\"\u003Csubstring to wait for>\"  \u002F\n                              sleep=\u003Cseconds, last resort>>\n        compose_services:    \u003Coptional: whitespace-separated service\n                              names in docker-compose.yml to start first;\n                              use label mem0-e2e: \"true\" to mark them>\n        write_call:          \u003Ccommand that triggers the Mem0 write path\n                              exactly once; ≤ 60s runtime>\n        write_async_wait_ms: \u003Cmilliseconds to wait after write_call for\n                              async memory flush; default 0>\n        read_call:           \u003Ccommand that triggers the Mem0 read path,\n                              typically a fresh session \u002F new request>\n        read_assert:         \u003Csubstring, regex, or jsonpath=\u003Cexpr>=\u003Cvalue>\n                              that MUST appear in read_call's output for\n                              the E2E to pass. Derived from goal.md's\n                              \"What gets stored.\">\n\n    **Rejected alternatives:** \u003Cbriefly, 1–2 bullets — patterns the skill\n    considered but did not pick, and why. Helps the user decide.>\n\nRules:\n\n- Show the user the proposed call sites with 10 lines of context around\n  each before asking for approval.\n- If the skill can't find a plausible call site for either write or read,\n  it exits with code 5 and asks the user to name the file(s) manually\n  (this is the \"no fit here\" signal — don't guess).\n- Max 3 rejection rounds on the plan. On the 4th, exit code 5 with the\n  last plan and the user's notes.\n- If the user edits `plan.md` by hand, reload and re-confirm.\n\n`plan.md` (not `goal.md`) is the contract the subagent implements against\nin step 8.\n\n### 7. Tests first (TDD)\n\nMain agent writes failing tests against `goal.md` in the repo's native\ntest framework:\n\n| Track | Default framework |\n|---|---|\n| Python | `pytest` |\n| TypeScript | `vitest` if detected, else `jest` |\n| JavaScript | same |\n\nTest assertion shapes must match the **canonical signatures**:\n\n- Platform method signatures: `https:\u002F\u002Fdocs.mem0.ai\u002Fopenapi.json`\n  (request body schemas for `\u002Fv1\u002Fmemories\u002F` and `\u002Fv1\u002Fmemories\u002Fsearch\u002F`).\n- OSS method signatures: the delegated skill named in `plan.md`\n  (fetched from its raw URL) or `skills\u002Fmem0\u002FSKILL.md` as the default.\n- Do not hand-roll request shapes. If the delegated skill has an\n  example block, lift it verbatim.\n\nMinimum two test files (paths taken from `plan.md` call sites):\n\n- `test_mem0_write.\u003Cext>` — asserts `add()` is called at the Write call\n  site with the right payload shape (Platform messages-array vs OSS string)\n  and the right `user_id` source.\n- `test_mem0_read.\u003Cext>` — asserts `search()` runs before the Read call\n  site and the result is wired into the LLM prompt \u002F response path.\n\nTests MUST be importable with `MEM0_API_KEY` unset. This is the design\npressure that forces step 8's lazy `MemoryClient()` \u002F `Memory()`\nconstruction — eager module-level init hits the API on import and\nbreaks pre-existing test collection when the key is missing.\n\nRun the tests. They **must fail**. If they pass before any implementation,\nthe tests are wrong — rewrite them.\n\n### 8. Implementation (subagent, fresh context)\n\nSpawn a subagent with:\n\n- **Inputs**: the repo, `goal.md`, `plan.md`, the two test files, and\n  direct URLs to: the delegated skill (from `plan.md`), the SDK source\n  (pinned per `mem0_tested_versions`), `https:\u002F\u002Fdocs.mem0.ai\u002Fllms.txt`,\n  and `https:\u002F\u002Fdocs.mem0.ai\u002Fopenapi.json`.\n- **No access** to main agent's reasoning trace or scratchpad.\n- **System prompt** (verbatim):\n\n      You are implementing a Mem0 integration for an existing repo.\n\n      Read these first:\n      - plan.md           (the mechanical contract)\n      - goal.md           (the intent — do not change it)\n      - the test files    (do not change them either)\n      - \u003Cdelegated skill raw URL from plan.md>\n      - https:\u002F\u002Fdocs.mem0.ai\u002Fllms.txt\n      - https:\u002F\u002Fdocs.mem0.ai\u002Fopenapi.json  (Platform only)\n\n      Constraints — all required, all enforced at review:\n\n      1. Touch only the files named in plan.md's call sites, or add\n         strictly new files.\n      2. Do not remove or rename any existing symbol. Do not change\n         any public signature.\n      3. Do not modify any existing test.\n      4. Gate every line of new Mem0 code behind the feature flag from\n         plan.md. With the flag in its default state, the repo must\n         behave exactly like `main` — byte-for-byte, including stdout\n         and return values.\n      5. Use only the \u003CPlatform | OSS> SDK surface. No new dependencies\n         beyond those listed under plan.md's \"Dependencies to add.\"\n      6. Preserve everything listed under plan.md's \"Preserved behavior\"\n         and \"Coexistence.\"\n      7. Lazy client construction. `MemoryClient()` validates the API\n         key in `__init__` (it makes a network call). Never instantiate\n         it at module-import time — construct on first use inside the\n         request \u002F handler path. The same rule applies to OSS `Memory()`,\n         which can eagerly initialize embedding and LLM providers. Use\n         a function-local singleton (`functools.lru_cache`, a module-level\n         `_client = None` + getter, or DI scope) — never a top-level\n         global. Eager init breaks the pre-existing test suite at\n         collection time whenever the key is missing or invalid, which\n         is a non-invasiveness violation.\n\n      Implement the plan to make the new tests pass while all\n      pre-existing tests continue to pass unchanged.\n\nSubagent returns a diff. Main agent reviews against `plan.md` (the\nmechanical contract) and `goal.md` (the intent):\n\n- Approved → apply the diff, commit.\n- Rejected → return with specific, actionable feedback (not \"try again\").\n- Max 3 review loops. Beyond that → exit code 4 with the last diff and\n  reviewer feedback.\n\n### 9. Commit + handoff\n\nCreate branch `mem0-integrate\u002F\u003Cshort-goal-slug>` and commit in\n**separate commits** so reviewers can cherry-pick:\n\n1. `mem0: add gated dependency` — just the `pyproject.toml` \u002F `package.json`\n   change.\n2. `mem0: add integration module` — the new file(s).\n3. `mem0: wire into \u003Ccall site>` — the call-site edit(s), still gated.\n4. `mem0: add tests` — the new test files.\n\nIf `--no-heal` is set → print `Run \u002Fmem0-test-integration to verify.`\nand exit. Otherwise proceed to step 10.\n\n### 10. Self-healing loop (default ON; disable with `--no-heal`)\n\nRun `\u002Fmem0-test-integration --ci` in a subprocess. If `scorecard.json`\nreports `overall: pass` → done, exit 0.\n\nOtherwise loop:\n\n1. **Categorize the failing check** from `scorecard.json`. Route per\n   category:\n   - `install` \u002F `static_checks` → dependency or import fix.\n   - `unit_tests` → wiring or assertion fix.\n   - `smoke_test` → API key or SDK call-shape fix.\n   - `e2e_test` → recipe, flag-wiring, or integration-point fix.\n   - **Pre-existing test failure (test skill exit code 7,\n     `non_invasive: false` in scorecard) → STOP.** This is a\n     non-invasiveness violation. Do NOT attempt to \"fix\" it (that\n     breaks principle 3). Exit code 6 with rationale.\n\n2. **Spawn a remediation subagent**, fresh context. Inputs:\n   `plan.md`, `goal.md`, `scorecard.md`, `scorecard.json`, the last\n   committed diff, and the relevant log file for the failing category\n   (`test-stdout.log` \u002F `smoke-stdout.log` \u002F `e2e-app.log` \u002F\n   `e2e-calls.log`).\n\n   System prompt (verbatim):\n\n       You are fixing a failing Mem0 integration test.\n\n       Non-negotiable constraints:\n       - Do not modify test files.\n       - Do not remove or rename any existing symbol or signature.\n       - Do not change pre-existing behavior. The feature flag from\n         plan.md must still default to OFF, and with the flag in its\n         default state the repo must behave exactly like main.\n       - Touch only the files named in plan.md's call sites, or add\n         strictly new files.\n       - Return the smallest possible diff that fixes the single\n         failing check listed in scorecard.md. No drive-by cleanup.\n\n3. **Apply the diff**; commit on the same branch with message\n   `mem0-heal: \u003Ccategory> attempt \u003CN>`. Do NOT amend earlier commits\n   (reviewers need the heal trail).\n\n4. **Re-run `\u002Fmem0-test-integration --ci`**. Outcomes:\n   - `overall: pass` → done, exit 0.\n   - Same check still failing → increment attempt counter; loop.\n   - A *different* check now failing → regression. Revert the heal\n     commit (`git revert HEAD --no-edit`), record the regression in\n     `.mem0-integration\u002Fheal-trace.md`, exit code 6.\n\n5. **Bounded iterations.** Default 3 attempts per failing category.\n   Override with `--heal-max N` (hard cap 10). On exhaustion, exit 6\n   with the full attempt trace: each diff, each scorecard, final log\n   tail.\n\n6. **Post-loop summary** written to `.mem0-integration\u002Fheal-trace.md`:\n   which category failed, how many attempts, each diff's intent, final\n   status, and — on success — the delta from initial scorecard to final.\n\n## Artifacts (all under `.mem0-integration\u002F`)\n\n| File | Purpose | Retention |\n|---|---|---|\n| `repo-summary.md` | Repo comprehension + candidate backend surfaces (step 2). | Keep across runs. |\n| `goal.md` | Approved intent. Never rewritten after step 6. | Keep across runs. |\n| `plan.md` | Approved mechanics (where, how, call sites, preserved behavior). | Keep across runs. |\n| `trace.jsonl` | Every tool call, decision, and subagent exchange this run. | Overwritten per run. |\n| `diff.patch` | The committed integration as a reviewable patch. | Overwritten per run. |\n| `heal-trace.md` | Per-attempt record of the self-healing loop (step 10). | Overwritten per run. |\n| `product.json` | `{\"product\": \"platform\"\\|\"oss\", \"language\": \"...\", \"mem0_version\": \"...\", \"write_site\": \"file:line\", \"read_site\": \"file:line\", \"feature_flag\": \"MEM0_ENABLED\"}` — consumed by the verification skill. | Overwritten per run. |\n\n`.mem0-integration\u002F` is added to `.gitignore` on first run. Nothing is\nwritten outside this directory and the repo's source tree.\n\n## Modes\n\n| Mode | Trigger | Behavior |\n|---|---|---|\n| Interactive (default) | TTY present, `MEM0_INTEGRATE_CI` unset | Asks for keys, confirms goal doc, shows recommendations. |\n| CI | `MEM0_INTEGRATE_CI=1` | Requires keys in env, requires `--product`, auto-approves goal doc from `goal.md` if present, fails fast otherwise. |\n\n## Invocation\n\n    \u002Fmem0-integrate                            # interactive, heal ON\n    \u002Fmem0-integrate --no-heal                  # stop after commit; manual verify\n    \u002Fmem0-integrate --heal-max 5               # cap heal attempts per category (default 3)\n    \u002Fmem0-integrate --product platform         # skip the product ask\n    \u002Fmem0-integrate --product oss\n    \u002Fmem0-integrate --ci                       # non-interactive (for test harness)\n\n## Exit codes\n\n| Code | Meaning |\n|---|---|\n| 0 | Success. Feature branch committed; verification skill ready to run. |\n| 1 | Precondition failed (dirty repo, no detectable language, etc.). |\n| 2 | Missing env key in CI mode. |\n| 3 | Goal doc rejected 3+ times — integration is not well-specified. |\n| 4 | Subagent review loop did not converge in 3 rounds. |\n| 5 | Integration plan rejected 3+ times, or no plausible additive call site found. |\n| 6 | Self-healing loop did not converge, detected a non-invasiveness violation, or a pre-existing test failed. |\n\n## Explicitly out of scope\n\n- Surveying the repo for fit points. Humans decide where Mem0 helps before\n  invoking this skill.\n- Replacing any existing memory \u002F session \u002F state system. Always additive\n  and feature-flagged; see \"Integration principles.\"\n- Modifying pre-existing tests, even to \"fix\" them under self-heal. Tests\n  that fail after integration with the flag unset are a non-invasiveness\n  violation, not a bug to patch.\n- Deciding Platform vs OSS silently. Always ask with a recommendation.\n- Switching branches, pushing, or opening PRs. Commits locally and stops\n  (or enters the heal loop, still local).\n- Data migration between stores. Point user at `migration\u002Foss-to-platform`\n  docs if they ask.\n- Provider selection beyond the default LLM for OSS. If they need a custom\n  LLM \u002F embedder \u002F vector store, route to `components\u002F*` docs and re-run\n  step 4 with the new key.\n",{"name":5,"license":14,"metadata":24,"description":30},{"tags":25,"author":26,"version":27,"category":28,"mem0_tested_versions":29},"memory, integration, tdd, platform, oss","mem0ai","0.1.0","ai-memory","mem0ai (PyPI) >=2.0.0,\u003C3.0.0; mem0ai (npm) >=3.0.0,\u003C4.0.0","Integrate Mem0 into an existing repository using a goal-driven, TDD pipeline. Detects the repo's language automatically and asks the user to pick between Mem0 Platform (managed) and Mem0 Open Source (self-hosted). Writes failing tests before any implementation. Produces a local feature branch plus `.mem0-integration\u002F` artifacts consumed by the paired verification skill. TRIGGER when: user says \"integrate mem0\", \"add mem0 to this repo\", \"wire mem0 into \u003Crepo>\", or asks how to add memory to an existing project. DO NOT TRIGGER when: the user wants general SDK usage (use skill:mem0), CLI usage (use skill:mem0-cli), or Vercel AI SDK (use skill:mem0-vercel-ai-sdk). After success, invoke skill:mem0-test-integration to verify in the same workspace (loose coupling).\n","main","e0ec177d00f087cb04e90206b2f7d3aa2f5a1350","References\u002FAgent\u002FMemory\u002Fmem0\u002Fskills\u002Fmem0-integrate","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim","https:\u002F\u002Fgithub.com\u002Flzy18001500226","2026-08-31 23:29:00",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add lzy18001500226\u002FMoSim --skill mem0-integrate",{"tool":43,"command":44},"bunx","bunx skills add lzy18001500226\u002FMoSim --skill mem0-integrate",{"tool":46,"command":47},"pnpm","pnpm dlx skills add lzy18001500226\u002FMoSim --skill mem0-integrate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FMemory\u002Fmem0\u002Fskills\u002Fmem0-integrate\u002FSKILL.md",true,[51,55],{"path":52,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":15},"LICENSE","许可证",10705,{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"README.md","REFERENCE","参考文档",3551,"https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FMemory\u002Fmem0\u002Fskills\u002Fmem0-integrate\u002FREADME.md",[62,71,79,87,95,103],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":66,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M78RK6JGRPTD3TDSMTQWDQ9P","skill-installer","Install Codex skills into $CODEX_HOME\u002Fskills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fskill-installer\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fskill-installer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":75,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":70},"01M78RK29KVRDQXSMVZX1GQTJN","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fskill-creator\u002Flicense.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fskill-creator\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":83,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":70},"01M78RJPF3210Y5DA9VJ6JMMG6","openai-docs","Use for Codex models\u002Fpricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or 'this coding agent' when they refer to Codex—and for OpenAI APIs\u002Fproducts and ChatGPT Work. Also use for model choice\u002Fmigration, prompting, SDKs, Responses, Realtime, agents, evals, and Chat\u002FWork\u002FCodex comparisons. Do not use for generic app\u002Fsoftware tasks that merely mention Codex.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fopenai-docs\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fopenai-docs\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":70},"01M78RJH7X67C5AY8ZVS7RQNWJ","imagegen","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fimagegen\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fimagegen\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":99,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":70},"01M78RBBAYMJ6T3ZMAYHCFM6G7","skill-creator-cc","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FWorkflow\u002Fokwinds\u002Fmiscellany\u002Fagent\u002Fskills\u002Fskill-creator-cc\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FWorkflow\u002Fokwinds\u002Fmiscellany\u002Fagent\u002Fskills\u002Fskill-creator-cc\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":107,"licenseFileUrl":108,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":112},"01M76VV9V2R9FZTVGMJZV7Y996","prd-writing-guide","Write complete, unambiguous PRDs that development teams can implement without guesswork. Includes requirement discovery framework, structured documentation methodology, completeness checklists, and common pitfall avoidance. Use when: writing new PRDs, reviewing PRD drafts, validating requirement completeness, preparing for engineering handoff. Triggers: 'write PRD', '写PRD', '产品需求文档', '需求文档', '需求规格', '需求评审', '完善需求', 'create requirements doc', 'product requirements', 'feature spec', 'requirements document'. Anti-triggers: 'technical design doc', 'architecture design', 'implementation plan', 'API design', '架构设计', '技术方案', '实现方案', '接口设计'.","MIT","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FWorkflow\u002Fokwinds\u002Fmiscellany\u002Fagent\u002Fskills\u002Fprd-writing-guide\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FWorkflow\u002Fokwinds\u002Fmiscellany\u002Fagent\u002Fskills\u002Fprd-writing-guide\u002FSKILL.md",[],[],"2026-11-12 13:55:43"]