360 Secure SkillHub
360 安全技能中心

Osop Optimize

读取 .osop 工作流文件及其 .osoplog.yaml 执行日志,汇总各节点平均耗时、失败率与超时率,识别慢步骤、失败热点、缺失重试或超时、可并行链路与缺失错误处理,输出带优先级的优化建议表,并在用户确认后展示 diff 再修改 .osop 文件。

archie0125
archie0125
热度 44.28
最近更新 2026-05-11 17:39:05
分类:自动化依赖:读写文件应用场景:工作流 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add osop-optimize
Metadata
name
osop-optimize
description
Analyze .osoplog execution history to optimize workflows — finds slow steps and parallelization opportunities
version
1.2.0
emoji
⚡
homepage
https://osop.ai
argument-hint
<path-to-osop-file>
metadata
{"openclaw":{"requires":{"bins":["bash"],"config":["~/.osop/config.yaml"]},"install":[],"always":false}}
user-invocable
true
disable-model-invocation
false

OSOP Workflow Optimizer

Improve a workflow based on its execution history.

Target workflow

$ARGUMENTS

What to do

  1. Read the .osop file specified in the argument

  2. Find execution logs — look for matching .osoplog.yaml files in sessions/ or the same directory

  3. Aggregate stats from all matching logs:

    • Per-node: average duration, failure rate, timeout rate, common errors
    • Overall: success rate, average total duration, run count
  4. Identify issues:

    • Slow steps: nodes with avg_duration > 5s
    • Failure hotspots: nodes with failure_rate > 10%
    • Bottlenecks: nodes that are both slow AND unreliable
    • Missing retries: external call nodes (api, cli, agent, infra, mcp) without retry_policy
    • Missing timeouts: external call nodes without timeout_sec
    • Parallelization: sequential chains of 3+ independent nodes
    • Missing error handling: high-risk nodes without fallback/error edges
  5. Generate suggestions and present as a table:

    | Type | Target Node | Description | Priority |
    |------|-------------|-------------|----------|
    | add_retry | fetch-data | 35% failure rate, add retry with backoff | HIGH |
    | parallelize | scan, test, lint | Independent steps, run in parallel | MEDIUM |
    
  6. If user approves, apply changes to the .osop file

  7. Show diff of changes before writing

Self-optimization loop

This skill enables the feedback loop:

Execute → Log (.osoplog) → Analyze (this skill) → Improve (.osop) → Re-execute → Better results

Each iteration makes the workflow more resilient and efficient.