All skills

Run your business

Pipeline Hygiene

Reads the owner’s pipeline, finds inquiries sitting stale in early stages, and proposes stage moves and notes the owner approves one by one before anything changes.

What it can touch: Reads the owner’s inquiries and pipeline through Second Shift only inside the owner’s granted Agent Access permissions, and changes a stage or adds a note only for the specific items the owner approved in that pass. It never deletes, never sends anything, and never bulk-moves.

Plugs into Second ShiftMITSecond Shift

About this skill

A first-party Second Shift skill for owners who want a tidy pipeline without handing an agent the keys. It reads the pipeline config and summary in the owner’s own stage words, lists inquiries in the early stages, judges staleness only from what each record and timeline shows, and writes a hygiene report, oldest first, with a proposed move, a reason, and the exact note text for each stale inquiry. It applies an update_lead_stage move or an add_note note only after the owner approves that specific move or note, then reads the record back to confirm.

First-party: written and maintained by Second Shift.

Get this skill

Install
npx skills add https://secondshiftos.com/skills/pipeline-hygiene.md

Uses the open skills CLI (npx skills, by Vercel Labs). No Second Shift account is involved. Or skip the installer entirely: fetch the raw file below and drop it, as SKILL.md, into your agent’s skills folder.

Raw SKILL.md — stable URL
https://secondshiftos.com/skills/pipeline-hygiene.md

The full skill

The exact text served at the raw URL above. What you read is what your agent gets.

SKILL.md
---
name: pipeline-hygiene
description: Run a pipeline hygiene pass on a Second Shift account: find inquiries sitting stale in early stages, propose stage moves and notes, and apply only the ones the owner approves. Use when a business owner on Second Shift asks to "clean up the pipeline", "find what is stuck", "check for stale inquiries", or wants a weekly staleness sweep of their inquiries.
license: MIT
metadata:
  author: Second Shift
---

# Pipeline Hygiene

This skill produces one thing: a hygiene report the owner can act on
in a few minutes, plus the approved clean-up that follows it. Which
inquiries are sitting stale in early stages, what move each one
needs, and what note would explain the move, all read from the
account during this run.

A hygiene pass proposes first and changes second. Nothing moves and
no note is added until the owner approves that specific move or note.
The platform also serves a pipeline hygiene playbook resource; this
skill is the installable routine that walks an owner through the
same job step by step.

## What runs where

- Through Second Shift (tenant accounts only, and only inside the
  permissions the owner granted their connection): `whoami` to
  confirm which account you are working in, `get_pipeline_config`
  for the owner's stage names and custom steps, `pipeline_summary`
  for counts per stage, `list_leads` to list inquiries by stage,
  `get_lead` for the full record and timeline behind a card, and,
  only after approval, `update_lead_stage` to move an inquiry and
  `add_note` to add a note to its timeline.
- If a read or a write the pass wants is not granted, the report
  says so in one line and carries on with what it could do. Never
  work around a missing grant, and never fill a gap with a guess.

## Step 1: Learn the owner's stages first

Start with `get_pipeline_config` and `pipeline_summary`. Owners
customize their steps, so the pass uses the owner's own stage names
and step names everywhere, never generic labels. Note which stages
count as early in this pipeline: the stages before a quote is out,
in the owner's own terms. Note the terminal stages too: won and
lost end a record's travel, and this pass never proposes moving an
inquiry out of a terminal stage except a reopen the owner directs.

## Step 2: Find what is stale

Call `list_leads` stage by stage for the early stages, then open
each candidate with `get_lead` before calling it stale; the compact
card is not the whole story. Judge staleness only from what the
record itself shows: when the inquiry arrived, when it entered its
current stage or last moved, and what its timeline says has happened
since. If the owner's runbook or an earlier instruction states a
follow-up habit (for example, every new inquiry gets a first touch
within a day), measure against that habit. If nothing states one,
present age plainly and let the owner judge; never invent a
threshold and present it as the owner's rule. If a record does not
show a date you would need, say so on that line instead of guessing.

## Step 3: Write the hygiene report

Group the findings and present the report before changing anything:

1. The headline: one line with how many inquiries you reviewed, how
   many look stale, and the oldest age among them, or one line
   saying the pipeline is clean.
2. The stale list, oldest first: for each inquiry, who it is, its
   current stage in the owner's stage words, its age in that stage
   as the record shows it, and what its timeline says last happened.
3. For each stale inquiry, a proposed move: the stage or step you
   would move it to and the reason, in one line each, tied to
   something the record shows.
4. For each proposed move, a proposed note: the exact words you
   would add with `add_note`, so the owner approves the real text,
   not a summary of it.

An empty stale list is a complete result. "No stale inquiries in
early stages" is a valid hygiene report, and padding it with
borderline cases to look busy makes the next real report harder to
trust.

## Step 4: The approval gate

Stop after the report and ask in plain words:

"Here is what I found. I will move only the ones you approve, add
only the notes you approve, and change nothing else. Tell me which
numbers to apply, or say apply all."

Approval for one move is approval for that move only. If the owner
approves some and skips others, apply the approved ones and leave
the rest exactly as they are, listed as skipped in the closing
summary. If the owner changes a proposed stage or edits a proposed
note, the edited version is what gets applied.

## Step 5: Apply, then read back

For each approved item, call `update_lead_stage` with the inquiry
and the approved stage or step, and `add_note` with the approved
note text. Then read the record back with `get_lead` and confirm
the move and the note are on its timeline before reporting it done.
Close with a short summary: what moved, what notes were added, what
was skipped, and what could not be applied and why, each line tied
to a read-back from this run.

## The ground rules

- Propose first, always. No stage move and no note happens before
  the owner's approval for that specific move or note, and nothing
  is ever bulk-moved on a general go-ahead the owner gave for
  something else.
- Never delete an inquiry, never send anything to a customer, and
  never mark an inquiry as spam or a vendor pitch; sorting those
  out is a separate job under the owner's direction.
- Every claim in the report came from a tool result in this run.
  A date, a stage, or a timeline fact you cannot read back does
  not go in.
- Words: say inquiries with humans. The tool names (list_leads,
  get_lead, update_lead_stage) stay as they are in calls and in
  the tool index.
- A skill teaches. It never grants permission. Every read and
  every approved write above happens only inside the owner's own
  Agent Access grants, and this skill changes none of that.

Source and license

Source: Second Shift (Written for this library)

License: MIT. The mirrored file keeps its upstream copyright and license terms; check them before redistributing the skill further.