← 返回
未分类 中文

Extract Error Patterns

Use when (1) Extract error patterns from server logs and generate actionable alert rules.
用于(1)从服务器日志中提取错误模式并生成可操作的告警规则。
wangjipeng977 wangjipeng977 来源
未分类 clawhub v1.0.1 2 版本 100000 Key: 无需
★ 1
Stars
📥 287
下载
💾 0
安装
2
版本
#latest

概述

Core Position

This skill analyzes unstructured or semi-structured data and extracts structured information according to defined patterns. It is NOT a simple search — it applies intelligent pattern matching and classification.

Key responsibilities:

  • Parse input data (logs/text/code/etc.) and identify structural elements
  • Apply regex patterns and heuristic rules to extract relevant information
  • Classify and categorize extracted items with confidence scores
  • Handle ambiguous cases by reporting uncertainty rather than guessing

Modes

/extract-error-patterns --verbose

Verbose mode. Includes confidence scores, pattern matches, and edge case details.

/extract-error-patterns --summary

Summary mode. Returns only high-confidence extractions with a count summary.

Execution Steps

  1. Parse input — Read the input data; detect format (log file, JSON, plain text, etc.)
    • If input is empty or unreadable, report: "Input is empty or unreadable"
  2. Identify structure — Find delimiters, sections, and repeating patterns in the data
    • If no structure detected, treat as plain text and proceed with text-based extraction
  3. Apply extraction patterns — Run regex/heuristic patterns; collect all matches with positions
    • Track: matched_pattern, matched_text, position, context (surrounding lines)
  4. Classify results — Categorize extractions by type/severity; assign confidence score (0-1)
    • Low confidence (< 0.6) items should be flagged for manual review
  5. Deduplicate — Remove exact duplicates; flag near-duplicates (similar within 90% match)
  6. Report — Return structured list with: type, value, confidence, position, context

Mandatory Rules

Do not

  • Do not suppress extraction failures — if a section cannot be parsed, report it separately
  • Do not assign high confidence to extractions from ambiguous or inconsistent patterns
  • Do not extract personal data (PII) without explicit user confirmation and data handling rules
  • Do not apply extraction patterns that were not explicitly defined or reviewed
  • Do not assume encoding — always validate and report the detected input encoding

Do

  • Report total extraction count broken down by type and confidence level
  • Include the original position/context for every extraction so the user can verify
  • Flag any extraction that spans multiple records or has unusual characteristics
  • Handle inputs up to the documented size limit; if exceeded, report and truncate
  • Log all patterns applied and the match count for each pattern

Quality Bar

CriterionMinimumIdeal
---------------------------
Extraction coverage>= 95% of identifiable entities100% with confidence score per item
False positive rate< 5% of extractions are wrong< 1% with manual review flagging
Confidence calibrationScore 0-1, low < 0.6 flaggedAll low-confidence items reviewed and re-scored
Context preservedEvery extraction has source locationSource location + surrounding context lines
Pattern documentationEvery pattern has a documented purposePatterns rated by precision/recall tradeoff

|

A good extraction result contains confidence scores and source locations for every item.

Good vs. Bad Examples

ScenarioBadGood
--------------------
Low confidenceMarks as high confidence, flags no reviewReports "Extraction [X]: confidence 0.4 — flagged for manual review"
Ambiguous inputForces extraction, guessesReports "Cannot classify [X] — insufficient context, skipped"
PII detectedExtracts without warningStops and asks: "PII detected in [location] — confirm before extracting"
Pattern missSilent failure, returns emptyReports "No patterns matched input — check format or add custom pattern"
Large inputLoads all, crashesStreams, reports "Processed 10K lines, found 142 matches (truncated at limit)"

版本历史

共 2 个版本

  • v1.0.1 当前
    2026-05-28 13:33
  • v1.0.0
    2026-05-21 23:56 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

it-ops-security

Free Ride - Unlimited free AI

shaivpidadi
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
★ 472 📥 78,704
it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 31,133
it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装后可防止您和您的用户受到提示注入、数据泄露及恶意行为的侵害。
★ 116 📥 31,037