persistence-audit

persistence-audit is a skill for Claude Code from terrylica/cc-skills. It costs 171 tokens per session (1,274 once invoked), scanned A, original, MIT.

A read-only inventory guide for finding software that starts automatically or remains active on macOS. It checks launch services, login items, extensions, helpers, scheduled jobs, network listeners, firewall state, and other persistence points.

In plain words
What is it for?
Use it during a Mac cleanup or security investigation to enumerate startup mechanisms, privileged components, listening sockets, and firewall settings.
Why use it?
Searching for a known app name can miss renamed, hidden, or unrelated startup components. Listing what exists first gives a fuller basis for deciding what is legitimate or needs investigation.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Part of the macos-permissions plugin — 2 skills shipped together , and of cc-skills

Good fit Use it during a Mac cleanup or security investigation to enumerate startup mechanisms, privileged components, listening sockets, and firewall settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/terrylica/cc-skills/persistence-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add terrylica/cc-skills --skill persistence-audit
Clone the repo
git clone --depth 1 https://github.com/terrylica/cc-skills

Made for: Claude Code.

Or install macos-permissions, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for persistence-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/terrylica/cc-skills/persistence-audit/github.svg)](https://agentmods.dev/skills/terrylica/cc-skills/persistence-audit)
Your own site
<a href="https://agentmods.dev/skills/terrylica/cc-skills/persistence-audit"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/persistence-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for persistence-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/terrylica/cc-skills/persistence-audit"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/persistence-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 171 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,274 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00171 $0.01274
Opus 5.5 $0.00068 $0.00510
Sonnet 5.5 $0.00034 $0.00255
Haiku 4.5 $0.00017 $0.00127

Measured 25d ago against content hash 386937b9ea86, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

persistence-audit scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (persistence-inventory.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo bash "$SKILL/persistence-inventory.sh" # adds root-only sections

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Tools that "find orphaned files" infer from whether a file maps to a known `.app`. On a machine with hand-written launchd runners in `~/.local/bin`, `~/.claude/tools` or a project `libexec`, that inference is catastrophi

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

plugins/macos-permissions/skills/persistence-audit/SKILL.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

persistence-audit — enumerate what persists, don't grep for it

Self-Evolving skill — if a macOS release adds or moves a persistence mechanism, add a section and record it here.

SKILL="$(cc-plugin-root macos-permissions)/skills/persistence-audit"
bash      "$SKILL/persistence-inventory.sh"      # everything readable as you
sudo bash "$SKILL/persistence-inventory.sh"      # adds root-only sections

Read-only. It deletes nothing.

Grepping for product names answers "is X here?" and can never answer "what is here?". In a real cleanup that searched for a handful of vendor names, a root LaunchDaemon was running the entire time and was missed — nobody typed its name. The same run also checked for /Applications/<Vendor>.app when the bundle was actually named <Vendor> Helper.app — a confident false negative.

Checking for a name you guessed at is not a test. List what exists, then classify.

🔴 launchd addresses jobs by the Label INSIDE the plist, never the filename

A vendor plist named com.vendor.vendor_service.plist can carry Label com.vendor.service. So:

launchctl bootout system/com.vendor.vendor_service    # ESRCH -> "not loaded"

…looks like the job is already gone, and you then delete a root binary out from under a live KeepAlive job. Always:

label="$(/usr/libexec/PlistBuddy -c 'Print :Label' "$plist")"
[ -n "$label" ] || { echo "no Label key — refusing to guess a target"; exit 1; }
launchctl bootout "system/$label"

Section 1 of the inventory flags every LABEL!=FILENAME mismatch for you.

Mechanisms people forget

Mechanism Why it hides
Audio HAL plug-ins (/Library/Audio/Plug-Ins/HAL) load into coreaudiod; appear in no launchd listing
SecurityAgentPlugins + system.login.console wired into the authorization chain, not a process list
Background Task Management (sfltool dumpbtm) the modern login-item registry; not a plist you can ls
launchctl print-disabled remembers labels of long-uninstalled software forever
System extensions / DriverKit systemextensionsctl list, separate from launchd
Privileged helpers (/Library/PrivilegedHelperTools) installed by SMJobBless, survive app deletion

Read the full file on GitHub · 82 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago First seen · 82 lines · 171 tokens per session scan A 386937b9ea86

Subscribe to this mod's changes

persistence-audit is a skill published in the GitHub repository terrylica/cc-skills (0 stars, last pushed today), licensed MIT. It adds 171 tokens to every session and 1,274 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 2 findings (asks for root, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-21.