agentleFS
Eleven-MEleven-M/flowmind/skills/data-logic-validation/SKILL.md

data-logic-validation

Skill1 starsChanged 3 months agoMITView on GitHub

Data logic validation skill for FlowMind. Verify actual SQL queries, Redis operations, and data processing logic against real data via MCP database and Redis connections.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify actual data processing logic by connecting to databases and Redis via MCP, extracting real SQL queries and Redis operations from …

    line 16
  2. Distinctive:

    Verify query logic against real database

    line 22
  3. Distinctive:

    Check data integrity and consistency

    line 23
  4. Distinctive:

    Verify cache key structure and values

    line 28
  5. Distinctive:

    Check TTL and expiration logic

    line 29
  6. Distinctive:

    Check state machine transitions

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Data Logic Validation Skill

Verify actual data processing logic by connecting to databases and Redis via MCP, extracting real SQL queries and Redis operations from code, and validating against actual data.

Features

SQL Validation

  • Extract actual SQL queries from code
  • Verify query logic against real database
  • Check data integrity and consistency
  • Validate complex join and subquery logic

Redis Validation

  • Extract Redis operations from code
  • Verify cache key structure and values
  • Check TTL and expiration logic
  • Validate cache-database consistency

Data Flow Validation

  • Trace data flow from API to database
  • Verify data transformations
  • Check state machine transitions
  • Validate business rule enforcement

Trigger Patterns

"数据验证", "data validation"
"检查实际逻辑", "查看实际 SQL"
"检查 Redis 处理", "验证缓存逻辑"
"验证数据库操作", "查看真实查询"
"排查真实数据", "搜索词"
"预测结果", "门店结果"
"数据完整性", "data integrity"

Output Format

┌─────────────────────────────────────────────────────┐
│ Data Logic Validation Report                        │
├─────────────────────────────────────────────────────┤
│ Target: {module/service}                            │
│ Database: {db_name}                                 │
│ Redis: {key_pattern}                                │
├─────────────────────────────────────────────────────┤
│ SQL Queries Found: {count}                          │
│ • {query_description}: {result}                     │
├─────────────────────────────────────────────────────┤
│ Redis Operations: {count}                           │
│ • {operation}: {result}                             │
├─────────────────────────────────────────────────────┤
│ Validation Results:                                 │
│ • Data Integrity: {status}                          │
│ • Business Logic: {status}                          │
│ • Cache Consistency: {status}                       │
└─────────────────────────────────────────────────────┘

Validation Workflow

1. Code Analysis → Extract SQL/Redis operations
2. MCP Connection → Connect to database/Redis
3. Query Execution → Run extracted queries
4. Result Comparison → Compare expected vs actual
5. Report Generation → Output validation results

Component Integration

This skill uses the databaseManager, databaseQuery, and redisMonitor components.

ComponentProviderMCP ServerDescription
databaseManageraliyun-dmsaliyun-dms-mcp-serverAlibaba Cloud DMS
databaseQueryaliyun-rds-querydb-redis-queryDirect SQL queries
redisMonitoraliyun-redisredis-monitorRedis Prometheus metrics

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

Learning Integration

This skill supports FlowMind learning:

  • Query Patterns: Learns common query patterns for faster extraction
  • Connection Info: Remembers database/Redis connection details
  • Validation Rules: Learns project-specific validation rules

Examples

Example 1: SQL Validation

User: 验证订单查询逻辑

FlowMind:
┌─────────────────────────────────────────────────────┐
│ SQL Validation Report                               │
├─────────────────────────────────────────────────────┤
│ Source: OrderService.getOrdersByUser()              │
│ SQL: SELECT * FROM orders WHERE user_id = ?         │
├─────────────────────────────────────────────────────┤
│ ✅ Query returns correct results                    │
│ ⚠️ Missing index on user_id column                 │
│ ✅ Pagination working correctly                     │
└─────────────────────────────────────────────────────┘

Example 2: Redis Validation

User: 验证缓存逻辑

FlowMind:
┌─────────────────────────────────────────────────────┐
│ Redis Validation Report                             │
├─────────────────────────────────────────────────────┤
│ Key: store:{storeId}:config                         │
│ Type: Hash                                          │
│ TTL: 3600s                                          │
├─────────────────────────────────────────────────────┤
│ ✅ Key structure matches code definition            │
│ ✅ TTL configured correctly                         │
│ ⚠️ Value size: 2.5MB (consider compression)        │
└─────────────────────────────────────────────────────┘

Configuration

{
  "data-logic-validation": {
    "database": {
      "enabled": true,
      "maxRows": 100
    },
    "redis": {
      "enabled": true,
      "scanCount": 100
    },
    "validation": {
      "checkIntegrity": true,
      "checkConsistency": true,
      "checkPerformance": true
    }
  }
}

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.

Reviews can't be read right now.

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.