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

ai-brainAI 大脑

Agent Skill

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

总安装

549

周安装

22

GitHub Stars

1

下载量

178
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/learnwy/skills --skill ai-brain

简介

用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • ai-brain 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

AI Brain — Persistent Memory System

Gives AI persistent memory across sessions. Remembers who you are, what you prefer, what patterns you've established, and what happened in past sessions.

Prerequisites

  • Node.js >= 18
  • Writable home directory for ~/.learnwy/ai/memory/ storage

Core Concept

Three memory types, inspired by human cognition:

TypeWhat It StoresPersists Across SessionsExample
EpisodicSession history, what happenedYes"Last session we refactored the auth module"
SemanticFacts, preferences, knowledgeYes"User prefers TypeScript", "Project uses React 18"
ProceduralPatterns, rules, how-toYes"When fixing nil panic, check element IDs first"

Plus Identity: who the AI is and who the user is — loaded at every session start.

Memory Architecture

~/.learnwy/ai/memory/
├── semantic/
│   ├── facts/          # fact-{hash}.md
│   └── preferences/    # pref-{hash}.md
├── procedural/
│   └── patterns/       # pattern-{hash}.md
├── episodic/
│   └── sessions/       # session-{date}-{hash}.md
├── identity/
│   ├── AI.md           # Who the AI is
│   └── user.md         # Who the user is
└── index/
    └── active-session.json

Session Lifecycle

Every interaction should be wrapped in a session:

Session Start  →  Load Identity + Recent Context  →  Work  →  Session End (save summary)
     ↓                                                                ↓
  start.cjs                                                    session.cjs end

Session Start (run at conversation begin)

node start.cjs [--project <name>]

Returns JSON with:

  • Active session (new or resumed)
  • AI and user identity
  • Last 3 session summaries (cross-session context)
  • Memory stats

Session End (run at conversation end)

node session.cjs end --summary "What we accomplished this session"

Saves session to episodic memory with: start/end time, project, memories created/recalled, summary.

Commands

Remember (save a memory)

node remember.cjs "<content>" [--category fact|preference|pattern] [--tags tag1,tag2] [--project name]
  • Auto-categorizes if no --category: "prefer/like/want" → preference, "when/always/pattern" → pattern, else → fact
  • Auto-tags based on content keywords (react, typescript, api, etc.)
  • Deduplicates: if similar memory exists, increments frequency instead of creating duplicate
  • Session-aware: tracks which session created this memory

Recall (search memories)

node recall.cjs "<query>" [--category fact|preference|pattern|all] [--project name] [--limit N] [--context]
  • Relevance scoring: exact match (10pts), token match (2pts/token), tag match (3pts), project match (5pts)
  • --context flag: additionally returns recent sessions + identity — useful for full context load
  • Session-aware: increments session recall counter

Forget (remove memories)

node forget.cjs "<content_substring>" [--category fact|preference|pattern]

Status

node status.cjs [--json]

Shows memory counts, identity status, active session info.

Dump (export all memories)

node dump.cjs [--json]

Full brain dump: all facts, preferences, patterns, recent sessions.

Clear

node clear.cjs <all|facts|preferences|patterns|sessions|identity|index>

Reflect (analysis & identity management)

node reflect.cjs stats              # Memory statistics
node reflect.cjs sessions [--limit] # Recent session history
node reflect.cjs identity show      # Show AI & user identity
node reflect.cjs identity set AI "I am a coding assistant who remembers context"
node reflect.cjs identity set user "Senior dev, prefers TypeScript, works on TikTok iOS"
node reflect.cjs health             # Memory health check

Brain (unified router)

node brain.cjs <start|stop|status|recall|remember|dump|forget|clear|reflect|session>

Routes to the appropriate script. brain.cjs stop = session.cjs end.

Cross-Session Memory Flow

Session N:
  1. start.cjs loads identity + last 3 session summaries
  2. AI has context: "Last time we worked on X, user prefers Y"
  3. During work: remember.cjs saves new facts/patterns
  4. session.cjs end saves summary to episodic

Session N+1:
  1. start.cjs loads identity + sessions N, N-1, N-2 summaries
  2. AI knows: "Last session we did X. Before that, Y. User prefers Z."
  3. Continuity preserved across sessions

AI Integration Guide

At Session Start

When the AI brain skill triggers at conversation begin:

  1. Run node start.cjs --project <detected_project_name>
  2. Read the returned identity.ai and identity.user — adopt the persona
  3. Read recent_sessions — mention relevant past work naturally
  4. Read stats — know how much context is available

During Conversation

When you learn something new about the user or project:

node remember.cjs "User wants all scripts in CJS format" --category preference --project skills-repo

When you need to recall past context:

node recall.cjs "CJS migration" --project skills-repo --context

At Session End

Before the conversation ends:

node session.cjs end --summary "Migrated all Python scripts to CJS, added Prerequisites to all skills"

Error Handling

IssueSolution
No identity filesAI works normally, just without persona. Set via reflect.cjs identity set
No previous sessionsFirst session — no context to load, start fresh
Duplicate memoryAuto-deduplicated, frequency incremented
Memory storage fullUse reflect.cjs health to check, clear.cjs to prune
Active session not endedNext start.cjs resumes the existing session

Scripts

ScriptPurpose
lib.cjsShared library (memory CRUD, sessions, identity, search)
brain.cjsUnified command router
start.cjsSession start with context loading
session.cjsSession lifecycle (start/end/current)
remember.cjsSave memory with dedup + auto-tag
recall.cjsSearch with relevance scoring
forget.cjsRemove memories by content match
status.cjsBrain status overview
dump.cjsFull memory export
clear.cjsClear memory by category
reflect.cjsStats, sessions, identity, health

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.79%
按下载量换算64

Claude

28.6%
按下载量换算51

Cursor

21.14%
按下载量换算38

Gemini CLI

9.06%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills