iteration

iteration is a command for Claude Code from SAP/automation-pilot-agent-skills. It costs 0 tokens per session (1,447 once invoked), scanned A, original, Apache-2.0.

A command step that runs another command once for every item in a list. It can process items one after another or start separate child runs in parallel.

In plain words
What is it for?
Use it to apply an operation to a list of apps, query results, API identifiers, or other resolved items. Choose sequential runs when order matters and parallel runs when items are independent.
Why use it?
It avoids copying the same step for each app, database row, or identifier. It also makes the choice between ordered processing and concurrent processing explicit.

Command for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the automation-pilot-skills plugin — 12 skills, 6 commands shipped together

Good fit Use it to apply an operation to a list of apps, query results, API identifiers, or other resolved items. Choose sequential runs when order matters and parallel runs when items are independent.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sap/automation-pilot-agent-skills/iteration
About the project

SAP Automation Pilot is an automation engine for SAP Business Technology Platform in which Commands define operational workflows. SAP teams use it to generate, review, deploy, run, monitor, and troubleshoot these automations. The catalogue skills provide an AI-assisted workflow for developing and operating SAP Automation Pilot Commands.

SAP/automation-pilot-agent-skills · 15 stars · on GitHub

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/SAP/automation-pilot-agent-skills

Made for: Claude Code.

Or install automation-pilot-skills, the plugin that ships this one along with the rest of its 12 skills, 6 commands.

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 iteration

README.md
[![agentmods](https://agentmods.dev/badge/commands/sap/automation-pilot-agent-skills/iteration/github.svg)](https://agentmods.dev/commands/sap/automation-pilot-agent-skills/iteration)
Your own site
<a href="https://agentmods.dev/commands/sap/automation-pilot-agent-skills/iteration"><img src="https://agentmods.dev/badge/commands/sap/automation-pilot-agent-skills/iteration/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 iteration

Your own site · 80×15
<a href="https://agentmods.dev/commands/sap/automation-pilot-agent-skills/iteration"><img src="https://agentmods.dev/badge/commands/sap/automation-pilot-agent-skills/iteration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,447 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.00000 $0.01447
Opus 5.5 $0.00000 $0.00579
Sonnet 5.5 $0.00000 $0.00289
Haiku 4.5 $0.00000 $0.00145

Measured 27d ago against content hash 1a85cdfb0998, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

iteration 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 27d 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.

skills/automation-pilot-command-authoring/references/commands/iteration.md · 119 lines

How it starts

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

Iteration: ForEach & ParallelForEach

Run a sub-command once per item of a list. Use when a step must repeat over a resolved set (apps in a space, rows from a query, IDs from an API) rather than once.

Resolve the executor contract live before use (autopi commands contract). Field tables are a 2026-10-14 snapshot, not proof of the target tenant's contract.

Contents

When to use

  • Order matters, or later items depend on earlier side effects, or you want one execution → utils-sapcp:ForEach:2 (runs the sub-command sequentially, inside the current execution).
  • Independent items, throughput, and per-child execution IDs → utils-sapcp:ParallelForEach:1 (triggers separate child executions in batches and polls them).

Executor IDs & variants

Executor Model
utils-sapcp:ForEach:2 Sequential, in-execution. Use :2, not the deprecated :1.
utils-sapcp:ParallelForEach:1 Parallel child executions, batched + polled

Shared inputs

Required: command and inputs.

Field Notes
command ID of the sub-command. Must be a literal, not a dynamic expression.
inputs Expression resolving to an array — one entry per iteration.
inputMapping Stringified JSON object; every value must be a quoted string ("key":"$(expr)"). An unquoted value is rejected at deploy ("must be a valid JSON object with static keys"). A quoted $(expr) resolving to an object or array is passed to the sub-command typed, so no toEscapedJson is needed. Default {}.

Reach the current element with the ForEach step's own alias: $(.<thisAlias>.current.item) (object items: $(.<thisAlias>.current.item.name)). Do not use the list step's alias.

Read the full file on GitHub · 119 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. 27d ago First seen · 119 lines · 0 tokens per session scan A 1a85cdfb0998

Subscribe to this mod's changes

iteration is a command published in the GitHub repository SAP/automation-pilot-agent-skills (15 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,447 tokens. 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-11-03.

Related

iteration compared with commands from other repositories

iteration next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
iterationSAP/automation-pilot-agent-skillsCommand154d agoApache-2.0A0Claude Code
generate-commandTheBeardedBearSAS/claude-craftCommand10814d agoMITA6Claude Code
initDataZooDE/flapiCommand754d agononeA21Claude Code
flow-nexus-user-toolsruvnet/sublinear-time-solverCommand10219d agoMITA14Claude Code
add-email-railwayLarouexNonprofitConsulting/larouex-fullstack-pluginCommand81y agoMITA0Claude Code
add-email-railwayAshikparvez89/larouex-fullstack-pluginCommand31mo agoMITA0Claude Code
codernatea/ExoMindCommand211y agoMITA0Claude Code