# Send Knowledge Management to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "knowledge-management",
    "name": "Knowledge Management",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ClaireAICodes/knowledge-management",
    "canonicalUrl": "https://clawhub.ai/ClaireAICodes/knowledge-management",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/knowledge-management",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=knowledge-management",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "index-local.js",
      "package.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "knowledge-management",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-04T19:17:16.743Z",
      "expiresAt": "2026-05-11T19:17:16.743Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=knowledge-management",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=knowledge-management",
        "contentDisposition": "attachment; filename=\"knowledge-management-2.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "knowledge-management"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/knowledge-management"
    },
    "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."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/knowledge-management",
    "downloadUrl": "https://openagent3.xyz/downloads/knowledge-management",
    "agentUrl": "https://openagent3.xyz/skills/knowledge-management/agent",
    "manifestUrl": "https://openagent3.xyz/skills/knowledge-management/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/knowledge-management/agent.md"
  }
}
```
## Documentation

### Knowledge Management Skill (Local Storage)

Organize your OpenClaw memory files into a structured local knowledge base. Automatically parses MEMORY.md and daily memory files, classifies entries by content type, and stores each as a timestamped markdown file in the appropriate folder.

### Core Commands

km sync [options] - Sync memory entries to local files
km classify [options] - Parse and classify without storing (JSON output)
km summarize [options] - Generate index files for each content type
km cleanup [options] - Remove orphaned files
km list_types - List all available content types

### Setup

No API keys needed! The skill uses two locations:

Input Workspace: Where MEMORY.md and memory/ daily files are read from.
Output Directory: Where organized folders (Research/, Decision/, etc.) are written.

Both are detected automatically:

### Input Workspace (source files)

OPENCLAWORKSPACE environment variable
--workspace <path> CLI argument
Current working directory (if it contains MEMORY.md)
Default: ~/.openclaw/workspace

### Output Directory (organized files)

--output-dir <path> CLI argument (relative to workspace or absolute)
Default: <workspace>/memory/KM

The skill will create the output directory and all content-type folders automatically.

If you want to pre-create:

mkdir -p ~/.openclaw/workspace/memory/KM/{Research,Decision,Insight,Lesson,Pattern,Project,Reference,Tutorial}

### Default locations (input at workspace root, output in memory/KM)

# From any directory (workspace auto-detected)
km sync --days_back 7 --cleanup

### Custom input workspace and output directory

km sync --workspace /custom/input/workspace --output-dir /custom/output/KM --days_back 7

### Using environment variables

export OPENCLAWORKSPACE=/custom/input/workspace
km sync --output-dir /custom/output/KM --days_back 7

### Dry run (preview only)

km sync --dry_run --days_back 1

### Classify entries and export JSON

km classify --days_back 3 > entries.json

### Generate index files (default: output directory)

km summarize
# or specify different location
km summarize --output_dir ~/some/other/folder

### Preview orphan cleanup

km cleanup --dry_run

### List content types

km list_types

### Storage Structure

Assuming default configuration:

Input workspace: ~/.openclaw/workspace
Output directory: ~/.openclaw/workspace/memory/KM

~/.openclaw/workspace/
├── MEMORY.md                (source file - you edit this)
├── memory/                  (daily memory files)
│   ├── 2025-02-11.md
│   ├── 2025-02-12.md
│   └── ...
└── memory/KM/               (organized output by the skill)
    ├── local-sync-state.json
    ├── local-sync-log.md
    ├── Research/
    │   ├── 20260215T1448_Title_Here_HASH.md
    │   └── ...
    ├── Decision/
    ├── Insight/
    ├── Lesson/
    ├── Pattern/
    ├── Project/
    ├── Reference/
    ├── Tutorial/
    ├── Research_Index.md
    ├── Decision_Index.md
    └── ... (other index files)

### File Naming

Format: YYYYMMDDTHHMM_Title_With_Underscores_8CHARHASH.md

The 8-character content hash suffix prevents filename collisions when titles are identical but content differs.

### File Content (YAML Frontmatter)

---
title: "Protocol Name"
content_type: "Research"
domain: "OpenClaw"
certainty: "Verified"
impact: "Medium"
confidence_score: 8
tags: ["AI", "Automation"]
source: "MEMORY.md"
source_file: "MEMORY.md"
date: "2026-02-11"
content_hash: "e4b30e75d0f5a662"
---

Entry body content starts here...

### How It Works

Parses MEMORY.md and recent daily memory/*.md files
Classifies each entry (content type, domain, certainty, impact, tags, confidence)
Computes content hash for deduplication
Checks sync state (memory/local-sync-state.json) to skip already synced entries
Writes to appropriate folder with timestamp + hash filename
Updates state mapping (hash → filepath)
Optional cleanup removes files not in state

### Classification Logic

Content Type: Keyword matching (Research, Lesson, Decision, Pattern, Tutorial, Reference, Insight)
Domain: Contextual inference (AI Models, OpenClaw, Cost, Trading, etc.)
Certainty: Based on language (Verified, Likely, Speculative, Opinion)
Impact: Importance indicators (High, Medium, Low, Negligible)
Tags: Auto-extracted from predefined keyword map
Confidence Score: 1–10 heuristic (source credibility, length, data mentions)

Customize by editing the EntryClassifier class in index-local.js.

### State Management

memory/local-sync-state.json maps content hashes to file paths:

{
  "e4b30e75d0f5a662": "/path/to/Research/202602151440_Title_e4b30e75.md"
}

This enables idempotent syncs and fast duplicate detection.

Do not edit manually unless recovering from corruption.

### Cron Integration

Automate daily syncs:

openclaw cron add \\
  --name "Daily Knowledge Sync" \\
  --cron "0 5 * * *" \\
  --tz "Asia/Singapore" \\
  --session isolated \\
  --message "km sync --days_back 7"

Note: By default, the skill reads MEMORY.md from ~/.openclaw/workspace and writes organized files to ~/.openclaw/workspace/memory/KM. Use --workspace or --output-dir to customize these locations.

### Troubleshooting

"km: command not found"

Run npm link in the skill directory, or add ~/workspace/bin to PATH.

No entries found

Ensure MEMORY.md uses ## section headers and ### entry titles within recognized sections.

Files not created

Check write permissions; run with --verbose.

Old entries not syncing

They may already be in state. Clear memory/KM/local-sync-state.json to force re-sync (caution: may duplicate files).

Duplicate files

Run km cleanup to remove orphans, then km sync to create missing files.

Version: 2.0.0
Changed: 2026-02-15 — Switched from Notion to local storage, added hash suffixes for uniqueness.
Author: Claire (OpenClaw Agent)
License: MIT
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ClaireAICodes
- Version: 2.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-04T19:17:16.743Z
- Expires at: 2026-05-11T19:17:16.743Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/knowledge-management)
- [Send to Agent page](https://openagent3.xyz/skills/knowledge-management/agent)
- [JSON manifest](https://openagent3.xyz/skills/knowledge-management/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/knowledge-management/agent.md)
- [Download page](https://openagent3.xyz/downloads/knowledge-management)