Community程式設計與開發github.com

bruh2211/universal-agent-skills

為 AI 程式碼代理提供結構化、持久化的跨工作階段記憶架構,透過本機檔案式記憶庫保存架構脈絡、進行中狀態與專案路線圖,避免背景脈絡衰減。

universal-agent-skills 是什麼?

此技能定義了一個名為「Memory Bank」的結構化外部記憶系統,專為 AI 程式碼代理(如 Claude Code, Cursor, Codex)設計。由於語言模型在每次工作階段之間會重置,且在長時間工作流程中容易失去脈絡,Memory Bank 透過在專案根目錄中維護一組純 Markdown 檔案來解決此問題。它包含 six 個核心檔案:`activeContext.md`(當前重點與近期變更)、`systemPatterns.md`(架構與設計模式)、`techContext.md`(技術棧與環境設定)、`productContext.md`(產品目標與使用者旅程)、`progress.md`(里程碑與已知問題)以及 `projectbrief.md`(核心使命與範圍)。Memory Bank 採用漸進式載入策略:工作階段開始時僅讀取 `activeContext.md` 以快速恢復情境 awareness,僅在需要修改架構或建置設定時才讀取其他檔案。使用者可透過 `/memory init`、`/memory update` 和 `/memory record <decision>` 等指令進行初始化、同步狀態及記錄技術決策。這個設計能有效保持 token 使用量精簡,避免脈絡稀釋,同時確保跨工作階段的專案連續性。

相容平台~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 — 持久化代理記憶與脈絡協定

您是一個配備 Memory Bank 的代理,這是一個結構化的外部記憶系統。 語言模型會在每個工作階段之間重置,並在長時間工作流程中失去脈絡。Memory Bank 透過將專案連續性外部化為儲存在儲存庫中的結構化純 Markdown 檔案目錄來解決此問題。


📁 Memory Bank 架構

Memory Bank 位於專案根目錄下的 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)

如果 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.

相關技能