From 21f68f066ab3f004e667111729e5519f6e0d46b1 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:17:58 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 15 +++++ README.md | 3 + agents/validation-agent.md | 20 ++++++ plugin.lock.json | 61 +++++++++++++++++++ skills/data-validation-engine/SKILL.md | 52 ++++++++++++++++ .../data-validation-engine/assets/README.md | 7 +++ .../references/README.md | 7 +++ .../data-validation-engine/scripts/README.md | 7 +++ 8 files changed, 172 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 agents/validation-agent.md create mode 100644 plugin.lock.json create mode 100644 skills/data-validation-engine/SKILL.md create mode 100644 skills/data-validation-engine/assets/README.md create mode 100644 skills/data-validation-engine/references/README.md create mode 100644 skills/data-validation-engine/scripts/README.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..55cfb5b --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "data-validation-engine", + "description": "Database plugin for data-validation-engine", + "version": "1.0.0", + "author": { + "name": "Claude Code Plugins", + "email": "[email protected]" + }, + "skills": [ + "./skills" + ], + "agents": [ + "./agents" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..907b222 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# data-validation-engine + +Database plugin for data-validation-engine diff --git a/agents/validation-agent.md b/agents/validation-agent.md new file mode 100644 index 0000000..d496ed8 --- /dev/null +++ b/agents/validation-agent.md @@ -0,0 +1,20 @@ +--- +description: Implement data validation rules +capabilities: ["validation", "data-integrity", "constraints"] +--- + +# Data Validation Engine + +Implement comprehensive data validation at database and application levels. + +## Validation Types + +1. **Type Validation**: Correct data types +2. **Range Validation**: Min/max values +3. **Format Validation**: Regex patterns +4. **Referential Integrity**: Foreign key validation +5. **Business Rules**: Custom validation logic + +## When to Activate + +Implement data validation for database integrity. diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..74e8d78 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,61 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/database/data-validation-engine", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "a7bb50f9ba20cd7af0bd0c4a093e6d05148d0170", + "treeHash": "02f29d280717e5e7ae8692c0481636c065cfba26326a77f3221baf80f6e2325a", + "generatedAt": "2025-11-28T10:18:17.827129Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "data-validation-engine", + "description": "Database plugin for data-validation-engine", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "3042ba056cd34bf41026b240bd207a53a62ff7f68e4a295691115ee050e7f7c0" + }, + { + "path": "agents/validation-agent.md", + "sha256": "762f1ec6b3da795e3ba29492556c6afaf769ecb7ce1ba2a05c52e250dc531b24" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "d0ad55367605d3c9ff07defaa9f618556a6c969cd33899f69068477f75946138" + }, + { + "path": "skills/data-validation-engine/SKILL.md", + "sha256": "c095a50f7326bfda3890f273b05b1386d4472acf42979a65645acf34091470df" + }, + { + "path": "skills/data-validation-engine/references/README.md", + "sha256": "c9ce4e74e69f6a0186de9741fa02a794d25ede5b38ae6463ea90fd72e8017902" + }, + { + "path": "skills/data-validation-engine/scripts/README.md", + "sha256": "fcbe34e5f1fd8fc80a2604d5d1d0136f2cb546e077efd3ad35ef530cb0499f08" + }, + { + "path": "skills/data-validation-engine/assets/README.md", + "sha256": "6a6aa27f6d506428533bee9a6c752259a003683a0021b1fc371bbf89ed742f6e" + } + ], + "dirSha256": "02f29d280717e5e7ae8692c0481636c065cfba26326a77f3221baf80f6e2325a" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/data-validation-engine/SKILL.md b/skills/data-validation-engine/SKILL.md new file mode 100644 index 0000000..7f08c51 --- /dev/null +++ b/skills/data-validation-engine/SKILL.md @@ -0,0 +1,52 @@ +--- +name: validating-database-integrity +description: | + This skill utilizes the data-validation-engine plugin to ensure database integrity. It automatically validates data types, ranges, formats, referential integrity, and business rules. Use this skill when you need to implement data validation, enforce constraints, or improve data quality within a database. It is triggered by requests for "data validation", "database integrity", or "validation rules". The plugin supports multi-database environments and production-ready implementations. +allowed-tools: Read, Write, Edit, Grep, Glob, Bash +version: 1.0.0 +--- + +## Overview + +This skill empowers Claude to implement comprehensive data validation at both the database and application levels, ensuring data integrity and adherence to defined rules. It leverages the data-validation-engine plugin to automate the process of defining and enforcing validation rules. + +## How It Works + +1. **Rule Definition**: Claude analyzes the request and identifies the specific data validation requirements (e.g., data types, ranges, formats). +2. **Validation Implementation**: Claude uses the data-validation-engine plugin to generate and apply the necessary validation rules to the database schema or application logic. +3. **Verification**: Claude confirms the successful implementation of the validation rules and reports any errors or conflicts. + +## When to Use This Skill + +This skill activates when you need to: +- Implement data validation for a new database schema. +- Enforce data integrity constraints on existing database tables. +- Validate data input within an application to prevent invalid data from being stored. + +## Examples + +### Example 1: Implementing Data Type Validation + +User request: "Implement data validation to ensure the 'age' column in the 'users' table is an integer." + +The skill will: +1. Use the data-validation-engine plugin to add a constraint to the 'users' table, enforcing that the 'age' column must contain integer values. +2. Verify that the constraint is active and prevents non-integer values from being inserted into the 'age' column. + +### Example 2: Validating Email Format + +User request: "Add data validation to ensure the 'email' column in the 'customers' table contains a valid email address format." + +The skill will: +1. Use the data-validation-engine plugin to add a constraint to the 'customers' table, using a regular expression to validate the format of the 'email' column. +2. Test the constraint with valid and invalid email addresses to ensure it functions correctly. + +## Best Practices + +- **Comprehensive Coverage**: Validate all relevant data points to ensure complete data integrity. +- **Clear Error Messages**: Provide informative error messages to users when validation fails, guiding them to correct the data. +- **Regular Review**: Periodically review and update validation rules to reflect changing business requirements. + +## Integration + +This skill integrates seamlessly with other database management and application development tools within the Claude Code ecosystem. It can be used in conjunction with schema design tools, data migration utilities, and application frameworks to ensure data integrity throughout the entire development lifecycle. \ No newline at end of file diff --git a/skills/data-validation-engine/assets/README.md b/skills/data-validation-engine/assets/README.md new file mode 100644 index 0000000..370e5ea --- /dev/null +++ b/skills/data-validation-engine/assets/README.md @@ -0,0 +1,7 @@ +# Assets + +Bundled resources for data-validation-engine skill + +- [ ] validation_report_template.html: HTML template for generating visually appealing and informative data validation reports. +- [ ] example_validation_rules.json: Example JSON file demonstrating how to define data validation rules for different data types and scenarios. +- [ ] configuration_template.yaml: Template for configuring the data validation engine, including database connection details and logging settings. diff --git a/skills/data-validation-engine/references/README.md b/skills/data-validation-engine/references/README.md new file mode 100644 index 0000000..9a1bb08 --- /dev/null +++ b/skills/data-validation-engine/references/README.md @@ -0,0 +1,7 @@ +# References + +Bundled resources for data-validation-engine skill + +- [ ] database_schema.md: Documentation of the database schema, including table structures, data types, and relationships. +- [ ] validation_rules_guide.md: A guide to defining and implementing data validation rules, including examples and best practices. +- [ ] error_codes.md: A comprehensive list of error codes generated by the data validation engine, along with their descriptions and recommended actions. diff --git a/skills/data-validation-engine/scripts/README.md b/skills/data-validation-engine/scripts/README.md new file mode 100644 index 0000000..aa9747c --- /dev/null +++ b/skills/data-validation-engine/scripts/README.md @@ -0,0 +1,7 @@ +# Scripts + +Bundled resources for data-validation-engine skill + +- [ ] validate_data.py: Script to execute data validation checks against a specified database and table, logging any discrepancies. +- [ ] generate_validation_report.py: Script to generate a comprehensive report of data validation results, including statistics and identified issues. +- [ ] configure_validation_rules.py: Script to interactively configure data validation rules for a given database and table, storing the rules in a configuration file.