One-command post-coding pipeline with health scores, trend dashboard, baseline ratchet, self-improving playbook learning loop, GitHub Action, and CI output
Accept or diff CodeCortexLoop baseline — ratchet mode for legacy codebases
Deep CodeCortexLoop pass — all 7 passes, whole project, benchmarks required for perf fixes.
Pre-PR CodeCortexLoop gate — all passes on recent changes, Critical+High must be clean for CI.
Fast CodeCortexLoop pass — review, security, error-handling on recent changes. Critical+High only.
Manually reflect on recent Direct fixes and record learnings to the playbook
Senior code reviewer that evaluates changes across five dimensions — correctness, readability, architecture, security, and performance. Use for thorough code review before merge.
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise. Use during /cortexloop simplicity pass.
Security engineer focused on vulnerability detection, threat modeling, and secure coding practices. Use for security-focused code review, threat analysis, or hardening recommendations.
Identifies silent failures, inadequate error handling, and inappropriate fallback behavior. Zero tolerance for empty catch blocks and swallowed errors. Use during /cortexloop error-handling pass.
QA engineer specialized in test strategy, test writing, and coverage analysis. Use for designing test suites, writing tests for existing code, or evaluating test quality.
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.
Detects dead code, unused exports, orphaned files, and dependency issues (unused, outdated, vulnerable). Use during cleanup passes. Always ask before deleting — never silently remove code or dependencies.
Proof-based performance optimization. Use when analyzing or fixing slow code, N+1 queries, bundle size, React re-renders, memory leaks, or async bottlenecks. Requires before/after benchmarks — never present a change without proving improvement.
After Direct-mode fixes, summarize what changed and record reusable problem→fix patterns into the playbook. Use when CodeCortexLoop Direct mode completes successfully, or when manually invoked via /cortexloop-reflect.
Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services.
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
No model invocation
Executes directly as bash, bypassing the AI model
No model invocation
Executes directly as bash, bypassing the AI model
一条命令,跑完 7 路代码体检并自我进化。 面向 AI 编码工具的"写完代码后"流水线:审查、安全、测试、性能、精简、错误处理、清理 —— 配套健康分、趋势看板、基线棘轮、CI 集成,以及可自我进化的修复记忆库(Playbook)。
适配 Cursor、Claude Code、Qoder、Trae。
| 能力 | 说明 |
|---|---|
| 一键 7 路体检 | /cortexloop 并行跑审查 / 安全 / 测试 / 性能 / 精简 / 错误处理 / 清理,只读分析、互不干扰 |
| 健康分(0–100) | 按类别打分 + 总分,Direct 修复后给出 修复前 → 修复后 对比 |
| 可自我进化 ⭐ | 内置 Playbook 记忆库(防幻觉信任模型:两层候选/已验证、验证驱动置信度、负信号、外部预言机优先);分析前查已验证线索,Direct 后反思沉淀 |
| 可视化看板 | 自包含的 report.html,浏览器直接打开,无需起服务 |
| 趋势 + 徽章 | history.json 记录历次得分趋势,health-badge.svg 可嵌入仓库 README |
| 基线棘轮 | 老项目历史欠债一次性接受,CI 只对新增问题报错 |
| CI / GitHub Action | 内置复合 Action,一步完成门禁 + 徽章 + 看板 + PR 评论 |
| 零依赖 | 所有后处理脚本均为零 npm 依赖的纯 Node 脚本 |
⭐ 可自我进化是 v2.2 的核心:记忆是召回(去哪看)而非权威(该信什么)——命中只提示优先排查区,修法每次重新推导验证。带两层信任模型(候选/已验证)、验证驱动置信度(含负信号)、外部预言机优先、多样性晋升与时间衰减,防止"越记越幻觉"。详见 自我进化(Learning Loop)。
flowchart LR
pre["分析前<br/>查 Playbook"] --> analyze["7 路并行分析"]
analyze --> Score["健康分"]
Score --> Out{"Report / Direct / CI"}
Out -->|Direct| Fix["串行修复 + 复验"]
Fix --> reflect["自动反思"]
reflect --> record["沉淀进 Playbook"]
record -.下次更快.-> pre
Out -->|CI| Gate["ci-gate + PR 评论"]
输入 /cortexloop,CodeCortexLoop 跑完 7 路只读分析、汇总问题、算出健康分后,按你选择的模式产出:
docs/cortexloop/*.md + report.json + HTML 看板,停下等你确认Windows(PowerShell):
git clone https://github.com/whitequeen306/code-cortex-loop.git
cd code-cortex-loop
.\scripts\install.ps1 -Tool cursor # 或:claude | qoder | trae | all
macOS / Linux:
git clone https://github.com/whitequeen306/code-cortex-loop.git
cd code-cortex-loop
chmod +x scripts/install.sh
./scripts/install.sh cursor # 或:claude | qoder | trae | all
安装脚本会把 commands/、agents/、skills/、rules/、scripts/ 一并拷贝到对应工具的配置目录。装完重启 IDE,在聊天里输入 /cortexloop 即可。
各工具的命令名都一样(/cortexloop 系列),区别在于安装目录和调用入口。
install.ps1 -Tool cursor(或 install.sh cursor),文件装到 ~/.cursor/{commands,agents,skills,rules,scripts}/。/cortexloop,按提示选 Report / Direct 与范围。.cursor-plugin/plugin.json 以插件方式加载。install.ps1 -Tool claude(或 install.sh claude),文件装到 ~/.claude/{commands,agents,skills,scripts}/,并把 AGENTS.md 拷为 ~/.claude/AGENTS.cortexloop.md 供参考。/cortexloop。claude plugin install .(在仓库根目录,清单见 .claude-plugin/plugin.json)。AGENTS.cortexloop.md 的规则按需并入你项目的 AGENTS.md。install.ps1 -Tool qoder(或 install.sh qoder),文件装到 ~/.qoder/{commands,agents,skills,rules,scripts}/。/cortexloop。install.ps1 -Tool trae(默认 user 作用域,装到 ~/.trae/);项目级可用 install-trae.ps1 -Scope project,装到当前项目的 .trae/。/cortexloop。关于脚本路径:
/cortexloop流程会调用node scripts/*.mjs做后处理(看板 / 徽章 / Playbook 等)。从 clone 的仓库根目录运行最稳妥;在你自己的项目里运行时,请确保scripts/可访问(已随安装拷贝到工具配置目录),或直接用本仓库根目录执行脚本。CI 场景由action.yml自动定位脚本,无需关心路径。
| 命令 | 用途 |
|---|---|
/cortexloop | 完整流水线;会询问 Report / Direct 及范围 |
/cortexloop-quick | 仅审查 + 安全 + 错误处理,针对近期改动(High+) |
/cortexloop-deep | 全部 7 路、整库扫描、强制基准测试 |
/cortexloop-security | 安全 + 错误处理 + 依赖审计 |
/cortexloop-pre-pr | PR 前门禁:近期改动,High+ 必须清零 |
/cortexloop-baseline | 接受或对比技术债基线 |
/cortexloop-reflect | 手动反思并把经验写入 Playbook |
加 --ci 进入 CI 模式(无交互、写 JSON、跑门禁)。
v2.2 引入 Playbook 记忆库,在保留"省 token 召回"收益的同时,用防幻觉信任模型阻断回音壁(模型把自己的产物当成 ground truth 越记越自信)。
核心权衡:记忆告诉你去哪查,不告诉你该信什么——每次命中仍重新推导、重新验证,绝不从记忆直接粘贴修法。
flowchart LR
pre["Step 0.5:查 verified 层"] --> analyze["7 路分析"]
analyze --> fix["Direct 修复 + 测试"]
fix --> reflect["反思 skill"]
reflect --> record["record: self_verified"]
record --> feedback["feedback: 外部/负信号"]
feedback -.晋升或降级.-> pre
架构原则:AI 只产出结构化 JSON;确定性活(去重 / 两层 / 置信度 / 负信号 / 衰减 / 剪枝)全交给零依赖 Node 脚本;脚本不读 config,用 CLI flag + 内置默认值。
| 层级 | 含义 | query 行为 |
|---|---|---|
| verified | 多样且已验证的可信召回 | 默认展示 |
| candidate | 未确认假设 | 仅 --include-candidates 展示,标注为猜测,禁止套用 |
| quarantined | 失败/过低置信 | 不展示,可 --drop-quarantined 剪枝 |
晋升条件:confidence >= 0.7 且 verifiedCount >= 2 且 distinctContexts >= 2(跨场景验证,非同一文件反复命中)。
node scripts/playbook.mjs query --category=performance,simplicity,errorHandling --lang=js --global-merge
# 查看未确认候选(标注为猜测,禁止套用):
node scripts/playbook.mjs query ... --include-candidates
npx claudepluginhub whitequeen306/code-cortex-loop --plugin cortexloopComprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review
Develop, test, build, and deploy Godot 4.x games with Claude Code. Includes GdUnit4 testing, web/desktop exports, CI/CD pipelines, and deployment to Vercel/GitHub Pages/itch.io.
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification
Access thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.