Skip to content
FunCoding

data-validation

Validates data against common and custom rules (required fields, formats, ranges). Use when checking data quality, input validation, or enforcing schemas and constraints.

Star
1,152
License
Apache-2.0
Last commit
Oct 13, 2026

browser4-agentic/src/main/resources/skills/data-validation/SKILL.md

View on GitHub

Data Validation Skill

Description

Validate data against specified rules. This skill provides a flexible validation framework supporting common validation patterns like email format, required fields, and custom rules.

Dependencies

None

Parameters

ParameterTypeRequiredDefaultDescription
dataMap<String, Any>Yes-The data to validate
rulesListYes-List of validation rules to apply

Return Value

Returns a SkillResult with the following data structure on success:

{
  "validationResults": {
    "rule1": true,
    "rule2": true
  }
}

On failure, returns:

{
  "validationResults": {
    "rule1": true,
    "rule2": false
  },
  "errors": ["error message 1", "error message 2"]
}

Supported Validation Rules

RuleDescriptionExample
emailValidates email format"[email protected]"
requiredChecks all fields are non-null and non-blankAll values must be present

Usage Examples

Email Validation

val result = registry.execute(
    skillId = "data-validation",
    context = context,
    params = mapOf(
        "data" to mapOf("email" to "[email protected]"),
        "rules" to listOf("email")
    )
)

Multiple Rules Validation

val result = registry.execute(
    skillId = "data-validation",
    context = context,
    params = mapOf(
        "data" to mapOf(
            "email" to "[email protected]",
            "name" to "John Doe",
            "age" to "25"
        ),
        "rules" to listOf("email", "required")
    )
)

Error Handling

The skill returns a failure result in the following cases:

  • Missing required parameter data
  • Missing required parameter rules
  • Unknown validation rule specified
  • Validation rule fails for the provided data

Implementation Notes

  • Rules are applied in the order specified in the rules list
  • All rules are executed even if some fail (to provide complete feedback)
  • Custom validation rules can be added by extending the skill
  • Validation is performed synchronously
  • Thread-safe execution

Extending with Custom Rules

To add custom validation rules, extend the skill and override the execute method to handle additional rule types:

class ExtendedDataValidationSkill : DataValidationSkill() {
    override suspend fun execute(context: SkillContext, params: Map<String, Any>): SkillResult {
        // Handle custom rules first
        val rules = params["rules"] as? List<String> ?: emptyList()

        if (rules.contains("custom-rule")) {
            // Implement custom validation
        }

        // Delegate to parent for standard rules
        return super.execute(context, params)
    }
}

Best Practices

  • Always provide clear error messages
  • Validate input data before processing
  • Use multiple validation rules for comprehensive checks
  • Combine with other skills in a pipeline for data processing workflows
  • Log validation failures for monitoring and debugging

See Also

Similar Skills

test-driven-development

OBobra/superpowers298k2,631 new stars in the last 7 days

migrate-to-shoehorn

MAmattpocock/skills288k10,178 new stars in the last 7 days

agent-runtime-gateway-smoke-test

AFaffaan-m/ECC278k4,046 new stars in the last 7 days

Featured

accessibility

Audit accessibility on Web, iOS, and Android to meet WCAG 2.2, with keyboard navigation and screen-reader support.

AFaffaan-m/ECC278k4,046 new stars in the last 7 days

ai-regression-testing

AFaffaan-m/ECC278k4,046 new stars in the last 7 days

Official

firecrawl-build-interact

FIfirecrawl/firecrawl191k2,010 new stars in the last 7 days