← 返回 Skills 市场
alexxxiong

InspirAI Evo

作者 alexxiong · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
275
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install inspirai-evo
功能描述
技能自我进化 - 检测流程问题信号(重复试错、流程中断、代码翻动),生成分析报告,引导改进。Triggers: '流程优化', '技能进化', 'skill evolution', '自我改进', '流程问题', 'workflow analysis'.
使用说明 (SKILL.md)

/evo - 技能进化分析

检测工作流中的问题信号(重复试错、流程中断、代码翻动),生成分析报告,并引导在独立 session 中处理改进,不阻塞当前工作。

使用方式

/evo              # 执行完整分析流程
/evo --status     # 查看当前信号状态
/evo --report     # 仅生成报告,不进入交互
/evo --continue   # 继续处理 pending 改进项(独立 session 使用)

核心原则

  1. 非阻塞 - 分析快速完成,改进在独立 session 处理
  2. 阈值触发 - 单类信号达到 3 次才建议分析
  3. 双重存储 - 项目内详细报告 + 全局跨项目统计

执行步骤

Step 1: 收集数据

1.1 读取状态文件

STATE_FILE=".evo-state.json"
if [ -f "$STATE_FILE" ]; then
    echo "[INFO] 读取状态文件..."
    cat "$STATE_FILE" | jq '.'
else
    echo "[INFO] 状态文件不存在,将仅分析 git 历史"
fi

1.2 分析 Git 历史

# 最近 20 个 commit
git log --oneline -20

# 检测高频修改文件
git log --name-only --pretty=format: -20 | sort | uniq -c | sort -rn | head -10

# 检测 revert commits
git log --oneline -50 | grep -i "revert"

# 检测连续 fix commits
git log --oneline -20 | grep -E "^[a-f0-9]+ fix"

1.3 汇总数据

收集以下信息:

  • 状态文件中的信号计数和实例
  • Git 历史中的高频修改文件
  • Revert 和连续 fix 的 commit
  • 当前 session 中观察到的模式(如果有)

Step 2: 生成分析报告

2.1 创建报告目录

REPORT_DIR="docs/evo-reports"
mkdir -p "$REPORT_DIR"

2.2 报告文件命名

REPORT_FILE="$REPORT_DIR/$(date +%Y-%m-%d)-report.md"

2.3 报告模板

生成报告包含以下结构:

# Evo 分析报告

生成时间:{YYYY-MM-DD HH:mm}
项目:{project-name}

## 发现的问题

### 1. [{signal_type}] {问题标题}
- **出现次数**:{count}
- **时间跨度**:{first_timestamp} - {last_timestamp}
- **上下文**:{context 汇总}
- **模式**:{检测到的模式}
- **关联 Skill**:{相关 skill 名称,如果能识别}
- **建议**:{具体改进建议}

## 改进建议汇总

| 优先级 | 类型 | 建议 | 影响范围 |
|--------|------|------|----------|
| 高/中/低 | 新增/优化/修复 | {建议内容} | {影响的 skill 或配置} |

## 待处理项

- [ ] {改进项 1}
- [ ] {改进项 2}

2.4 写入报告

使用收集的数据填充模板,写入报告文件。

Step 3: 交互确认

展示发现的问题摘要(不超过 5 条),使用 AskUserQuestion 逐条确认:

发现 {N} 个流程问题:

1. [retry_loops] TypeScript 编译错误循环 (3次)
2. [interrupted_flows] Debugging 中断未恢复 (2次)

请选择要处理的问题:
- [ ] 问题 1
- [ ] 问题 2
- [ ] 全部处理
- [ ] 暂不处理

用户确认后,将选中的问题加入 pending_improvements

Step 4: 引导独立 Session

若用户确认了需要处理的问题:

已记录 {N} 个待处理改进项。

要在独立 session 中处理这些改进,请运行:

    claude "继续处理 evo 改进项"

或稍后运行 /evo --continue

当前 session 可继续其他工作。

Step 5: 更新状态

5.1 更新项目状态文件

# 重置已分析的信号计数
# 更新 last_analysis 时间戳
# 保留 pending_improvements

jq '.last_analysis = now | .signals.retry_loops.count = 0 | .signals.interrupted_flows.count = 0 | .signals.git_churn.count = 0' .evo-state.json > .evo-state.json.tmp && mv .evo-state.json.tmp .evo-state.json

5.2 同步全局统计

GLOBAL_DIR="$HOME/.claude/evo-stats"
mkdir -p "$GLOBAL_DIR/projects"

# 更新项目统计
PROJECT_NAME=$(basename $(pwd))
cp .evo-state.json "$GLOBAL_DIR/projects/$PROJECT_NAME.json"

# 更新汇总统计
# 累加 pattern_frequency
# 更新 skills_needing_attention

--status 模式

仅显示当前信号状态,不执行分析:

Evo 状态检查:

信号状态:
  retry_loops:       2/3 (未达阈值)
  interrupted_flows: 1/3 (未达阈值)
  git_churn:         0/3 (无记录)

上次分析: 2026-01-25 18:00
待处理改进: 0 项

提示: 任一信号达到 3 次将自动建议执行 /evo

--continue 模式

用于独立 session 处理 pending 改进项:

  1. 读取 .evo-state.json 中的 pending_improvements
  2. 若无待处理项,提示并退出
  3. 逐个展示待处理项:
    • 显示问题详情和建议
    • 分析需要修改的文件
    • 提出具体修改方案
    • 用户确认后执行修改
  4. 完成后从 pending_improvements 中移除
  5. 更新全局统计
继续处理 Evo 改进项...

待处理项 1/2:
[retry_loops] TypeScript 编译错误循环

建议: 添加 pre-commit hook 进行类型检查

要执行此改进吗?
- 是,开始修改
- 跳过,处理下一个
- 退出,稍后继续

--report 模式

仅生成报告,不进入交互确认流程。适用于快速检查或自动化场景。

注意事项

  1. 状态文件位置: .evo-state.json 在项目根目录,建议加入 .gitignore
  2. 报告位置: docs/evo-reports/ 可选择是否提交到版本控制
  3. 全局统计: ~/.claude/evo-stats/ 跨项目累积,用于发现通用模式
  4. 阈值调整: 可手动编辑 .evo-state.json 中的 threshold

自动监控

将以下内容添加到项目的 CLAUDE.md 以启用自动信号检测。

信号检测规则

1. retry_loops(重复试错) 检测条件(满足任一即记录):

  • 同一个错误/问题连续尝试 2+ 次未解决
  • 同一段代码在 10 分钟内修改 3+ 次
  • 测试失败后的修复尝试超过 3 轮

2. interrupted_flows(流程中断) 检测条件(满足任一即记录):

  • 用户明确说"先不管这个"、"等会再说"、"跳过"
  • 任务切换时前一个任务未完成且未说明原因
  • debugging/实现过程被打断超过 30 分钟未恢复

3. git_churn(代码翻动) 检测条件(满足任一即记录):

  • 同一文件在最近 5 个 commit 中出现 3+ 次修改
  • 出现 revert commit
  • fix: 类型 commit 针对同一功能连续 2+ 次

检测到信号时的行为

  1. 读取项目根目录的 .evo-state.json(不存在则创建初始结构)

  2. 更新对应信号类型的 countinstances 数组

  3. 检查是否有任一信号的 count >= threshold(默认阈值为 3)

  4. 若达到阈值,在当前回复末尾提示:

    [Evo] 检测到流程问题信号({信号类型} 已达 {count} 次),建议执行 /evo 进行分析。

.evo-state.json 初始结构

首次检测到信号时,若文件不存在,创建以下结构:

{
  "version": "1.0",
  "project": "{当前项目名}",
  "signals": {
    "retry_loops": { "count": 0, "threshold": 3, "instances": [] },
    "interrupted_flows": { "count": 0, "threshold": 3, "instances": [] },
    "git_churn": { "count": 0, "threshold": 3, "instances": [] }
  },
  "last_analysis": null,
  "pending_improvements": []
}

记录实例的格式

{
  "timestamp": "ISO8601 时间戳",
  "context": "简短描述发生了什么",
  "pattern": "匹配的检测规则"
}
安全使用建议
This skill appears coherent with its description, but review these practical considerations before installing: - Acceptable behaviors: it will read your git history and create/update .evo-state.json in the project root and write report files under docs/evo-reports/. Ensure you are comfortable with those files being created locally. - Global aggregation: it copies per-project state into ~/.claude/evo-stats and maintains cross-project stats. If you do not want cross-project aggregation, do not allow or modify the copy step or remove the global directory after running. - Sensitive data risk: reports or state files may include contextual snippets or issue descriptions. Add .evo-state.json and reports to .gitignore (the SKILL.md even recommends that) if you do not want them committed to version control. - Dependencies: the instructions assume common CLI tools (git, jq, date, mkdir, cp, mv). Ensure jq is installed and usable in your environment or adjust the snippets. - Session/context access: the skill references detecting patterns in the 'current session' (conversation text). Be aware it will use available conversation/session context to detect phrases and patterns. If these behaviors and file locations are acceptable for your workflow, the skill is coherent. If you need stricter isolation, run it in a disposable environment, inspect the generated files before committing them, or remove/disable the global ~/.claude/evo-stats aggregation step.
功能分析
Type: OpenClaw Skill Name: inspirai-evo Version: 1.0.0 The skill is a workflow analysis tool designed to detect inefficiencies in development patterns by analyzing git history and local session state. It uses standard shell commands (git, jq) to generate reports and maintains local statistics in the user's home directory (~/.claude/evo-stats) for cross-project tracking, which is consistent with its stated purpose of 'skill evolution' and workflow optimization.
能力评估
Purpose & Capability
The skill's declared purpose (detect workflow problems, analyze git churn/reverts, produce reports, guide improvements) matches the instructions. It legitimately needs to read git history and maintain a project state file and reports. Minor inconsistency: SKILL.md uses utilities like git, jq, date, mkdir, cp, mv but the registry metadata lists no required binaries. Expectation: git and jq must be available for the provided shell snippets to work.
Instruction Scope
Instructions explicitly read and write project files (.evo-state.json, docs/evo-reports/*) and copy per-project state into a global directory (~/.claude/evo-stats). It also relies on 'current session' context for pattern detection and prompts (AskUserQuestion), which implies the agent will use conversation context. These behaviors are within the stated purpose but do include cross-project aggregation and writing data to the user's home directory — both are scope-expanding from 'per-project analysis' to a global telemetry store.
Install Mechanism
This is an instruction-only skill with no install spec or bundled code, so nothing is downloaded or written by an installer. That is the lowest-risk install surface.
Credentials
The skill requests no environment variables or credentials. It does require filesystem access (project root and $HOME) and relies on git and jq for its shell snippets; these are proportionate to analysing a repository and writing reports. No network endpoints or external tokens are requested.
Persistence & Privilege
The skill persists a project state file (.evo-state.json) and report files under the repo, and also writes cross-project aggregates to ~/.claude/evo-stats. always:false and normal autonomous invocation are set. Persisting global stats increases blast radius (cross-project aggregation) but is consistent with the stated goal of 'global statistics.'
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install inspirai-evo
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /inspirai-evo 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - 技能自我进化
元数据
Slug inspirai-evo
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

InspirAI Evo 是什么?

技能自我进化 - 检测流程问题信号(重复试错、流程中断、代码翻动),生成分析报告,引导改进。Triggers: '流程优化', '技能进化', 'skill evolution', '自我改进', '流程问题', 'workflow analysis'. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 275 次。

如何安装 InspirAI Evo?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install inspirai-evo」即可一键安装,无需额外配置。

InspirAI Evo 是免费的吗?

是的,InspirAI Evo 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

InspirAI Evo 支持哪些平台?

InspirAI Evo 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 InspirAI Evo?

由 alexxiong(@alexxxiong)开发并维护,当前版本 v1.0.0。

💬 留言讨论