30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Apply Snippet Pack

snippets/apply-pack installs every snippet in a pack. It refuses without confirm: true.

All of them are installed inactive, whatever the pack says.

At a glance

Abilitysnippets/apply-pack
ToolsetWPCode — toolset/wpcode
GroupWPCode › The Library
RequiresWPCode, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

Several snippets, one call

A pack installs several snippets at once — sometimes a dozen or more — and every one of them is third-party code. They all land inactive, so nothing runs, but the review burden scales with the pack: applying a pack of twenty means twenty snippets somebody should read before any of them is switched on.

How it works

The pack’s own payload can mark snippets active. That is overridden: everything lands inactive, so a human decides which of the pack’s snippets actually run here. Applying a pack is an import, not a deployment.

Snippets already present are skipped rather than duplicated, and the response reports the installed, skipped and failed counts separately. A pack applied twice is not twice the snippets.

Requires the site to be signed in to the library, like every install.

The counts are worth reading rather than glancing at. A failed count above zero means part of the pack did not arrive, and the pack is now half-installed — which is a state worth knowing about before anybody starts switching things on.

Input

NameTypeRequiredWhat it is
slugstringYesPack slug, from snippets/list-packs.
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
packobjectThe pack that was applied.
installedarrayThe snippets that were installed, all inactive.
installed_countintegerHow many were installed.
skipped_countintegerHow many were already present.
failed_countintegerHow many could not be installed.
safe_modebooleanWhether safe mode is active.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Apply the WooCommerce snippet pack.

It resolves to one call:

{
  "ability": "snippets/apply-pack",
  "parameters": {
    "slug": "woocommerce",
    "confirm": true
  }
}

Worth knowing

  • Everything lands inactive. The pack does not turn itself on.
  • Already-present snippets are skipped, not duplicated.
  • Check failed_count — a partial install is easy to miss.
  • Requires the site to be signed in to the library.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading