Skip to content
Back to skills

Templates

ASecurity

Local shared AI memory hub for OpenCode. Use when the user mentions shared memory, cross-agent memory, Agent Radio, local memory, shared memory across AI tools, or asks OpenCode to remember durable preferences/project facts.

  • 20 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 5, 2026
ai-agentsgobashgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 15 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add monkey-sking/ai-memory-hub --skill templates --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Templates?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Templates
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monkey-sking-templates-c6f826c1/badge)](https://www.skillsdirectory.com/skills/monkey-sking-templates-c6f826c1)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ai-memory-hub
description: Local shared AI memory hub for OpenCode. Use when the user mentions shared memory, cross-agent memory, Agent Radio, local memory, shared memory across AI tools, or asks OpenCode to remember durable preferences/project facts.
version: 0.1.0
metadata: {"category":"memory","keywords":["shared memory","Agent Radio","local ledger","local memory","cross-agent memory"]}
---

# AI Memory Hub

Use the local shared memory directory as the durable cross-assistant memory hub:

```text
{{MEMORY_DIR}}
```

{{SHARED_SKILL_LAYER}}

## Shared AI Memory

At the start of a relevant session, read `{{MEMORY_DIR}}/MEMORY.md` if it exists and use it as durable user/project context.

When you learn a durable preference, project fact, workflow rule, or long-lived correction, append one JSON line to `{{MEMORY_DIR}}/inbox/events.jsonl`:

```json
{"source":"opencode","text":"short durable memory","metadata":{"kind":"preference|project|workflow|correction"}}
```

Do not edit `{{MEMORY_DIR}}/memories/ledger.jsonl` or `{{MEMORY_DIR}}/MEMORY.md` directly. These are managed by `ai-memory-hub`.

After appending a durable memory event, run this when command execution is available:

```bash
ai-memory-hub sync
```

If command execution is not available, the local watcher will index it later.

Only save durable facts. Do not save secrets, API keys, one-off commands, or transient chat details.

## Shared Task List

For active work that another AI tool may continue or help with, use the shared task list:

```bash
ai-memory-hub task list --status active
ai-memory-hub task add "short task title" --from opencode --project <project> --priority normal
ai-memory-hub task claim --id <task-id> --by opencode
ai-memory-hub task note --id <task-id> "handoff note or progress update" --by opencode
ai-memory-hub task done --id <task-id> --by opencode
```

Use task notes for current progress and handoff state. Use durable memory only for long-lived facts and rules.

## Shared Workflows

For multi-agent work with planner, executor, reviewer, and observer roles, prefer workflows over ad hoc tasks:

```bash
ai-memory-hub workflow list --status active
ai-memory-hub workflow create "short workflow title" --from opencode --project <project> --planner opencode --executor <tool> --reviewer <tool> --spawn-tasks
ai-memory-hub workflow start --id <workflow-id> --by opencode
ai-memory-hub workflow result --id <workflow-id> --role executor "execution result" --by opencode
ai-memory-hub workflow review --id <workflow-id> --role reviewer "review result" --by opencode
ai-memory-hub workflow signal --id <workflow-id> --to <role-or-tool> "handoff note" --by opencode
```

Use workflows when multiple tools may act as planner, executor, reviewer, or observer. Use standalone tasks for small single-owner work.

## Shared Agent Radio

For cross-agent handoffs, review requests, risk notes, and status updates, append JSONL messages to `{{MEMORY_DIR}}/radio/messages.jsonl`.

Use this shape:

```json
{"source":"opencode","from":"opencode","to":"all","type":"note","text":"short cross-agent message"}
```

## Contact Other AI Tools

Use `connect` when you need a specific AI tool to inspect, execute, review, or continue work. It writes a Radio message and can also create an assigned shared task.

```bash
ai-memory-hub connect status
ai-memory-hub connect request --from opencode --to codex --project <project> --text "please inspect this task" --task
ai-memory-hub connect review --from opencode --to codex --project <project> --text "please review this change" --task
ai-memory-hub connect handoff --from opencode --to codex --project <project> --text "handoff context and next step" --task
ai-memory-hub dispatch --to codex --project <project>
ai-memory-hub dispatch --to codex --project <project> --run
```

Use `--run` only for targets with verified CLI runners. Without `--run`, the request remains shared local state until the target tool reads it.

## Commands

```bash
ai-memory-hub status
ai-memory-hub sync
ai-memory-hub backup --reason opencode
ai-memory-hub task list --status active
ai-memory-hub workflow list --status active
ai-memory-hub radio list --limit 10
```

## Calling Marvis (Windows Desktop AI Assistant)

Marvis is a Windows desktop assistant with access to local files, system settings, Android apps (via emulator), and Windows desktop apps. When you need Marvis to perform a task in the local Windows environment, call its dispatch API.

The AI Memory Hub app server must be running. Start it if needed:

```bash
start /B ai-memory-hub app --port 38787
```

Then send a task to Marvis:

```bash
curl -s -X POST http://127.0.0.1:38787/api/dispatch/marvis ^
  -H "Content-Type: application/json" ^
  -d "{\"text\":\"Find all PDF invoices in D:\\Documents and convert them to a single Excel file at D:\\Documents\\invoices.xlsx\",\"from\":\"opencode\",\"project\":\"<project-name>\"}"
```

Marvis polls for queued tasks every 30 minutes via scheduled task, or immediately when the user sends any message.

**What to delegate to Marvis:**
- Windows file operations (find, organize, convert, clean up)
- Windows system settings (display, audio, network, power)
- Android app operations (Xiaohongshu, Meituan, Duolingo, WeChat mini-programs, etc.)
- Windows desktop app interactions (CapCut Pro, WeChat PC, Steam games)
- APK/app/game installation and management

**Do NOT delegate to Marvis:** web browsing, web search, code generation, git operations, cloud infrastructure.

Files in this skill

  • AGENTS.md7.5 KB
  • CLAUDE.md6.9 KB
  • COZE_SKILL.md5.8 KB
  • GEMINI.md6.8 KB
  • GROK_SKILL.md5.7 KB
  • HERMES_AGENTS.md2.7 KB
  • MARVIS_SKILL.md4 KB
  • MIMOCODE_SKILL.md4.4 KB
  • OPENCLAW_SKILL.md5.4 KB
  • OPENCODE_SKILL.md5.4 KB
  • QCLAW_SKILL.md5.4 KB
  • dashboard-v2.html477 B
  • shared-instructions.md7.1 KB
  • shared-skill-layer.md4.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.