MCPInstall

adf-validation-rules

ADF activity nesting rules, limits, and validation gotchas. PROACTIVELY activate for: (1) ADF activity nesting rules (ForEach inside If, Switch, Until), (2) ForEach limitations (no nested ForEach, item limits), (3) pipeline validation errors and ARM-template build failures, (4) linked service authentication issues, (5) Set Variable restrictions in ForEach, (6) Data Flow constraints (transformation limits, source/sink rules), (7) parameter and variable scope, (8) max activities per pipeline, (9) pipeline concurrency limits. Provides: nesting rule matrix, activity limit reference, validation error catalog, and refactoring patterns for unsupported nesting.

Installs
164
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill adf-validation-rules
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads adf-validation-rules automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Azure Data Factory Validation Rules and Limitations

🚨 CRITICAL: Activity Nesting Limitations

Azure Data Factory has STRICT nesting rules for control flow activities. Violating these rules will cause pipeline failures or prevent pipeline creation.

Supported Control Flow Activities for Nesting

Four control flow activities support nested activities:

  • ForEach: Iterates over collections and executes activities in a loop
  • If Condition: Branches based on true/false evaluation
  • Until: Implements do-until loops with timeout options
  • Switch: Evaluates activities matching case conditions

✅ PERMITTED Nesting Combinations

Parent ActivityCan ContainNotes
ForEachIf Condition✅ Allowed
ForEachSwitch✅ Allowed
UntilIf Condition✅ Allowed
UntilSwitch✅ Allowed

❌ PROHIBITED Nesting Combinations

Parent ActivityCANNOT ContainReason
If ConditionForEach❌ Not supported - use Execute Pipeline workaround
If ConditionSwitch❌ Not supported - use Execute Pipeline workaround
If ConditionUntil❌ Not supported - use Execute Pipeline workaround
If ConditionAnother If❌ Cannot nest If within If
SwitchForEach❌ Not supported - use Execute Pipeline workaround
SwitchIf Condition❌ Not supported - use Execute Pipeline workaround
SwitchUntil❌ Not supported - use Execute Pipeline workaround
SwitchAnother Switch❌ Cannot nest Switch within Switch
ForEachAnother ForEach❌ Single level only - use Execute Pipeline workaround
UntilAnother Until❌ Single level only - use Execute Pipeline workaround
ForEachUntil❌ Single level only - use Execute Pipeline workaround
UntilForEach❌ Single level only - use Execute Pipeline workaround

🚫 Special Activity Restrictions

Validation Activity:

  • ❌ CANNOT be placed inside ANY nested activity
  • ❌ CANNOT be used within ForEach, If, Switch, or Until activities
  • ✅ Must be at pipeline root level only

🔧 Workaround: Execute Pipeline Pattern

The ONLY supported workaround for prohibited nesting combinations:

Instead of direct nesting, use the Execute Pipeline Activity to call a child pipeline:

{
  "name": "ParentPipeline_WithIfCondition",
  "activities": [
    {
      "name": "IfCondition_Parent",
      "type": "IfCondition",
      "typeProperties": {
        "expression": "@equals(pipeline().parameters.ProcessData, 'true')",
        "ifTrueActivities": [
          {
            "name": "ExecuteChildPipeline_WithForEach",
            "type": "ExecutePipeline",
            "typeProperties": {
              "pipeline": {
                "referenceName": "ChildPipeline_ForEachLoop",
                "type": "PipelineReference"
              },
              "parameters": {
                "ItemList": "@pipeline().parameters.Items"
              }
            }
          }
        ]
      }
    }
  ]
}

Child Pipeline Structure:

{
  "name": "ChildPipeline_ForEachLoop",
  "parameters": {
    "ItemList": {"type": "array"}
  },
  "activities": [
    {
      "name": "ForEach_InChildPipeline",
      "type": "ForEach",
      "typeProperties": {
        "items": "@pipeline().parameters.ItemList",
        "activities": [
          // Your ForEach logic here
        ]
      }
    }
  ]
}

Why This Works:

  • Each pipeline can have ONE level of nesting
  • Execute Pipeline creates a new pipeline context
  • Child pipeline gets its own nesting level allowance
  • Enables unlimited depth through pipeline chaining

🔢 Activity and Resource Limits

Pipeline Limits

ResourceLimitNotes
Activities per pipeline80Includes inner activities for containers
Parameters per pipeline50-
ForEach concurrent iterations50 (maximum)Set via batchCount property
ForEach items100,000-
Lookup activity rows5,000Maximum rows returned
Lookup activity size4 MBMaximum size of returned data
Web activity timeout1 hourDefault timeout for Web activities
Copy activity timeout7 daysMaximum execution time

ForEach Activity Configuration

{
  "name": "ForEachActivity",
  "type": "ForEach",
  "typeProperties": {
    "items": "@pipeline().parameters.ItemList",
    "isSequential": false,  // false = parallel execution
    "batchCount": 50,       // Max 50 concurrent iterations
    "activities": [
      // Nested activities
    ]
  }
}

Critical Considerations:

  • isSequential: true → Executes one item at a time (slow but predictable)
  • isSequential: false → Executes up to batchCount items in parallel
  • Maximum batchCount is 50 regardless of setting
  • Cannot use Set Variable activity inside parallel ForEach (variable scope is pipeline-level)

Set Variable Activity Limitations

❌ CANNOT use Set Variable inside ForEach with isSequential: false

  • Reason: Variables are pipeline-scoped, not ForEach-scoped
  • Multiple parallel iterations would cause race conditions
  • ✅ Alternative: Use Append Variable with array type, or use sequential execution

📊 Linked Services Validation (Azure Blob, Azure SQL)

Detailed validation rules and templates for ADF Linked Services (Azure Blob Storage and Azure SQL Database) — auth types (key, SAS, managed identity, AAD), network configuration, and connection-string patterns — live in references/linked-services.md. Load that reference when authoring or validating a Linked Service JSON.

🔍 Data Flow Limitations

General Limits

  • Column name length: 128 characters maximum
  • Row size: 1 MB maximum (some sinks like SQL have lower limits)
  • String column size: Varies by sink (SQL: 8000 for varchar, 4000 for nvarchar)

Transformation-Specific Limits

TransformationLimitation
LookupCache size limited by cluster memory
JoinLarge joins may cause memory errors
PivotMaximum 10,000 unique values
WindowRequires partitioning for large datasets

Performance Considerations

  • Partitioning: Always partition large datasets before transformations
  • Broadcast: Use broadcast hint for small dimension tables
  • Sink optimization: Enable table option "Recreate" instead of "Truncate" for better performance

🛡️ Validation Checklist for Pipeline Creation

Before Creating Pipeline

  • Verify activity nesting follows permitted combinations
  • Check ForEach activities don't contain other ForEach/Until
  • Verify If/Switch activities don't contain ForEach/Until/If/Switch
  • Ensure Validation activities are at pipeline root level only
  • Confirm total activities < 80 per pipeline
  • Verify no Set Variable activities in parallel ForEach

Linked Service Validation

  • Blob Storage: If using managed identity/service principal, accountKind is set
  • SQL Database: Authentication method matches security requirements
  • All services: Secrets stored in Key Vault, not hardcoded
  • All services: Firewall rules configured for integration runtime IPs
  • Network: Private endpoints configured if using VNet integration

Activity Configuration Validation

  • ForEach: batchCount ≤ 50 if parallel execution
  • Lookup: Query returns < 5000 rows and < 4 MB data
  • Copy: DIU configured appropriately (2-256 for Azure IR)
  • Copy: Staging enabled for large data movements
  • All activities: Timeout values appropriate for expected execution time
  • All activities: Retry logic configured for transient failures

Data Flow Validation

  • Column names ≤ 128 characters
  • Source query doesn't return > 1 MB per row
  • Partitioning configured for large datasets
  • Sink has appropriate schema and data type mappings
  • Staging linked service configured for optimal performance

🔍 Automated Validation Script

CRITICAL: Always run automated validation before committing or deploying ADF pipelines!

The adf-master plugin includes a comprehensive PowerShell validation script that checks for ALL the rules and limitations documented above.

Using the Validation Script

Location: ${CLAUDE_PLUGIN_ROOT}/scripts/validate-adf-pipelines.ps1

Basic usage:

# From the root of your ADF repository
pwsh -File validate-adf-pipelines.ps1

With custom paths:

pwsh -File validate-adf-pipelines.ps1 `
    -PipelinePath "path/to/pipeline" `
    -DatasetPath "path/to/dataset"

With strict mode (additional warnings):

pwsh -File validate-adf-pipelines.ps1 -Strict

What the Script Validates

The automated validation script checks for issues that Microsoft's official @microsoft/azure-data-factory-utilities package does NOT validate:

  1. Activity Nesting Violations:

    • ForEach → ForEach, Until, Validation
    • Until → Until, ForEach, Validation
    • IfCondition → ForEach, If, IfCondition, Switch, Until, Validation
    • Switch → ForEach, If, IfCondition, Switch, Until, Validation
  2. Resource Limits:

    • Pipeline activity count (max 120, warn at 100)
    • Pipeline parameter count (max 50)
    • Pipeline variable count (max 50)
    • ForEach batchCount limit (max 50, warn at 30 in strict mode)
  3. Variable Scope Violations:

    • SetVariable in parallel ForEach (causes race conditions)
    • Proper AppendVariable vs SetVariable usage
  4. Dataset Configuration Issues:

    • Missing fileName or wildcardFileName for file-based datasets
    • AzureBlobFSLocation missing required fileSystem property
    • Missing required properties for DelimitedText, Json, Parquet types
  5. Copy Activity Validations:

    • Source/sink type compatibility with dataset types
    • Lookup activity firstRowOnly=false warnings (5000 row/4MB limits)
    • Blob file dependencies (additionalColumns logging pattern)

Integration with CI/CD

GitHub Actions example:

- name: Validate ADF Pipelines
  run: |
    pwsh -File validate-adf-pipelines.ps1 -PipelinePath pipeline -DatasetPath dataset
  shell: pwsh

Azure DevOps example:

- task: PowerShell@2
  displayName: 'Validate ADF Pipelines'
  inputs:
    filePath: 'validate-adf-pipelines.ps1'
    arguments: '-PipelinePath pipeline -DatasetPath dataset'
    pwsh: true

Command Reference

Use the /adf-validate command to run the validation script with proper guidance:

/adf-validate

This command will:

  1. Detect your ADF repository structure
  2. Run the validation script with appropriate paths
  3. Parse and explain any errors or warnings found
  4. Provide specific solutions for each violation
  5. Recommend next actions based on results
  6. Suggest CI/CD integration patterns

Exit Codes

  • 0: Validation passed (no errors)
  • 1: Validation failed (errors found - DO NOT DEPLOY)

Best Practices

  1. Run validation before every commit to catch issues early
  2. Add validation to CI/CD pipeline to prevent invalid deployments
  3. Use strict mode during development for additional warnings
  4. Re-validate after bulk changes or generated pipelines
  5. Document validation exceptions if you must bypass a warning
  6. Share validation results with team to prevent repeated mistakes

🚨 CRITICAL: Enforcement Protocol

When creating or modifying ADF pipelines:

  1. ALWAYS validate activity nesting against the permitted/prohibited table
  2. REJECT any attempt to create prohibited nesting combinations
  3. SUGGEST Execute Pipeline workaround for complex nesting needs
  4. VALIDATE linked service authentication matches the connector type
  5. CHECK all limits (activities, parameters, ForEach iterations, etc.)
  6. VERIFY required properties are set (e.g., accountKind for managed identity)
  7. WARN about common pitfalls specific to the connector being used

Example Validation Response:

❌ INVALID PIPELINE STRUCTURE DETECTED:

Issue: ForEach activity contains another ForEach activity
Location: Pipeline "PL_DataProcessing" → ForEach "OuterLoop" → ForEach "InnerLoop"

This violates Azure Data Factory nesting rules:
- ForEach activities support only a SINGLE level of nesting
- You CANNOT nest ForEach within ForEach

✅ RECOMMENDED SOLUTION:
Use the Execute Pipeline pattern:
1. Create a child pipeline with the inner ForEach logic
2. Replace the inner ForEach with an Execute Pipeline activity
3. Pass required parameters to the child pipeline

Would you like me to generate the refactored pipeline structure?

📚 Reference Documentation

Official Microsoft Learn Resources:

Last Updated: 2025-01-24 (Based on official Microsoft documentation)

This validation rules skill MUST be consulted before creating or modifying ANY Azure Data Factory pipeline to ensure compliance with platform limitations and best practices.

Progressive Disclosure References

For detailed validation matrices and resource limits, see:

  • Nesting Rules: references/nesting-rules.md - Complete matrix of permitted and prohibited activity nesting combinations with workaround patterns
  • Resource Limits: references/resource-limits.md - Complete reference for all ADF limits (pipeline, activity, trigger, data flow, integration runtime, expression, API)

FAQ

What does the adf-validation-rules skill do?

ADF activity nesting rules, limits, and validation gotchas. PROACTIVELY activate for: (1) ADF activity nesting rules (ForEach inside If, Switch, Until), (2) ForEach limitations (no nested ForEach, item limits), (3) pipeline validation errors and ARM-template build failures, (4) linked service authentication issues, (5) Set Variable restrictions in ForEach, (6) Data Flow constraints (transformation limits, source/sink rules), (7) parameter and variable scope, (8) max activities per pipeline, (9) pipeline concurrency limits. Provides: nesting rule matrix, activity limit reference, validation error catalog, and refactoring patterns for unsupported nesting.

How do I install adf-validation-rules?

Run npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill adf-validation-rules in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/adf-validation-rules/ (personal) or .claude/skills/adf-validation-rules/ (project).

Which AI agents can use adf-validation-rules?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is adf-validation-rules safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains adf-validation-rules?

It is published by josiahsiegel in josiahsiegel/claude-plugin-marketplace. It has 164 recorded installs.

More from josiahsiegel/claude-plugin-marketplace

View all →

tailwindcss-advanced-layouts

josiahsiegel/claude-plugin-marketplace

Tailwind CSS advanced layout techniques including CSS Grid and Flexbox patterns. PROACTIVELY activate for: (1) building complex layouts with CSS Grid, (2) grid-template-areas via Tailwind v4 arbitrary values, (3) responsive grid (grid-cols-, auto-fit, minmax), (4) Flexbox patterns (flex-1, flex-grow, gap), (5) sticky headers and footers, (6) holy grail layout, (7) masonry-style layouts, (8) container queries (@container) with Tailwind, (9) subgrid usage, (10) aspect-ratio utilities, (11) magazine-style multi-column layouts. Provides: Grid template recipes, container-query patterns, holy-grail templates, masonry alternatives, and aspect-ratio examples.

Frontend & Design8.1K installs

tailwindcss-animations

josiahsiegel/claude-plugin-marketplace

Tailwind CSS animations and transitions including built-in utilities and custom keyframes. PROACTIVELY activate for: (1) animate- utilities (spin, ping, pulse, bounce), (2) custom @keyframes via @theme animate, (3) transition utilities (transition, duration, ease), (4) transforms (scale, rotate, translate) with transition, (5) prefers-reduced-motion: reduce, (6) Framer Motion / Motion One integration with Tailwind, (7) CSS scroll-driven animations (animation-timeline), (8) view transitions API with Tailwind, (9) hover, focus, group-hover transitions, (10) staggered list animations. Provides: animation utility reference, custom keyframe examples, reduced-motion pattern, Framer Motion integration, and scroll-driven animation recipes.

Frontend & Design2.4K installs

tailwindcss-mobile-first

josiahsiegel/claude-plugin-marketplace

Mobile-first responsive design patterns with Tailwind CSS v4 (2025-2026). PROACTIVELY activate for: (1) mobile-first design with Tailwind breakpoints (sm:, md:, lg:, xl:, 2xl:), (2) responsive utility ordering (default = mobile, then breakpoints), (3) responsive typography (text-base sm:text-lg lg:text-xl), (4) responsive grids and flexbox, (5) hide/show across breakpoints (hidden md:block), (6) max- breakpoints for desktop-down overrides, (7) container queries (@container) for component-level responsiveness, (8) safe-area insets and notch handling, (9) landscape vs portrait orientation, (10) touch vs hover (hover: with @media). Provides: breakpoint reference, mobile-first patterns, container-query examples, safe-area recipes, and touch/hover handling.

Mobile2.1K installs

powershell-master

josiahsiegel/claude-plugin-marketplace

Complete PowerShell expertise system across ALL platforms (Windows/Linux/macOS). PROACTIVELY activate for: (1) ANY PowerShell task (scripts/modules/cmdlets), (2) CI/CD automation (GitHub Actions/Azure DevOps/Bitbucket), (3) Cross-platform scripting, (4) Module discovery and management (PSGallery), (5) Azure/AWS/Microsoft 365 automation, (6) Script debugging and optimization, (7) Best practices and security. Provides: PowerShell 7+ features, popular module expertise (Az, Microsoft.Graph, PnP, AWS Tools), PSGallery integration, platform-specific guidance, CI/CD pipeline patterns, cmdlet syntax mastery, and production-ready scripting patterns. Ensures professional-grade, cross-platform PowerShell automation following industry standards.

DevOps & Cloud1.1K installs

docker-best-practices

josiahsiegel/claude-plugin-marketplace

Comprehensive Docker best practices for images, containers, and production deployments. PROACTIVELY activate for: (1) writing production-ready Dockerfiles, (2) multi-stage builds for lean images, (3) base image selection (distroless, alpine, scratch, slim), (4) layer caching and ordering, (5) .dockerignore hygiene, (6) HEALTHCHECK and graceful shutdown, (7) non-root user and least-privilege patterns, (8) ENV vs ARG and secret handling, (9) tag/digest pinning and reproducibility, (10) Compose for local development. Provides: Dockerfile templates by language, image-size optimization checklist, .dockerignore template, HEALTHCHECK patterns, and Compose dev-stack examples.

DevOps & Cloud938 installs

git-master

josiahsiegel/claude-plugin-marketplace

Complete Git expertise system for ALL git operations. PROACTIVELY activate for: (1) ANY Git task (basic/advanced/dangerous), (2) Repository management, (3) Branch strategies and workflows, (4) Conflict resolution, (5) History rewriting/recovery, (6) Platform-specific operations (GitHub/Azure DevOps/Bitbucket), (7) Advanced commands (rebase/cherry-pick/filter-repo). Provides: complete Git command reference, safety guardrails for destructive operations, platform best practices, workflow strategies, reflog recovery techniques, and expert guidance for even the most risky operations. Always asks user preference for automatic commits vs manual control.

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.