personal-memory
Personal Memory
This skill manages memory in two contexts:
- User level: rooted at
~/.codex - Project level: rooted at the project directory
For any selected root, the skill manages:
AGENTS.mdpersonal-memory/automation/
Script Directory
Important: All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions:
- Determine this
SKILL.mdfile's directory path asSKILL_DIR - Script path =
${SKILL_DIR}/scripts/<script-name>.py - Replace all
${SKILL_DIR}in this document with the actual path
Files
README.md: 当前 memory 目录的最小说明和入口命令profile.md: explicitly confirmed user preferencessummary.md: promoted memory digest for fast lookupobservations.jsonl: raw captured observationsfacts.jsonl: promoted facts and stable preferencespatterns.jsonl: promoted workflow patternsanti_patterns.jsonl: promoted repeated failures and things to avoid
Rules
- User level: store only cross-project, user-level information.
- Project level: store only information that is valid inside that project.
- Never store secrets, tokens, credentials, or sensitive private data.
- Do not promote single incidents into long-term memory.
- Project-specific facts may be captured only as
scope=project, but they must not be promoted into user-level memory.
Commands
Check initialization status:
python3 ${SKILL_DIR}/scripts/memory_cli.py status --level user
python3 ${SKILL_DIR}/scripts/memory_cli.py status --level project --root /path/to/project
Initialize AGENTS, personal-memory, and automation:
python3 ${SKILL_DIR}/scripts/memory_cli.py init --level user
python3 ${SKILL_DIR}/scripts/memory_cli.py init --level project --root /path/to/project
Show summary:
python3 ${SKILL_DIR}/scripts/memory_cli.py show
Search memory:
python3 ${SKILL_DIR}/scripts/memory_cli.py show 中文
List long-term memory records:
python3 ${SKILL_DIR}/scripts/memory_cli.py list
python3 ${SKILL_DIR}/scripts/memory_cli.py list --level project --root /path/to/project
Review recent Codex history and generate safe candidates:
python3 ${SKILL_DIR}/scripts/memory_cli.py review-history
Apply safe candidates into observations:
python3 ${SKILL_DIR}/scripts/memory_cli.py review-history --apply
If the user explicitly asks to remember something, write it directly as long-term memory:
python3 ${SKILL_DIR}/scripts/memory_cli.py remember \
--kind preference \
--scope user \
--summary "用户要求先给结论,再展开细节" \
--details "这是明确的跨项目沟通偏好"
Capture a preference, fact, pattern, or failure:
python3 ${SKILL_DIR}/scripts/memory_cli.py capture \
--kind preference \
--scope user \
--summary "用户要求始终使用简体中文回复" \
--details "这是明确声明的全局偏好" \
--source conversation \
--tag language
Promote repeated observations and rebuild summary:
python3 ${SKILL_DIR}/scripts/memory_cli.py evolve
Delete one memory:
python3 ${SKILL_DIR}/scripts/memory_cli.py forget --query 简体中文
Clear all stored memories:
python3 ${SKILL_DIR}/scripts/memory_cli.py clear --yes
Compatibility Notes
- Project-level memory should prefer the project-local skill copy, so generated commands and docs should point to the current skill directory instead of hard-coding
~/.codex. - User-level memory is agent-specific by nature. Different agents may keep their own user-level roots, summaries, and automation layouts.
- Therefore the stable boundary should be:
- user level = agent-owned runtime state
- project level = repo-owned shared convention
- The user-level root may be overridden with
PERSONAL_MEMORY_HOMEorCODEX_HOME. If neither is set, the default root is~/.codex. - If an agent wants to reuse this skill outside Codex, it should vendor the skill into the project or map
SKILL_DIRto its own installed location, rather than assuming~/.codex/skills/...exists.
Recommended Workflow
- First run
statusto determine whether the selected context is initialized. - If not initialized, run
init. - Before substantial work, read
summary.mdandprofile.mdif relevant. - When you observe durable information, capture it.
- When the user explicitly says to remember something, use
rememberdirectly. - Optionally run
review-historyto mine conservative candidates from recent Codex history. - After meaningful additions, run
evolveto refresh promoted memory. - Use promoted memory as guidance, not as unquestionable truth; prefer recent, higher-evidence records.
More from daqi/daqi-skills
article-polish
文章润色、校对与格式标准化。优化语气自然度、去除AI味,修正中英文空格及标点。
34article-analyzer
文章深度分析、解读与事实核查。用于提取核心观点、审视逻辑、评估价值及分析写作技巧。
23xhs-writer
小红书爆款文案助手。将技术或职场经历转化为情感共鸣强、极具传播力的故事。遵循S.L.R.A.模型。
19article-writer
大齐风格文章撰写与初稿生成。模拟通俗有趣、去AI味的专家口吻,输出高质量内容。
12article-outliner
生成写作提纲与文章结构策划。基于素材规划叙事逻辑、情绪曲线及差异化写作方案。
8skill-manager
skill查询与管理。列出所有可用skill清单,搜索及查看skill详细用法。
6