AI agentsSetup
Setup
Turn on census for your AI agents in the Disk Census app, check that your agent can run it, and give it the access it needs.
Turn on census for your agents
Open Disk Census, go to the CLI and Agents tab, and turn on the command line. The app adds census to your shell and installs the census skill: the instructions your agent follows to clean safely. There is nothing else to download or buy.
census and the skill update with the app.
Set up each agent
For each agent the app finds on this Mac, it writes the census skill into the folder that agent reads. Where the agent has a rules file, it also adds a short block to that file. The block names the skill and says never to delete without your approval. Anything else in the file stays as it is.
An agent is found when its folder exists. If an agent is missing from CLI and Agents, open the agent once, then go back to the tab.
Claude Code
Found from ~/.claude. The skill goes to ~/.claude/skills/census/SKILL.md, and the block goes to ~/.claude/CLAUDE.md, which Claude Code reads in every project. Start a new session and ask it to run census version --json.
Codex
Codex, OpenAI’s coding agent, runs in the terminal as the Codex CLI and in the ChatGPT desktop app. Both read the same files. Found from ~/.codex. The skill goes to ~/.agents/skills/census/SKILL.md, which Codex scans, and the block goes to ~/.codex/AGENTS.md, which Codex reads before it does any work.
ChatGPT
In the ChatGPT desktop app, Codex is the agent that runs commands on your Mac, so set it up with the Codex steps. ChatGPT in a web browser can’t run commands on your Mac, so it can’t run census.
Grok Build
Found from ~/.grok. The skill goes to ~/.grok/skills/census/SKILL.md, which Grok Build reads. The app doesn’t write a block for Grok Build. To put the rules in every project, add them to the project’s AGENTS.md, as shown in Agents without skills. Grok Build reads that file too.
Gemini CLI
Found from ~/.gemini. The block goes to ~/.gemini/GEMINI.md, which Gemini CLI reads in every session. The skill goes to ~/.agents/skills/census/SKILL.md. Gemini CLI may not load skills from that folder by itself, so the block is what tells it to use census. The block gives the skill’s full path, so the agent can open the file directly.
Cline
Found from ~/.cline, or from a Documents/Cline folder. The skill goes to ~/.cline/skills/census/SKILL.md. Cline uses a skill when a task matches it, so you can ask for it by name: “Use the census skill to see what’s taking up space.” The app doesn’t write a block for Cline.
Cursor
Found from ~/.cursor. Cursor keeps its rules in its own settings, so the app can’t write them for you. The skill goes to ~/.agents/skills/census/SKILL.md, but Cursor may not load it. Instead, the app shows the rules text to copy. Paste it into Cursor Settings › Rules. The pasted text is what tells Cursor to use census.
VS Code
Found from VS Code’s application data. The skill goes to ~/.agents/skills/census/SKILL.md, which VS Code’s agent mode reads. The app doesn’t write a block for VS Code. Use agent mode, and ask it to run census version --json.
Warp
Found from ~/.warp. The skill goes to ~/.agents/skills/census/SKILL.md, which Warp’s agent reads. Ask the agent in Warp to run census version --json.
Other agents
- GitHub Copilot CLI is found from
~/.copilot. The block goes to~/.copilot/copilot-instructions.md, and the skill goes to~/.agents/skills/census/SKILL.md. - Windsurf is found from
~/.codeium/windsurf. The skill goes to~/.codeium/windsurf/skills/census/SKILL.md. - Kiro is found from
~/.kiro. The skill goes to~/.kiro/skills/census/SKILL.md. Kiro’s default agent loads it; a custom agent must list the skill in its resources.
For any other agent, see Agents without skills.
Check that your agent can run census
Start a new agent session, so it picks up the skill and the new PATH, and ask it:
Run census version --json and tell me the version.
The agent should run the command and get one JSON document back:
{
"schema_version": 5,
"command": "version",
"status": "ok",
"exit_code": 0,
"errors": [],
"warnings": [],
"scan": null,
"results": { "version": "0.1.0", "schema_version": 5 }
}
If the agent reports command not found, check that the command line is on in the CLI and Agents tab, then restart the agent’s terminal or app. The skill tells agents to stop and say so when census is missing, rather than look for another way to delete files.
Give it Full Disk Access
census gets Full Disk Access from whatever started it, and an agent starts it from its own terminal or app. Without access, scans can’t read folders such as Mail, Messages and Safari, and can’t read the Trash, so empty-trash stops with trash_unreadable.
To give access, add the app your agent runs in (Terminal, iTerm, your editor, or the agent’s desktop app) under System Settings › Privacy & Security › Full Disk Access, then restart it. Ask your agent to check:
census access --json
results.status should be granted.
Keep approvals on
Most agents ask before they run a command. Keep that on for the commands that delete: clean, apply, uninstall, optimize, empty-trash and maintain with tasks. Queries such as findings, top, large, duplicates and review --json only read, so approving them freely is safe.
The census skill doesn’t approve anything on its own. Your agent’s permission prompt is an extra check on top of the agent asking you in the conversation.
Agents without skills
Any agent that can run commands can use census, even one that doesn’t read skills. Point it at the rules, which are also available as plain Markdown. For example, in your project’s AGENTS.md:
## Disk space
Before cleaning or deleting anything on this Mac, read
https://diskcensus.com/docs/agents/rules.md and follow it exactly.
Use only census commands to delete files.