๐ŸŽ Get the FREE AI Skills Starter Guide โ€” Subscribe โ†’
BytesAgainBytesAgain
๐Ÿฆ€ ClawHub

Link Library

by @nowhitestar

Personal knowledge base that captures web content (articles, tweets/threads, videos, podcasts, images, PDFs) and makes it retrievable for future conversation...

TERMINAL
clawhub install link-library

๐Ÿ“– About This Skill


name: link-library version: "1.0.0" description: > Personal knowledge base that captures web content (articles, tweets/threads, videos, podcasts, images, PDFs) and makes it retrievable for future conversations and writing. Use when: (1) User shares a URL with ANY interest signal โ€” asking to summarize, commenting positively, saying "ๆœ‰ๆ„ๆ€/ไธ้”™/interesting/ๅ€ผๅพ—็œ‹/ๅญฆๅˆฐไบ†", or requesting it be saved, (2) User asks to find previously saved content ("ๆˆ‘ไน‹ๅ‰ๅญ˜็š„้‚ฃ็ฏ‡...", "find that article about..."), (3) User needs reference material for writing or discussion, (4) User shares Twitter/X, WeChat, YouTube, Bilibili, or any web link and engages with it. Interest signals that trigger save: "ๅธฎๆˆ‘ๆ€ป็ป“ไธ€ไธ‹", "่ฟ™็ฏ‡ไธ้”™", "ๆœ‰ๆ„ๆ€", "่ฎฐไธ€ไธ‹", "็•™็€ไปฅๅŽ็”จ", "่ฟ™ไธช่ง‚็‚นๅพˆๅฅฝ", "ๅญฆๅˆฐไบ†", "ๅ€ผๅพ—ไฟๅญ˜", "ๆ”พ่ฟ›็Ÿฅ่ฏ†ๅบ“", sharing link + any commentary or opinion, asking follow-up questions about link content. Do NOT require literal "save"/"bookmark" keywords.

Link Library โ€” Personal Content Knowledge Base

Save web content with full original text, generate summaries and tags, retrieve semantically.

Core Rules

1. Always save original full text โ€” summaries are for retrieval, originals are for re-reading 2. Detect interest, don't demand commands โ€” if user engages with a link, offer to save 3. Twitter/X is first-class โ€” tweets, threads, and articles are fully supported

Interest Detection

When user shares a link, evaluate interest signals:

Auto-save (no confirmation needed):

  • User explicitly says save/bookmark/่ฎฐไธ€ไธ‹/ๆ”พ่ฟ›็Ÿฅ่ฏ†ๅบ“
  • User asks "ๅธฎๆˆ‘ๆ€ป็ป“ไธ€ไธ‹" (summarize implies save-worthy)
  • Offer to save (ask once):

  • User shares link + positive commentary ("่ฟ™็ฏ‡ไธ้”™", "ๆœ‰ๆ„ๆ€", "ๅญฆๅˆฐไบ†")
  • User asks follow-up questions about link content
  • User discusses link content substantively
  • Don't save:

  • User shares link just for quick reference in conversation
  • User says "ไธ็”จไฟๅญ˜" or similar
  • Data Location

    All entries in ~/.openclaw/workspace-main/library/:

    library/
    โ”œโ”€โ”€ articles/     # Web articles, blog posts, WeChat, Zhihu
    โ”œโ”€โ”€ tweets/       # Twitter/X posts and threads
    โ”œโ”€โ”€ videos/       # YouTube, Bilibili
    โ”œโ”€โ”€ podcasts/     # Podcast episodes
    โ”œโ”€โ”€ papers/       # Academic papers, PDFs
    โ”œโ”€โ”€ images/       # Infographics, visual content
    โ””โ”€โ”€ misc/         # Everything else
    

    Content Types & Fetch Methods

    | Type | URL Patterns | Fetch Method | Template | |------|-------------|--------------|----------| | article | Generic web, blog, /post/ | web_fetch or curl -s "https://r.jina.ai/URL" | article.md | | wechat | mp.weixin.qq.com | cd ~/.agent-reach/tools/wechat-article-for-ai && python3 main.py "URL" | article.md | | tweet | x.com, twitter.com /status/ | xreach tweet URL --json | tweet.md | | thread | x.com, twitter.com (thread) | xreach thread URL --json | tweet.md | | video | youtube.com, youtu.be | yt-dlp --dump-json "URL" + subtitle extraction | video.md | | bilibili | bilibili.com | yt-dlp --dump-json "URL" + subtitle extraction | video.md | | paper | arxiv.org, .pdf links | web_fetch or browser | paper.md | | podcast | Podcast platforms | web_fetch metadata | podcast.md | | image | Image URLs | Download + describe | image.md |

    Twitter/X Fetch Details

    # Single tweet
    xreach tweet URL_OR_ID --json

    Full thread

    xreach thread URL_OR_ID --json

    User timeline (for context)

    xreach tweets @username -n 20 --json

    Extract from JSON: full_text, user.screen_name, created_at, entities, media URLs. For threads: concatenate all tweets in order as full content.

    Video Subtitle Extraction

    # Download subtitles
    yt-dlp --write-sub --write-auto-sub --sub-lang "zh-Hans,zh,en" \
      --convert-subs vtt --skip-download -o "/tmp/%(id)s" "URL"
    

    Then read the .vtt file as transcript

    Entry Structure

    Every entry has two parts:

    1. YAML Frontmatter (structured metadata)

    title: "..."
    source: "..."           # Platform/domain
    url: "..."              # Original URL
    author: "..."           # Author or @handle
    date_published: "..."   # When content was created
    date_saved: "..."       # When we saved it
    last_updated: "..."     # Last modification
    type: article|tweet|video|podcast|paper|image
    tags: [tag1, tag2, ...]
    status: unread|read|reviewed
    priority: low|normal|high
    related: []             # Paths to related entries
    

    2. Markdown Body (content)

    # {title}

    Summary

    2-3 sentence summary.

    Key Points

  • Point 1
  • Point 2
  • Original Content

    THE FULL ORIGINAL TEXT โ€” not truncated, not summarized. This is the authoritative source for re-reading and quoting.

    Quotes

    > Notable quotes worth highlighting

    Notes

    Personal observations, connections, action items.

    Related

  • [[library/tweets/related-tweet]]
  • [[library/articles/related-article]]
  • โš ๏ธ MANDATORY: Always save original full text in "Original Content" section. Summaries and key points are for quick retrieval. The original text is for accurate re-reading and quoting. Never skip saving the full content.

    Filename Convention

    -.md

    Examples:

  • library/articles/yc-why-not-work-and-startup-2026-03-12.md
  • library/tweets/garry-tan-on-yc-advice-2026-03-13.md
  • library/videos/how-to-build-agents-2026-03-13.md
  • Save Workflow

    1. Detect URL โ€” Parse link from user message 2. Identify type โ€” Match URL pattern to content type 3. Check dedup โ€” memory_search("URL or title") to avoid duplicates 4. Fetch content โ€” Use appropriate method from table above 5. Generate metadata โ€” Title, summary, key points, tags (3-7) 6. Write entry โ€” Use template, fill frontmatter + full original text 7. Confirm โ€” Tell user: title, tags, and where it's saved

    Search & Retrieval

    # Semantic search
    memory_search("ๅˆ›ไธšๆ–นๆณ•่ฎบ")
    memory_search("Garry Tan ็š„ๆŽจๆ–‡")
    memory_search("AI agent ่ง†้ข‘ๆ•™็จ‹")

    Read specific entry

    memory_get("library/tweets/garry-tan-on-yc-2026-03-13.md")

    When returning search results, show:

  • Title + source + date
  • Summary (2 lines max)
  • Tags
  • Offer to show full original text
  • Writing Reference Mode

    When user asks to write something using saved content:

    1. Search library for relevant entries 2. Read full original text of top matches 3. Synthesize insights, cite sources inline 4. Format citations as [[library/type/entry-name]]

    Templates

    Located in templates/:

  • article.md โ€” Web articles, blog posts, newsletters
  • tweet.md โ€” Twitter/X posts and threads
  • video.md โ€” Videos with transcript
  • podcast.md โ€” Podcast episodes
  • paper.md โ€” Academic papers
  • image.md โ€” Visual content
  • Best Practices

  • Save originals religiously โ€” summaries lose nuance
  • Tag consistently โ€” reuse existing tags, keep vocabulary tight
  • Link related entries โ€” build a knowledge graph over time
  • Don't over-ask โ€” if interest is clear, just save and confirm
  • ๐Ÿ“‹ Tips & Best Practices

  • Save originals religiously โ€” summaries lose nuance
  • Tag consistently โ€” reuse existing tags, keep vocabulary tight
  • Link related entries โ€” build a knowledge graph over time
  • Don't over-ask โ€” if interest is clear, just save and confirm