com um clique
meta-cogbase
认知底座的包管理器。搜索、安装、更新、卸载认知底座——给 AI agent 安装认知义体的一站式工具。
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
认知底座的包管理器。搜索、安装、更新、卸载认知底座——给 AI agent 安装认知义体的一站式工具。
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
| name | meta-cogbase |
| description | 认知底座的包管理器。搜索、安装、更新、卸载认知底座——给 AI agent 安装认知义体的一站式工具。 |
认知底座的包管理器——搜索、安装、更新、管理认知义体。
命令:
/meta-cogbase list — 列出可用/已安装的认知底座/meta-cogbase search <query> — 按关键词搜索认知底座/meta-cogbase install <name> — 安装认知底座/meta-cogbase uninstall <name> — 卸载认知底座/meta-cogbase update [--check|<name>|--all] — 检查或执行更新/meta-cogbase registry add <url> — 添加 base 来源/meta-cogbase registry list — 列出已配置的来源/meta-cogbase registry remove <name> — 移除来源/meta-cogbase registry refresh — 刷新来源缓存/meta-cogbase create <name> — 创建新的认知底座(委托 cognitive-base-creator)/meta-cogbase status — 显示系统状态meta-cogbase 使用以下本地目录管理状态:
~/.meta-cogbase/
sources.yml # 已配置的来源列表
installed.yml # 已安装的 bases 记录
cache/
bases/ # git clone 缓存(按 base name)
sources/ # 非官方源的缓存文件
首次执行任何命令时,如果 ~/.meta-cogbase/ 不存在,先初始化:
sources.yml,包含 official 源:
sources:
- name: official
type: built-in
path: <this-skill-dir>/registry/official.yml
installed.yml:
installed: []
<this-skill-dir> 指本 skill 文件所在目录。agent 可通过检查 SKILL.md 的路径推导。
当用户执行 /meta-cogbase list 时执行。
步骤:
~/.meta-cogbase/sources.ymltype: built-in → 直接读取 path 指向的 YAML 文件type: github-repo / github-stars / custom → 读取 cache_path 指向的缓存文件。如果缓存不存在或超过 7 天,提示用户执行 registry refresh~/.meta-cogbase/installed.yml~/.cognitive-kernel/cognitive-registry.yml,交叉验证安装状态以表格形式展示:
NAME TIER STATUS DESCRIPTION
first-principles 5 installed 审计假设,分解到可验证基础,无约束重建
bayesian-reasoning 5 installed 从二元对错转向概率分布,用证据校准置信度
systems-thinking 5 available 看到反馈循环、涌现、杠杆点的系统性视野
...
installed = 已安装(绿色)available = 未安装(默认色)/meta-cogbase list --installed — 只显示已安装/meta-cogbase list --available — 只显示未安装/meta-cogbase list --tier 5 — 按 tier 过滤当用户执行 /meta-cogbase search <query> 时执行。
步骤:
<query>(不区分大小写):
namedisplay_namedescriptiontags/meta-cogbase registry add <url> 添加更多来源。"示例:
/meta-cogbase search 第一性原理 → 匹配 first-principles(description 包含关键词)/meta-cogbase search reasoning → 匹配 bayesian-reasoning, first-principles 等(tags/name 匹配)/meta-cogbase search 矛盾 → 匹配 dialectical-thinking(description 包含"矛盾")当用户执行 /meta-cogbase install <name> 时执行。
步骤:
name 完全匹配的 base<name> 的认知底座。执行 /meta-cogbase search <name> 查看可用的底座。"~/.meta-cogbase/installed.yml<name> 已安装(版本: )。要更新请用 /meta-cogbase update <name>。"git clone --depth 1 <repo-url> ~/.meta-cogbase/cache/bases/<name>git -C <cache-dir> pull 更新<cache-dir>/manifest.yml 存在manifest.yml 中的 schema_version 字段(当前支持 v1)检测 cognitive-kernel 是否可用:
方式 A:通过 kernel 安装(推荐)
如果 ~/.cognitive-kernel/cognitive-registry.yml 存在:
/cognitive-kernel install ~/.meta-cogbase/cache/bases/<name>方式 B:独立安装(降级) 如果 kernel 未安装:
<cache-dir>/install.sh 是否存在且可执行bash <cache-dir>/install.sh在 ~/.meta-cogbase/installed.yml 中添加记录:
- name: <name>
version: <git-commit-hash> # 通过 git -C <cache-dir> rev-parse HEAD 获取
installed_at: <ISO-timestamp>
source: <source-name>
install_method: kernel | standalone
✓ <name> 已安装
方法: kernel(含冲突分析)/ standalone
版本: <short-hash>
来源: <source-name>
当用户执行 /meta-cogbase uninstall <name> 时执行。
步骤:
~/.meta-cogbase/installed.yml根据 install_method 选择方式:
方式 A:通过 kernel 卸载
如果 install_method: kernel 且 kernel 仍可用:
/cognitive-kernel uninstall <name>方式 B:独立卸载
如果 install_method: standalone 或 kernel 不可用:
bash ~/.meta-cogbase/cache/bases/<name>/install.sh --uninstall~/.meta-cogbase/installed.yml 中移除该 base 的记录~/.meta-cogbase/cache/bases/<name>/ 缓存目录✓ <name> 已卸载
update --check检查所有已安装 bases 是否有新版本。
步骤:
~/.meta-cogbase/installed.ymlgit ls-remote <repo-url> HEAD → 提取 hashNAME LOCAL REMOTE STATUS
first-principles a1b2c3d e4f5g6h 有更新
bayesian-reasoning x7y8z9a x7y8z9a 已是最新
...
update <name>更新指定 base。
步骤:
update --all更新所有有新版本的 bases。
步骤:
registry add <url>添加新的 base 来源。
步骤:
识别 URL 类型:
github.com/<user>/<repo> → type: github-repogithub.com/<user>?tab=stars 或 github.com/stars/<user> → type: github-stars.yml 或 .yaml 结尾 → type: custom按类型获取数据:
github-repo:
git clone --depth 1 <url> /tmp/meta-cogbase-probe-<random>manifest.yml → 单 base 仓库manifest.yml → 多 base 集合~/.meta-cogbase/cache/sources/<repo-name>.ymlgithub-stars:
curl -s "https://api.github.com/users/<user>/starred?per_page=100"manifest.yml(通过 GitHub API 查文件树,或 curl -sf <raw-url>/manifest.yml)custom:
curl -sf <url> 下载 YAMLregistry_version、bases 列表)更新 sources.yml:
- name: <derived-name> # 从 URL 推导,如 repo name 或 username-stars
type: <detected-type>
url: <original-url>
cache_path: ~/.meta-cogbase/cache/sources/<name>.yml
cached_at: <ISO-timestamp>
registry list列出所有已配置的来源。
步骤:
~/.meta-cogbase/sources.ymlNAME TYPE BASES CACHED AT
official built-in 19 (always fresh)
my-repo github-repo 3 2026-04-15
alice-stars github-stars 7 2026-04-14
registry remove <name>步骤:
name 是 "official" → 拒绝:"官方源不能移除。"sources.yml 中移除对应条目registry refresh刷新所有非内置源的缓存。
步骤:
built-in 的源,重新执行 §6.1 的数据获取流程cached_at 时间戳当用户执行 /meta-cogbase create <name> 时执行。
步骤:
/cognitive-base-creator,传入 <name> 作为框架名称当用户执行 /meta-cogbase status 时执行。
步骤:
~/.meta-cogbase/ 是否存在(已初始化?)meta-cogbase status:
初始化: ✓
来源: 2 个 (22 个可用 bases)
已安装: 5 个 bases
cognitive-kernel: ✓ 已安装
cognitive-base-creator: ✓ 已安装
所有源文件(包括 official.yml 和缓存的源)遵循同一格式:
registry_version: 1
name: <source-name>
description: <optional description>
bases:
- name: <kebab-case-name> # 必填
display_name: <display name> # 可选
description: <one-line desc> # 必填
tier: 5 | 6 # 必填
tags: [tag1, tag2] # 可选,用于搜索
repo: <git-clone-url> # 必填
schema_version: 1 # 必填
meta-cogbase 和 cognitive-kernel 的职责划分:
| 操作 | meta-cogbase | cognitive-kernel |
|---|---|---|
| 发现 bases | ✓(搜索、浏览目录) | — |
| 获取 bases | ✓(git clone) | — |
| 安装 bases | 委托 → | ✓(冲突分析、6层装配) |
| 卸载 bases | 委托 → | ✓(清理、重新生成) |
| 版本管理 | ✓(对比、更新) | — |
| 来源管理 | ✓(添加/移除源) | — |
| 运行时执行 | — | ✓(L1-L6 干预) |
降级模式:如果 kernel 未安装,meta-cogbase 使用每个 base 自带的 install.sh 直接安装。功能可用但无冲突分析和 6 层装配。
| 场景 | 处理 |
|---|---|
| git clone 失败 | 报告错误,检查网络连接和 URL 有效性 |
| manifest.yml 不存在 | 报告"该仓库不是有效的认知底座(缺少 manifest.yml)" |
| schema_version 不兼容 | 报告版本不匹配,建议更新 meta-cogbase |
| kernel 不可用 | 自动降级为 standalone 模式,告知用户 |
| GitHub API rate limit | 报告限制,建议等待或使用 GITHUB_TOKEN 环境变量 |
| 源缓存过期(>7天) | 提示执行 registry refresh |