adf-expression

adf-expression is a command for Claude Code from JosiahSiegel/claude-plugin-marketplace. It costs 18 tokens per session (1,358 once invoked), scanned A, original, MIT.

A generator for Azure Data Factory expressions, which are formulas used to transform values and control data pipelines.

In plain words
What is it for?
Use it to create expressions for date calculations, filename extraction, partition paths, weekday checks, and parameter-based SQL conditions.
Why use it?
It reduces the effort and syntax mistakes involved in writing expressions for dates, text, paths, and conditions.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the adf-master plugin — 6 skills, 5 commands, 1 agent shipped together

Good fit Use it to create expressions for date calculations, filename extraction, partition paths, weekday checks, and parameter-based SQL conditions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/josiahsiegel/claude-plugin-marketplace/adf-expression
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/JosiahSiegel/claude-plugin-marketplace

Made for: Claude Code.

Or install adf-master, the plugin that ships this one along with the rest of its 6 skills, 5 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adf-expression

README.md
[![agentmods](https://agentmods.dev/badge/commands/josiahsiegel/claude-plugin-marketplace/adf-expression/github.svg)](https://agentmods.dev/commands/josiahsiegel/claude-plugin-marketplace/adf-expression)
Your own site
<a href="https://agentmods.dev/commands/josiahsiegel/claude-plugin-marketplace/adf-expression"><img src="https://agentmods.dev/badge/commands/josiahsiegel/claude-plugin-marketplace/adf-expression/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for adf-expression

Your own site · 80×15
<a href="https://agentmods.dev/commands/josiahsiegel/claude-plugin-marketplace/adf-expression"><img src="https://agentmods.dev/badge/commands/josiahsiegel/claude-plugin-marketplace/adf-expression.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.01358
Opus 5 $0.00009 $0.00679
Sonnet 5 $0.00004 $0.00272
Haiku 4.5 $0.00002 $0.00136

Measured 12d ago against content hash 772252095c13, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

adf-expression scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/adf-master/commands/adf-expression.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ADF Expression Generator

Generate Azure Data Factory expressions for common scenarios.

Task

Create valid ADF expressions based on the described requirement.

Arguments

  • $ARGUMENTS: Description of what the expression should do
    • Example: yesterday's date in yyyy-MM-dd format
    • Example: partition path like year=2025/month=01/day=15
    • Example: first day of current month
    • Example: extract filename from full path
    • Example: check if weekday
    • Example: conditional SQL query based on parameter

Expression Syntax Rules

Basic Syntax

  • Expressions start with @ prefix
  • Use @{expression} for string interpolation
  • Nested functions: @function1(function2(value))

Expression vs String Interpolation

// Full expression (returns typed value)
"value": "@utcnow()"

// String interpolation (returns string)
"value": "Date is @{utcnow()}"

// Explicit expression type
{
  "value": "@concat('prefix_', pipeline().parameters.Name)",
  "type": "Expression"
}

Common Expression Patterns

Date/Time

Yesterday's Date:

@formatDateTime(adddays(utcnow(), -1), 'yyyy-MM-dd')

First Day of Month:

@formatDateTime(startOfMonth(utcnow()), 'yyyy-MM-dd')

Last Day of Previous Month:

@formatDateTime(adddays(startOfMonth(utcnow()), -1), 'yyyy-MM-dd')

Date Partition Path (year/month/day):

@concat(
  formatDateTime(utcnow(), 'yyyy'), '/',
  formatDateTime(utcnow(), 'MM'), '/',
  formatDateTime(utcnow(), 'dd')
)

Hive Partition Path:

@concat(
  'year=', formatDateTime(pipeline().parameters.ProcessDate, 'yyyy'),
  '/month=', formatDateTime(pipeline().parameters.ProcessDate, 'MM'),
  '/day=', formatDateTime(pipeline().parameters.ProcessDate, 'dd')
)

Is Weekday Check:

@and(greater(dayOfWeek(utcnow()), 0), less(dayOfWeek(utcnow()), 6))

N Days Ago:

@formatDateTime(adddays(utcnow(), -7), 'yyyy-MM-dd')

String Operations

Extract Filename from Path:

@substring(
  variables('FilePath'),
  add(lastIndexOf(variables('FilePath'), '/'), 1),
  sub(length(variables('FilePath')), add(lastIndexOf(variables('FilePath'), '/'), 1))
)

Read the full file on GitHub · 234 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 234 lines · 18 tokens per session scan A 772252095c13

Subscribe to this mod's changes

adf-expression is a command published in the GitHub repository JosiahSiegel/claude-plugin-marketplace (54 stars, last pushed 2mo ago), licensed MIT. It adds 18 tokens to every session and 1,358 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.