Skip to content
Back to skills

M Custom Functions

ASecurity

Use when writing a custom Power Query M function — typed and optional parameters, return types, recursion with @, functions that take functions, attaching Documentation metadata with Value.ReplaceType so the function shows a description and examples in the editor, or turning a query into a reusable function. Triggers on "M custom function", "Power Query function parameters", "optional parameter M", "Value.ReplaceType", "document my function", "Documentation.Name", "recursive function Power Qu...

  • 4 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added October 24, 2026
ai-agentsdocumentation

Security analysis

A100/100

Scanned October 24, 2026

npx -y skills add CSalcedoDataBI/powerquery-m-for-agents --skill m-custom-functions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of M Custom Functions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for M Custom Functions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/csalcedodatabi-m-custom-functions/badge)](https://www.skillsdirectory.com/skills/csalcedodatabi-m-custom-functions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: m-custom-functions
description: Use when writing a custom Power Query M function — typed and optional parameters, return types, recursion with @, functions that take functions, attaching Documentation metadata with Value.ReplaceType so the function shows a description and examples in the editor, or turning a query into a reusable function. Triggers on "M custom function", "Power Query function parameters", "optional parameter M", "Value.ReplaceType", "document my function", "Documentation.Name", "recursive function Power Query", "invoke custom function".
---

# M Custom Functions

> **Status.** Stub. Scope fixed in
> [the design spec](../../docs/superpowers/specs/2026-09-28-powerquery-m-for-agents-design.md)
> (§4).

## Planned contents

| File | Covers |
|---|---|
| `references/syntax.md` | `(x as number, optional y as nullable text) as table =>`, what `optional` really implies for the type |
| `references/documentation-metadata.md` | `Value.ReplaceType` with `Documentation.*` — the same metadata `m-reference` reads from `#shared` |
| `references/recursion.md` | `@` scoping, and when `List.Generate` is the better answer |
| `references/function-values.md` | Passing functions, `each` as sugar for `(_) =>`, closures over `let` variables |

## Related skills

- **`m-reference`** — check a library function does not already do it.
- **`m-iteration`** — loops without recursion.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.