---
name: launchdarkly-automations-archival-settings
description: "Read and change a LaunchDarkly project's Automations auto-archival settings via the hosted MCP. Auto-archival archives flags that are ready to archive after a grace period, or creates approval requests for them. Use when the user wants to see or change the grace period, approval requirement, run limit, recheck cadence, or notification recipients, turn automatic archival off or on, or asks why a flag was or was not archived automatically. For first-time setup of every Release Autopilot capability, use launchdarkly-release-autopilot-onboarding."
license: Apache-2.0
compatibility: Requires the remotely hosted LaunchDarkly MCP server
metadata:
  author: launchdarkly
  version: "0.1.0-experimental"
title: launchdarkly-automations-archival-settings
canonical_url: https://skilld.dev/gh/launchdarkly/ai-tooling/launchdarkly-automations-archival-settings
last_updated: 2026-11-12T08:16:54.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [marketplace.json](https://skilld.dev/api/skills-raw/launchdarkly/ai-tooling/launchdarkly-automations-archival-settings/marketplace.json), [README.md](https://skilld.dev/api/skills-raw/launchdarkly/ai-tooling/launchdarkly-automations-archival-settings/README.md), [references/browser-steps.md](https://skilld.dev/api/skills-raw/launchdarkly/ai-tooling/launchdarkly-automations-archival-settings/references/browser-steps.md).
>
> If the user asked to install this Skill, run `npx skilld install launchdarkly/ai-tooling/launchdarkly-automations-archival-settings`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/launchdarkly-automations-archival-settings`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/launchdarkly/ai-tooling/launchdarkly-automations-archival-settings) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/launchdarkly-automations-archival-settings`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/launchdarkly-automations-archival-settings --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/launchdarkly-automations-archival-settings --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# LaunchDarkly Automations Auto-archival Settings

You're using a skill that reads and changes a project's auto-archival settings, from the "Automatic archival" section of the project's **Settings > Automations** page. Auto-archival archives flags without a person in the loop unless approvals are required. Treat every write as production automation with a blast radius.

## Prerequisites

This skill requires the remotely hosted LaunchDarkly MCP server.

**Required MCP tools:**
- `get-automations` with `section: "archival"` and `projectKey`: the project's archival `settings` and `automationsPage`, the link to the project's Automations page.
- `update-automations` with `projectKey` and an `archival` object: change one or more settings, or turn archival off. Omitted fields keep their stored values. Send `archival` on its own, without `accountWide`, `repo`, or `cleanup`. It cannot turn archival on (see [Turn it on](#turn-it-on)).

**Optional:** `get-projects` to pick the project, `search-members` to resolve notification member IDs (team keys come from the user), `get-approval-requests` for pending archival approvals.

If `get-automations` has no `section` argument, or rejects `section`, the server has not picked up cleanup and archival yet. Ask the user to reconnect the LaunchDarkly MCP server once. If it still has none, guide the browser steps in [references/browser-steps.md](https://skilld.dev/api/skills-raw/launchdarkly/ai-tooling/launchdarkly-automations-archival-settings/references/browser-steps.md) instead. Do not invent REST calls.

If a call fails with "automatic archival is not available for this account yet", the account does not have the feature. Tell the user and stop; do not retry or try other tools.

## What the settings mean

Durations are in seconds. Show them to the user in hours or days.

| Field | Meaning |
|-------|---------|
| `enabled` | Whether automatic archival runs for the project |
| `graceSeconds` | How long a flag that is ready to archive waits before it is archived: 1 hour (3600) to 30 days (2592000) |
| `requireApproval` | `true` creates an approval request for each flag instead of archiving it directly |
| `maxArchivalsPerRun` | The most flags one run archives (1 to 100) |
| `watchCadenceSeconds` | How often watched flags are rechecked for a status change: 1 minute (60) to 7 days (604800) |
| `notifyMemberIds`, `notifyTeamKeys` | Fallback members and teams notified about archival activity. They are not owners: flags with no maintainer are never archived automatically |
| `configuredByMemberId`, `riskAcknowledgedAtSeconds` | Read-only: who last saved the settings, and when someone confirmed the risk to turn archival on |

## Core Principles

1. **Confirm before every write.** State the current and proposed values, wait for a yes that names the change in this turn, then write. A yes from an earlier turn, or a vague "go ahead", is not enough.
2. **Only a person can turn it on.** Turning archival on requires confirming its risk on the Automations page. Never claim you turned it on.
3. **Keep approvals unless asked.** Never set `requireApproval` to false unless the user explicitly asked to archive without approvals. Say that flags will then be archived without review.
4. **Lists replace.** `notifyMemberIds` and `notifyTeamKeys` replace the whole stored list. To add one recipient, read the current list and send it with the new one.
5. **Shorter means sooner.** Lowering `graceSeconds` or raising `maxArchivalsPerRun` archives more flags sooner. Say so in the proposal.

## Workflows

### Read the settings

`get-automations` with `section: "archival"` and `projectKey`. Report whether it is on, the grace period, whether approvals are required, the run limit, and the notification recipients.

### Change a setting

1. Read the settings: `get-automations` with `section: "archival"`.
2. Propose the change, for example:

   > Automatic archival in project `default` waits 1 day before archiving a ready flag. Change it to 7 days? Ready flags will stay unarchived for a week before they are archived.

3. After the user confirms, call `update-automations` with `projectKey`, `confirm: true`, and an `archival` object holding only the confirmed fields.
4. The response lists `changed` and the `settings` as read back. If it reports a mismatch, or says the settings changed after they were read, show the user the current values from `get-automations` with `section: "archival"` and ask again before retrying.

Settings can be changed while archival is off, so a user can set them before a person turns it on.

### Turn it off

Propose it ("Turn off automatic archival for project `default`? No more flags will be archived automatically; flags already archived stay archived."), then `update-automations` with `projectKey`, `archival: { "enabled": false }`, and `confirm: true`.

### Turn it on

The agent cannot turn archival on. If the user asks:

1. Read the settings: `get-automations` with `section: "archival"`, and set any other settings they asked for first (see [Change a setting](#change-a-setting)).
2. Give the user `automationsPage`. In the "Automatic archival" section, they turn on **Enable automatic archival** and confirm the "Enable automatic archival?" dialog. Turning it on requires permission to archive every flag in the project.
3. When they say it is done, call `get-automations` with `section: "archival"` once and report whether `enabled` is true. Do not poll.

If `update-automations` returns `applied: false` with a `nextStep`, nothing changed: follow these steps.

### Why was (or wasn't) a flag archived automatically?

Read-only. Ask for the flag key if the user did not give one. Then check in this order, and stop at the first cause you can show from a tool result:

1. `get-automations` with `section: "archival"`: `enabled` is false, so archival is off for the project.
2. `get-flags` with `projectKey` and `flagKey`: the flag has no maintainer (flags with no maintainer are never archived automatically), or it is already archived (`archived` true; a flag archived automatically has the `auto-archived` tag).
3. `get-flag-status-across-envs` with `allEnvs: true`, and `get-projects` with `projectKey` and `fullSettings: true` (`settings.lifecycle` holds the checks and day thresholds for ready to archive): the flag is still evaluated or does not meet those checks, so it is not ready to archive.
4. `requireApproval` is true: look for a pending approval request with `get-approval-requests`.

These tools do not show when a flag became ready to archive or which flags a run picked. If none of the checks above explains it, say the likely causes without claiming either one: it became ready less than `graceSeconds` ago, or more flags were ready than `maxArchivalsPerRun` and the rest wait for a later run.

Flags archived this way get the `auto-archived` tag. "View auto-archived flags" on the Automations page lists them. Do not change settings to try something.

## Errors

- **"automatic archival is not available for this account yet":** see [Prerequisites](#prerequisites).
- **403 on a write:** the member lacks permission to update the project's lifecycle settings. Say so, and stop.

## Out of scope

- Archiving or restoring one flag: use the flag tools.
- Auto-cleanup: use [`launchdarkly-automations-cleanup-settings`](../launchdarkly-automations-cleanup-settings/SKILL.md).
- Auto-flagging and auto-releasing: use [`launchdarkly-release-autopilot-settings`](../launchdarkly-release-autopilot-settings/SKILL.md).

## References

- [references/browser-steps.md](https://skilld.dev/api/skills-raw/launchdarkly/ai-tooling/launchdarkly-automations-archival-settings/references/browser-steps.md): the same settings in the browser, for servers without these tools
