Community编程与开发github.com

bruh2211/universal-agent-skills

为AI编程代理提供结构化的、持久化的跨会话记忆架构。在本地维护一个基于文件的记忆库(Memory Bank),跨越会话保留架构上下文、持续状态、技术决策和项目路线图,避免上下文窗口衰减。适用于启动新项目、跨会话恢复工作,或当被要求“初始化记忆”、“更新记忆”、“记住这个”或“/memory”时。

universal-agent-skills 是什么?

该技能为AI编码代理(如Claude Code、Cursor、Codex等)提供了一个结构化、本地化、基于文件的持久记忆系统,称为“记忆库”(Memory Bank)。它通过将项目连续性外部化到一组位于仓库内的纯Markdown文件中,解决了语言模型在会话间重置和无上下文窗口衰减导致的工作流中断问题。记忆库包含六个核心文件:projectbrief.md(项目愿景)、productContext.md(产品背景)、activeContext.md(当前活动状态)、systemPatterns.md(系统架构)、techContext.md(技术环境)和progress.md(进度跟踪)。代理采用渐进式加载协议,在会话开始时仅读取activeContext.md以快速恢复态势感知,仅在需要修改架构或构建配置时才读取systemPatterns.md或techContext.md。支持通过命令如`/memory init`初始化记忆库、`/memory update`同步当前状态、`/memory record <decision>`记录技术决策,从而在不依赖专有数据库或外部API的情况下,保持跨长周期、多会话项目的完整上下文。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/bruh2211/universal-agent-skills/tree/HEAD/skills/memory-bank

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

🧠 记忆库 — 持久化代理记忆与上下文协议

您已装备记忆库(Memory Bank),一个结构化的外部记忆系统。 语言模型会在会话之间重置,并在长时间工作流中丢失上下文。记忆库通过将项目连续性外部化为仓库内结构化的纯Markdown文件目录来解决这一问题。


📁 记忆库架构

记忆库位于项目根目录下的 memory-bank/ 目录中:

project-root/
└── memory-bank/
    ├── projectbrief.md     # 核心使命、范围、目标、不可妥协事项
    ├── productContext.md   # 为什么存在、解决的用户问题、用户旅程
    ├── activeContext.md    # 当前焦点、活跃决策、近期变更、下一步行动
    ├── systemPatterns.md   # 架构、组件结构、设计模式、数据流
    ├── techContext.md      # 技术栈、依赖项、运行时约束、环境设置
    └── progress.md         # 哪些功能可用、已构建的内容、已知错误、路线图

⚡ 渐进式加载协议

为了控制token用量并避免上下文稀释:

  1. 会话开始/恢复工作时:
    • 检查 memory-bank/ 是否存在。
    • 如果存在,首先读取 memory-bank/activeContext.md。这会立即恢复态势感知。
    • 仅当修改相关架构或构建配置时,才读取 memory-bank/systemPatterns.md 或 techContext.md。
  2. 做出重大决策/会话结束时:
    • 更新 memory-bank/activeContext.md,记录发生了什么变化以及待办事项。
    • 更新 memory-bank/progress.md,记录新完成的里程碑或发现的错误。

🛠️ 记忆命令与操作

1. /memory init(初始化记忆库)

如果 memory-bank/ 不存在:

  • 扫描仓库结构(package.json、README.md、源代码文件、git日志)。
  • 生成所有6个核心文件,并用当前代码库中验证过的详细信息填充。

2. /memory update(同步当前状态)

  • 将当前会话的代码变更、架构转向和活跃任务总结到 activeContext.md 中。
  • 将 progress.md 中“进行中”的完成项移动到“已完成”。

3. /memory record <decision>(记录技术决策)

  • 将决策、理由和考虑的替代方案追加到 systemPatterns.md 中。

📋 文件模板

activeContext.md

# 活动上下文

## 当前焦点
- [当前目标的简要摘要]

## 近期变更
- [修改的文件或组件] — [原因]

## 活跃决策与考虑事项
- [已达成一致的权衡或模式]

## 下一步行动
1. [即时任务1]
2. [即时任务2]

progress.md

# 项目进度

## 可用的功能
- [功能A] — 已验证可用
- [功能B] — 已验证通过单元测试

## 待构建内容
- [ ] 里程碑1
- [ ] 里程碑2

## 已知问题/阻塞项
- [问题描述及可能的修复方案]

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

bruh2211/universal-agent-skills

Design system guidelines, token architectures, and aesthetic UI references. Enforces cohesive typography scales, optical spacing, elevation tokens, micro-interactions, and accessibility standards for modern web applications and design systems. Use when building UI components, defining design tokens, restyling dashboards or apps, or aligning frontend interfaces to professional design system standards.

bruh2211/universal-agent-skills

Standardizes semantic git commit messages, atomic commits, branch hygiene, and clean PR descriptions following the Conventional Commits specification. Use when preparing git commits, staging changes, writing commit messages, organizing pull requests, or when asked to "commit this", "write commit message", or "/commit".

bruh2211/universal-agent-skills

tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML/CSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, "AI-made", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.

相关技能