memory

GitHub

提供持久化知识管理CLI,支持搜索、存储和更新项目约定、可复用修复及架构规则。强调在深度工作前检索上下文,并通过严格的质量门禁确保数据准确、安全且非冗余,避免保存临时信息或机密数据。

skills/memory/SKILL.md codeaholicguy/ai-devkit

Trigger Scenarios

进行实现、调试、审查、规划或文档编写任务时 需要记录经过验证的项目规范、偏好或故障模式时 发现现有记忆过时或冲突需修正时

Install

npx skills add codeaholicguy/ai-devkit --skill memory -g -y
More Options

Use without installing

npx skills use codeaholicguy/ai-devkit@memory

指定 Agent (Claude Code)

npx skills add codeaholicguy/ai-devkit --skill memory -a claude-code -g -y

安装 repo 全部 skill

npx skills add codeaholicguy/ai-devkit --all -g -y

预览 repo 内 skill

npx skills add codeaholicguy/ai-devkit --list

SKILL.md

Frontmatter
{
    "name": "memory",
    "description": "AI DevKit · Use the memory CLI as a durable knowledge layer. Search before non-trivial work, store verified reusable knowledge, update stale entries, and avoid saving transcripts, secrets, or one-off task progress."
}

AI DevKit Memory CLI

Use npx ai-devkit@latest memory ... as the durable knowledge layer.

Workflow

  1. For implementation, debugging, review, planning, or documentation tasks, search before deep work unless the task is trivial:

    npx ai-devkit@latest memory search --query "<task, subsystem, error, or convention>" --limit 5
    

    For broad or risky tasks, search multiple angles: subsystem, error text, framework, command, and task intent.

  2. Use results as context:

    • Trust repo files, tests, fresh command output, and explicit user instructions over memory.
    • If memory conflicts with verified evidence, use the evidence and update the stale memory.
    • Mention memory only when it changes the plan or avoids asking the user again.
  3. Search before storing:

    npx ai-devkit@latest memory search --query "<knowledge to store>" --table
    
  4. Store or update only after the quality gate passes.

Quality Gate

Before storing, all must be true:

  • Future sessions are likely to reuse it.
  • It is verified by code, docs, tests, command output, or explicit user instruction.
  • It is not merely a restatement of obvious nearby files unless it prevents repeated agent mistakes.
  • It is scoped narrowly enough.
  • Existing memory does not already cover it.
  • It contains no secrets, credentials, private customer data, personal data, raw logs, or temporary paths.

Store:

  • Project conventions, user preferences, durable decisions.
  • Reusable fixes, testing patterns, commands, setup gotchas.
  • Non-obvious constraints, architecture rules, failure patterns.

Do not store:

  • Task progress, transcripts, speculation, generic programming facts.
  • Raw errors without diagnosis.
  • Anything the user did not intend to persist.

Commands

Search

npx ai-devkit@latest memory search \
  --query "<query>" \
  --tags "<tags>" \
  --scope "<scope>" \
  --limit 5

Use --table to get IDs for updates:

npx ai-devkit@latest memory search --query "<query>" --table

Options: --query/-q required; --tags; --scope/-s; --limit/-l from 1-20; --table.

Store

npx ai-devkit@latest memory store \
  --title "<actionable title, 10-100 chars>" \
  --content "<context, guidance, evidence, exceptions>" \
  --tags "<lowercase,tags>" \
  --scope "<global|project:name|repo:org/repo>"

Use this content shape when helpful:

Context: Where this applies.
Guidance: What to do.
Evidence: File, command, test, or user instruction.
Exceptions: When not to apply it.

Update

Find the ID with search --table, then update only changed fields:

npx ai-devkit@latest memory update \
  --id "<memory-id>" \
  --title "<updated title>" \
  --content "<updated content>" \
  --tags "<replacement,tags>" \
  --scope "<updated scope>"

--tags replaces all existing tags.

Scoping

Use the narrowest useful scope:

  • repo:<org/repo> for one repository.
  • project:<name> for one app, product, or workspace.
  • global only for knowledge that applies across unrelated projects.

If unsure, use a narrower scope.

Troubleshooting

  • CLI missing: run npx ai-devkit@latest --version.
  • Duplicate title: search, then update the existing item if it is the same knowledge.
  • Empty results: broaden terms, remove filters, or search symptoms and subsystem names separately.
  • Validation error: check title/content lengths, query length, and --limit range.
  • DB path: default is ~/.ai-devkit/memory.db; project config can override it automatically.

Version History

  • d4caf56 Current 2026-07-05 15:22

Same Skill Collection

skills/agent-communication/SKILL.md
skills/agent-management/SKILL.md
skills/changelog/SKILL.md
skills/dev-commit/SKILL.md
skills/dev-design/SKILL.md
skills/dev-implementation/SKILL.md
skills/dev-lifecycle/SKILL.md
skills/dev-planning/SKILL.md
skills/dev-pr/SKILL.md
skills/dev-requirements/SKILL.md
skills/dev-review/SKILL.md
skills/dev-testing/SKILL.md
skills/dev-worktree/SKILL.md
skills/document-code/SKILL.md
skills/security-review/SKILL.md
skills/simplify-implementation/SKILL.md
skills/structured-debug/SKILL.md
skills/task/SKILL.md
skills/tdd/SKILL.md
skills/technical-writer/SKILL.md
skills/verify/SKILL.md

Metadata

Files
0
Version
d4caf56
Hash
b76bf798
Indexed
2026-07-05 15:22

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-14 11:36
浙ICP备14020137号-1 $Map of visitor$