# Axiom audit memory

> Axiom audit memory is an open-source agent skill for developer tools. Audits Swift code for memory leaks, retain cycles and unreleased timers or observers. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/CharlesWiltgen/Axiom/tree/main/axiom-codex/skills/axiom-audit-memory
- **Repository:** https://github.com/charleswiltgen/axiom
- **GitHub stars:** 1,278
- **License:** MIT
- **Skill name:** axiom-audit-memory
- **Collection:** https://github.com/CharlesWiltgen/Axiom
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill turns the agent into a memory leak auditor for Swift codebases. It first maps which classes own long-lived resources such as timers, observers, stored tasks and delegates, and where each one is cleaned up. It then runs a fixed set of search patterns for known leak shapes, including repeating timers without invalidation, observers without removal, closures capturing self strongly, non-weak delegates, view callbacks and image requests that are never cancelled, and checks each match by reading the surrounding code.

The audit also looks for missing cleanup, such as objects that create resources but only release some of them, or collections that grow without bounds. Findings are ranked by severity, compound problems are escalated, and the result is a health rating with counts, per-issue fixes and suggested Instruments profiling steps. Test, preview, vendored and build folders are excluded from the scan.

The skill expects read and search access to the project files. Optionally, symbolicated field crash reports can be supplied, and the skill notes that it cannot run the xcsym tool itself, so that output must be provided or run manually.

## When your agent uses it

> Use when the user mentions memory leak prevention, code review for memory issues, or proactive leak checking — retain cycles, leaks, and Timer/observer patterns.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/CharlesWiltgen/Axiom/tree/HEAD/axiom-codex/skills/axiom-audit-memory)
- [License: MIT](https://github.com/CharlesWiltgen/Axiom/tree/HEAD/axiom-codex/skills/axiom-audit-memory)

## Features

- **Resource ownership mapping:** Identifies which classes own timers, observers, tasks and delegates and where cleanup occurs.
- **Known leak pattern detection:** Searches for repeating timers, unremoved observers, strong closure captures and delegate cycles.
- **Completeness reasoning:** Looks for partial cleanup, unbounded collections and inconsistent lifecycle handling.
- **Compound severity ranking:** Raises severity when several risky patterns combine in the same class.
- **Memory health score:** Summarizes resource pairing and cleanup coverage as clean, needs attention or leaking.
- **Crash report correlation:** Uses symbolicated jetsam, heap corruption and bad access crash data to focus the audit.

## Good for

- Check my Swift code for memory leaks
- Review this view model for retain cycles
- Find timers that are never invalidated
- Audit closures that capture self strongly
- Find observers that are never removed

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/axiom-audit-memory` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/axiom-audit-memory &&
cp -R "$tmp/axiom-codex/skills/axiom-audit-memory" ~/.claude/skills/axiom-audit-memory &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/axiom-audit-memory` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/axiom-audit-memory` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/axiom-audit-memory &&
cp -R "$tmp/axiom-codex/skills/axiom-audit-memory" ~/.agents/skills/axiom-audit-memory &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/axiom-audit-memory` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/axiom-audit-memory` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/axiom-audit-memory &&
cp -R "$tmp/axiom-codex/skills/axiom-audit-memory" ~/.cursor/skills/axiom-audit-memory &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/axiom-audit-memory` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/CharlesWiltgen/Axiom.git --path axiom-codex/skills/axiom-audit-memory
```

Or copy the folder to `~/.gemini/skills/axiom-audit-memory` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/axiom-audit-memory`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/axiom-audit-memory &&
cp -R "$tmp/axiom-codex/skills/axiom-audit-memory" ~/.copilot/skills/axiom-audit-memory &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/axiom-audit-memory` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git
```

Then copy `Axiom/axiom-codex/skills/axiom-audit-memory` into your agent's skills folder as `axiom-audit-memory`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs read and search access to the Swift project files, since the procedure is built around Glob, Grep and Read scans.

### Does Axiom audit memory change my code?

No. It reads and searches the codebase and reports findings with suggested fixes.

### Which files are skipped?

Test files, preview files, Pods, Carthage, build output, DerivedData, docs and the .claude folders are excluded.

### Can Axiom audit memory use crash logs?

Yes, if symbolicated crash output is provided. It cannot run the xcsym tool itself, so that output must be supplied or generated manually.

### How do I install Axiom audit memory in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/axiom-audit-memory to use it in all your projects, or to .claude/skills/axiom-audit-memory in one project.

### Does Axiom audit memory run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Axiom audit memory?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Axiom audit memory?

The closest alternatives to Axiom audit memory are Axiom audit testing, Axiom health check, Axiom audit energy, Axiom audit spritekit and Axiom audit camera.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Axiom audit testing](https://ai-powered.com/skills/axiom-audit-testing): Axiom audit testing is an open-source agent skill for developer tools.
- [Axiom health check](https://ai-powered.com/skills/axiom-health-check): Axiom health check is an open-source agent skill for developer tools.
- [Axiom audit energy](https://ai-powered.com/skills/axiom-audit-energy): Axiom audit energy is an open-source agent skill for developer tools.
- [Axiom audit spritekit](https://ai-powered.com/skills/axiom-audit-spritekit): Axiom audit spritekit is an open-source agent skill for developer tools.
- [Axiom audit camera](https://ai-powered.com/skills/axiom-audit-camera): Axiom audit camera is an open-source agent skill for developer tools.
- [Axiom audit storage](https://ai-powered.com/skills/axiom-audit-storage): Axiom audit storage is an open-source agent skill for security.
- [Axiom audit icloud](https://ai-powered.com/skills/axiom-audit-icloud): Axiom audit icloud is an open-source agent skill for developer tools.
- [Axiom audit swiftui architecture](https://ai-powered.com/skills/axiom-audit-swiftui-architecture): Axiom audit swiftui architecture is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/axiom-audit-memory
