返回技能列表

c-memory

daxaur
更新于 2 days ago
7 次查看
143
6
143
在 GitHub 上查看
开发memorycontextpersistence

关于

c-memory enables persistent memory across Claude Code sessions by storing facts, preferences, and context in local markdown files. It automatically loads key information from `~/.claude/memory/MEMORY.md` at session start and allows saving important learnings during interactions. Developers should use this skill to maintain continuity and personalization across multiple coding sessions.

快速安装

Claude Code

推荐
主要方式
npx skills add daxaur/openpaw -a claude-code
插件命令备选方式
/plugin add https://github.com/daxaur/openpaw
Git 克隆备选方式
git clone https://github.com/daxaur/openpaw.git ~/.claude/skills/c-memory

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Memory — Persistent Context

Store and recall facts, preferences, and context across Claude Code sessions.

How It Works

Memory lives in ~/.claude/memory/ as plain markdown files. Read them at session start, write to them when you learn something important.

Directory Structure

~/.claude/memory/
├── MEMORY.md          # Key facts — always read this first
├── people.md          # People the user mentions (names, roles, preferences)
├── preferences.md     # User preferences (tools, workflows, habits)
├── projects.md        # Active projects and their context
└── journal.md         # Session log — append-only, dated entries

Session Start

At the beginning of every session, read ~/.claude/memory/MEMORY.md to load context. This file should be concise — under 100 lines.

When to Save

Save to memory when the user:

  • Shares their name, role, or preferences
  • Mentions people they work with
  • Describes a project or recurring task
  • Says "remember this" or "don't forget"
  • Corrects you about something

Writing Rules

  • MEMORY.md: Key facts only. Keep under 100 lines. Update, don't append.
  • people.md: Name, role, relationship, preferences. One section per person.
  • preferences.md: Tools, workflows, communication preferences.
  • projects.md: Project name, status, key files, context.
  • journal.md: Append a dated entry at the end of each session summarizing what was done.

Commands

# Read memory
cat ~/.claude/memory/MEMORY.md

# List memory files
ls ~/.claude/memory/

# Append to journal
echo "## $(date +%Y-%m-%d)" >> ~/.claude/memory/journal.md

Example MEMORY.md

# Memory

## User
- Name: Alex
- Role: Frontend developer
- Prefers TypeScript, uses Neovim
- Timezone: PST

## Active Projects
- ctrl.build — DeFi workflow automation (Next.js + Solidity)
- openpaw — CLI tool for Claude Code setup

## Preferences
- Concise responses, no emoji unless asked
- Always use bun instead of npm
- Dark mode everything

Guidelines

  • Never store passwords, API keys, or secrets in memory files
  • Always ask before overwriting existing memory entries
  • If memory files don't exist, create them on first write
  • Keep MEMORY.md focused — move details to topic-specific files

Obsidian Sync (Auto)

If c-obsidian is also installed (check ls ~/.claude/skills/c-obsidian/), automatically sync memory to Obsidian:

On Memory Write

When saving to any memory file, also mirror to Obsidian in an AI/ folder:

obsidian-cli create "AI/Memory" --content "$(cat ~/.claude/memory/MEMORY.md)"
obsidian-cli create "AI/People" --content "$(cat ~/.claude/memory/people.md)"
obsidian-cli create "AI/Preferences" --content "$(cat ~/.claude/memory/preferences.md)"
obsidian-cli create "AI/Projects" --content "$(cat ~/.claude/memory/projects.md)"

Journal → Daily Note

Append session logs to both journal.md and Obsidian's daily note:

obsidian-cli append "$(date +%Y-%m-%d)" "### Claude Session $(date +%H:%M)\n- [summary]"
echo "## $(date +%Y-%m-%d %H:%M)\n- [summary]" >> ~/.claude/memory/journal.md

On Session Start

After reading ~/.claude/memory/MEMORY.md, check Obsidian for newer content:

obsidian-cli search --folder "AI" "Memory"

If the Obsidian version has additional facts, merge them into ~/.claude/memory/MEMORY.md.

Conflict Resolution

  • ~/.claude/memory/ is the authoritative quick-access cache
  • Obsidian is the long-term archive and rich knowledge base
  • When in doubt, prefer the most recently modified version

GitHub 仓库

daxaur/openpaw
路径: skills/c-memory
0
ai-agentanthropicautomationclaudeclaude-codecli

相关推荐技能

qmd

开发

这是一个本地搜索和索引的CLI工具,支持BM25、向量搜索和重排序功能。开发者可以用它快速索引本地文件(如Markdown文档)并进行混合搜索,特别适合代码库或文档的本地检索。它还提供MCP模式,能轻松集成到Claude开发环境中使用。

查看技能

subagent-driven-development

开发

该Skill用于在当前会话中执行包含独立任务的实施计划,它会为每个任务分派一个全新的子代理并在任务间进行代码审查。这种"全新子代理+任务间审查"的模式既能保障代码质量,又能实现快速迭代。适合需要在当前会话中连续执行独立任务,并希望在每个任务后都有质量把关的开发场景。

查看技能

mcporter

开发

mcporter Skill 让开发者能在Claude中直接管理和调用MCP服务器。它支持列出可用服务器、调用工具、处理OAuth认证以及管理服务器守护进程。开发者可以通过命令行式交互快速执行`mcporter list`查看服务器,或使用`mcporter call`直接调用工具,简化了MCP工作流程。

查看技能

adk-deployment-specialist

开发

这是一个用于部署和编排Google Vertex AI ADK智能体的Claude Skill,专为构建生产级多智能体系统而设计。它支持通过A2A协议进行智能体通信,提供代码执行沙箱和记忆库功能,并能处理智能体发现与任务提交。当开发者需要部署ADK智能体或编排多智能体协作时,可使用此Skill来简化Vertex AI Agent Engine的部署流程。

查看技能