Agent skill
dr-anomalies
Detect data anomalies in Datarails Finance OS tables. Finds outliers, missing values, duplicates, and data quality issues.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/anomalies
SKILL.md
Datarails Anomaly Detection
Automated anomaly detection for Finance OS tables - find data quality issues, outliers, and suspicious patterns.
Workflow
Step 1: Verify Authentication
If any tool call fails with an authentication or connection error, guide the user to connect via the Connectors UI ("+" > Connectors > Datarails > Connect).
Step 2: Run Detection
- Get table schema for context
- Run
detect_anomaliesfor comprehensive analysis - Optionally run
profile_numeric_fieldsandprofile_categorical_fieldsfor deeper stats - If specific anomalies need investigation, use
get_records_by_filterto fetch examples
Step 3: Present Findings
Organize findings by severity:
- 🔴 Critical - Requires immediate attention
- 🟠 High - Should be addressed soon
- 🟡 Medium - Worth investigating
- 🟢 Low - Minor issues or informational
Arguments
| Argument | Description |
|---|---|
<table_id> |
Required - the table to analyze |
--severity <level> |
Filter to specific severity (critical, high, medium, low) |
--type <type> |
Filter to specific anomaly type |
Anomaly Types Detected
| Type | Description |
|---|---|
outliers |
Numeric values beyond 3 standard deviations |
missing |
Unexpected NULL values or patterns |
duplicates |
Potential duplicate records |
temporal |
Date/time anomalies (gaps, future dates) |
categorical |
Rare values, unexpected categories |
referential |
Foreign key or relationship issues |
Example Interactions
User: "/dr-anomalies 11442"
🔍 Anomaly Detection: GL Transactions (ID: 11442)
═══════════════════════════════════════════════════════════
Scanned 125,432 records | Found 47 anomalies
🔴 CRITICAL (3 findings)
───────────────────────────────────────────────────────────
1. DUPLICATE TRANSACTIONS
• 23 potential duplicate records detected
• Same amount, date, and vendor within 1 minute
• Records: [45231, 45232], [67892, 67893], ...
💡 Recommendation: Review for accidental double-entry
📋 Query: /dr-query 11442 "transaction_id IN (45231, 45232)"
2. FUTURE-DATED TRANSACTIONS
• 5 transactions with posting_date > today
• Dates range from 2024-02-15 to 2024-12-31
💡 Recommendation: Verify if these are planned entries
📋 Query: /dr-query 11442 "posting_date > '2024-01-20'"
3. NEGATIVE INVENTORY QUANTITIES
• 8 records with quantity < 0
• Min value: -500 (record 89234)
💡 Recommendation: Check if returns are properly coded
🟠 HIGH (12 findings)
───────────────────────────────────────────────────────────
4. AMOUNT OUTLIERS
• 127 transactions beyond normal range
• 115 above $500,000 (expected max ~$250,000)
• 12 below -$100,000 (expected min ~-$50,000)
💡 Recommendation: Verify large transactions are approved
5. HIGH NULL RATE: vendor_name
• 2,341 records (1.87%) missing vendor_name
• But vendor_id is present
💡 Recommendation: Join with vendor master to populate
...
🟡 MEDIUM (18 findings)
───────────────────────────────────────────────────────────
12. RARE CATEGORY VALUES
• department contains 3 values appearing < 10 times
• Values: "TEST", "MIGRATION", "UNKNOWN"
💡 Recommendation: Standardize or reclassify
...
🟢 LOW (14 findings)
───────────────────────────────────────────────────────────
35. TRAILING WHITESPACE
• account_code has 45 values with trailing spaces
💡 Recommendation: Trim during ETL
═══════════════════════════════════════════════════════════
📊 SUMMARY
═══════════════════════════════════════════════════════════
| Severity | Count | Action |
|----------|-------|---------------------------|
| Critical | 3 | Investigate immediately |
| High | 12 | Address this week |
| Medium | 18 | Plan for remediation |
| Low | 14 | Fix during maintenance |
Data Quality Score: 87/100 ⚠️
Primary concerns: Duplicates, Future dates, Amount outliers
User: "/dr-anomalies 11442 --severity critical"
🔴 Critical Anomalies: GL Transactions
Found 3 critical issues requiring immediate attention:
1. DUPLICATE TRANSACTIONS (23 records)
...
2. FUTURE-DATED TRANSACTIONS (5 records)
...
3. NEGATIVE INVENTORY QUANTITIES (8 records)
...
User: "/dr-anomalies 11442 --type outliers"
📊 Outlier Analysis: GL Transactions
Analyzed 8 numeric fields for statistical outliers (|z| > 3)
amount: 127 outliers
├── Above 3σ: 115 records
│ ├── Max: $8,750,000 (z=12.4)
│ ├── Sample: [45231: $2.1M], [67892: $1.8M], [89234: $1.5M]
│ └── Pattern: Mostly Q4 entries (82%)
└── Below -3σ: 12 records
├── Min: -$1,250,000 (z=-8.2)
└── Sample: [12345: -$800K], [23456: -$650K]
quantity: 23 outliers
├── All above 3σ (high quantities)
├── Max: 10,000 (z=5.1)
└── 18 of 23 are from department="Warehouse"
unit_cost: 45 outliers
...
Investigation Workflow
When anomalies are detected:
- Review findings - Understand the scope and patterns
- Fetch examples - Use
/dr-queryto see actual records - Verify business rules - Some "anomalies" may be valid
- Document decisions - Note which are false positives
- Create remediation plan - Prioritize by severity
Related Skills
/dr-profile- Detailed field statistics/dr-query- Fetch specific records/dr-tables- Understand table structure
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?