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
| Ability | snippets/apply-pack |
| Toolset | WPCode — toolset/wpcode |
| Group | WPCode › The Library |
| Requires | WPCode, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI 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
| Name | Type | Required | What it is |
|---|---|---|---|
slug | string | Yes | Pack slug, from snippets/list-packs. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
pack | object | The pack that was applied. |
installed | array | The snippets that were installed, all inactive. |
installed_count | integer | How many were installed. |
skipped_count | integer | How many were already present. |
failed_count | integer | How many could not be installed. |
safe_mode | boolean | Whether safe mode is active. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present 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
- List Snippet Packs — see what a pack contains first
- List Code Snippets — review what arrived
- Activate Code Snippet — switch on the ones you want
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category