Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@macrodata/opencode

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@macrodata/opencode

Persistent local memory for AI coding agents - journal, semantic search, reminders, and context injection

Source
npmnpm
Version
0.0.0
Version published
Weekly downloads
14
-56.25%
Maintainers
1
Weekly downloads
 
Created
Source

Macrodata Local Plugin

Local file-based memory for Claude Code. Zero infrastructure, fully offline.

Using OpenCode? See opencode-macrodata for the OpenCode plugin.

Installation

/plugin marketplace add ascorbic/macrodata
/plugin install macrodata@macrodata

What It Does

  • Session context injection - On session start, injects your identity, current state, and recent journal
  • File-based memory - All state stored as markdown files in ~/.config/macrodata/
  • Semantic search - Search across journal, entity files, and past conversations
  • Conversation history - Search and retrieve context from past Claude Code sessions
  • Auto-journaling - Automatically logs git commands and file changes
  • Session summaries - Auto-saves conversation summaries before context compaction
  • Scheduling - Cron-based and one-shot reminders

File Structure

~/.config/macrodata/
├── state/
│   ├── identity.md      # Agent persona
│   ├── today.md         # Daily focus
│   ├── human.md         # User profile
│   ├── workspace.md     # Current project context
│   └── topics.md        # Working knowledge index
├── entities/
│   ├── people/          # One file per person
│   └── projects/        # One file per project
├── journal/             # JSONL, date-partitioned
├── signals/             # Raw events for future analysis
├── .schedules.json      # Reminders config
└── .index/
    ├── vectors/         # Memory embeddings
    └── conversations/   # Conversation embeddings

MCP Tools

Core Memory

ToolPurpose
get_contextPaths and dynamic context (schedules, recent journal)
log_journalAppend timestamped entry (auto-indexed for search)
get_recent_journalGet recent entries, optionally filtered by topic
log_signalLog raw events for later analysis
search_memorySemantic search across journal and entities
rebuild_memory_indexRebuild the search index from scratch
get_memory_index_statsIndex statistics

Conversation History

ToolPurpose
search_conversationsSearch past sessions (project-biased, time-weighted)
expand_conversationLoad full context from a past conversation
rebuild_conversation_indexIndex Claude Code's conversation logs
get_conversation_index_statsConversation index statistics

Session Management

ToolPurpose
save_conversation_summarySave session summary for context recovery
get_recent_summariesRetrieve recent session summaries

Scheduling

ToolPurpose
schedule_reminderCreate recurring reminder (cron)
schedule_onceCreate one-shot reminder
list_remindersList active schedules
remove_reminderDelete a reminder

Hooks

The plugin uses Claude Code hooks for automatic behavior:

HookBehavior
SessionStartStart daemon, inject context
UserPromptSubmitInject pending reminders
PreCompactAuto-save conversation summary before compaction
SessionEndSave summary if significant work was done
PostToolUse (Bash)Auto-log git commands
PostToolUse (Write/Edit)Auto-log file changes

First Run

On first run (no state/identity.md exists), the plugin will prompt you to set up your identity:

  • What should the agent call you?
  • Any particular way you'd like it to work with you?
  • What are you working on right now?

The agent will create your state/identity.md and initial state files.

Configuration

To use a custom storage directory, create ~/.claude/macrodata.json:

{
  "root": "/path/to/your/macrodata"
}

Default location is ~/.config/macrodata.

Daemon

A background daemon handles:

  • Scheduled reminders (cron and one-shot)
  • File watching for index updates

The daemon is automatically started by the hook script on session start.

Development

cd plugins/macrodata
bun install

# Run MCP server
bun run start

# Run daemon
bun run daemon

# Type check
bun run check

Keywords

opencode

FAQs

Package last updated on 03 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts