[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C279X4CZE3S6N2AS1H50AS":3,"skill-same:01M6C279X4CZE3S6N2AS1H50AS":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":13,"ownerHtmlUrl":59,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":60,"install":61,"resources":74},"01M6C279X4CZE3S6N2AS1H50AS","learn","经验教训捕获与知识沉淀","Capture durable learnings from failures, corrections, repeated mistakes, successful recovery patterns, or direct \u002Flearn requests. Use whenever the user invokes \u002Flearn, asks to save\u002Fremember\u002Fcapture a lesson, or when a workflow failure should become reusable process knowledge. Always persist to Claude memory, optional mem0, the roadmap log (ROADMAP_DIR), beads, and wiki-ingest (WIKI_ROOT).","从失败、纠正、重复错误、成功恢复模式或直接的 \u002Flearn 请求中捕获持久化经验教训。当用户调用 \u002Flearn、要求保存\u002F记住\u002F记录一条经验，或某次工作流失败应转化为可复用的流程知识时使用。始终持久化到 Claude memory、可选的 mem0、roadmap 日志（ROADMAP_DIR）、beads 以及 wiki-ingest（WIKI_ROOT）。","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX",null,"01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Flearn\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BRFRAYBCBW9WKDY9TCSHY3","知识管理与沉淀","SCENARIO","使用场景",[5,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"mistakes","persist","claude memory","requests","log","learnings","reusable","when","roadmap","ingest","lesson","recovery","beads","workflow","use","wiki","knowledge","memory","remember","2026-11-10 10:12:30",false,"---\nname: learn\ndescription: Capture durable learnings from failures, corrections, repeated mistakes, successful recovery patterns, or direct \u002Flearn requests. Use whenever the user invokes \u002Flearn, asks to save\u002Fremember\u002Fcapture a lesson, or when a workflow failure should become reusable process knowledge. Always persist to Claude memory, optional mem0, the roadmap log (ROADMAP_DIR), beads, and wiki-ingest (WIKI_ROOT).\n---\n\n# Learn\n\nUse this skill to turn a concrete lesson into durable, discoverable artifacts. Do\nnot stop at a chat summary. A complete learning capture writes the file-backed\nrecords that future agents and reviewers will actually find.\n\n## Required outputs\n\nEvery confirmed learning must produce or update all of these:\n\n1. Claude auto-memory under `~\u002F.claude\u002Fprojects\u002F\u003Cproject-key>\u002Fmemory\u002F`.\n2. Optional mem0 save when the configured helper and mem0 package are available (see step 3 gates).\n3. Monthly roadmap log at `${ROADMAP_DIR:-$HOME\u002Froadmap}\u002Flearnings-YYYY-MM.md` (skip and report when that directory is absent).\n4. A closed or referenced bead in `.beads\u002Fissues.jsonl` when the current repo has beads.\n5. LLM wiki ingest under the configured wiki (resolved following `wiki-ingest`'s exact 4-step order: `--wiki \u003Cpath>` override if passed, `.wiki-default` in repo root, `~\u002F.wiki-default` in home, or `$WIKI_ROOT\u002Fwiki`; report \"WIKI_ROOT not configured\" and skip when no wiki is configured): raw source copy, source page, index entry, log entry, and relevant concept\u002Fentity updates.\n\nIf a persistence target is unavailable, report the exact blocker and continue\nwith the remaining targets. Do not silently skip wiki ingest.\n\n## Workflow\n\n### 1. Extract the learning\n\n- If the user supplied a lesson, use it as the source.\n- If the user invoked `\u002Flearn` without specifics, inspect the recent\n  conversation and extract the most actionable failure, correction, or pattern.\n- Classify it as `Critical`, `Mandatory`, `Best Practice`, or `Anti-Pattern`.\n- Prefer precise references: PR URLs, commit SHAs, file paths, commands, error\n  strings, artifacts, and verification results.\n- Search existing local records before writing:\n  - `~\u002F.claude\u002Fprojects\u002F**\u002Fmemory`\n  - `${ROADMAP_DIR:-$HOME\u002Froadmap}\u002Flearnings-*.md`\n  - `.beads\u002Fissues.jsonl`\n  - `$WIKI_ROOT\u002Fwiki\u002Findex.md` and relevant `concepts\u002F` pages (when configured)\n\n### 1a. Fix vs. Document decision (apply BEFORE writing the memory entry)\n\nWorkarounds-as-memory are NOT a complete resolution when a small fix is possible. Apply the fix-on-discovery rule from `~\u002F.claude\u002FCLAUDE.md`:\n\n| Bug class | Action |\n|---|---|\n| User-managed config (yaml\u002Fplist\u002Fdotfile) + fix \u003C 10 lines + currently blocking | **FIX IT NOW**, then write memory entry that *references the fix* (commit SHA, diff, or `\u003Cconfig-file>:line`). Memory body must say \"FIX: \u003Cwhat> at \u003Cwhere> on \u003Cdate>\" — not just \"workaround: ...\" |\n| User's published code in a separate PR scope (separate repo, separate concern) | Document workaround; open a dedicated fix PR; memory links the fix PR |\n| Third-party code (provider outage, npm package, OS-level) | Workaround only — no fix possible from here. Memory describes the trigger conditions and the recovery path |\n| Agent-orchestrator core code in same repo | Fix in same PR per project CLAUDE.md; memory captures the *pattern* (e.g. \"configKey\u002Fname\u002Fpath mismatch must be validated at write-time\") so the fix is durable |\n| Documentation, test, tooling, scripts | Document; no fix required |\n\nIf you find yourself writing \"workaround: ...\" without a corresponding fix, re-read the table. The most common mistake is treating a 1-line config fix as \"out of scope\" — that is exactly the class this rule targets.\n\n### 2. Write Claude auto-memory\n\n**Determine memory type from classification**: Critical\u002FMandatory rules → `feedback`;\narchitecture or design decisions → `project`; best practices → `feedback`; durable\nexternal facts or documentation-style lookups → `reference`.\n\nUse the current git root to derive the project memory path:\n\n```text\nproject_key = git_root.replace(\"\u002F\", \"-\")\nmemory_dir = ~\u002F.claude\u002Fprojects\u002F\u003Cproject_key>\u002Fmemory\u002F\n```\n\nCreate or update:\n\n- `\u003Ctype>_YYYY-MM-DD_\u003Cslug>.md`\n- `MEMORY.md`\n\n**Never let a write failure (permissions, disk) block learning capture.** If the\nwrite fails, log a warning and continue to the remaining persistence targets.\n\nThe memory file must include frontmatter:\n\n```yaml\n---\nname: \u003Clearning title>\ndescription: \u003Cone-line summary>\ntype: feedback|project|reference\nbead: \u003Cbead id or none>\n---\n```\n\nThe body must include context, technical detail, solution or rule, verification,\nreferences, and a reusable pattern.\n\n### 3. Save to mem0 when available\n\nSave a concise text record only when a configured helper and the **mem0 Python\npackage** are present. **Do NOT probe `OPENAI_API_KEY` \u002F `MEM0_API_KEY`** — those\nwere the pre-Ollama-era gates; mem0 now uses local Ollama embedder + Groq LLM\n(configured in `$MEM0_HOOKS_DIR\u002Fmem0_config.py`), neither of which\nrequire `OPENAI_API_KEY`. The real availability gates are:\n\n1. `python3 -c \"from mem0 import Memory\"` resolves (requires `mem0ai` PyPI pkg).\n2. The helper script exists:\n   - `$MEM0_HOOKS_DIR\u002Fmem0_save.py` (machine-local hooks dir; unset means skip mem0), OR\n   - `$(git rev-parse --show-toplevel)\u002F.claude\u002Fhooks\u002Fmem0_save.py` (repo-local fallback)\n3. `mem0_config.py` exists next to that helper and its `mem0_hooks_enabled()` returns `True`\n   (this is the helper's own gate — it inspects `OPENAI_API_KEY`, `GROQ_API_KEY`,\n   `OLLAMA_HOST`, etc., not what we hard-code here).\n\n**Verification step (mandatory before reporting \"mem0 unavailable\"):** Run the\nexisting read-only health check. Do not manufacture a learning message or require a\nQdrant\u002Fmarkdown write merely to test availability:\n\n```bash\n\"${MEM0_PYTHON:-python3}\" - \u003C\u003C'EOF'\nimport os, subprocess, sys\nfrom pathlib import Path\ntry:\n    from mem0 import Memory  # noqa: F401\nexcept ImportError as e:\n    raise AssertionError(f\"mem0 package missing: {e}\")\nhooks_env = os.environ.get(\"MEM0_HOOKS_DIR\", \"\")\nhooks = Path(hooks_env) if hooks_env else None\nhelpers = [hooks \u002F \"mem0_save.py\"] if hooks else []\nif not any(h.is_file() for h in helpers):\n    result = subprocess.run(\n        [\"git\", \"rev-parse\", \"--show-toplevel\"],\n        capture_output=True, text=True, timeout=10,\n    )\n    if result.returncode == 0:\n        helpers.append(Path(result.stdout.strip()) \u002F \".claude\u002Fhooks\u002Fmem0_save.py\")\nfound = [h for h in helpers if h.is_file()]\nassert found, f\"mem0_save.py missing (MEM0_HOOKS_DIR not configured?): {helpers}\"\nhooks = found[0].parent\nassert (hooks \u002F \"mem0_config.py\").is_file(), f\"mem0_config.py missing: {hooks}\"\nsys.path.insert(0, str(hooks))\nimport mem0_config\nassert mem0_config.mem0_hooks_enabled(), \"mem0_hooks_enabled() is False\"\nprint(\"mem0 available\")\nEOF\n```\n\nThis checks all three gates above (the real `Memory` import, either helper\npath, and the helper's own `mem0_hooks_enabled()` — asserting `mem0_config.py`\nexists first so a missing hooks dir yields an assertion, not a traceback),\nnever writes anything, and prints the failing assertion. If it fails report `mem0 unavailable: \u003Cexact assertion\nmessage>`; otherwise report `mem0 available` and save only the actual learning.\n**Never block learning capture on a mem0 error** — it is an optional target;\ncontinue to the remaining persistence steps regardless of outcome.\n\nReference incident: 2026-06-24 — old SKILL.md probed `OPENAI_API_KEY` and\nfalsely reported \"mem0 unavailable\" for ~2 months after the Ollama\u002FGroq switch\nin PR #7178 \u002F bead `rev-1cmaj` (2026-05-24).\n\n### 4. Append the roadmap learning log\n\nAppend to `${ROADMAP_DIR:-$HOME\u002Froadmap}\u002Flearnings-YYYY-MM.md` (if the directory is absent, report it and skip):\n\n```markdown\n## YYYY-MM-DD - \u003Clearning title>\n\n- **Type**: feedback|project|reference\n- **Classification**: Critical|Mandatory|Best Practice|Anti-Pattern\n- **Summary**: \u003Cone-line summary>\n- **Bead**: \u003Cbead id or none>\n- **Files**: \u003Cpaths created or updated>\n- **References**: \u003CPRs, commits, artifact links, commands>\n```\n\n### 5. Create or reference a bead\n\nIf `.beads\u002Fissues.jsonl` exists:\n\n- Reuse a matching learning bead when one already exists.\n- Otherwise create a closed task bead with labels including `learning` and\n  `documentation`.\n- Use the repository's normal bead id prefix when possible: follow the prefix\n  existing beads use (for example `rev-`) via `br create ... --type task --priority 3`\n  rather than inventing a `bd-` id.\n- Record the bead id in the Claude memory frontmatter and roadmap entry.\n\nIf beads are unavailable, write `none` and report why.\n\n### 6. Always wiki-ingest using the calling CLI\n\nWiki ingest is mandatory for `\u002Flearn`. Use the Claude memory file (preferred)\nor the roadmap entry as the source document. Read the canonical `wiki-ingest`\nskill and execute its full procedure with the calling CLI's own inference and\ntools. If the runtime provides a native skill invocation, it may use that; a\nClaude-specific Skill tool or a second CLI is never a prerequisite. Writes\nperformed as part of the complete wiki-ingest procedure are authorized; do\nnot substitute a partial copy that skips entity\u002Fconcept extraction or validation.\n\nResolve the wiki destination once for both ingestion and verification, following the exact `wiki-ingest` order (`--wiki \u003Cpath>` \u002F `$WIKI_OVERRIDE` first, then `.wiki-default` in repo root, then `~\u002F.wiki-default`, then `$WIKI_ROOT\u002Fwiki`):\n\n```bash\n# Resolve destination once for both ingestion and verification:\nif [ -n \"${WIKI_OVERRIDE:-}\" ]; then\n  WIKI=\"$WIKI_OVERRIDE\"\nelif [ -f \".wiki-default\" ]; then\n  WIKI=$(cat .wiki-default)\nelif [ -f \"$HOME\u002F.wiki-default\" ]; then\n  WIKI=$(cat \"$HOME\u002F.wiki-default\")\nelif [ -n \"${WIKI_ROOT:-}\" ]; then\n  WIKI=\"$WIKI_ROOT\u002Fwiki\"\nelse\n  echo \"WIKI_ROOT not configured — skipping wiki ingest and verification\"\n  return 0 2>\u002Fdev\u002Fnull || exit 0\nfi\n\n# Gate verification assertions directly against the resolved $WIKI:\nif [ -n \"${WIKI:-}\" ] && [ -d \"$WIKI\" ]; then\n  WIKI_ROOT=$(dirname \"$WIKI\")\n  RAW_DIR=\"$WIKI_ROOT\u002Fraw\"\n\n  # Verify raw source copy, canonical source page, index, log, and clean git commit recording the ingested source page:\n  ( { test -f \"$RAW_DIR\u002F\u003Cbasename>\" 2>\u002Fdev\u002Fnull || test -f \"$WIKI\u002Fraw\u002F\u003Cbasename>\"; } && \\\n    test -f \"$WIKI\u002Fsources\u002F\u003Cslug>.md\" && \\\n    grep -q -F \"\u003Cslug>\" \"$WIKI\u002Findex.md\" && \\\n    tail -20 \"$WIKI\u002Flog.md\" | grep -q \"\u003Ctitle>\" && \\\n    test -z \"$(git -C \"$WIKI\" status --porcelain)\" && \\\n    git -C \"$WIKI\" log -n 1 --oneline -- \"sources\u002F\u003Cslug>.md\" | grep -q . ) || \\\n    { echo \"ERROR: wiki ingest verification failed\" >&2; exit 1; }\nfi\n```\n\nAfter execution, verify the required side effects using the exact resolved destination `$WIKI` (and sibling `$RAW_DIR`):\n\n- `\"$RAW_DIR\u002F\u003Cbasename>\"` (or `\"$WIKI\u002Fraw\u002F\u003Cbasename>\"`) exists\n- `\"$WIKI\u002Fsources\u002F\u003Cslug>.md\"` exists with the canonical frontmatter\n  (`title`, `type`, `tags`, `sources`, `last_updated`) and `[[wikilinks]]`\n- `\"$WIKI\u002Findex.md\"` was updated under `## Sources` (verify with `grep -F \"\u003Cslug>\" \"$WIKI\u002Findex.md\"`)\n- `\"$WIKI\u002Flog.md\"` was appended with `## [YYYY-MM-DD] ingest | \u003Ctitle>` (verify with `tail -20 \"$WIKI\u002Flog.md\"`)\n- Git commit created on publish branch (verify with `test -z \"$(git -C \"$WIKI\" status --porcelain)\" && git -C \"$WIKI\" log -n 1 --oneline -- \"sources\u002F\u003Cslug>.md\" | grep -q .`)\n- Relevant entity\u002Fconcept updates exist and the wiki's link lint passes.\n\nIf the full procedure cannot be completed, report the exact missing step and\ncontinue independent persistence; never present a partial ingest as complete.\n\n**No exceptions for \"the learning seems not wiki-bearing.\"** The learning\nitself is the source. The skill's classifier decides what is wiki-bearing.\n\n**Working-directory caveat**: if the current session cwd is not\nthe resolved `$WIKI_ROOT` (e.g. an `\u002Fintegrate` flow running in a feature worktree),\nresolve the source by its absolute path and pass an explicit `--wiki \"$WIKI\"` path\n(setting `WIKI_OVERRIDE=\"$WIKI\"`) so the destination does not depend on a current-directory override.\n\n### 7. Validate and report\n\nBefore reporting complete:\n\n- Verify files exist for each persistence target that was available.\n- Validate `.beads\u002Fissues.jsonl` parses when modified.\n- Check duplicate bead ids when a bead was created manually.\n- Run a whitespace check for repo changes when applicable.\n\nFinal report must name the created\u002Fupdated paths and any skipped persistence\ntarget with its reason.\n","# Learn\n\nUse this skill to turn a concrete lesson into durable, discoverable artifacts. Do\nnot stop at a chat summary. A complete learning capture writes the file-backed\nrecords that future agents and reviewers will actually find.\n\n## Required outputs\n\nEvery confirmed learning must produce or update all of these:\n\n1. Claude auto-memory under `~\u002F.claude\u002Fprojects\u002F\u003Cproject-key>\u002Fmemory\u002F`.\n2. Optional mem0 save when the configured helper and mem0 package are available (see step 3 gates).\n3. Monthly roadmap log at `${ROADMAP_DIR:-$HOME\u002Froadmap}\u002Flearnings-YYYY-MM.md` (skip and report when that directory is absent).\n4. A closed or referenced bead in `.beads\u002Fissues.jsonl` when the current repo has beads.\n5. LLM wiki ingest under the configured wiki (resolved following `wiki-ingest`'s exact 4-step order: `--wiki \u003Cpath>` override if passed, `.wiki-default` in repo root, `~\u002F.wiki-default` in home, or `$WIKI_ROOT\u002Fwiki`; report \"WIKI_ROOT not configured\" and skip when no wiki is configured): raw source copy, source page, index entry, log entry, and relevant concept\u002Fentity updates.\n\nIf a persistence target is unavailable, report the exact blocker and continue\nwith the remaining targets. Do not silently skip wiki ingest.\n\n## Workflow\n\n### 1. Extract the learning\n\n- If the user supplied a lesson, use it as the source.\n- If the user invoked `\u002Flearn` without specifics, inspect the recent\n  conversation and extract the most actionable failure, correction, or pattern.\n- Classify it as `Critical`, `Mandatory`, `Best Practice`, or `Anti-Pattern`.\n- Prefer precise references: PR URLs, commit SHAs, file paths, commands, error\n  strings, artifacts, and verification results.\n- Search existing local records before writing:\n  - `~\u002F.claude\u002Fprojects\u002F**\u002Fmemory`\n  - `${ROADMAP_DIR:-$HOME\u002Froadmap}\u002Flearnings-*.md`\n  - `.beads\u002Fissues.jsonl`\n  - `$WIKI_ROOT\u002Fwiki\u002Findex.md` and relevant `concepts\u002F` pages (when configured)\n\n### 1a. Fix vs. Document decision (apply BEFORE writing the memory entry)\n\nWorkarounds-as-memory are NOT a complete resolution when a small fix is possible. Apply the fix-on-discovery rule from `~\u002F.claude\u002FCLAUDE.md`:\n\n| Bug class | Action |\n|---|---|\n| User-managed config (yaml\u002Fplist\u002Fdotfile) + fix \u003C 10 lines + currently blocking | **FIX IT NOW**, then write memory entry that *references the fix* (commit SHA, diff, or `\u003Cconfig-file>:line`). Memory body must say \"FIX: \u003Cwhat> at \u003Cwhere> on \u003Cdate>\" — not just \"workaround: ...\" |\n| User's published code in a separate PR scope (separate repo, separate concern) | Document workaround; open a dedicated fix PR; memory links the fix PR |\n| Third-party code (provider outage, npm package, OS-level) | Workaround only — no fix possible from here. Memory describes the trigger conditions and the recovery path |\n| Agent-orchestrator core code in same repo | Fix in same PR per project CLAUDE.md; memory captures the *pattern* (e.g. \"configKey\u002Fname\u002Fpath mismatch must be validated at write-time\") so the fix is durable |\n| Documentation, test, tooling, scripts | Document; no fix required |\n\nIf you find yourself writing \"workaround: ...\" without a corresponding fix, re-read the table. The most common mistake is treating a 1-line config fix as \"out of scope\" — that is exactly the class this rule targets.\n\n### 2. Write Claude auto-memory\n\n**Determine memory type from classification**: Critical\u002FMandatory rules → `feedback`;\narchitecture or design decisions → `project`; best practices → `feedback`; durable\nexternal facts or documentation-style lookups → `reference`.\n\nUse the current git root to derive the project memory path:\n\n```text\nproject_key = git_root.replace(\"\u002F\", \"-\")\nmemory_dir = ~\u002F.claude\u002Fprojects\u002F\u003Cproject_key>\u002Fmemory\u002F\n```\n\nCreate or update:\n\n- `\u003Ctype>_YYYY-MM-DD_\u003Cslug>.md`\n- `MEMORY.md`\n\n**Never let a write failure (permissions, disk) block learning capture.** If the\nwrite fails, log a warning and continue to the remaining persistence targets.\n\nThe memory file must include frontmatter:\n\n```yaml\n---\nname: \u003Clearning title>\ndescription: \u003Cone-line summary>\ntype: feedback|project|reference\nbead: \u003Cbead id or none>\n---\n```\n\nThe body must include context, technical detail, solution or rule, verification,\nreferences, and a reusable pattern.\n\n### 3. Save to mem0 when available\n\nSave a concise text record only when a configured helper and the **mem0 Python\npackage** are present. **Do NOT probe `OPENAI_API_KEY` \u002F `MEM0_API_KEY`** — those\nwere the pre-Ollama-era gates; mem0 now uses local Ollama embedder + Groq LLM\n(configured in `$MEM0_HOOKS_DIR\u002Fmem0_config.py`), neither of which\nrequire `OPENAI_API_KEY`. The real availability gates are:\n\n1. `python3 -c \"from mem0 import Memory\"` resolves (requires `mem0ai` PyPI pkg).\n2. The helper script exists:\n   - `$MEM0_HOOKS_DIR\u002Fmem0_save.py` (machine-local hooks dir; unset means skip mem0), OR\n   - `$(git rev-parse --show-toplevel)\u002F.claude\u002Fhooks\u002Fmem0_save.py` (repo-local fallback)\n3. `mem0_config.py` exists next to that helper and its `mem0_hooks_enabled()` returns `True`\n   (this is the helper's own gate — it inspects `OPENAI_API_KEY`, `GROQ_API_KEY`,\n   `OLLAMA_HOST`, etc., not what we hard-code here).\n\n**Verification step (mandatory before reporting \"mem0 unavailable\"):** Run the\nexisting read-only health check. Do not manufacture a learning message or require a\nQdrant\u002Fmarkdown write merely to test availability:\n\n```bash\n\"${MEM0_PYTHON:-python3}\" - \u003C\u003C'EOF'\nimport os, subprocess, sys\nfrom pathlib import Path\ntry:\n    from mem0 import Memory  # noqa: F401\nexcept ImportError as e:\n    raise AssertionError(f\"mem0 package missing: {e}\")\nhooks_env = os.environ.get(\"MEM0_HOOKS_DIR\", \"\")\nhooks = Path(hooks_env) if hooks_env else None\nhelpers = [hooks \u002F \"mem0_save.py\"] if hooks else []\nif not any(h.is_file() for h in helpers):\n    result = subprocess.run(\n        [\"git\", \"rev-parse\", \"--show-toplevel\"],\n        capture_output=True, text=True, timeout=10,\n    )\n    if result.returncode == 0:\n        helpers.append(Path(result.stdout.strip()) \u002F \".claude\u002Fhooks\u002Fmem0_save.py\")\nfound = [h for h in helpers if h.is_file()]\nassert found, f\"mem0_save.py missing (MEM0_HOOKS_DIR not configured?): {helpers}\"\nhooks = found[0].parent\nassert (hooks \u002F \"mem0_config.py\").is_file(), f\"mem0_config.py missing: {hooks}\"\nsys.path.insert(0, str(hooks))\nimport mem0_config\nassert mem0_config.mem0_hooks_enabled(), \"mem0_hooks_enabled() is False\"\nprint(\"mem0 available\")\nEOF\n```\n\nThis checks all three gates above (the real `Memory` import, either helper\npath, and the helper's own `mem0_hooks_enabled()` — asserting `mem0_config.py`\nexists first so a missing hooks dir yields an assertion, not a traceback),\nnever writes anything, and prints the failing assertion. If it fails report `mem0 unavailable: \u003Cexact assertion\nmessage>`; otherwise report `mem0 available` and save only the actual learning.\n**Never block learning capture on a mem0 error** — it is an optional target;\ncontinue to the remaining persistence steps regardless of outcome.\n\nReference incident: 2026-06-24 — old SKILL.md probed `OPENAI_API_KEY` and\nfalsely reported \"mem0 unavailable\" for ~2 months after the Ollama\u002FGroq switch\nin PR #7178 \u002F bead `rev-1cmaj` (2026-05-24).\n\n### 4. Append the roadmap learning log\n\nAppend to `${ROADMAP_DIR:-$HOME\u002Froadmap}\u002Flearnings-YYYY-MM.md` (if the directory is absent, report it and skip):\n\n```markdown\n## YYYY-MM-DD - \u003Clearning title>\n\n- **Type**: feedback|project|reference\n- **Classification**: Critical|Mandatory|Best Practice|Anti-Pattern\n- **Summary**: \u003Cone-line summary>\n- **Bead**: \u003Cbead id or none>\n- **Files**: \u003Cpaths created or updated>\n- **References**: \u003CPRs, commits, artifact links, commands>\n```\n\n### 5. Create or reference a bead\n\nIf `.beads\u002Fissues.jsonl` exists:\n\n- Reuse a matching learning bead when one already exists.\n- Otherwise create a closed task bead with labels including `learning` and\n  `documentation`.\n- Use the repository's normal bead id prefix when possible: follow the prefix\n  existing beads use (for example `rev-`) via `br create ... --type task --priority 3`\n  rather than inventing a `bd-` id.\n- Record the bead id in the Claude memory frontmatter and roadmap entry.\n\nIf beads are unavailable, write `none` and report why.\n\n### 6. Always wiki-ingest using the calling CLI\n\nWiki ingest is mandatory for `\u002Flearn`. Use the Claude memory file (preferred)\nor the roadmap entry as the source document. Read the canonical `wiki-ingest`\nskill and execute its full procedure with the calling CLI's own inference and\ntools. If the runtime provides a native skill invocation, it may use that; a\nClaude-specific Skill tool or a second CLI is never a prerequisite. Writes\nperformed as part of the complete wiki-ingest procedure are authorized; do\nnot substitute a partial copy that skips entity\u002Fconcept extraction or validation.\n\nResolve the wiki destination once for both ingestion and verification, following the exact `wiki-ingest` order (`--wiki \u003Cpath>` \u002F `$WIKI_OVERRIDE` first, then `.wiki-default` in repo root, then `~\u002F.wiki-default`, then `$WIKI_ROOT\u002Fwiki`):\n\n```bash\n# Resolve destination once for both ingestion and verification:\nif [ -n \"${WIKI_OVERRIDE:-}\" ]; then\n  WIKI=\"$WIKI_OVERRIDE\"\nelif [ -f \".wiki-default\" ]; then\n  WIKI=$(cat .wiki-default)\nelif [ -f \"$HOME\u002F.wiki-default\" ]; then\n  WIKI=$(cat \"$HOME\u002F.wiki-default\")\nelif [ -n \"${WIKI_ROOT:-}\" ]; then\n  WIKI=\"$WIKI_ROOT\u002Fwiki\"\nelse\n  echo \"WIKI_ROOT not configured — skipping wiki ingest and verification\"\n  return 0 2>\u002Fdev\u002Fnull || exit 0\nfi\n\n# Gate verification assertions directly against the resolved $WIKI:\nif [ -n \"${WIKI:-}\" ] && [ -d \"$WIKI\" ]; then\n  WIKI_ROOT=$(dirname \"$WIKI\")\n  RAW_DIR=\"$WIKI_ROOT\u002Fraw\"\n\n  # Verify raw source copy, canonical source page, index, log, and clean git commit recording the ingested source page:\n  ( { test -f \"$RAW_DIR\u002F\u003Cbasename>\" 2>\u002Fdev\u002Fnull || test -f \"$WIKI\u002Fraw\u002F\u003Cbasename>\"; } && \\\n    test -f \"$WIKI\u002Fsources\u002F\u003Cslug>.md\" && \\\n    grep -q -F \"\u003Cslug>\" \"$WIKI\u002Findex.md\" && \\\n    tail -20 \"$WIKI\u002Flog.md\" | grep -q \"\u003Ctitle>\" && \\\n    test -z \"$(git -C \"$WIKI\" status --porcelain)\" && \\\n    git -C \"$WIKI\" log -n 1 --oneline -- \"sources\u002F\u003Cslug>.md\" | grep -q . ) || \\\n    { echo \"ERROR: wiki ingest verification failed\" >&2; exit 1; }\nfi\n```\n\nAfter execution, verify the required side effects using the exact resolved destination `$WIKI` (and sibling `$RAW_DIR`):\n\n- `\"$RAW_DIR\u002F\u003Cbasename>\"` (or `\"$WIKI\u002Fraw\u002F\u003Cbasename>\"`) exists\n- `\"$WIKI\u002Fsources\u002F\u003Cslug>.md\"` exists with the canonical frontmatter\n  (`title`, `type`, `tags`, `sources`, `last_updated`) and `[[wikilinks]]`\n- `\"$WIKI\u002Findex.md\"` was updated under `## Sources` (verify with `grep -F \"\u003Cslug>\" \"$WIKI\u002Findex.md\"`)\n- `\"$WIKI\u002Flog.md\"` was appended with `## [YYYY-MM-DD] ingest | \u003Ctitle>` (verify with `tail -20 \"$WIKI\u002Flog.md\"`)\n- Git commit created on publish branch (verify with `test -z \"$(git -C \"$WIKI\" status --porcelain)\" && git -C \"$WIKI\" log -n 1 --oneline -- \"sources\u002F\u003Cslug>.md\" | grep -q .`)\n- Relevant entity\u002Fconcept updates exist and the wiki's link lint passes.\n\nIf the full procedure cannot be completed, report the exact missing step and\ncontinue independent persistence; never present a partial ingest as complete.\n\n**No exceptions for \"the learning seems not wiki-bearing.\"** The learning\nitself is the source. The skill's classifier decides what is wiki-bearing.\n\n**Working-directory caveat**: if the current session cwd is not\nthe resolved `$WIKI_ROOT` (e.g. an `\u002Fintegrate` flow running in a feature worktree),\nresolve the source by its absolute path and pass an explicit `--wiki \"$WIKI\"` path\n(setting `WIKI_OVERRIDE=\"$WIKI\"`) so the destination does not depend on a current-directory override.\n\n### 7. Validate and report\n\nBefore reporting complete:\n\n- Verify files exist for each persistence target that was available.\n- Validate `.beads\u002Fissues.jsonl` parses when modified.\n- Check duplicate bead ids when a bead was created manually.\n- Run a whitespace check for repo changes when applicable.\n\nFinal report must name the created\u002Fupdated paths and any skipped persistence\ntarget with its reason.\n",{"name":5,"description":7},"main","2d92c349286cf4e1cfed8cdec1773e71f6c601d2",".claude\u002Fskills\u002Flearn",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill learn",{"tool":67,"command":68},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill learn",{"tool":70,"command":71},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill learn","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Flearn\u002FSKILL.md",true,[],[76,84,91,99,107,116],{"skillNo":77,"name":78,"nameZh":13,"description":79,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":83},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":85,"name":86,"nameZh":13,"description":87,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":83},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":13,"description":94,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":98},"01M7622KQJ32AV4K5BXEMVSSEB","pr","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":100,"name":101,"nameZh":13,"description":102,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":106},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":108,"name":109,"nameZh":13,"description":110,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":111,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":106},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":13,"description":119,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":106},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]