← 返回 Skills 市场
hx-w

fragments

作者 CarOL · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
93
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install fragments
功能描述
Fragmented work logging and idea capture powered by Memos. Full memo lifecycle: create, search, update, delete, and comment. Daily-log: structured work journ...
使用说明 (SKILL.md)

Fragments

Setup Check

  1. Read ~/.config/fragments.json (Windows: %USERPROFILE%\.config\fragments.json).
  2. If file missing → first install. Detect current platform, read the matching setup guide:
    • Claude Code → references/setup-claude-code.md
    • OpenCode → references/setup-opencode.md
    • OpenClaw → references/setup-openclaw.md
  3. If file exists → verify MCP is configured. If incomplete → read the matching setup guide.
  4. All good → proceed to normal usage.

Platform Detection

Detect the current platform by checking for platform-specific markers:

Platform Detection Marker
Claude Code ~/.claude/ directory exists
OpenCode ~/.config/opencode/ directory exists
OpenClaw ~/.openclaw/ directory exists

Modes

memo — Full Lifecycle Management

Create, search, update, delete, and comment on memos via MCP tools.

Workflows:

  • Create & dedup → references/memo-capture.md
  • Update & delete → references/memo-capture.md#lifecycle
  • Comments → references/memo-comments.md

Write operations require user confirmation before calling.

daily-log — Daily Work Journal

One structured log per user per day. Content follows .plan format enforced by the Memos server.

Format rules, diff-merge logic, and hook trigger workflow: → references/daily-log.md

search — Semantic Search

Server-side full-text retrieval via MCP, optional client-side TF-IDF + LSA rerank for semantic/fuzzy queries.

Pipeline details and tuning parameters: → references/search-strategy.md

Retrieval Strategy

Data volume can be large. Always prefer targeted retrieval over bulk listing.

Memos

  1. Search first: memos_search_memos(query=...) — use when the user has any intent, keyword, or topic. Returns bounded results.
  2. Get by ID: memos_get_memo(name=...) — use when you already know the memo name. Expand full content only for shortlisted results.
  3. List as fallback: memos_list_memos(page_size=10) — use only for explicit "show recent" requests. Always set a small page_size.
  4. Client-side rerank: pipe search results through scripts/fragments_search.py for semantic ranking when server-side results need refinement.

Comments

  • List comments: memos_list_memo_comments(name=...) — retrieve all comments on a memo. Comments inherit the parent memo's visibility.

Daily Logs

  1. Get by date: memos_get_daily_log(date=YYYY-MM-DD) — single log lookup. Pass creator="users/{id}" to view another user's log (PROTECTED visibility).
  2. List with date range: memos_list_daily_logs(start_date, end_date, page_size=10) — use only for explicit "show this week/month" requests. Always bound the range.

Tags

  • memos_list_tags — lightweight, use to discover available tags for filtering.

No read operations require user confirmation.

Write Operations

All write operations require explicit user confirmation before calling. Read operations need no confirmation. Never echo PAT tokens to the conversation.

Memo Writes

Operation MCP Tool When to Use
Create memos_create_memo New idea, note, snippet
Update memos_update_memo Modify content, visibility, pin
Delete memos_delete_memo Remove memo (irreversible)
Add comment memos_create_memo_comment Append discussion to memo

Daily Log Writes

  • memos_save_daily_log(date=..., content=...) — full replacement save. Always include complete content (existing + new lines).

Hook Workflow (Passive Trigger)

When triggered by agent task completion:

  1. Assess whether this session performed meaningful work. Skip if trivial.
  2. Call memos_get_daily_log for today's date.
  3. Format new entries in .plan style.
  4. Diff against existing content. Skip if no new information.
  5. Long-form content → suggest creating a memo first, reference in daily log.
  6. Show user the full merged log (existing + new). Wait for confirmation.
  7. Call memos_save_daily_log with complete content (full replacement).
安全使用建议
What to check before installing: 1) Credentials & manifest mismatch: The skill requires you to provide and store a Memos Personal Access Token (MEMOS_PAT/PAT_TOKEN) and a MEMOS_URL, but these are not declared in the registry metadata. Expect the skill to ask for and write that PAT into ~/.config/fragments.json or platform config files—only proceed if you trust the Memos instance and the token's scope is minimal. 2) Backup configs: The setup flow merges entries into .mcp.json / ~/.claude/settings.json / ~/.openclaw/openclaw.json and may write hooks or plugin files into your global or project directories. Back up those config files before letting the agent perform merges or writes. 3) Inspect provided code: The included plugin (assets/opencode/plugin.ts) and hook templates are small and readable; the Python reranker (scripts/fragments_search.py) runs locally and requires numpy. Review these files yourself (they are bundled) to ensure behavior is acceptable. 4) Dependencies & environment: The skill expects python3 and numpy for client-side reranking and platform-specific commands (curl/Invoke-WebRequest) for status checks. The manifest doesn't list these—ensure your environment has them or that you accept installing them. 5) Confirm write actions interactively: The skill's docs state writes require explicit user confirmation. When the agent asks for PAT, config merges, or to install hooks/plugins, verify each prompt and prefer project-level installs rather than global when possible. 6) Principle of least privilege: Create a PAT with the minimal permissions needed by Memos, and consider using a short-lived or scoped token if possible. After installation, check where the token is stored and consider file permissions on that config file. If any of these points concern you or you need a manifest correction (to declare required env vars and dependencies), ask the skill author/maintainer to update the registry metadata before proceeding.
能力评估
Purpose & Capability
The skill claims to integrate with a Memos server (create/search/update/delete memos, daily logs) which legitimately requires a Memos instance URL and a Personal Access Token (PAT). However the registry metadata declares no required environment variables or credentials. Multiple files (assets/openclaw/mcp.json, assets/opencode/mcp.json, references/setup-*.md, assets/openclaw/hook/HOOK.md) clearly reference MEMOS_URL, MEMOS_PAT or PAT_TOKEN and instruct writing a local fragments.json containing a pat_token and site_url. The omission of these required credentials from the skill manifest is an incoherence that should be corrected/clarified.
Instruction Scope
SKILL.md and the referenced setup guides instruct the agent (and user) to read and write local configuration files (~/.config/fragments.json, ~/.claude/settings.json, .mcp.json, ~/.openclaw/config.json, project plugin directories), merge MCP configuration, and optionally install hooks/plugins into user/global directories. Those actions are within scope for a Memos integration but are intrusive: they modify user and project config files and add hooks that will prompt after sessions. The instructions do state user confirmation is required before writes, and not to echo tokens, but they still direct persistent changes to the user's environment and system files—users should expect and consent to that.
Install Mechanism
There is no network install spec (no downloads), so no arbitrary remote code is fetched at install time. The skill includes local code files (plugin.ts and a Python script) that the setup guides instruct the user/agent to copy into platform plugin directories. The Python script requires numpy, but the skill manifest does not declare this runtime dependency nor required binaries. This is a modest mismatch: low risk for remote code fetching, but the missing dependency declaration is an omission to surface to users.
Credentials
Although the manifest lists no required env vars, the skill repeatedly requires and/or configures credentials: MEMOS_PAT / MEMOS_URL / PAT_TOKEN are referenced across MCP templates and setup docs. The setup flows instruct collecting a Personal Access Token and storing it in ~/.config/fragments.json or in platform config files. Requesting a PAT is expected for this purpose, but the manifest omission and the fact the skill will write that token into local config (and add it to MCP headers) are proportional only if the user expects to grant that token. The skill also suggests adding environment variables to OpenClaw config, which creates persistent credential exposure—users should ensure the PAT has minimal scope and that they trust the target Memos instance.
Persistence & Privilege
always:false (good), but the setup instructions intentionally install persistent hooks/plugins and merge MCP configs into project or global config files. That gives the skill a lasting presence (hooks that prompt after sessions and MCP entries that allow API calls). Autonomous invocation (disable-model-invocation:false) is the platform default; combined with the persistent hooks and stored PATs, this increases the blast radius if the skill or environment is later compromised. There is no evidence the skill attempts to modify other skills' configs beyond adding its own entries, but it does write to global user configs unless the user prefers project-level installation.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fragments
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fragments 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the "fragments" skill: fragmented work logging and idea capture via Memos, with structured and confirmable workflows. - Capture, search, update, delete, and comment on memos via explicit triggers or passive agent hooks. - Daily work journal in structured `.plan` format, with lifecycle management and integration into agent workflows. - Advanced search features: semantic search, limited result sets, and client-side reranking. - Platform autodetection (Claude Code, OpenCode, OpenClaw) and first-boot setup guidance. - Enforces user confirmation for all write operations; read actions require none. **MUST use docker image** https://hub.docker.com/repository/docker/deepshape/memos
元数据
Slug fragments
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

fragments 是什么?

Fragmented work logging and idea capture powered by Memos. Full memo lifecycle: create, search, update, delete, and comment. Daily-log: structured work journ... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 93 次。

如何安装 fragments?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install fragments」即可一键安装,无需额外配置。

fragments 是免费的吗?

是的,fragments 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

fragments 支持哪些平台?

fragments 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 fragments?

由 CarOL(@hx-w)开发并维护,当前版本 v1.0.0。

💬 留言讨论