plugins/tools/cortex/skills/cortex-ingest/SKILL.md
知识库构建 ingest — 接受 GitHub/GitLab/Website URL 或 local dir 输入, 自动识别+路由到 项目/<host>/<owner>/<repo>/ (本地 git repo 当 github/gitlab 处理, 非 git → 项目/local/<name>/). 默认 --apply 调度抓取 (gh/git clone/WebFetch 混合) + 落盘 (--dry-run opt-in 仅出 JSON plan 预览).
npx skillsauth add lazygophers/ccplugin cortex-ingestInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
外部资源 → vault 项目/ 模块构建器. 接受 4 类输入, 识别 + 路由 + 计划. 默认 --apply 调度抓取 + 落盘 (--dry-run opt-in 仅出 plan 预览).
破坏性提示:默认
--apply会向 vault项目/落盘;只想看路由不落盘时显式传--dry-run。
本段由 context: fork 派 cortex-ingest-worker 后台跑:识别下方输入速查表中的来源形态,解析 git remote,按规则算目标路径,必要时用 gh/WebFetch 探查元信息,默认 --apply 调度抓取 + 落盘。
bash scripts/ingest.sh [--target <vault>] --source <url-or-path>
默认 --apply, target = $HOME/.cortex. worker 默认调度抓取 (gh / git clone / WebFetch 混合) + 落盘 (website 等仅 sub-agent 可抓的 fetch_method 标 needs_main 由主会话补抓),把入库结果 (source / target_path / fetch_method / frontmatter) 作为报告返回主会话。落盘后调用 cortex-lint 校验。
仅预览 (不落盘) 时显式传 --dry-run:
bash scripts/ingest.sh --dry-run [--target <vault>] --source <url-or-path>
| # | 输入形态 | 识别 | 目标路径 |
| --- | --- | --- | --- |
| 1 | https://github.com/<o>/<r> 或 [email protected]:<o>/<r>.git | URL host = github.com | 项目/github.com/<o>/<r>/ |
| 2 | https://gitlab.com/<o>/<r> 或 ssh gitlab | URL host = gitlab.com | 项目/gitlab.com/<o>/<r>/ |
| 3 | 其他 https://<domain>/... | URL host | 项目/<domain>/_/<slug>/ |
| 4 | local dir + .git/config remote 指向 github/gitlab | 读 remote URL 递归识别 | 按 1/2 处理 |
| 5 | local dir 无 git 或无 remote | 目录存在 | 项目/local/<basename>/ |
落盘文件: README.md (frontmatter 用 cortex-schema templates/project/<variant>.md).
| 任务 | 文件 |
| --- | --- |
| 查 GitHub 抓取详情 (gh CLI / WebFetch fallback) | sources/github.md |
| 查 GitLab 抓取详情 (glab / WebFetch) | sources/gitlab.md |
| 查 Website 抓取详情 (WebFetch + slug) | sources/website.md |
| 查 local dir 抓取 (含 git remote 检测 + 转向逻辑) | sources/local.md |
| 查输入识别算法 + 优先序 + git remote 解析 | references/routing.md |
| 查 CLI vs sub-agent 抓取流程 + dry-run/apply + 游标 | references/workflow.md |
bash scripts/ingest.sh [--dry-run|--apply] [--target <vault>] --source <url-or-path>
默认 --apply, target = $HOME/.cortex. --dry-run (opt-in 预览) 输出 JSON plan (source / target_path / fetch_method / frontmatter_preview),不落盘.
cortex-schema (templates/project/<variant>.md)cortex-extract 互补 (ingest = 抓外部资源进 vault; extract = L4-inbox 内部分类)cortex-linttools
UI/UX 与布局设计——做界面布局/结构/导航/组件/交互的设计决策。触发:做UI/UX/布局/排版/导航/组件/交互/栅格/响应式/图表选型/字体配对。按媒介路由 HTML/Web、原生 App(iOS/Android/桌面)、CLI、TUI。需后端动态系统不适用;配色/主题/色板走姊妹 skill design-color。
tools
主题与配色设计——做颜色搭配/调色板/主题/品牌色阶/暗模式的设计决策。触发:选配色/调色/主题/色板/品牌色/暗模式/对比度/色盲/UI风格。按媒介路由 HTML/Web(CSS变量)、原生App(平台token)、CLI(ANSI)、TUI(真彩/256/16降级)。保证可访问性(对比度/色盲安全)。需后端动态系统不适用;UI/UX 布局/组件/交互走姊妹 skill design-uiux。
tools
跨任意组件(plugin/skill/agent/command)的验证驱动优化循环纪律 skill。当用户要优化某个已有组件却无明确方向、或要防止改了反而更差(自评乐观偏差 / 多维同改归因失效 / 为凑分加废话膨胀)、或要把一套通用「评分→单变量改→改后验证严格更好才留否则回滚→触顶停」的纪律套到任意组件上时使用。管优化过程本身的纪律(validation gate / ratchet / 独立验证 / 触顶停),不评单组件深度(交 skill-dev),不查插件接线(交 plugin-dev)。仅手动 /optimize-any 触发。
data-ai
两层规则记忆 (基于 .skein/spec)。planning 时 recall 召回相关规则、task finish 后 sediment 沉淀学习 + prune 自动精简过期/重复/断链规则。core 常驻硬规 + recall 按需召回, 经判定门自动写盘 (不逐次问用户)。产出 .skein/spec 下 core/recall 规则文件 + index。另支持空仓 bootstrap 播种规则基线、记忆大面积失效 (大重构/换栈) 时 reconstruct 可逆归档后按项目类型分型重建、maintain 手动体检 (超预算/stale/断链/重复/废弃, --apply 自动修复)、auto-fix (Stop hook 写 .pending-fix 标记 → main 派 skein-specer bg 跑 maintain --apply 全自动修, 断链只报告)。