agentleFS
terrene-foundationterrene-foundation/pact/.claude/skills/16-validation-patterns/SKILL.md

validation-patterns

Skill0 starsChanged 7 months agoApache-2.0View on GitHub

Validation patterns and compliance checking for Kailash SDK including parameter validation, DataFlow pattern validation, connection validation, absolute import validation, workflow structure validation, and security validation. Use when asking about 'validation', 'validate', 'check compliance', 'verify', 'lint', 'code review', 'parameter validation', 'connection validation', 'import validation', 'security validation', or 'workflow validation'.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    All required parameters provided

    line 59
  2. Distinctive:

    All connections use 4-parameter format

    line 60
  3. Distinctive:

    No missing or duplicate node IDs

    line 61

≈ “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

Kailash Validation Patterns

Validation patterns and compliance checking for Kailash SDK development.

Sub-File Index

Core Validations

  • validate-parameters - Node parameter validation
    • Required params, type checking, value ranges, format, defaults
  • validate-connections - Connection validation
    • 4-parameter format, node existence, param name matching, type compatibility, circular dependency detection
  • validate-workflow-structure - Workflow validation
    • Node ID uniqueness, dead-end detection, entry/exit point validation

Framework-Specific Validations

  • validate-dataflow-patterns - DataFlow compliance
    • Result access: results["node_id"]["result"] (not .result)
    • String ID preservation, multi-instance isolation, transaction patterns
  • validate-absolute-imports - Import validation
    • Absolute vs relative, module path correctness, circular/missing import detection
  • validate-security - Security checks
    • Secret exposure, SQL/code injection, file path traversal, API key handling

Quick Reference

What Each Validation Catches

ValidationCatchesKey Pattern
ParametersMissing/wrong-type paramsCheck before workflow.build()
ConnectionsWrong 4-param format, nonexistent nodes(src_id, src_param, tgt_id, tgt_param)
WorkflowDuplicate IDs, dead-ends, no entry pointStructural integrity
DataFlow.result access, UUID conversionresults["id"]["result"]
ImportsRelative imports, circular depsAbsolute imports only
SecurityHardcoded secrets, SQL injectionEnv vars, parameterized queries

Automated Validation

from kailash.validation import WorkflowValidator

validator = WorkflowValidator(workflow)
results = validator.validate_all()

if not results.is_valid:
    for error in results.errors:
        print(f"Error: {error}")

Pre-Execution Checklist

  • All required parameters provided
  • All connections use 4-parameter format
  • No missing or duplicate node IDs
  • Called .build() before execute
  • Using correct runtime type

CI Integration

python -m kailash.validation.cli validate-all
python -m kailash.validation.cli check-security

Validation Rules

  • Always validate parameters before execution, connections before building, security before deployment, imports before commit
  • Never skip parameter validation, connection validation, security validation

Related Skills

  • 17-gold-standards - Compliance standards
  • 31-error-troubleshooting - Error troubleshooting
  • 01-core-sdk - Core patterns
  • 02-dataflow - DataFlow patterns

Support

  • gold-standards-validator - Compliance checking
  • pattern-expert - Pattern validation
  • testing-specialist - Test validation

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.