agentleFS
spotifyspotify/portal-ai-plugins/skills/fleetshift-create-shift/SKILL.md

fleetshift-create-shift

Skill2.8k starsChanged 3 months agoApache-2.0View on GitHub

Create a Fleetshift shift definition that runs an agent to apply transformations across a set of repository targets. Use when the user wants to set up a reusable, repeatable change (e.g. "add a header to every service", "migrate every repo from X to Y") that can later be run, checked on, and have PRs opened from it. Requires explicit user confirmation before creating the shift.

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If it isn't, ask the user to run npx @spotify/portal-cli auth login.

    line 24
  2. Very specific:

    If auth list shows more than one Portal instance, confirm which one with the user and pass --instance <name> on every call.

    line 25
  3. Very specific:

    If a Portal MCP server is connected instead, the same actions are available as fleetshift_<action> tools (for example …

    line 27
  4. Very specific:

    Never pass --yes. It confirms actions marked destructive (stop-jobs, close-prs, delete-shift).

    line 31
  5. Distinctive:

    Before creating anything, understand the current state.

    line 38
  6. Distinctive:

    If a shift with the user's desired name already exists, surface it and propose a distinct name rather than overwriting.

    line 49
  7. Very specific:

    If the user wants a one-off change and there is no reusable target set, create-shift still works: the targets define the scope up front.

    line 51
  8. Distinctive:

    Keep user input to a minimum.

    line 56
  9. Distinctive:

    shiftPrompt: write a precise, self-contained instruction for the agent to follow in every target repo.

    line 66
  10. Very specific:

    pullRequest: default to metadataMode: "generate" with a title derived from the goal.

    line 71
  11. Distinctive:

    owner: default to the caller. Set a group only if the user mentions a team.

    line 77
  12. Distinctive:

    Do not pass a custom image unless the user explicitly requests an allowed deployment-managed image.

    line 99
  13. Distinctive:

    After a successful create, verify with a read-only call and report the result:

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create a Fleetshift shift

A Fleetshift shift is a reusable definition: an agent prompt plus a set of repository targets and PR metadata. Once created, a shift can be run (fleetshift-run-shift), checked on (fleetshift-check-shift), and have PRs opened from it (fleetshift-create-prs).

This skill creates agent-type shifts only: the shift runs an LLM agent against each target repository with a prompt you provide.

Mutating action — explicit confirmation required. Do not call fleetshift:create-shift until the user has explicitly confirmed the shift name, the agent prompt, the target scope, and the PR metadata. A "looks good"/"go ahead" is not enough — ask and get a clear "yes" first.

Prerequisites

  • The Portal CLI is authenticated: npx @spotify/portal-cli auth show. If it isn't, ask the user to run npx @spotify/portal-cli auth login. If auth list shows more than one Portal instance, confirm which one with the user and pass --instance <name> on every call.
  • If a Portal MCP server is connected instead, the same actions are available as fleetshift_<action> tools (for example fleetshift_list-shifts). They take the same input, but have no --dry-run, so the confirmation steps below matter even more.
  • Never pass --yes. It confirms actions marked destructive (stop-jobs, close-prs, delete-shift). Only the fleetshift-run-shift kill switch uses it, for stop-jobs.
  • You know what change the user wants and which repositories it applies to.

1. Scope the shift (read-only)

Before creating anything, understand the current state. These calls never mutate anything and need no confirmation:

# Existing shifts (names, owners, progress) so you can avoid collisions
npx @spotify/portal-cli actions fleetshift:list-shifts --input '{}' --json

# Details of an existing shift, if you want its targets/PR config as a model
npx @spotify/portal-cli actions fleetshift:get-shift --input '{"shiftName":"<shift-name>"}' --json
  • If a shift with the user's desired name already exists, surface it and propose a distinct name rather than overwriting.
  • If the user wants a one-off change and there is no reusable target set, create-shift still works: the targets define the scope up front.

2. Draft the inputs from the user's goal

Keep user input to a minimum. Work out the goal (what should change and why) from the conversation, then draft every field yourself. Don't send the user a form to fill in. Only ask about something you can't reasonably infer, usually just which repositories to target. Everything else gets a draft the user can accept or tweak in the confirmation step.

  • name: derive a short kebab-case id from the goal (e.g. add-maintainers-header), checked against list-shifts so it doesn't collide with an existing shift.
  • title: derive a human-readable title from the goal.
  • shiftPrompt: write a precise, self-contained instruction for the agent to follow in every target repo. Spell out the exact change, how to tell it's done, and what not to touch. Turn the user's goal into these concrete steps; don't just repeat it back. Look at a representative target repo first if that makes the prompt more accurate.
  • pullRequest: default to metadataMode: "generate" with a title derived from the goal. Use metadataMode: "manual" only if the user has specific PR wording in mind.
  • targets: build one or more structured { source, type, id } references from whatever the user named (services, a team, a soundcheck check). Look up entity refs yourself instead of asking for them.
  • owner: default to the caller. Set a group only if the user mentions a team.

3. Confirm explicitly, then create (mutating)

First validate the drafted payload with --dry-run. This checks the input locally and doesn't create anything:

npx @spotify/portal-cli actions fleetshift:create-shift --input '{"name":"add-maintainers-header","title":"Add maintainers headers","type":"agent","shiftPrompt":"Add a Maintainers section to the README listing the owning team from catalog-info.yaml, keeping existing content intact.","targets":[{"source":"catalog","type":"entity","id":"component:default/my-service"}],"pullRequest":{"metadataMode":"generate","title":"Add maintainers header to README"}}' --dry-run --json

Fix anything the dry run rejects. Then show the user the drafted payload (shift name, prompt, target scope, PR title/description) in one go, so they can confirm or adjust it in a single reply. A dry run is not a create: only after an explicit "yes", run the same command without --dry-run:

npx @spotify/portal-cli actions fleetshift:create-shift --input '<the confirmed payload>' --json
  • The shift type must be "agent".
  • Do not pass a custom image unless the user explicitly requests an allowed deployment-managed image.
  • For more than 10 targets, summarize the full scope and confirm it separately, then pass "confirmedLargeTargetSet":true.

4. Verify

After a successful create, verify with a read-only call and report the result:

npx @spotify/portal-cli actions fleetshift:get-shift --input '{"shiftName":"add-maintainers-header"}' --json

Report the shift name, owner, target count, and what to do next — usually "run it" (see fleetshift-run-shift).

After

  • To run it: use the fleetshift-run-shift skill.
  • To check on runs/PRs later: use the fleetshift-check-shift skill (read-only, safe to run days or weeks later).
  • To open PRs for completed targets: use the fleetshift-create-prs skill.

Download now (ZIP)

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 8 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the spotify/portal-ai-plugins repository that our weekly crawl found: only 10 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about spotify/portal-ai-plugins

The biggest 5 of 10 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 10

Talked about on GitHub and Bluesky (10 times).

On GitHub · 8

3 more on GitHub

On Bluesky · 2

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.