agentleFS
Eleven-MEleven-M/flowmind/skills/log-audit/SKILL.md

log-audit

Skill1 starsChanged 3 months agoMITView on GitHub

Log analysis and trace visualization skill for FlowMind. Analyze application logs, trace requests, debug performance issues.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Log Audit Skill

Analyze application logs, trace requests, and debug performance issues with FlowMind intelligence.

Features

🔍 Log Query

  • Time-based filtering
  • Service filtering
  • Level filtering (ERROR, WARN, INFO, DEBUG)
  • Keyword search
  • Trace ID lookup

🔗 Trace Analysis

  • Full call chain visualization
  • Duration breakdown
  • Error identification
  • Bottleneck detection

⚡ Performance Analysis

  • Slow query detection
  • Timeout identification
  • Resource bottleneck analysis

Resolution Strategy

log-audit now resolves query conditions in this order:

  1. AI-extracted parameters when an AI provider is available
  2. Local parser fallback for any missing fields
  3. Direct raw SLS query reuse when the input already contains explicit conditions

This keeps log queries usable even when the AI model is unavailable or temporarily failing.

Trigger Patterns

"日志", "log", "查看日志", "分析日志"
"traceId", "链路", "trace", "调用链"
"错误日志", "异常日志", "error log"
"性能分析", "耗时分析", "performance"
"排查", "调试", "debug"

Output Formats

Sequential List (Default for Traces)

TraceId: {traceId}
Time: {startTime} ~ {endTime}
Duration: {totalDuration}ms | Requests: {count}

=== Requests ===

[1] {time} | {service} | {duration}ms
    {method} {url}
    Request: {params}
    Response: {body}

[2] {time} | {service} | {duration}ms
    {method} {url}
    Request: {params}
    Response: {body}

=== Summary ===
Bottleneck: {service} - {url} ({duration}ms)

Log Summary

┌─────────────────────────────────────────┐
│ Log Analysis                            │
├─────────────────────────────────────────┤
│ Time: {range}                           │
│ Total: {count} | Errors: {errorCount}   │
├─────────────────────────────────────────┤
│ Key Errors:                             │
│ • [{time}] {error}                      │
│ • [{time}] {error}                      │
└─────────────────────────────────────────┘

Component Integration

This skill uses the logService component. The actual log service provider is determined by configuration.

ProviderMCP ServerDescription
aliyun-slssls-logsAlibaba Cloud SLS
baidu-slsbaidu-sls-logsBaidu Cloud Log Service
elk(direct)Elasticsearch

Configuration is managed in flowmind.config.json under components.logService.

Learning Integration

This skill supports FlowMind learning:

  • Output Format: Learns preferred format
  • Query Patterns: Learns common queries
  • Filter Preferences: Learns which filters to apply
User: "用顺序列表格式"
FlowMind: ✓ Learned for log-audit

User: [Next query]
FlowMind: [Applies sequential list automatically]

Configuration

Skill-specific configuration:

{
  "log-audit": {
    "defaultFormat": "sequential-list",
    "excludeInfrastructure": true
  }
}

Log service provider is configured via components.logService in flowmind.config.json.

Examples

Example 1: Trace Query

User: 查询 traceId abc123 的完整链路

FlowMind:
TraceId: abc123
Time: 2026-06-22 10:00:00 ~ 10:00:05
Duration: 5000ms | Requests: 8

=== Requests ===

[1] 10:00:00.100 | order-service | 150ms
    POST /api/orders
    Request: {"userId": "123"}
    Response: {"orderId": "ORD-001"}

[2] 10:00:00.300 | payment-service | 2000ms ⚠️
    POST /api/payments
    Request: {"orderId": "ORD-001"}
    Response: {"status": "success"}

=== Summary ===
Bottleneck: payment-service (2000ms)

Example 2: Error Analysis

User: 查看最近1小时的错误日志

FlowMind:
┌─────────────────────────────────────────┐
│ Error Analysis                          │
├─────────────────────────────────────────┤
│ Time: 09:00 ~ 10:00                     │
│ Errors: 3                               │
├─────────────────────────────────────────┤
│ • 09:15 NullPointerException            │
│ • 09:32 ConnectionTimeout               │
│ • 09:45 ValidationException             │
└─────────────────────────────────────────┘

Query Templates

Default (Exclude Infrastructure)

service != 'gateway'
AND service NOT LIKE '%-gateway'
AND service != 'nacos'
AND service != 'sentinel'
AND tag != 'health-check'

Errors Only

level = 'ERROR'

Slow Requests

duration > 1000

Customization

Custom Templates

{
  "log-audit": {
    "templates": {
      "my-service": "service = 'my-service'",
      "slow-db": "duration > 500 AND type = 'db'"
    }
  }
}

Custom Formats

{
  "log-audit": {
    "formats": {
      "compact": { "maxLines": 10 },
      "detailed": { "includeHeaders": true },
      "json": { "format": "json" }
    }
  }
}

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.