Security v1.0.0

pilot-sla

Service-level agreement enforcement with automatic penalties. Use this skill when: 1. You need guaranteed performance...

teoslayer 更新于 2026-04-09 1 浏览
下载 SKILL

技能说明

Service-level agreement enforcement with automatic penalties. Use this skill when: 1. You need guaranteed performance levels for critical tasks 2. You want automatic penalty enforcement for SLA violations 3. You need uptime, latency, or quality guarantees from agents Do NOT use this skill when: - Tasks don't have strict performance requirements - Best-effort execution is acceptable - You don't need automated compliance monitoring

使用场景

Service-level agreement enforcement with automatic penalty assessment.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/pilot-sla
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 16 kB
SKILL.md text/markdown
---
name: pilot-sla
description: >
  Service-level agreement enforcement with automatic penalties.

  Use this skill when:
  1. You need guaranteed performance levels for critical tasks
  2. You want automatic penalty enforcement for SLA violations
  3. You need uptime, latency, or quality guarantees from agents

  Do NOT use this skill when:
  - Tasks don't have strict performance requirements
  - Best-effort execution is acceptable
  - You don't need automated compliance monitoring
tags:
  - pilot-protocol
  - task-workflow
  - sla
  - compliance
license: AGPL-3.0
compatibility: >
  Requires pilot-protocol skill and pilotctl binary on PATH.
  The daemon must be running (pilotctl daemon start).
metadata:
  author: vulture-labs
  version: "1.0"
  openclaw:
    requires:
      bins:
        - pilotctl
    homepage: https://pilotprotocol.network
allowed-tools:
  - Bash
---

# pilot-sla

Service-level agreement enforcement with automatic penalty assessment.

## Commands

### Define SLA Contract
```bash
cat > sla-contract.json <<EOF
{
  "sla_id": "sla-$(date +%s)",
  "metrics": {"max_response_time_ms": 2000, "min_success_rate": 0.95},
  "penalties": {"response_time_violation": 5, "failed_task": 10}
}
EOF
```

### Monitor Compliance
```bash
TASK_SUBMIT_TIME=$(date +%s%3N)
TASK_COMPLETE_TIME=$(date +%s%3N)
COMPLETION_TIME=$((TASK_COMPLETE_TIME - TASK_SUBMIT_TIME))

SLA_MAX_TIME=$(jq -r '.metrics.max_response_time_ms' sla-contract.json)
[ $COMPLETION_TIME -gt $SLA_MAX_TIME ] && echo "SLA violation"
```

### Calculate Success Rate
```bash
TOTAL=$(pilotctl --json task list | jq -r "[.[] | select(.target == \"$AGENT\")] | length")
SUCCESSFUL=$(pilotctl --json task list | jq -r "[.[] | select(.target == \"$AGENT\") | select(.status == \"completed\")] | length")

SUCCESS_RATE=$(echo "scale=4; $SUCCESSFUL / $TOTAL" | bc)
```

## Workflow Example

```bash
#!/bin/bash
# SLA enforcement

SLA_ID="sla-$(date +%s)"
SLA_MAX=3000

for i in {1..10}; do
  SUBMIT_TIME=$(date +%s%3N)
  TASK_ID=$(pilotctl --json task submit "$AGENT" --task "api-call: task_id=$i" | jq -r '.task_id')

  while [ "$(pilotctl --json task list | jq -r ".[] | select(.task_id == \"$TASK_ID\") | .status")" = "pending" ]; do
    sleep 0.5
  done

  RESPONSE_TIME=$(($(date +%s%3N) - SUBMIT_TIME))
  [ $RESPONSE_TIME -gt $SLA_MAX ] && echo "SLA violation: task $i took ${RESPONSE_TIME}ms"
done
```

## Dependencies

Requires pilot-protocol, pilotctl, jq, and bc.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。