Skip to content
Back to search

ayca

All Your Context Are Belong To Us — a read-only TUI that shows every instruction, rule, skill, hook and MCP server your AI coding agents (Claude Code, Codex, Cursor) can see.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/r037--ayca/badge.svg)](/listings/r037--ayca)

HTML

<a href="/listings/r037--ayca"><img src="/api/listings/r037--ayca/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Requires Go 1.24.2 or later.

go install github.com/R037/ayca/cmd/ayca@latest

`go install` puts the binary in `$(go env GOPATH)/bin`, which is usually `~/go/bin`. If running `ayca` then gives `command not found`, that directory isn't on your `PATH` yet. Add it to your shell profile (`~/.bashrc`, `~/.zshrc`, ...) and open a new terminal:

export PATH="$PATH:$(go env GOPATH)/bin"

If you set `GOBIN`, the binary goes there instead, so put that directory on your `PATH`.

Or from a clone, which also stamps the version:

git clone https://github.com/R037/ayca && cd ayca
make install            # installs to ~/.local/bin/ayca

Make sure `~/.local/bin` is on your `PATH`. To install somewhere else, use `make install PREFIX=/usr/local`. To build without installing, run `make build`; the binary ends up at `./bin/ayca`.

> If you use a version manager such as mise or asdf, prefer `make install`. > `go install` puts the binary in the toolchain's own directory, and the > shim then only works in projects that use that Go version.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 370 lines
  1. # AYCA — All Your Context Are Belong To Us
  2. *Know what your agents know.*
  3. AYCA is a local-first terminal UI that shows every piece of context that can
  4. influence an AI coding agent in your project: instruction files and their
  5. `@imports`, auto memory, rules, skills, subagents, commands, output styles,
  6. hooks and MCP servers. It covers project, parent-directory, user-global and
  7. system-wide (managed policy) locations for **Claude Code**, **Codex** and
  8. **Cursor**. It also lists the context that exists at runtime but has no file
  9. to read.
  10. ```
  11. AYCA — All Your Context Are Belong To Us Know what your agents know.
  12. Project: ~/projects/my-app · 12 items
  13. ╭────────────────────────────────────╮╭──────────────────────────────────────────╮
  14. │▼ Instructions (3) ││Path CLAUDE.md │
  15. │ ▼ Project (3) ││File 252 B · ~63 tokens (est.) │
  16. │ ├─ • CLAUDE.md claude ││Source Instructions · project · claude │
  17. │ ├─ • AGENTS.md codex·cursor ││──────────────────────────────────────────│
  18. │ └─ • web/CLAUDE.md claude ││ Project Instructions │
  19. │▼ Rules (1) ││ │
  20. │ ▼ Project (1) ││ ## Architecture │
  21. │ └─ ▸ .cursor/rules/ cursor ││ This project uses a Go backend… │
  22. │▼ Skills (2) ││ │
  23. │ ▼ Global (2) ││ │
  24. │ ├─ ▸ pdf claude·codex ⇆2 ││ │
  25. │ └─ ▸ frontend-design claude ││ │
  26. │▼ MCP Servers (2) ││ │
  27. │ ▼ Project (2) ││ │
  28. │ ├─ • filesystem claude ││ │
  29. │ └─ • github claude ││ │
  30. ╰────────────────────────────────────╯╰──────────────────────────────────────────╯
  31. ↑↓/jk navigate ←→/hl collapse/expand enter view tab switch pane / search q quit
  32. ```
  33. AYCA is **read-only**. It never modifies, creates or deletes files, never runs
  34. agents, hooks or MCP servers, and makes no network calls.
  35. ## Install
  36. Requires Go 1.24.2 or later.
  37. ```sh
  38. go install github.com/R037/ayca/cmd/ayca@latest
  39. ```
  40. `go install` puts the binary in `$(go env GOPATH)/bin`, which is usually
  41. `~/go/bin`. If running `ayca` then gives `command not found`, that directory
  42. isn't on your `PATH` yet. Add it to your shell profile (`~/.bashrc`,
  43. `~/.zshrc`, ...) and open a new terminal:
  44. ```sh
  45. export PATH="$PATH:$(go env GOPATH)/bin"
  46. ```
  47. If you set `GOBIN`, the binary goes there instead, so put that directory on
  48. your `PATH`.
  49. Or from a clone, which also stamps the version:
  50. ```sh
  51. git clone https://github.com/R037/ayca && cd ayca
  52. make install # installs to ~/.local/bin/ayca
  53. ```
  54. Make sure `~/.local/bin` is on your `PATH`. To install somewhere else, use
  55. `make install PREFIX=/usr/local`. To build without installing, run
  56. `make build`; the binary ends up at `./bin/ayca`.
  57. > If you use a version manager such as mise or asdf, prefer `make install`.
  58. > `go install` puts the binary in the toolchain's own directory, and the
  59. > shim then only works in projects that use that Go version.
  60. ## Usage
  61. ```sh
  62. ayca # inspect the current directory
  63. ayca --path ~/code/my-app # inspect another project
  64. ayca --agent claude,cursor # only show context for some agents
  65. ayca --window 1m # compare against a 1M-token context window
  66. ayca --list # print the discovered context as plain text (no TUI)
  67. ayca --json # print it as JSON, for scripts and AI agents
  68. ayca --version
  69. ```
  70. ### Let an agent prune your context
  71. `ayca --json` gives agents the same data as the TUI. It lists every item with
  72. its absolute path, scope, the agents that read it, size, estimated tokens and
  73. whether it loads at session start, followed by the startup budget per agent.
  74. The format is versioned (`schema_version`).
  75. The repo includes a skill that uses it to audit your setup and suggest cuts:
  76. [`skills/prune-context`](skills/prune-context/SKILL.md).
  77. #### Install the skill
  78. You need `ayca` v0.2.0 or later on your `PATH` (`ayca --version`), because
  79. the skill runs `ayca --json`. Then put the skill folder where your agent looks
  80. for skills:
  81. | Agent | User-wide (all projects) | One project only |
  82. | --- | --- | --- |
  83. | Claude Code | `~/.claude/skills/prune-context/` | `<project>/.claude/skills/prune-context/` |
  84. | Codex | `~/.agents/skills/prune-context/` | |
  85. To keep the skill up to date, link it to a clone of this repo. A `git pull`
  86. then updates it:
  87. ```sh
  88. git clone https://github.com/R037/ayca ~/src/ayca
  89. mkdir -p ~/.claude/skills
  90. ln -s ~/src/ayca/skills/prune-context ~/.claude/skills/prune-context
  91. ```
  92. Or take a one-off copy instead:
  93. ```sh
  94. cp -r ~/src/ayca/skills/prune-context ~/.claude/skills/
  95. ```
  96. Agents load skills when a session starts, so open a new session after you
  97. install it. Other agents that can run shell commands can use the skill too:
  98. tell them to read `skills/prune-context/SKILL.md` and follow it.
  99. #### Use it
  100. Start a session in the project you want to check and ask, for example:
  101. - "Prune my context."
  102. - "Why is my startup context so big?"
  103. - "Find duplicate or stale instructions in my CLAUDE.md and AGENTS.md."
  104. - "Which of my skills and MCP servers could I drop?"
  105. In Claude Code you can also run it directly with `/prune-context`.
  106. The agent then:
  107. 1. Runs `ayca --json` in the project (add "for Codex only" or similar to
  108. limit it to one agent).
  109. 2. Reads the largest items that load at startup.
  110. 3. Looks for broken imports, unused skills and MCP servers, instructions
  111. duplicated across scopes, bloated files, long skill descriptions and stale
  112. memory. It asks you which skills and servers you actually use, because
  113. ayca can't see usage.
  114. 4. Proposes cuts in a table: what to remove, trim, merge, move or fix, the
  115. tokens each saves, and the risk.
  116. 5. Makes only the changes you approve, preferring reversible ones (archiving
  117. instead of deleting), then runs ayca again to show the before and after.
  118. Token counts are estimates (bytes ÷ 4) of files on disk only. The agent's
  119. built-in prompt and MCP tool definitions aren't included. In Claude Code,
  120. `/context` shows the real totals. AYCA itself stays read-only.
  121. ### Keyboard shortcuts
  122. | Key | Context tree | Preview pane |
  123. | --- | --- | --- |
  124. | `↑` `↓` / `k` `j` | Move | Scroll |
  125. | `←` / `h` | Collapse, or jump to parent | Back to tree |
  126. | `→` / `l` | Expand, or step into the first child | |
  127. | `space` | Toggle expand/collapse | |
  128. | `enter` | Focus preview (on a file); toggle (on a group) | |
  129. | `pgup` `pgdn` / `ctrl+u` `ctrl+d` | Page | Page |
  130. | `g` `G` / `home` `end` | First / last | Top / bottom |
  131. | `tab` | Switch between tree and preview | Switch |
  132. | `/` | Search by name or path (`enter` keeps the filter, `esc` clears it) | |
  133. | `esc` | Clear the active filter | Back to tree |
  134. | `v` | Toggle rendered and raw view | Toggle |
  135. | `c` | Show the startup context budget per agent | |
  136. | `w` | Show discovery warnings (unreadable or malformed files) | |
  137. | `r` | Rescan | Rescan |
  138. | `q` / `ctrl+c` | Quit | Quit |
  139. ### Reading the tree
  140. - Items are grouped by **category** (Instructions, Memory, Rules, Skills,
  141. Subagents, Commands, Output styles, Hooks, MCP Servers, Runtime), then by
  142. **scope**. Categories other than Instructions, Rules, Skills and MCP Servers
  143. appear only when something was found. The scopes are:
  144. - **Project** (green): inside the project root. The project root is the
  145. nearest git root, or the current directory if there isn't one.
  146. - **Ancestor directories** (yellow): above the project root.
  147. - **Global** (blue): user-wide configuration.
  148. - **System** (red): machine-wide managed policy set by an administrator,
  149. plus context built into the agents themselves.
  150. - The tags after a name (`claude·codex`) are the agents known to read that
  151. location.
  152. - Under a CLAUDE.md, `@path` entries are files it imports. They're nested
  153. the way Claude Code expands them. `✗ … missing` marks a broken import.
  154. - Under a hook, the entries are the scripts its command runs. You can read
  155. them; AYCA never runs them.
  156. - `◇` entries (Runtime) describe context with no file behind it. The preview
  157. explains what it is and where to check it.
  158. - `⇆N` means the same file or folder was found at N other paths, for example
  159. a skill symlinked into `~/.claude/skills`, `~/.codex/skills` and
  160. `~/.agents/skills`. It is listed once. The preview shows every path and the
  161. real target.
  162. - The preview header shows the absolute path, size, a rough token estimate
  163. (bytes ÷ 4), the category, scope and agents, plus notes such as
  164. "nested — loaded on demand" or "shadowed by AGENTS.override.md".
  165. ## Supported context locations
  166. `<dir>` means every directory from the project root down to the current
  167. directory. *Nested* means any subdirectory below the current directory. Those
  168. files are loaded on demand when an agent works there. The nested scan goes up
  169. to 6 levels deep, skips hidden, `node_modules`, `vendor`, `dist`, `build` and
  170. `target` directories, and is skipped when you run AYCA from `$HOME` or `/`.
  171. ### Claude Code
  172. | Category | Project | Ancestors | Global | System |
  173. | --- | --- | --- | --- | --- |
  174. | Instructions | `<dir>/CLAUDE.md`, `<dir>/.claude/CLAUDE.md`, `<dir>/CLAUDE.local.md`, nested `CLAUDE.md` | same files, up to `/` | `~/.claude/CLAUDE.md` | managed `CLAUDE.md` |
  175. | `@imports` | expanded under every CLAUDE.md, up to 5 levels deep, ignoring code blocks | | | |
  176. | Memory | `~/.claude/projects/<project>/memory/` (auto memory; `MEMORY.md` loads every session) | | | |
  177. | Rules | `<dir>/.claude/rules/**/*.md` | | `~/.claude/rules/**/*.md` | |
  178. | Skills | `<dir>/.claude/skills/*/SKILL.md` | | `~/.claude/skills/**/SKILL.md`, plugin skills | |
  179. | Subagents | `<dir>/.claude/agents/` | | `~/.claude/agents/`, plugin `agents/` | |
  180. | Commands | `<dir>/.claude/commands/` | | `~/.claude/commands/`, plugin `commands/` | |
  181. | Output styles | `<dir>/.claude/output-styles/` | | `~/.claude/output-styles/`, plugin `output-styles/` | |
  182. | Hooks | `.claude/settings.json`, `.claude/settings.local.json` | | `~/.claude/settings.json`, plugin `hooks/hooks.json` | `managed-settings.json` |
  183. | MCP | `.mcp.json` (project scope); `~/.claude.json` → `projects[<root>].mcpServers` (local scope) | | `~/.claude.json` → `mcpServers` (user scope), plugin `.mcp.json` | `managed-mcp.json` |
  184. The managed policy directory is `/etc/claude-code` on Linux,
  185. `/Library/Application Support/ClaudeCode` on macOS and
  186. `C:\Program Files\ClaudeCode` on Windows. `$CLAUDE_CONFIG_DIR` is honoured.
  187. Plugins come from `~/.claude/plugins/installed_plugins.json`. Plugins disabled
  188. in `settings.json` are marked as disabled. The active `outputStyle` is noted.
  189. ### Codex
  190. | Category | Project | Ancestors | Global |
  191. | --- | --- | --- | --- |
  192. | Instructions | `<dir>/AGENTS.override.md` / `<dir>/AGENTS.md`, nested `AGENTS.md` | `AGENTS.md`, flagged as likely not loaded | `$CODEX_HOME/AGENTS.override.md` / `AGENTS.md` |
  193. | Rules | | | `$CODEX_HOME/rules/*.rules` (execution policy) |
  194. | Skills | `<dir>/.agents/skills`, `<dir>/.codex/skills` | | `~/.agents/skills`, `$CODEX_HOME/skills` |
  195. | Commands | | | `$CODEX_HOME/prompts/*.md` (custom prompts) |
  196. | Hooks | | | `$CODEX_HOME/hooks.json` |
  197. | MCP | `.codex/config.toml` `[mcp_servers.*]` (trusted projects) | | `$CODEX_HOME/config.toml` `[mcp_servers.*]` |
  198. `$CODEX_HOME` defaults to `~/.codex`.
  199. ### Cursor
  200. | Category | Project | Global |
  201. | --- | --- | --- |
  202. | Instructions | `AGENTS.md` (root and nested) | |
  203. | Rules | `<dir>/.cursor/rules/**/*.{mdc,md}`, nested `.cursor/rules`, legacy `.cursorrules` | |
  204. | Skills | `<dir>/.cursor/skills` | `~/.cursor/skills` |
  205. | Commands | `.cursor/commands/*.md` | `~/.cursor/commands/*.md` |
  206. | Hooks | `.cursor/hooks.json` | `~/.cursor/hooks.json` |
  207. | MCP | `.cursor/mcp.json` | `~/.cursor/mcp.json` |
  208. Cursor's *User Rules* live inside the app's settings database, not in a file,
  209. so AYCA can't see them.
  210. ### Hooks
  211. Each hook command is its own entry, labelled with its event and command.
  212. SessionStart and UserPromptSubmit hooks are flagged because their output goes
  213. straight into the agent's context. AYCA finds the scripts a command
  214. references: absolute paths, `~`, `$HOME`, `${CLAUDE_PLUGIN_ROOT}`,
  215. `$CLAUDE_PROJECT_DIR`, paths relative to the config file, and arguments that
  216. name a file next to such a script. It lists them under the hook so you can
  217. read what would run.
  218. ### Runtime context (not on disk)
  219. Some context is present in every session but has no file behind it. AYCA
  220. lists it under **Runtime** with an explanation instead of pretending it
  221. doesn't exist:
  222. - the built-in system prompts of Claude Code, Codex and Cursor
  223. - Claude Code's session environment (working directory, platform, date,
  224. git status)
  225. - claude.ai account connectors. AYCA lists connectors that `~/.claude.json`
  226. records as used on this machine, clearly marked as history rather than
  227. current state.
  228. - launch flags (`--append-system-prompt`, `--mcp-config`, …), environment
  229. variables, and the output hooks produce when they run
  230. - Cursor User Rules and Memories, which live in the app's settings
  231. ### MCP servers, hooks and secrets
  232. Each MCP server and hook appears as its own entry, backed by the config file
  233. it came from. The preview shows only that entry's configuration, never the
  234. whole file: `~/.claude.json`, for example, also holds account data. Values that look
  235. like secrets are masked as `••••••••`. That covers every value in `env` and
  236. `headers` maps, keys such as `token`, `secret`, `password`, `api_key` and
  237. `auth`, arguments after flags like `--api-key`, URL passwords and credential
  238. query parameters, and well-known token formats (`sk-…`, `ghp_…`, `xox…-`,
  239. JWTs and similar), including tokens embedded in a longer command line.
  240. Environment variable references such as `${GITHUB_TOKEN}`
  241. are left visible because they aren't secrets.
  242. ## Startup context budget
  243. The header shows roughly how much of each agent's context window the context
  244. on disk fills before you type anything, for example
  245. `startup context on disk: claude 1.9% · codex 0.2%`. Press `c` for the
  246. breakdown by category and item. `--list` prints the same at the end, and
  247. each item's details include a *Startup* line.
  248. What counts:
  249. | Context | Counted as |
  250. | --- | --- |
  251. | Instruction files and their `@imports` | full text |
  252. | Auto memory | the first 200 lines of `MEMORY.md` |
  253. | Claude Code rules without `paths:`, Cursor rules with `alwaysApply: true`, `.cursorrules` | full text |
  254. | Cursor rules with only a `description` | the description (the agent decides whether to read the rest) |
  255. | Skills, Claude Code subagents, Claude Code commands with a `description` | name and description |
  256. | The active Claude Code output style | its body |
  257. | Codex project `AGENTS.md` files | full text, capped at 32 KiB in total (`project_doc_max_bytes`) |
  258. What doesn't count: nested files (they load on demand), shadowed files, files
  259. an agent likely ignores, disabled plugins, conditional rules, Codex `.rules`
  260. (they're enforced by the CLI, not sent to the model), and Codex prompts and
  261. Cursor commands (they load only when typed).
  262. The panel also lists what AYCA knows is there but can't size: the built-in
  263. system prompt and tool definitions, the tools of each MCP server, and the
  264. output of SessionStart and UserPromptSubmit hooks. These are often the
  265. largest part of the real total, so treat the percentage as a lower bound.
  266. Tokens are estimated as bytes ÷ 4. The windows default to 200k for Claude
  267. Code and Cursor and 272k for Codex, but the real size depends on the model;
  268. set yours with `--window`. For exact numbers, run `/context` in Claude Code.
  269. ## What AYCA does *not* know
  270. AYCA shows what is **configured on disk**. It can't see what an agent actually
  271. received in a given session. Agents may skip files, load them lazily, or apply
  272. precedence rules that change between versions. Notes like "likely not loaded"
  273. or "nested — loaded on demand" describe documented behaviour; they don't come
  274. from inspecting a running agent.
  275. ## Development
  276. ```sh
  277. make test # go test ./...
  278. make lint # gofmt check + go vet
  279. make build # ./bin/ayca
  280. ```
  281. The layout keeps discovery, presentation and filesystem access separate, so
  282. editing can be added in v0.2 without restructuring:
  283. ```
  284. cmd/ayca/ CLI flags, --list output, program start-up
  285. internal/discovery/ Env (paths), agent adapters (claude.go, codex.go, cursor.go),
  286. hooks, @imports, runtime info, de-duplication, MCP parsing & masking
  287. internal/budget/ Startup context estimate per agent (tokens, % of window)
  288. internal/tree/ Category → scope → item tree, expansion state, filtering
  289. internal/preview/ Read-only file loading and Glamour rendering (rendered/raw)
  290. internal/tui/ Bubble Tea model: layout, key handling, preview pane
  291. ```
  292. To add an agent, write a `discoverX(c *collector)` function in its own file
  293. and register it in `Adapters` in `internal/discovery/adapters.go`. Use
  294. `c.file`, `c.fileDir`, `c.skills`, `c.hooksFile`, `c.mcpJSONFile`,
  295. `c.mcpTOMLFile` and `c.info`. The
  296. collector handles de-duplication, symlink resolution, scope fixes and
  297. warnings.
  298. ## License
  299. MIT. See [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.