echolot
/echolot
The door to echolot — localise Android performance regressions from a Perfetto trace, from the metric down to a place in the code. /echolot with nothing after it reads the project's state and takes the next step (install the layer, build the config, or hunt); with an argument it does that. Use when cold start regressed, scrolling stutters, TTI grew, a benchmark dropped, or there is a .perfetto-trace to analyse. Also for questions like "why is startup slow", "where does main thread time go", "what is burning CPU".
- Author
- grishan0v ↗
- Repository
- echolot ↗
- Licence
- Apache-2.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 5
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
The door to echolot — localise Android performance regressions from a Perfetto trace, from the metric down to a place in the code. /echolot with nothing after it reads the project's state and takes the next step (install the layer, build the config, or hunt); with an argument it does that. Use when cold start regressed, scrolling stutters, TTI grew, a benchmark dropped, or there is a .perfetto-trace to analyse. Also for questions like "why is startup slow", "where does main thread time go", "what is burning CPU".
Triggers from the description
Original author description
The door to echolot — localise Android performance regressions from a Perfetto trace, from the metric down to a place in the code. /echolot with nothing after it reads the project's state and takes the next step (install the layer, build the config, or hunt); with an argument it does that. Use when cold start regressed, scrolling stutters, TTI grew, a benchmark dropped, or there is a .perfetto-trace to analyse. Also for questions like "why is startup slow", "where does main thread time go", "what is burning CPU".
How it works
- The one rule
- /echolot is the door
- resume-or-new: whose question are we answering
- init-force: edits made here
- With an argument
- The order of work
- Two reports, one question
- When what arrived is an ANR, not a regression
- Reading the report
- From a finding to the code
SKILL.md preview
---
name: echolot
description: The door to echolot — localise Android performance regressions from a Perfetto trace, from the metric down to a place in the code. /echolot with nothing after it reads the project's state and takes the next step (install the layer, build the config, or hunt); with an argument it does that. Use when cold start regressed, scrolling stutters, TTI grew, a benchmark dropped, or there is a .perfetto-trace to analyse. Also for questions like "why is startup slow", "where does main thread time go", "what is burning CPU".
---
# echolot
A deterministic layer between the Perfetto trace and you.
## The one rule
**Never open the trace yourself.** No hand-rolled TraceProcessor, no ad-hoc
SQL, no reading `.perfetto-trace`. A trace is tens of megabytes and hundreds of
thousands of slices; everything you need, `echolot` hands you as a table of
about twenty rows.
Live proportions: an 81 MB trace with 475k slices compresses into a 14 KB
`report.json`. Six thousand times smaller, and it takes five seconds.
If the report seems to be missing data, that is not a reason to open the trace.
It is a reason to fix the config (anchors that did not match, the wrong
process), to add instrumentation and re-record, or to add a detector.
## `/echolot` is the door
When you are invoked as `/echolot`, do not guess what the human wants from
the state of the project — ask the tool. First:
```bash
echolot # where things stand: layer, config, traces, report, doctor — and `next`
```
Show that output to the human as it is, then act on the `next` line
(`echolot status --next` gives it as one word):
| `next` | what you do |
|---|---|
| `upgrade` | the `.claude/` layer here was written by a newer echolot than the one installed, or its manifest names a version the installed one cannot read, and the installed one writes nothing into it. Show the `layer` line to the human as it is — it names both versions and the command to upgrade — and stop. Do not run `echolot init`: it refuses |
| `init` | run `echolot init`, show the result; then run `echolot` again and continue from its new `next` |
| `doctor` | run `echolot doctor`, show what failed, stop — no report is trustworthy until it passes |
| `setup` | invoke the `echolot-setup` skill (the Skill tool) — it builds `echolot.yml` |
| `fix-config` | show the parse error, ask the human to fix `echolot.yml`, stop |
| `resume-or-new` | **ask before attaching to anything** — see below |
| `init-force` | files in `.claude/` may carry edits made here, and `echolot init --all` would overwrite them — **ask first**, see below |
| `fix-settings` | `.claude/settings.json` does not parse, so echolot's permission is not in it and no flag of `init` can put it there. Show the `layer` line — it says what to merge in — and tell the human to fix the file by hand, then do what the `hunt` row says |
| `hunt` | invoke the `echolot-hunt` skill (the Skill tool) — **never run the loop here**; it asks what regressed and after which change, opens the investigation, hands the work to `perf-hunter` and waits for its answer, then closes the investigation with it |
## `resume-or-new`: whose question are we answering
An investigation is open, it left traces and a report on disk, and nobody has
worked on it for a while. Attaching to that history without asking is how a
question about scrolling gets answered with cold-start traces.
`echolot` has already printed the recap under the table — the question, when it
was last worked on, how many traces it would reuse, what the last report said,
and anything that drifted since. **Show that recap as it is**, then ask with
`AskUserQuestion`:
| the human picks | what you do |
|---|---|
| carry on | `echolot hunt --resume`, then the `echolot-hunt` skill, saying the human chose to carry on: it works inside that investigation, with the question and the change it recorded |
| something new | the `echolot-hunt` skill with their question: it asks for the change and opens the new investigation before anything is recorded for it |
| just show the report | print `.echolot/out/report.md` — `.echolot/out/<scenario>/report.md`, the investigation's scenario, when the config names several — and stop |
Lean towards "something new" when the recap shows a `!` line — the scenario
changed, the config changed, or it has been untouched for over a week.
A new investigation is opened by `echolot hunt "<question>"`, which the
`echolot-hunt` skill runs. It moves the previous set of traces aside before
anything is recorded, so the new investigation cannot inherit them, and it
says on stderr if the previous one left `AGENTTMP_` markers in the sources.
**Deal with those before hunting**: `echolot mark --remove` takes out what
`mark --apply` wrote, and anything added by hand has to go by hand.
Instrumentation nobody meant to leave behind is the starting condition of the
next investigation otherwise.
When the human's own words already name a different question — `/echolot why
does the list stutter` while the open investigation is about cold start — still
ask, but offer "something new" first with their words filled in. A new
formulation is sometimes a sharper version of the same hunt.
Two things this is never asked about. Inside `perf-hunter`'s loop: it
re-records and re-instruments on purpose, works inside an investigation it was
handed, and never calls `status` at all. And within half an hour of the last
`collect` or `analyze` — that is the same sitting, and `next` says `hunt`.
## `init-force`: edits made here
The package has moved on from files this project edited (`conflict`), or from
files nothing can tell apart from an edit (`differs` — a layer installed before
echolot kept a manifest). `echolot init` leaves them alone;
`echolot init --all` overwrites them, and the edit goes with the old copy.
Run `echolot init`: it touches nothing edited here and lists each file `--all`
would overwrite on a `≠` line — the `customised` ones too, since `--all` does
not choose. Show those lines, then ask with `AskUserQuestion`:
| the human picks | what you do |
|---|---|
| overwrite them | `echolot init --all`, then `echolot` again and continue from its new `next`. Say that the edits are in git, to carry over by hand |
| keep them | leave them, and do what the `hunt` row says. `next` asks again while they differ from the package |
Never run `echolot init --all` without that answer.
## With an argument
The argument wins over the state:
- `/echolot init` — run `echolot init`. Not setup: `init` installs or
updates **this** layer; the config is setup's job.
- `/echolot setup` — the `echolot-setup` skill.
- `/echolot hunt <words>` — a hunt for that question, and the
`resume-or-new` question is not asked: the words are what regressed. It
is the `echolot-hunt` skill with those words. The skill asks for the
change, opens the investigation with `echolot hunt "<words>" --since …` —
the same word in a shell, which does that half and nothing else — hands
the loop to `perf-hunter`, and closes the investigation with its answer.
`/echolot <free text>` about slowness ("why is startup slow", "the list
stutters since the redesign") means the same.
- `/echolot doctor`, `/echolot status`, `/echolot analyze …` — run that
command, show the output.
- `/echolot reflect` — the `echolot-reflect` skill: how the last session
went, what to change in the tool.
Every argument after `/echolot` is a CLI verb of the same name, except
`setup` — that one needs an agent and has no shell half. Where a verb has
both, `/echolot X` runs `echolot X` and then whatever loop it needs.
`/echolot-setup`, `/echolot-hunt` and `/echolot-reflect` still exist for
whoever knows where they are going; `/echolot` is the door for everyone else.
## The order of work
```bash
echolot doctor -q # does the environment compute correctly?
echolot analyze <trace> -c echolot.yml
```
`analyze` writes `.echolot/out/report.json` (for you) and `report.md` (for
humans), next to the config. Read the **json** — it has a stable schema.
No config? That is `next: setup`. No idea what is in the trace?
`echolot probe <trace> --process '<package>*'`.
**Silence is relative to the thresholds.** The report's `Config:` line and
`detectors[].params_source` say whether the numbers are the shipped defaults
or calibrated ones. Calibrated on the runs that hold the regression means the
bar sits above it: look with `echolot analyze … --defaults` before calling a
run clean.
## Two reports, one question
`analyze` says where the time went in one set of traces. "It was 3 s, now it is
7 s" needs two sets, and subtracting two twenty-row tables by reading them is
the work this tool exists to remove.
```bash
echolot compare # inside an investigation: previous round vs latest
echolot compare --hunt 3 # its first report against its last
echolot compare old.json new.json # or name them
```
One table sorted by how far each row moved, plus `comparison.json` beside the
report. Three things decide how to read it:
- **`change`** — `appeared`, `grew`, `shrank`, `vanished`, `steady`. An
appeared row is usually the answer.
- **`holds`** — `true` means the move's 95% range, in `shift`, is on one side
of zero and the move survives a re-record; `false` means the range runs
through zero — the runs disagree among themselves by more than the row
moved, so record another round before concluding — `shift.runs_needed` says
about how many runs a side, and hundreds means more rounds will not settle
it; `null` means the row is on one side only, or it has too few runs of its
own: a row found in `2/5` runs gets `null` with no warning, and its
`before.runs` and `after.runs` say why. For the report as a whole, too few
repeats is the `single` or `few` warning.
- **`warnings`** — reasons the two may not be comparable. `thresholds` is the
one to read first: against a moved bar, appeared and gone mean "the bar
moved", not "the app changed". `instrumentation` names rows that appeared
because you added `AGENTTMP_` markers between the rounds.
## When what arrived is an ANR, not a regression
Sometimes the question is not "it was 3 s, now it is 7 s" but a report from
Crashlytics, Play Console, or the device's own drop box: the app stopped
answering somewhere you cannot see. Different first move, and most of it needs
no device and no trace.
```bash
echolot anr report.txt --root .
```
Reads and prints — it opens no investigation and leaves nothing on disk but
the line every command adds to `.echolot/log/runs.jsonl`, so a folder of
exports goes through it in one loop and the ones worth chasing are the ones
that name a lock chain.
| what it says | your next move |
|---|---|
| a lock chain with the main thread behind it | you have the mechanism. Open the frames of the thread at the root of the chain — the stack `anr` prints for it. The direct holder is often queued itself, a victim like the threads behind it. No trace needed |
| the main thread was **idle** (`nativePollOnce`) | it was not the culprit. Read the threads that were working — each is listed by the frame nearest the app, with its top beside it |
| "every frame belongs to the platform or a library", then "the frames nearest to the app" | the platform is a dead end, a library the app drives is not: `SystemJobScheduler.cancel` points at the app's WorkManager setup. Read that setup |
| "Who was holding what" under what it does not say | this file carries no lock notes; an empty chain list is the file's limit, not the freeze's. Get the device's own record |
| frames placed in the checkout | open those lines |
| frames landing nowhere | check out the build the report names — line numbers go stale first |
| "What N frames are: they read as R8 named them" under what it does not say | a minified build: run it again with `--mapping` and that build's `mapping.txt`, or set `project.mapping` in the config under `--root`. Until then nothing in it is the app's |
| a warning that frames R8 wrote have no place in the mapping, or name another mapping's id | the mapping is another build's: find the one that froze before reading the names |
`--json` is the same findings in the shape you walk: `chains`, `main.stack`,
`working[].where` / `.top` / `.stack`, `nearest`, `lock_notes`, `code.placed`,
`retrace` and `minified`.
Read it rather than the file: the frames that decide sit three to six deep,
and `awk` over the dump is what this replaces.
The idle main thread is the case that wastes a day if you miss it: the dump is
a snapshot taken five seconds in, and whatever caused the freeze had often let
go by then. Reading its top frame as the culprit sends you into Android's
message queue.
Then `echolot mark --from-anr report.txt` proposes markers on the methods that
were on the stack, and refuses the ones that would lie — a line that falls in a
different function than the frame names, a `return` in the body, a one-line
body. Show the reasons rather than working around them.
To measure a freeze rather than read about one, record long enough for
`anr_risk` and `anr` to see it: the seconds until the freeze starts, plus the
five an unanswered input event is given before the system declares an ANR,
plus a few for it to write the record. A freeze eight seconds in needs about
sixteen, past the default `duration_ms: 12000`.
## Reading the report
Details live in `references/report.md`; three things here that you will get
wrong without them. And one habit to drop: do not cut `report.json` up with
jq or python one-liners. `echolot report` prints what fired,
`echolot report --detector <id> --top 5` one detector's rows with the
evidence kept short, `--window` and `--markers` the rest, `--json` any of
them as a small json.
**Silent detectors matter as much as firing ones.** They stay in the report
with empty `rows`. Silence means that ground was checked and is clean — do not
go there.
**`self_ms` versus `total_ms`.** Self time, with children subtracted, is where
the time actually went. `traversal` with `total_ms: 354` and `self_ms: 79` does
almost nothing itself; dig into its children. Never add `total_ms` across rows:
they nest inside one another. Nor `self_ms` across detectors: a disk wait
inside a slice is in both. How much of the window the findings cover is
`window.main_thread.in_rows_pct`, each moment counted once.
**Warnings inside `window`.** If `start_anchor.matches == 0` or
`end_anchor.matches == 0`, the window ran to the edge of the trace and none of
the numbers are about your scenario.
Fix the config rather than hunting a problem. Same for `process_alternatives` —
you may be analysing the wrong process.
**`frame_jank` is about single frames, not totals.** Most of the others
aggregate by name and gate on sums, which is right for "cold start got slower"
and blind to a heavy tail: one 86 ms frame among thousands disappears into
every sum there is. This one reads SurfaceFlinger's per-frame record instead,
so it needs no instrumentation and answers a question the sums cannot.
Its `total_ms` and `max_ms` are time **past the deadline**; the frame's own
length is in `detail`, which is where a benchmark's percentiles can be matched.
`detail` also leads with the platform's verdict on whose deadline was missed —
`Self Jank` is the app, `Other Jank` is the compositor and is not something to
go into the code over.
Its silence is ambiguous: no bad frames, and no frame timeline in the trace at
all, look the same. Android 11 and below have none, and neither does a capture
that did not ask for it. Check before calling a scenario smooth.
## From a finding to the code
1. A firing detector gives you a `location` — a slice or thread name.
A row with `code` has already been placed: `places[].file` and `.line`
name the method that waited for a lock and the one holding it, the class
a View slice is, or, in a sampled recording, the app's own method the
samples found (role `sampled`). Open that; skip the grep.
2. The `domains` section of `echolot.yml` maps that name to a module and file.
3. Not in `domains`? Run `echolot domains --root .` — it maps literals inside
`trace("...")` and names kept in a `const val` and passed through the
project's own wrapper. Still nothing? Grep the repository for the slice
name: a literal survives minification and is found exactly, and a
constant's declaration is one grep away from its calls.
4. Nothing found? The slice is most likely a system one (`bindApplication`,
`Choreographer#doFrame`, `binder transaction`). See `references/naming.md`.
When `uninstrumented_cpu` fires in a recording without `runner.sampling`,
there is no code behind the finding by definition: the thread burned CPU with
no instrumentation. That is an address for adding `trace{}`, not the location
of a bug. In a sampled recording, `detail` names what ran on the stacks, then
`ours:` and the app's own method under it, and `code` and `places[]` (role
`sampled`) give its file: open that first. `ours: none` is work a pool ran
with its caller off the stack; `ours: cut` is a stack that ended in the
framework before anything of ours.
**`main_thread_outlier` is not `main_thread_block` again.** One gates on the
sum for a name and answers "where did the time go"; the other gates on a
single occurrence against the median for that same name and answers "which one
was out of line". A name in both is telling you two things.
They lead to different places in the code. Expensive every time means the fix
is in that work. Usually fine and once not means the cause is the state it hit
that once — a cold cache, a lock, a first-run path. `detail` carries the median
and how many occurrences it came from, which is what to hold a benchmark's
percentiles against.
## Boundaries
The tool **localises one specific regression**: you know "it was 3 s, now it is
7 s" and need to find where. It does not search for the unknown across a pile
of traces.
Networking in benchmarks is mocked on purpose — we hunt problems in code, not
network speed.
Thresholds are tied to a device and a scenario. When either changes, run
`echolot calibrate` on healthy runs instead of nudging numbers by hand.
When the question is about the tool rather than the app — "how did that
session go, what should change in echolot" — that is `/echolot reflect`
(the `echolot-reflect` skill), not a hunt.
## References
- `references/report.md` — the `report.json` schema, all detectors, what each column means
- `references/config.md` — the `echolot.yml` sections, what the code reads and what it does not
- `references/naming.md` — how ART names GC, locks and binder; facts from live Android 14
- `references/collect.md` — capturing a trace: perfetto and adb commands, verified in practice
Files in this package (5)
- SKILL.md 19 KB
- references/collect.md 13 KB
- references/config.md 21 KB
- references/naming.md 11 KB
- references/report.md 52 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · grishan0v/echolot | 100 | Apache-2.0 |
| grishan0v/echolot | 95 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version 94f8bdc6d310 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 96echolot-hunt
Find the cause of one Android performance regression with echolot. Opens an investigation, hands the loop to a subagent that starts clean, and closes the investigation with its answer. The echolot skill routes here once the config exists; use it directly when the human names a regression to hunt. - 100perfetto-trace-analysis
Analyzes Perfetto (.pftrace) traces for Lens Studio—quick JSON summary first, then optional deep SQL via a persistent trace server. Use when the user mentions .pftrace, Perfetto, Mobile Lens Profiler, Spectacles Monitor traces, frame drops, jank, LAT, or trace performance analysis. - 100automated-tracing
Automated Tracing & Performance Telemetry in Chromium using Perfetto and Telemetry benchmarks. Use when you need to launch the browser binary, execute a specific scenario/story, and collect Perfetto traces. Don't use for trace analysis (use analyzing-sql-traces). - 89trace-analysis
The investigation harness for "why is this slow?" over a Pulp Perfetto trace (.pftrace). Runs the hypothesis→query→drill-down chain-of-evidence loop autonomously and returns a plain-English root cause + evidence + a concrete fix. TRIGGER on "why is my plugin slow to open", "find… - 95trace-sql
SQL discipline for querying Pulp Perfetto traces (.pftrace) with trace_processor — idempotent CREATE OR REPLACE PERFETTO views, GLOB not LIKE, dur = -1 incomplete-slice handling, EXTRACT_ARG for span args, joining on stable utid/upid, SPAN_JOIN PARTITIONED, and the… - 100argent-native-profiler
Native profiling for CPU hotspots, UI hangs, memory issues. iOS via xctrace; Android via Perfetto. Use when diagnosing native-level performance issues.