Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

memory-bank记忆库

Agent Skill

memory-bank 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

541

周安装

23

GitHub Stars

公开资料未说明

下载量

190
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:memory-bank(记忆库)
来源仓库:https://github.com/halilbarim/hbm-skills
仓库路径:skills/memory-bank
安装命令:
npx skills add https://github.com/halilbarim/hbm-skills --skill memory-bank
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/halilbarim/hbm-skills --skill memory-bank

简介

维护项目记忆库,记录上下文、决策历史与关键知识点。

  • 适用于长期项目协作、知识传承和 Agent 行为校准场景。
  • 采用标准化模板组织信息,便于后续引用与回溯分析。
  • 写入内容需经用户确认,防止误记或敏感数据泄露。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • memory-bank 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Memory Bank Skill

Overview

Memory Bank is a cross-session context continuity system for AI coding agents. It maintains a memory-bank/ directory in the project root with structured markdown files that capture project knowledge, architecture decisions, progress, and active context. Every AI agent reads these files at session start, ensuring continuity across sessions and across different agents working on the same project.

This skill handles four intents: SETUP, UPDATE, STATUS, and READ. It detects user intent from natural language in any language.

Intent Detection

Detect the user's intent from their message. The user may write in any language — use natural language understanding to map to the correct intent.

IntentTrigger Words (examples, not exhaustive)
SETUPsetup, install, initialize, init, create, bootstrap, kur, kurulum, başlat, einrichten, configurar, installer, configurer, 설치, セットアップ
UPDATEupdate, refresh, sync, güncelle, yenile, aktualisieren, actualizar, mettre à jour, 업데이트, 更新
STATUSstatus, check, durumu, durum, kontrol, estado, statut, 상태, ステータス
READread, show, review, display, present, oku, göster, lesen, anzeigen, lire, leer, mostrar, 읽기, 読む

Route to the matching flow below. If the intent is ambiguous, ask the user which action they want.


SETUP Flow

Follow these steps in order. Get user confirmation at each major step.

Step 1: Language & Profile Preference

1a. Language:

Ask the user which language the memory bank files should be written in:

  • TR (Turkish)
  • EN (English)

Store this choice — all file headings, labels, and descriptions will be in this language. Templates in templates/ are in English; translate headings and labels to the chosen language when filling them.

1b. Profile:

Ask the user which profile they want:

  • Basic (7 files) — Suitable for small/medium projects. Includes the core files for project context, architecture, tech stack, active context, and progress tracking.
  • Extended (7 core + optional extra files) — Suitable for enterprise/production projects. Includes the core files plus specialized files for business logic, data models, security, observability, and more.

If the user selects Extended, present the list of optional extended files and let them pick which ones they need:

Extended FilePurpose
businessLogic.mdDomain rules, business workflows, validation logic
dataModel.mdDatabase schema, entity relationships, data flow
dependencies.mdDetailed dependency map, version constraints, upgrade notes
events.mdEvent-driven architecture, pub/sub topics, event schemas
externalIntegrations.md3rd party APIs, webhooks, service contracts
featureToggles.mdFeature flags, A/B tests, gradual rollout rules
observability.mdLogging, monitoring, tracing, alerting setup
security.mdAuth flows, security policies, vulnerability tracking
technicalDebt.mdKnown debt items, refactoring priorities, cleanup plans
contextCoverage.mdMemory bank completeness tracking, coverage gaps

The user can select all, some, or none. Store the selection for Steps 4 and 5.

Step 2: Ask User Which Agent(s) They Use

CRITICAL: This skill can run inside any agent (Claude Code, Cursor, Windsurf, Cline, etc.). The agent running this skill is NOT necessarily the agent the user wants to configure. You MUST always ask the user which agent(s) they use for this project. NEVER assume the running agent is the target. NEVER skip this question. NEVER auto-create a rules file based on which agent you are.

2a. Ask the user:

Ask: "Which AI coding agent(s) do you use for this project?" and present these options:

  • Claude Code → CLAUDE.md or .claude/rules/*.md
  • Cursor → .cursor/rules/*.mdc (legacy: .cursorrules)
  • Windsurf → .windsurf/rules/*.md (legacy: .windsurfrules)
  • Cline → .clinerules/ directory or .clinerules file
  • GitHub Copilot → .github/copilot-instructions.md
  • Roo Code → .roo/rules/*.md (legacy: .roorules)
  • Aider → CONVENTIONS.md + .aider.conf.yml
  • Antigravity → .gemini/GEMINI.md
  • OpenAI Codex → AGENTS.md
  • Other → ask for the rules file name/path

The user may select multiple agents. Store the selection for Step 3.

2b. Scan for existing rules files:

Read reference.md for the full agent-to-rules-file mapping table.

IMPORTANT: Rules files are NOT always in the project root. Search the ENTIRE project tree to find them. Use glob/find patterns to locate all known rules files regardless of their location.

Search for the rules files of the agent(s) the user selected:

AgentFile Names to Search
Claude CodeCLAUDE.md, .claude/CLAUDE.md, .claude/rules/*.md
Cursor.cursor/rules/*.mdc, .cursorrules (legacy)
Windsurf.windsurf/rules/*.md, .windsurfrules (legacy)
Cline.clinerules/ (directory), .clinerules (file)
GitHub Copilot.github/copilot-instructions.md, .github/instructions/*.instructions.md
Roo Code.roo/rules/*.md, .roorules (legacy)
AiderCONVENTIONS.md, .aider.conf.yml
Antigravity.gemini/GEMINI.md
OpenAI CodexAGENTS.md

Search strategy:

  1. Use glob patterns like **/.cursor/rules/*.mdc, **/.windsurf/rules/*.md, **/CLAUDE.md, **/.claude/rules/*.md, **/.clinerules, **/.github/copilot-instructions.md, **/.roo/rules/*.md, **/.aider.conf.yml, **/CONVENTIONS.md, **/AGENTS.md, **/.gemini/GEMINI.md
  2. Also search for legacy files: **/.cursorrules, **/.windsurfrules, **/.roorules
  3. Exclude node_modules/, .git/, dist/, build/, .next/, vendor/ directories from search
  4. For ambiguous names (like CONVENTIONS.md), verify by checking parent directory context

2c. Report results and handle unrecognized agents:

  • If the rules file for the user's selected agent(s) already exists, report the path(s) and proceed to inject the protocol
  • If the rules file does not exist, create it at the standard location for that agent
  • If the user selected multiple agents, handle each one
  • If the user's agent is NOT in the supported list above, or the agent cannot be matched to a known rules file format:

1. Create AGENTS.md in the project root as a generic fallback 2. Inject the Memory Bank protocol into AGENTS.md 3. Display a clear warning to the user: ⚠️ Your agent ([agent name]) is not in our supported list. The Memory Bank protocol has been written to AGENTS.md in the project root. For Memory Bank to work correctly, you MUST manually add or copy the contents of AGENTS.md into your agent's own rules file. Please check your agent's documentation for the correct rules file location and format, then ensure the Memory Bank protocol is included. 4. This ensures the protocol content is available even if automatic injection isn't possible

Step 3: Inject Protocol into Rules Files

For each selected rules file:

  1. Read the file
  2. Check if it already contains "Memory Bank Protocol" — if yes, skip it
  3. Read templates/rules-protocol.md for the protocol block
  4. Prepend the protocol block to the top of the file (before existing content)
  5. Show the user the change and get confirmation before writing

Step 4: Create memory-bank/ Directory

Check if memory-bank/ exists in the project root:

  • If it exists, check which files are present and only create missing ones
  • If it doesn't exist, create it

Core files (always created — 7 total):

  1. RULES.md
  2. projectbrief.md
  3. productContext.md
  4. systemPatterns.md
  5. techContext.md
  6. activeContext.md
  7. progress.md

Extended files (only if user selected Extended profile — based on their selection): 8. businessLogic.md 9. dataModel.md 10. dependencies.md 11. events.md 12. externalIntegrations.md 13. featureToggles.md 14. observability.md 15. security.md 16. technicalDebt.md 17. contextCoverage.md

Step 5: Fill Templates with Project Data

For each missing file:

  1. Read the corresponding template from templates/
  2. Scan the project for real data to fill the template:

- package.json — project name, dependencies, scripts - README.md — project description, vision - tsconfig.json / jsconfig.json — import aliases, compiler options - Folder structure — architecture patterns - Git log (last 10-20 commits) — recent changes, active work - Existing rules files — conventions, preferences

  1. Fill placeholders with discovered project data
  2. Translate headings/labels to the user's chosen language
  3. Show the filled content to the user
  4. Get approval before writing each file

Important: RULES.md is created from templates/RULES.md and is immutable after creation — the skill must never modify it in subsequent runs.

Step 6:.gitignore Check

Verify that memory-bank/ is NOT listed in .gitignore. Memory bank files should be committed to git so all team members and agents can access them.

If memory-bank/ is found in .gitignore, warn the user and offer to remove it.

Step 7: Validation Checklist

Run the validation checklist and display results:

[✓/✗] Rules file found and Memory Bank protocol injected
[✓/✗] memory-bank/ directory exists

Core files:
[✓/✗] RULES.md exists
[✓/✗] projectbrief.md exists
[✓/✗] productContext.md exists
[✓/✗] systemPatterns.md exists
[✓/✗] techContext.md exists
[✓/✗] activeContext.md exists
[✓/✗] progress.md exists

If Extended profile was selected, also validate the selected extended files:

Extended files:
[✓/✗] businessLogic.md exists
[✓/✗] dataModel.md exists
[✓/✗] dependencies.md exists
... (only show files the user selected)

If all pass, show completion message:

Memory Bank setup complete!
Profile: [Basic/Extended]
Agent: [agent name]
Rules file: [file path]
Memory Bank: memory-bank/ ([N] files)

From now on, memory-bank/ files will be read at every session start.
Try: "memory bank status" or "memory bank read"

If any fail, explain the issue and offer to fix it.


UPDATE Flow

Step 1: Read Current Memory Bank

Read all 7 files from memory-bank/ (skip RULES.md — it is immutable).

Step 2: Scan Current Project State

Gather current project information:

  • Git status, recent commits, current branch
  • Package.json changes (new dependencies, scripts)
  • Folder structure changes
  • Any new/modified rules files

Step 3: Detect Changes & Propose Updates

Compare current project state with memory bank contents. For each file that needs updates:

  1. Show what changed (diff-style or summary)
  2. Show proposed new content
  3. Get user approval before writing

Step 4: Write Approved Updates

Write only the approved changes. Add date stamps [YYYY-MM-DD] to entries.

Step 5: Summary

Show a summary of what was updated and what was left unchanged.


STATUS Flow

  1. Read memory-bank/activeContext.md
  2. Read memory-bank/progress.md
  3. Present a concise summary:

- Current focus / active work - Recent changes - What's completed - What's in progress - Known issues - Next steps

Respond in the same language as the existing memory bank files (auto-detect from headings).


READ Flow

  1. Read ALL files in memory-bank/
  2. Present the full context in an organized format:

- Start with project overview (from projectbrief.md) - Then product context (from productContext.md) - Then technical details (from techContext.md + systemPatterns.md) - Then current state (from activeContext.md + progress.md)

  1. Highlight any areas that appear outdated or incomplete

Respond in the same language as the existing memory bank files (auto-detect from headings).


Important Rules

  • NEVER modify memory-bank/RULES.md after initial creation
  • NEVER write secrets (API keys, tokens, passwords) to memory bank files
  • NEVER skip user confirmation for file writes during setup
  • Keep each file under 500 lines
  • Use date stamps [YYYY-MM-DD] for temporal entries
  • Don't duplicate information across files
  • When updating, preserve existing content and append/modify — don't overwrite entire files unless the user approves

For detailed rules, agent mapping, and update triggers, see reference.md.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.01%
按下载量换算70

Claude

30.08%
按下载量换算57

Cursor

19.67%
按下载量换算37

Gemini CLI

9.41%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills