{
  "schemaVersion": "1.0",
  "item": {
    "slug": "knowledge-brain",
    "name": "knowledge is what brings us together",
    "source": "tencent",
    "type": "skill",
    "category": "内容创作",
    "sourceUrl": "https://clawhub.ai/plc/knowledge-brain",
    "canonicalUrl": "https://clawhub.ai/plc/knowledge-brain",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/knowledge-brain",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=knowledge-brain",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/knowledge-brain"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/knowledge-brain",
    "agentPageUrl": "https://openagent3.xyz/skills/knowledge-brain/agent",
    "manifestUrl": "https://openagent3.xyz/skills/knowledge-brain/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/knowledge-brain/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Knowledge: Capture, Summarize, and Organize",
        "body": "Manage a personal knowledge base that extracts content from artifacts, generates summaries, and organizes entries into fluid categories.\n\nWhen to activate this skill:\n\nExplicit knowledge operations: the user says \"save this\", \"add to knowledge\", \"capture this article\", \"summarize this video\", \"sort knowledge\", \"organize categories\", \"import knowledge\", etc.\n\n\nProactive recall: the user asks about ANY topic where the knowledge base might have relevant entries. This includes general questions like \"what's a good workout routine\", \"how should I approach this design problem\", \"what do I know about sleep training\", etc. When in doubt, check the knowledge base -- it is an extension of memory. Search it whenever the user's question touches a topic that could plausibly have been captured previously."
      },
      {
        "title": "Knowledge Base Path",
        "body": "The knowledge base path is not hardcoded. On first invocation:\n\nCheck agent memory for a previously stored knowledge base path.\nIf no path is stored, ask the user. Suggest ~/Documents/knowledge/ or a sensible default.\nSave the chosen path to the agent's persistent memory so it persists across sessions.\nOn subsequent invocations, read the stored path. Do not ask again unless the path no longer exists."
      },
      {
        "title": "Knowledge Index in Agent Memory",
        "body": "The agent's persistent memory should contain a lightweight index of the knowledge base so that category awareness is always in context — even before this skill is activated. This is what makes proactive recall possible.\n\nAfter any operation that changes the knowledge base structure (adding entries, sorting, creating/splitting/merging/renaming categories), update the index in agent memory. The index should look approximately like this:\n\n## Knowledge Base\nPath: ~/Documents/knowledge/\nCategories:\n- fitness: exercise routines, nutrition, recovery\n- parenting: child development, sleep training, education approaches\n- software-design: architecture patterns, API design, system modeling\n- industrial-design: product design, materials, manufacturing\nUnsorted: 3 entries\n\nKeep the index under ~20 lines. Update it immediately after any structural change."
      },
      {
        "title": "Conventions",
        "body": "Date format: YYYY-MM-DD (ISO 8601 date only)\nFilename format: {descriptive-slug}--{YYYY-MM-DD}.md\n\nSlug: lowercase, hyphenated, 3-6 words describing the content\nRaw and summary files for the same artifact share the same filename\n\n\nSummary length: 100-400 words"
      },
      {
        "title": "Directory Structure",
        "body": "{knowledge-base-path}/\n  README.md\n  CHANGELOG.md\n  unsorted/\n    raw/\n    summary/\n  {category}/\n    _category.md\n    raw/\n    summary/\n\nCategory directories are created on demand when knowledge is sorted into them."
      },
      {
        "title": "First-Run Initialization",
        "body": "On first invocation:\n\nResolve the knowledge base path (see Configuration above).\nIf README.md does not exist at the knowledge base path, create:\n\nREADME.md (see README Template below)\nCHANGELOG.md with an initial entry\nunsorted/raw/ and unsorted/summary/ directories (use mkdir -p via Bash)\n\n\nSave the resolved path to agent memory if not already stored."
      },
      {
        "title": "Version Control",
        "body": "If git is available and the knowledge base directory is not already a git repository, initialize one (git init). The knowledge base benefits from version control — it provides history for category reorganizations, a safety net for bulk imports, and makes it easy to sync across machines.\n\nAfter meaningful operations (adding knowledge, sorting, reorganizing), commit the changes with a short descriptive message. Keep commits atomic: one commit per logical operation rather than batching unrelated changes. Do not push unless the user has configured a remote and asks to push."
      },
      {
        "title": "Raw File",
        "body": "---\ntitle: \"{Human-readable title}\"\nsource: \"{URL, file path, or description of origin}\"\n---\n\n{Full extracted content. Preserve original structure where possible.}\n\nThe filename carries the ID and date ({slug}--{YYYY-MM-DD}.md). No need to duplicate them in frontmatter.\n\nRules:\n\nPreserve content faithfully. Do not editorialize.\nFor YouTube transcripts, clean auto-sub artifacts but keep [HH:MM:SS] timestamps at paragraph boundaries.\nFor URLs, strip navigation, ads, and boilerplate. Keep the article body."
      },
      {
        "title": "Summary File",
        "body": "---\ntitle: \"{Human-readable title}\"\nsource: \"{URL, file path, or description of origin}\"\n---\n\n## Summary\n\n{2-4 paragraphs capturing the main ideas, arguments, or content.\nWrite in plain, direct prose.}\n\n## Key Points\n\n- {Bullet point}\n\n## Takeaways\n\n{1-2 sentences on why this matters or how it connects to broader themes.}\n\nThe filename carries the ID and date. The corresponding raw file is always at ../raw/{same-filename}. Category directories and descriptive filenames provide the semantic structure — no tags needed.\n\nRules:\n\nWhen generating, read the full raw content first. Capture the core argument, not surface details.\nCross-entry relationships are discovered at recall time by the agent (via search, category context, or embeddings) rather than stored in individual files."
      },
      {
        "title": "_category.md",
        "body": "---\ncategory: {category-slug}\ndescription: \"{One-sentence scope definition}\"\n---\n\n## {Category Name}\n\n{1-3 sentences defining what belongs in this category and what does not.\nBe specific enough to resolve ambiguity when sorting.}\n\n## Notes\n\n{Optional guidance on navigating this category, notable themes,\nor conventions specific to this domain.}"
      },
      {
        "title": "CHANGELOG.md Format",
        "body": "# Knowledge Base Changelog\n\n## YYYY-MM-DD\n\n### Added\n- [{id}] \"{title}\" from {source_type} -- placed in `{category}/`\n\n### Moved\n- [{id}] moved from `{old-category}/` to `{new-category}/`\n\n### Categories\n- Created `{category-name}`: {description}\n- Renamed `{old-name}` to `{new-name}`\n- Split `{old-name}` into `{new-name-1}` and `{new-name-2}`\n- Merged `{name-1}` and `{name-2}` into `{new-name}`\n\nGroup entries under the current date heading. If today's heading exists, append to it."
      },
      {
        "title": "Ability 1: Create Knowledge from an Artifact",
        "body": "When the user provides a URL, YouTube link, file path, or content to capture:\n\nStep 1: Detect source type.\n\nYouTube URL: contains youtube.com/watch, youtu.be/, or youtube.com/shorts/\nGeneral URL: starts with http:// or https://\nFile path: exists on local filesystem\nPasted text: inline content provided directly\n\nStep 2: Extract raw content.\n\nSourceMethodURLWebFetch(url, \"Extract the main article content of this page as plain text\")YouTubeBash: yt-dlp --write-auto-sub --sub-lang \"en\" --skip-download --print title --print description -o \"/tmp/yt-%(id)s\" \"{url}\" then Read the .vtt file and clean it (see transcript cleaning below)Local fileRead(filepath)AudioBash: whisper \"{path}\" --output_format txt if available; otherwise note as placeholderPasted textUse directly\n\nYouTube transcript cleaning:\n\nRemove VTT headers (WEBVTT, Kind:, Language:)\nRemove timestamp lines (lines matching XX:XX:XX.XXX --> XX:XX:XX.XXX)\nRemove duplicate consecutive lines\nCollapse blank lines\nInsert [HH:MM:SS] markers approximately every 60 seconds as paragraph breaks\nClean up via Bash pipeline, then read and format the result\nClean up temporary files in /tmp/\n\nStep 3: Generate descriptive slug. Read the extracted content and produce a 3-6 word lowercase hyphenated slug. Examples:\n\ndeep-work-productivity-strategies--2026-02-27\nreact-server-components-explained--2026-02-27\ninfant-sleep-training-methods--2026-02-27\n\nStep 4: Check for duplicates. Grep across **/raw/*.md for the source URL in frontmatter. If found, warn the user and ask whether to overwrite or create a suffixed version.\n\nStep 5: Determine placement. Consult the knowledge index in agent memory. If an existing category is an obvious fit for this content (e.g., a workout video clearly belongs in fitness), place it directly in that category. If the fit is ambiguous or no category matches, place it in unsorted/. When in doubt, use unsorted/.\n\nStep 6: Write the raw file to {target}/raw/{slug}--{date}.md where {target} is either the chosen category or unsorted. Create the directory with mkdir -p if needed.\n\nStep 7: Generate the summary. Read the full raw content. Produce a summary following the template above.\n\nStep 8: Write the summary file to {target}/summary/{slug}--{date}.md.\n\nStep 9: Extract book references. Scan the raw content and summary for mentions of books — titles, authors, \"in his book...\", \"as described in...\", ISBN references, etc. For each book found, append it to books-to-read.md at the knowledge base root (see Books to Read below). If the book is already listed, add this artifact's ID to its \"Referenced By\" column instead of creating a duplicate.\n\nStep 10: Update CHANGELOG.md. Append an \"Added\" entry under today's date.\n\nStep 11: Update the knowledge index in agent memory. If a new category was created or the unsorted count changed, update the index immediately.\n\nStep 12: Report to the user. Display the title, source, summary key points, file locations, the category it was placed in (or note that it's in unsorted/ and suggest sorting), and any books that were extracted."
      },
      {
        "title": "Ability 2: Sort Unsorted Knowledge",
        "body": "When the user asks to sort knowledge or after adding new knowledge:\n\nEnumerate unsorted entries. Glob unsorted/summary/*.md. Read frontmatter for titles.\n\n\nEnumerate existing categories. Glob */_category.md (excluding unsorted/). Read each for scope.\n\n\nPropose categorization. For each unsorted entry:\n\nIf an existing category fits, propose it.\nIf no category fits, propose creating a new one with a slug and description.\nIf the user specified a target, use that.\n\n\n\nConfirm with the user via AskUserQuestion. Present proposed moves as a list. Wait for confirmation.\n\n\nExecute moves. For each entry:\na. Create target category directory structure if needed (mkdir -p {category}/raw {category}/summary).\nb. Write _category.md if this is a new category.\nc. Move raw file: Bash mv unsorted/raw/{filename} {category}/raw/{filename}.\nd. Move summary file: Bash mv unsorted/summary/{filename} {category}/summary/{filename}.\n\n\nUpdate CHANGELOG.md. Record moves and new categories.\n\n\nUpdate the knowledge index in agent memory. Reflect any new categories and the updated unsorted count.\n\n\nReport to the user."
      },
      {
        "title": "Ability 3: Reorganize Categories",
        "body": "Always confirm with the user before executing any reorganization.\n\nSplit a Category\n\nRead all summary files in the source category.\nPropose which entries go to which new category. Confirm with user.\nCreate new category directories and _category.md files.\nMove raw and summary files via Bash mv.\nDelete the old empty category directory via Bash rm -r after confirming it is empty.\nUpdate CHANGELOG.md.\nUpdate the knowledge index in agent memory.\n\nMerge Categories\n\nCreate the target category if it does not exist.\nMove all raw and summary files from source categories to target.\nHandle filename collisions: append -2 suffix to both raw and summary filenames.\nWrite or update target _category.md.\nRemove empty source directories.\nUpdate CHANGELOG.md.\nUpdate the knowledge index in agent memory.\n\nRename a Category\n\nRename directory via Bash mv.\nUpdate _category.md frontmatter.\nNo changes needed in files — filenames are unchanged, raw/summary pairing holds.\nUpdate CHANGELOG.md.\nUpdate the knowledge index in agent memory."
      },
      {
        "title": "Ability 4: Recall Knowledge",
        "body": "When the user asks a question, references a topic, or requests context that the knowledge base may contain:\n\nConsult the knowledge index. The memory index lists all categories with brief descriptions. Use it to identify which categories are likely relevant to the query. This narrows the search before touching any files.\n\n\nLocate relevant entries. Using whatever search capabilities the agent has:\n\nIf the agent can search file contents (e.g., Grep, text search, embeddings), search within the identified categories' summary/ directories for keywords related to the query.\nIf the agent can only read files, list the summary files in the relevant category directories and read their frontmatter (title) and content to find matches.\nIf neither works, read the _category.md files for the relevant categories and follow their notes.\nFall back to broader search across the full knowledge base only if category-scoped search yields nothing.\n\n\n\nLoad into working context. Read the relevant summary files fully. If deeper detail is needed, read the corresponding raw file at ../raw/{same-filename}. The goal is to internalize the knowledge — absorb it into the current conversation context, embedding, or working memory so it informs subsequent responses.\n\n\nSynthesize across entries. When multiple entries are relevant, connect them. Surface patterns, contradictions, or complementary perspectives across the loaded knowledge.\n\n\nCite sources. When drawing on loaded knowledge, reference the entry by title and ID so the user can trace back to the original artifact.\n\n\nProactive recall. When the knowledge index shows a relevant category exists, load and reference it without being asked. The knowledge base is an extension of memory — if relevant knowledge is there, use it."
      },
      {
        "title": "Ability 5: Import Existing Knowledge",
        "body": "When the user points to an existing directory, collection of files, or structured knowledge source to onboard into the knowledge base:\n\nScan the source. Use Glob and Read to inventory the source directory or file list. Identify:\n\nFile types present (markdown, text, PDF, HTML, etc.)\nAny existing organizational structure (subdirectories, naming conventions, tags, metadata)\nTotal number of files and approximate scope\n\n\n\nPresent a migration plan. Before touching anything, report:\n\nHow many files were found and their types\nProposed category mapping (if the source has directories/folders, suggest mapping them to knowledge base categories)\nAny files that can't be processed (binary formats, unsupported types)\nAsk the user to confirm or adjust the plan\n\n\n\nProcess each file. For each importable file:\na. Read the content.\nb. If the file already has structured metadata (YAML frontmatter, title, date), preserve and adapt it to the knowledge base format.\nc. If the file is unstructured, infer a title from the filename or first heading, and use the file's modification date as the captured date.\nd. Write the raw file using the standard template and naming convention.\ne. Generate a summary following the standard template.\nf. Place files according to the migration plan — either into a mapped category or into unsorted/.\n\n\nPreserve source structure as categories. If the source has meaningful subdirectories:\n\nMap each subdirectory to a knowledge base category.\nCreate _category.md files with descriptions inferred from the directory name and contents.\nIf the source structure is flat, place everything in unsorted/ for manual sorting later.\n\n\n\nVerify placement. After all files are imported, confirm entries are in appropriate categories.\n\n\nUpdate CHANGELOG.md. Record the import as a batch operation:\n### Imported\n- Imported {count} entries from `{source_path}`\n- Categories created: {list}\n- Entries placed in unsorted: {count}\n\n\n\nUpdate the knowledge index in agent memory. Reflect all new categories and updated entry counts.\n\n\nReport to the user. Summarize what was imported, where it landed, and flag anything that needs manual attention (duplicates, unprocessable files, ambiguous categorization).\n\nRules:\n\nNever modify or delete the source files. The import is a copy operation.\nIf an entry with the same content or source already exists in the knowledge base, flag it as a duplicate and skip unless the user says otherwise.\nFor large imports (50+ files), process in batches and report progress.\nIf the source contains its own README, index, or table of contents, read it first to inform category mapping."
      },
      {
        "title": "After Any Ability",
        "body": "After completing any ability that writes or moves files (Abilities 1, 2, 3, 5), commit the changes to git if the knowledge base is a git repository. Use a short descriptive message. One commit per logical operation."
      },
      {
        "title": "Category Management Heuristics",
        "body": "Suggest but never execute without user confirmation.\n\nCreate a new category: 3+ entries in unsorted/ share a common theme not covered by existing categories.\nSplit a category: 15-20+ entries with entries clearly clustering into 2+ distinct subtopics, or the _category.md description has become overly broad.\nMerge categories: Two categories with fewer than 3 entries each and significantly overlapping scopes.\nRename a category: Name no longer reflects actual contents, or name is ambiguous.\n\nAfter adding knowledge, briefly note if reorganization might be warranted. Example: \"Note: unsorted/ now has 5 entries about cooking. Consider creating a cooking category.\""
      },
      {
        "title": "Idempotency",
        "body": "Before creating a new raw file, check if a file with the same filename already exists anywhere (Glob **/raw/{slug}--{date}.md). If so, warn the user and ask whether to overwrite or suffix."
      },
      {
        "title": "Date Collisions",
        "body": "If two artifacts about similar topics are captured on the same day and produce the same slug, append a numeric suffix: {slug}-2--{date}.md."
      },
      {
        "title": "Empty Categories",
        "body": "When the last entry leaves a category, ask the user whether to delete the empty category or keep it for future use."
      },
      {
        "title": "Error Handling",
        "body": "If WebFetch fails, report the error and ask the user to provide content another way.\nIf yt-dlp fails (no subtitles available), note this in the raw file and ask if the user can provide a transcript.\nIf a move operation fails, do not update CHANGELOG until the move succeeds."
      },
      {
        "title": "Writing Style in Summaries",
        "body": "Plain, direct prose. No promotional language.\nActive voice. Specific facts over vague characterizations."
      },
      {
        "title": "Books to Read",
        "body": "A flat index file at the knowledge base root that automatically captures book references found in any processed artifact."
      },
      {
        "title": "File: books-to-read.md",
        "body": "# Books to Read\n\n| Title | Author | Referenced By | Date Added |\n|-------|--------|---------------|------------|\n| Deep Work | Cal Newport | deep-work-productivity--2026-02-27 | 2026-02-27 |\n| Atomic Habits | James Clear | habit-stacking-overview--2026-02-27, morning-routine-video--2026-02-28 | 2026-02-28 |"
      },
      {
        "title": "Rules",
        "body": "Create this file on first use (when the first book reference is found), not during initialization.\nEach row is one book. The \"Referenced By\" column contains a comma-separated list of artifact IDs that mention this book.\nWhen a book is already in the table and a new artifact references it, append the new artifact ID to the existing row's \"Referenced By\" column. Do not add a duplicate row.\nExtract whatever is available: title is required, author is best-effort. If the author isn't mentioned, leave the column as —.\nBe conservative — only extract clear book references, not vague mentions of \"a book about X\".\nThis file is not tracked in the memory index. It is accessed explicitly when the user asks for book recommendations or reading lists."
      },
      {
        "title": "README Template",
        "body": "On first-run, generate a brief README.md explaining the directory structure, file naming convention ({slug}--{date}.md), and basic usage (add, sort, reorganize, search, browse)."
      }
    ],
    "body": "Knowledge: Capture, Summarize, and Organize\n\nManage a personal knowledge base that extracts content from artifacts, generates summaries, and organizes entries into fluid categories.\n\nWhen to activate this skill:\n\nExplicit knowledge operations: the user says \"save this\", \"add to knowledge\", \"capture this article\", \"summarize this video\", \"sort knowledge\", \"organize categories\", \"import knowledge\", etc.\n\nProactive recall: the user asks about ANY topic where the knowledge base might have relevant entries. This includes general questions like \"what's a good workout routine\", \"how should I approach this design problem\", \"what do I know about sleep training\", etc. When in doubt, check the knowledge base -- it is an extension of memory. Search it whenever the user's question touches a topic that could plausibly have been captured previously.\n\nConfiguration\nKnowledge Base Path\n\nThe knowledge base path is not hardcoded. On first invocation:\n\nCheck agent memory for a previously stored knowledge base path.\nIf no path is stored, ask the user. Suggest ~/Documents/knowledge/ or a sensible default.\nSave the chosen path to the agent's persistent memory so it persists across sessions.\nOn subsequent invocations, read the stored path. Do not ask again unless the path no longer exists.\nKnowledge Index in Agent Memory\n\nThe agent's persistent memory should contain a lightweight index of the knowledge base so that category awareness is always in context — even before this skill is activated. This is what makes proactive recall possible.\n\nAfter any operation that changes the knowledge base structure (adding entries, sorting, creating/splitting/merging/renaming categories), update the index in agent memory. The index should look approximately like this:\n\n## Knowledge Base\nPath: ~/Documents/knowledge/\nCategories:\n- fitness: exercise routines, nutrition, recovery\n- parenting: child development, sleep training, education approaches\n- software-design: architecture patterns, API design, system modeling\n- industrial-design: product design, materials, manufacturing\nUnsorted: 3 entries\n\n\nKeep the index under ~20 lines. Update it immediately after any structural change.\n\nConventions\nDate format: YYYY-MM-DD (ISO 8601 date only)\nFilename format: {descriptive-slug}--{YYYY-MM-DD}.md\nSlug: lowercase, hyphenated, 3-6 words describing the content\nRaw and summary files for the same artifact share the same filename\nSummary length: 100-400 words\nDirectory Structure\n{knowledge-base-path}/\n  README.md\n  CHANGELOG.md\n  unsorted/\n    raw/\n    summary/\n  {category}/\n    _category.md\n    raw/\n    summary/\n\n\nCategory directories are created on demand when knowledge is sorted into them.\n\nFirst-Run Initialization\n\nOn first invocation:\n\nResolve the knowledge base path (see Configuration above).\nIf README.md does not exist at the knowledge base path, create:\nREADME.md (see README Template below)\nCHANGELOG.md with an initial entry\nunsorted/raw/ and unsorted/summary/ directories (use mkdir -p via Bash)\nSave the resolved path to agent memory if not already stored.\nVersion Control\n\nIf git is available and the knowledge base directory is not already a git repository, initialize one (git init). The knowledge base benefits from version control — it provides history for category reorganizations, a safety net for bulk imports, and makes it easy to sync across machines.\n\nAfter meaningful operations (adding knowledge, sorting, reorganizing), commit the changes with a short descriptive message. Keep commits atomic: one commit per logical operation rather than batching unrelated changes. Do not push unless the user has configured a remote and asks to push.\n\nFile Formats\nRaw File\n---\ntitle: \"{Human-readable title}\"\nsource: \"{URL, file path, or description of origin}\"\n---\n\n{Full extracted content. Preserve original structure where possible.}\n\n\nThe filename carries the ID and date ({slug}--{YYYY-MM-DD}.md). No need to duplicate them in frontmatter.\n\nRules:\n\nPreserve content faithfully. Do not editorialize.\nFor YouTube transcripts, clean auto-sub artifacts but keep [HH:MM:SS] timestamps at paragraph boundaries.\nFor URLs, strip navigation, ads, and boilerplate. Keep the article body.\nSummary File\n---\ntitle: \"{Human-readable title}\"\nsource: \"{URL, file path, or description of origin}\"\n---\n\n## Summary\n\n{2-4 paragraphs capturing the main ideas, arguments, or content.\nWrite in plain, direct prose.}\n\n## Key Points\n\n- {Bullet point}\n\n## Takeaways\n\n{1-2 sentences on why this matters or how it connects to broader themes.}\n\n\nThe filename carries the ID and date. The corresponding raw file is always at ../raw/{same-filename}. Category directories and descriptive filenames provide the semantic structure — no tags needed.\n\nRules:\n\nWhen generating, read the full raw content first. Capture the core argument, not surface details.\nCross-entry relationships are discovered at recall time by the agent (via search, category context, or embeddings) rather than stored in individual files.\n_category.md\n---\ncategory: {category-slug}\ndescription: \"{One-sentence scope definition}\"\n---\n\n## {Category Name}\n\n{1-3 sentences defining what belongs in this category and what does not.\nBe specific enough to resolve ambiguity when sorting.}\n\n## Notes\n\n{Optional guidance on navigating this category, notable themes,\nor conventions specific to this domain.}\n\nCHANGELOG.md Format\n# Knowledge Base Changelog\n\n## YYYY-MM-DD\n\n### Added\n- [{id}] \"{title}\" from {source_type} -- placed in `{category}/`\n\n### Moved\n- [{id}] moved from `{old-category}/` to `{new-category}/`\n\n### Categories\n- Created `{category-name}`: {description}\n- Renamed `{old-name}` to `{new-name}`\n- Split `{old-name}` into `{new-name-1}` and `{new-name-2}`\n- Merged `{name-1}` and `{name-2}` into `{new-name}`\n\n\nGroup entries under the current date heading. If today's heading exists, append to it.\n\nCore Abilities\nAbility 1: Create Knowledge from an Artifact\n\nWhen the user provides a URL, YouTube link, file path, or content to capture:\n\nStep 1: Detect source type.\n\nYouTube URL: contains youtube.com/watch, youtu.be/, or youtube.com/shorts/\nGeneral URL: starts with http:// or https://\nFile path: exists on local filesystem\nPasted text: inline content provided directly\n\nStep 2: Extract raw content.\n\nSource\tMethod\nURL\tWebFetch(url, \"Extract the main article content of this page as plain text\")\nYouTube\tBash: yt-dlp --write-auto-sub --sub-lang \"en\" --skip-download --print title --print description -o \"/tmp/yt-%(id)s\" \"{url}\" then Read the .vtt file and clean it (see transcript cleaning below)\nLocal file\tRead(filepath)\nAudio\tBash: whisper \"{path}\" --output_format txt if available; otherwise note as placeholder\nPasted text\tUse directly\n\nYouTube transcript cleaning:\n\nRemove VTT headers (WEBVTT, Kind:, Language:)\nRemove timestamp lines (lines matching XX:XX:XX.XXX --> XX:XX:XX.XXX)\nRemove duplicate consecutive lines\nCollapse blank lines\nInsert [HH:MM:SS] markers approximately every 60 seconds as paragraph breaks\nClean up via Bash pipeline, then read and format the result\nClean up temporary files in /tmp/\n\nStep 3: Generate descriptive slug. Read the extracted content and produce a 3-6 word lowercase hyphenated slug. Examples:\n\ndeep-work-productivity-strategies--2026-02-27\nreact-server-components-explained--2026-02-27\ninfant-sleep-training-methods--2026-02-27\n\nStep 4: Check for duplicates. Grep across **/raw/*.md for the source URL in frontmatter. If found, warn the user and ask whether to overwrite or create a suffixed version.\n\nStep 5: Determine placement. Consult the knowledge index in agent memory. If an existing category is an obvious fit for this content (e.g., a workout video clearly belongs in fitness), place it directly in that category. If the fit is ambiguous or no category matches, place it in unsorted/. When in doubt, use unsorted/.\n\nStep 6: Write the raw file to {target}/raw/{slug}--{date}.md where {target} is either the chosen category or unsorted. Create the directory with mkdir -p if needed.\n\nStep 7: Generate the summary. Read the full raw content. Produce a summary following the template above.\n\nStep 8: Write the summary file to {target}/summary/{slug}--{date}.md.\n\nStep 9: Extract book references. Scan the raw content and summary for mentions of books — titles, authors, \"in his book...\", \"as described in...\", ISBN references, etc. For each book found, append it to books-to-read.md at the knowledge base root (see Books to Read below). If the book is already listed, add this artifact's ID to its \"Referenced By\" column instead of creating a duplicate.\n\nStep 10: Update CHANGELOG.md. Append an \"Added\" entry under today's date.\n\nStep 11: Update the knowledge index in agent memory. If a new category was created or the unsorted count changed, update the index immediately.\n\nStep 12: Report to the user. Display the title, source, summary key points, file locations, the category it was placed in (or note that it's in unsorted/ and suggest sorting), and any books that were extracted.\n\nAbility 2: Sort Unsorted Knowledge\n\nWhen the user asks to sort knowledge or after adding new knowledge:\n\nEnumerate unsorted entries. Glob unsorted/summary/*.md. Read frontmatter for titles.\n\nEnumerate existing categories. Glob */_category.md (excluding unsorted/). Read each for scope.\n\nPropose categorization. For each unsorted entry:\n\nIf an existing category fits, propose it.\nIf no category fits, propose creating a new one with a slug and description.\nIf the user specified a target, use that.\n\nConfirm with the user via AskUserQuestion. Present proposed moves as a list. Wait for confirmation.\n\nExecute moves. For each entry: a. Create target category directory structure if needed (mkdir -p {category}/raw {category}/summary). b. Write _category.md if this is a new category. c. Move raw file: Bash mv unsorted/raw/{filename} {category}/raw/{filename}. d. Move summary file: Bash mv unsorted/summary/{filename} {category}/summary/{filename}.\n\nUpdate CHANGELOG.md. Record moves and new categories.\n\nUpdate the knowledge index in agent memory. Reflect any new categories and the updated unsorted count.\n\nReport to the user.\n\nAbility 3: Reorganize Categories\n\nAlways confirm with the user before executing any reorganization.\n\nSplit a Category\nRead all summary files in the source category.\nPropose which entries go to which new category. Confirm with user.\nCreate new category directories and _category.md files.\nMove raw and summary files via Bash mv.\nDelete the old empty category directory via Bash rm -r after confirming it is empty.\nUpdate CHANGELOG.md.\nUpdate the knowledge index in agent memory.\nMerge Categories\nCreate the target category if it does not exist.\nMove all raw and summary files from source categories to target.\nHandle filename collisions: append -2 suffix to both raw and summary filenames.\nWrite or update target _category.md.\nRemove empty source directories.\nUpdate CHANGELOG.md.\nUpdate the knowledge index in agent memory.\nRename a Category\nRename directory via Bash mv.\nUpdate _category.md frontmatter.\nNo changes needed in files — filenames are unchanged, raw/summary pairing holds.\nUpdate CHANGELOG.md.\nUpdate the knowledge index in agent memory.\nAbility 4: Recall Knowledge\n\nWhen the user asks a question, references a topic, or requests context that the knowledge base may contain:\n\nConsult the knowledge index. The memory index lists all categories with brief descriptions. Use it to identify which categories are likely relevant to the query. This narrows the search before touching any files.\n\nLocate relevant entries. Using whatever search capabilities the agent has:\n\nIf the agent can search file contents (e.g., Grep, text search, embeddings), search within the identified categories' summary/ directories for keywords related to the query.\nIf the agent can only read files, list the summary files in the relevant category directories and read their frontmatter (title) and content to find matches.\nIf neither works, read the _category.md files for the relevant categories and follow their notes.\nFall back to broader search across the full knowledge base only if category-scoped search yields nothing.\n\nLoad into working context. Read the relevant summary files fully. If deeper detail is needed, read the corresponding raw file at ../raw/{same-filename}. The goal is to internalize the knowledge — absorb it into the current conversation context, embedding, or working memory so it informs subsequent responses.\n\nSynthesize across entries. When multiple entries are relevant, connect them. Surface patterns, contradictions, or complementary perspectives across the loaded knowledge.\n\nCite sources. When drawing on loaded knowledge, reference the entry by title and ID so the user can trace back to the original artifact.\n\nProactive recall. When the knowledge index shows a relevant category exists, load and reference it without being asked. The knowledge base is an extension of memory — if relevant knowledge is there, use it.\n\nAbility 5: Import Existing Knowledge\n\nWhen the user points to an existing directory, collection of files, or structured knowledge source to onboard into the knowledge base:\n\nScan the source. Use Glob and Read to inventory the source directory or file list. Identify:\n\nFile types present (markdown, text, PDF, HTML, etc.)\nAny existing organizational structure (subdirectories, naming conventions, tags, metadata)\nTotal number of files and approximate scope\n\nPresent a migration plan. Before touching anything, report:\n\nHow many files were found and their types\nProposed category mapping (if the source has directories/folders, suggest mapping them to knowledge base categories)\nAny files that can't be processed (binary formats, unsupported types)\nAsk the user to confirm or adjust the plan\n\nProcess each file. For each importable file: a. Read the content. b. If the file already has structured metadata (YAML frontmatter, title, date), preserve and adapt it to the knowledge base format. c. If the file is unstructured, infer a title from the filename or first heading, and use the file's modification date as the captured date. d. Write the raw file using the standard template and naming convention. e. Generate a summary following the standard template. f. Place files according to the migration plan — either into a mapped category or into unsorted/.\n\nPreserve source structure as categories. If the source has meaningful subdirectories:\n\nMap each subdirectory to a knowledge base category.\nCreate _category.md files with descriptions inferred from the directory name and contents.\nIf the source structure is flat, place everything in unsorted/ for manual sorting later.\n\nVerify placement. After all files are imported, confirm entries are in appropriate categories.\n\nUpdate CHANGELOG.md. Record the import as a batch operation:\n\n### Imported\n- Imported {count} entries from `{source_path}`\n- Categories created: {list}\n- Entries placed in unsorted: {count}\n\n\nUpdate the knowledge index in agent memory. Reflect all new categories and updated entry counts.\n\nReport to the user. Summarize what was imported, where it landed, and flag anything that needs manual attention (duplicates, unprocessable files, ambiguous categorization).\n\nRules:\n\nNever modify or delete the source files. The import is a copy operation.\nIf an entry with the same content or source already exists in the knowledge base, flag it as a duplicate and skip unless the user says otherwise.\nFor large imports (50+ files), process in batches and report progress.\nIf the source contains its own README, index, or table of contents, read it first to inform category mapping.\nAfter Any Ability\n\nAfter completing any ability that writes or moves files (Abilities 1, 2, 3, 5), commit the changes to git if the knowledge base is a git repository. Use a short descriptive message. One commit per logical operation.\n\nCategory Management Heuristics\n\nSuggest but never execute without user confirmation.\n\nCreate a new category: 3+ entries in unsorted/ share a common theme not covered by existing categories.\nSplit a category: 15-20+ entries with entries clearly clustering into 2+ distinct subtopics, or the _category.md description has become overly broad.\nMerge categories: Two categories with fewer than 3 entries each and significantly overlapping scopes.\nRename a category: Name no longer reflects actual contents, or name is ambiguous.\n\nAfter adding knowledge, briefly note if reorganization might be warranted. Example: \"Note: unsorted/ now has 5 entries about cooking. Consider creating a cooking category.\"\n\nProcess Conventions\nIdempotency\n\nBefore creating a new raw file, check if a file with the same filename already exists anywhere (Glob **/raw/{slug}--{date}.md). If so, warn the user and ask whether to overwrite or suffix.\n\nDate Collisions\n\nIf two artifacts about similar topics are captured on the same day and produce the same slug, append a numeric suffix: {slug}-2--{date}.md.\n\nEmpty Categories\n\nWhen the last entry leaves a category, ask the user whether to delete the empty category or keep it for future use.\n\nError Handling\nIf WebFetch fails, report the error and ask the user to provide content another way.\nIf yt-dlp fails (no subtitles available), note this in the raw file and ask if the user can provide a transcript.\nIf a move operation fails, do not update CHANGELOG until the move succeeds.\nWriting Style in Summaries\nPlain, direct prose. No promotional language.\nActive voice. Specific facts over vague characterizations.\nBooks to Read\n\nA flat index file at the knowledge base root that automatically captures book references found in any processed artifact.\n\nFile: books-to-read.md\n# Books to Read\n\n| Title | Author | Referenced By | Date Added |\n|-------|--------|---------------|------------|\n| Deep Work | Cal Newport | deep-work-productivity--2026-02-27 | 2026-02-27 |\n| Atomic Habits | James Clear | habit-stacking-overview--2026-02-27, morning-routine-video--2026-02-28 | 2026-02-28 |\n\nRules\nCreate this file on first use (when the first book reference is found), not during initialization.\nEach row is one book. The \"Referenced By\" column contains a comma-separated list of artifact IDs that mention this book.\nWhen a book is already in the table and a new artifact references it, append the new artifact ID to the existing row's \"Referenced By\" column. Do not add a duplicate row.\nExtract whatever is available: title is required, author is best-effort. If the author isn't mentioned, leave the column as —.\nBe conservative — only extract clear book references, not vague mentions of \"a book about X\".\nThis file is not tracked in the memory index. It is accessed explicitly when the user asks for book recommendations or reading lists.\nREADME Template\n\nOn first-run, generate a brief README.md explaining the directory structure, file naming convention ({slug}--{date}.md), and basic usage (add, sort, reorganize, search, browse)."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/plc/knowledge-brain",
    "publisherUrl": "https://clawhub.ai/plc/knowledge-brain",
    "owner": "plc",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/knowledge-brain",
    "downloadUrl": "https://openagent3.xyz/downloads/knowledge-brain",
    "agentUrl": "https://openagent3.xyz/skills/knowledge-brain/agent",
    "manifestUrl": "https://openagent3.xyz/skills/knowledge-brain/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/knowledge-brain/agent.md"
  }
}