Borrowing it
Nothing to install: this file belongs to Cumulocity-IoT/cumulocity-dynamic-mapper. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Cumulocity-IoT/cumulocity-dynamic-mapper/main/.claude/commands/smart-function-sync.mdgit clone --depth 1 https://github.com/Cumulocity-IoT/cumulocity-dynamic-mapperWrote 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.
[](https://agentmods.dev/commands/cumulocity-iot/cumulocity-dynamic-mapper/smart-function-sync)<a href="https://agentmods.dev/commands/cumulocity-iot/cumulocity-dynamic-mapper/smart-function-sync"><img src="https://agentmods.dev/badge/commands/cumulocity-iot/cumulocity-dynamic-mapper/smart-function-sync/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.
<a href="https://agentmods.dev/commands/cumulocity-iot/cumulocity-dynamic-mapper/smart-function-sync"><img src="https://agentmods.dev/badge/commands/cumulocity-iot/cumulocity-dynamic-mapper/smart-function-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00723 |
| Opus 5.5 | $0.00000 | $0.00289 |
| Sonnet 5.5 | $0.00000 | $0.00145 |
| Haiku 4.5 | $0.00000 | $0.00072 |
Grade A, and why
smart-function-sync 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Smart Function Sync Audit
Audit the Smart Function API surface to verify that the Java source and TypeScript declarations are in sync. Follow the strategy described in docs/smart-function-type-sync.md.
Steps
1. Read the Java source of truth
Read these files in full:
dynamic-mapper-service/src/main/java/dynamic/mapper/processor/model/DataPrepContext.javadynamic-mapper-service/src/main/java/dynamic/mapper/processor/model/SmartFunctionContext.javadynamic-mapper-service/src/main/java/dynamic/mapper/processor/model/InputMessage.java
Extract:
- All public method signatures from
DataPrepContext(the interface) — these are callable from JavaScript via GraalVM. - Any additional public methods on
SmartFunctionContextthat are not on the interface (also callable). - All public fields on
InputMessage— these becomemsg.*in Smart Functions.
2. Read the TypeScript declarations
Read these files in full:
dynamic-mapper-smart-function/src/types/dataprep.types.tsdynamic-mapper-smart-function/src/types/smart-function-dynamic-mapper.types.ts
Extract:
- All methods declared on
SmartFunctionContextandSmartFunctionContextV2interfaces. - All fields declared on
DynamicMapperDeviceMessage(inboundmsg) andOutboundMessage(outboundmsg).
3. Read the mock helpers
In smart-function-dynamic-mapper.types.ts (or its spec file), find createMockRuntimeContext, createMockRuntimeContextV2, createMockInputMessage, createMockOutboundMessage. Check that every interface method/field is implemented in the corresponding mock.
The spec file is at:
dynamic-mapper-smart-function/src/types/smart-function-dynamic-mapper.types.spec.ts
4. Diff and report
Produce a report with four sections:
A. Methods in Java but missing from TypeScript List each Java method that has no matching TypeScript declaration. These are gaps that break IntelliSense and may surprise developers.
B. Methods in TypeScript but absent from Java (phantoms)
List each TypeScript declaration that does not match any public method on DataPrepContext or SmartFunctionContext. These may be stale docs or errors.
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.
- 2mo ago First seen · 66 lines · 0 tokens per session scan A 5fcc97dda927
smart-function-sync is a command published in the GitHub repository Cumulocity-IoT/cumulocity-dynamic-mapper (19 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 723 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-08-30.
Other commands, from other repositories
delegate-review
Run OCR in delegation mode — OCR handles file selection and rules, the host agent performs the actual review.
commit
Please summarize your current changes, generate a commit message in English, then add and commit. Never include any AI tool or model as a Co-Author in commit messages. No Co-Authored-By lines referencing AI assistants.
review.v1
Review code changes: /review [commit|branch|PR].
branch-review
Review a branch before merge.
bug-check
Run automated tests and build checks first, then agent code review. For each bug found, propose or document a regression test.
aidd-churn
Rank files by hotspot score to identify prime candidates for refactoring before PR review.