لم تُترجَم هذه الصفحة إلى العربية بعد، لذا تُعرض نسختها الإنجليزية. الإنجليزية
Docs menu

Shortcuts in code

How a program keeps a task that worked as a shortcut, how any AI calls it in one line, and how you run it again, share it or trust one from elsewhere.

On this page

A shortcut is a program that worked, kept under a name with its inputs typed. Your AI then does the same task in one line. You can also run it from the app, with no AI.

In the code, and in the text your AI reads, a shortcut is still called a recipe: recipes.<name>. The answers say “recipe” too.

Keep one

The simplest way is to ask on the call that does the task. These are the arguments of one delta call. The program reads its inputs from args, and keep names it.

{
  code: `const t = await tickets.ticket.get(args.id);
t.status = "closed";
t.comments.push({ body: args.why });
return t.id + " closed";`,
  args: { id: "T-1", why: "fixed in 2.3" },
  keep: { name: "close_ticket", about: "Closes a ticket and says why in a comment." },
}

The task is done, and the answer ends by saying it kept the shortcut. Its inputs are typed from what it was given: { id: string; why: string }.

  • A program that fails is not kept: “Not kept as a recipe: it did not work.”
  • A name that isn’t a name in code is made one (not_a_name), and never takes another shortcut’s place: it gets the next free name. A name in code you already have replaces that shortcut.
  • about is one sentence of 120 characters at most. Links, markup and invisible characters are removed, because another AI will read it.

The other way is afterwards. delta_apply { keep: { name, about, params } } keeps the programs of this conversation that changed something, as one shortcut. params maps each input to the value used this time.

{ keep: { name: "slow_page", about: "Opens a ticket for a slow page.", params: { site: "https://shop.test" } } }

Delta MCP finds that value in the programs and makes it args.site. A value it can’t find is reported, not guessed. Programs that only read, or failed with nothing made, are left out, and so is anything you undid since. A name that must be new on every run, such as a folder, becomes an input.

Call one

Any AI calls a shortcut like a function. It goes through the same checks, plan, all or nothing, read back and Undo as any program.

return await recipes.close_ticket({ id: "T-2", why: "duplicate" });

The API declares each shortcut in one line.

recipes.close_ticket(args: { id: string; why: string }) // Closes a ticket and says why in a comment. (tickets)

A shortcut is declared from the next conversation on, so the text of the current one stays the same for the app’s cache. It can be called by name at once. A wrong name answers unknown recipe, and a failure inside says where: in recipe title_of, line 1.

delta_read { refs: ["recipes"] } lists your shortcuts, and delta_read { refs: ["recipe:close_ticket"] } shows one’s code.

Run it without your AI

From the app, Run and Do again run a shortcut with no AI. Your click approves ordinary changes. Deleting or sending still follows the connector’s mode, and a read-only connector stays read-only. From a terminal, see Shortcuts on the command line.

Share one

A shortcut is private, in Delta MCP’s protected folder. Sharing is your gesture, in the app. It writes the shortcut as a file you can read and keep in git. This one comes from Delta MCP’s tests.

// Delta shortcut
// Create the tests for a site
// Name: make_site_tests
// Inputs: { site: string }
// Uses: cerberus
// Example: {"site":"https://shop.com"}

const folder = await cerberus.test_folder.create({ test: args.site });
return folder.test;

By default the file goes to Documents/Delta, locked.

  • Locked: the exact version is kept. If the file changes, the locked version keeps running, and the change waits for you: Accept the change, or Keep the locked version. An AI can’t replace a locked shortcut by keeping another one under its name.
  • Unlocked: the file is the shortcut. Its changes are taken when a conversation starts, never in the middle of one.
  • Secrets: a secret value written in a program is refused, and a secret input’s example is left empty. Make it an input first.

From elsewhere

A file someone sends you is added with a gesture. A project can also hold shortcuts in a .delta/shortcuts folder, shared with git. Delta MCP looks for it from the working folder upward, never at or above your home folder, and only in Claude Code.

Both work at once. Until you trust that exact version, every change from a program that calls one asks you, whatever the connector’s mode. A file that changes, after a git pull for example, asks again.

Not yet: renaming, sharing or removing a shortcut from a program, with the mcpdelta connector that the skill describes. For now, you do it in the app.

See also Shortcuts and Writing a task.

Something missing or wrong? Open an issue

Coming soon

Delta MCP is almost here

The free app for Mac, Windows and Linux lands soon. Leave your email and you’ll hear the moment it’s out. No account needed.

We use your email only to tell you once when Delta MCP is out. No newsletter. Privacy policy