Add a new built-in exercise to Liftosaur end-to-end — image (gymvisual.com → S3), catalog registration, description page, and the LLM/MCP exercise list. Use when adding one or more built-in exercises to the app catalog.
中文简介正在准备中。当前显示原文说明。
Investigate a user-reported issue using server logs, user events, storage snapshots, and Rollbar. Use when given a user id or email plus an issue description (e.g. from a support email).
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Investigate a user-reported issue: $ARGUMENTS
Fetch the user's server-side data incrementally, correlate it with their description of the problem and the source code, and explain the root cause. If the data isn't conclusive, instrument the suspect code paths with lgDebug and hand off for deploy.
ROLLBAR_READ_TOKEN must be set in the environment for the Rollbar steps.npm run r ./lambda/scripts/<script>.ts .... Their stdout includes DynamoDB/log noise around the useful output — when saving to a file, extract the relevant part (e.g. the JSON object) afterwards.npm run r ./lambda/scripts/get_user_id_by_email.ts <email>
person.id from it. If the task is purely "fix this exception" rather than "investigate this user's issue", use /fix-rollbar instead.Stage all artifacts under .tmp/debug-<userid>/:
install -d .tmp/debug-<userid>
npm run r ./lambda/scripts/user_events_markdown.ts <userid> > .tmp/debug-<userid>/events.md
This is the cheapest and densest source — the last 2 weeks of client events, grouped by day, each line carrying time, platform (Web/Mobile + iOS/Android app version), and short commit hash:
❌ **ERROR** lines — client errors with message, stack, and rollbar_id📸 safesnapshot / mergesnapshot lines — storage snapshots with storage_id and the sync update payloadextra JSONRead it looking for: the time window matching the user's description, errors near that window, and suspicious event sequences (e.g. repeated syncs, unexpected screen flows). Quick error scan:
grep -B 3 -A 3 "❌ \*\*ERROR\*\*" .tmp/debug-<userid>/events.md
Server logs for the relevant date(s). The script writes logs-<date>-<userid>.txt into the project root:
npm run r ./lambda/scripts/get_logs.ts <YYYY-MM-DD> <userid>
mv logs-<YYYY-MM-DD>-<userid>.txt .tmp/debug-<userid>/
These can be large — don't read whole files; grep around the timestamps identified from events.md.
Current storage:
npm run r ./lambda/scripts/get_user_storage.ts <userid> > .tmp/debug-<userid>/storage-raw.txt
Extract the JSON object from the surrounding stdout noise into storage.json, then query with jq (storages are big — don't read whole):
jq '{version: .storage.version, programs: [.storage.programs[].name], historyCount: (.storage.history | length)}' .tmp/debug-<userid>/storage.json
Useful shapes: .history[] (workouts, newest first), .programs[], .settings (units, equipment, gyms), .stats.
Diff storage snapshots from before and after the suspect moment. Snapshot ids come from the 📸 lines in events.md:
npm run r ./lambda/scripts/get_storage_from_snapshot.ts <userid> <storage_id> > .tmp/debug-<userid>/snapshot-<storage_id>.txt
Note: this prints via util.inspect (JS object notation, possibly ANSI-colored), not JSON. Compare targeted fields between snapshots rather than diffing whole files.
Primary path — from events.md. ❌ ERROR lines include rollbar_id. For errors near the issue window:
curl -sS -H "X-Rollbar-Access-Token: $ROLLBAR_READ_TOKEN" \
"https://api.rollbar.com/api/1/instance/<ROLLBAR_ID>" \
-o .tmp/debug-<userid>/rollbar-<ROLLBAR_ID>.json
Drill down like /fix-rollbar does:
jq -r '.result.item_id, .result.data.liftosaur_exception_id, .result.data.timestamp' .tmp/debug-<userid>/rollbar-<ROLLBAR_ID>.json
If liftosaur_exception_id is non-null, fetch the captured state/actions:
npm run r ./lambda/scripts/get_exception.ts <EXCEPTION_ID> > .tmp/debug-<userid>/exception-<EXCEPTION_ID>.json
jq -r '.data' .tmp/debug-<userid>/exception-<EXCEPTION_ID>.json | jq '.lastActions | fromjson | .[-10:]'
jq -r '.data' .tmp/debug-<userid>/exception-<EXCEPTION_ID>.json | jq '.lastState | fromjson | {screenStack, progressCount: (.storage.progress | length)}'
Fallback — when events.md shows no errors but you suspect a crash. RQL is unavailable on the current Rollbar plan; instead page recent occurrences and filter by person (20 per page, only practical for recent crashes — scan ~10–20 pages max):
for page in 1 2 3 4 5 6 7 8 9 10; do
curl -sS -H "X-Rollbar-Access-Token: $ROLLBAR_READ_TOKEN" \
"https://api.rollbar.com/api/1/instances?page=$page" |
jq -r '.result.instances[] | select(.data.person.id == "<userid>") |
"\(.id) \(.timestamp) \(.data.body.trace.exception.message // .data.body.message.body // .data.body.trace_chain[0].exception.message // "?")"'
done
Matching ids are occurrence ids — feed them back into the primary path above.
Cross-reference events, server logs, storage, and Rollbar data against the user's description and the relevant source code. Key files:
src/types.ts — IStorage, IProgram, IHistoryRecordsrc/models/state.ts — IStatesrc/ducks/reducer.ts, src/ducks/thunks.ts — state transitions and synclambda/index.ts — server endpointsProduce a root-cause explanation citing specific evidence (event lines, log entries, storage fields), plus a proposed fix when the cause is clear.
lgDebug(name, userId, extra?) from src/utils/posthog.ts logs an event only when the running client's tempUserId matches — safe to ship for a single user, works on web and native.
lgDebug("descriptive-event-name", "<userid>", { key: value }) calls at the suspect code paths, capturing the values that would confirm or refute each hypothesis.events.md.lgDebug calls.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Add a new built-in exercise to Liftosaur end-to-end — image (gymvisual.com → S3), catalog registration, description page, and the LLM/MCP exercise list. Use when adding one or more built-in exercises to the app catalog.
中文简介正在准备中。当前显示原文说明。
Add a new server-rendered page to the Liftosaur website. Use when creating new public-facing pages with routing, SSR, and client hydration.
中文简介正在准备中。当前显示原文说明。
Create a 30%-off coupon for an affiliate or creator on iOS and Android, and draft the reply that tells them how to use it. Use when asked to create, set up or send a coupon or promo code for an affiliate, influencer or creator.
中文简介正在准备中。当前显示原文说明。
Interactively investigate a production Rollbar error. Accepts an occurrence id, item id, item counter, or Rollbar URL. Fetches the error data, assesses how widespread it is, drills into affected users (events, logs, storage, captured state), and works with the developer toward a fix or ignore decision. Use for collaborative debugging; use /fix-rollbar for a straight fetch-and-fix of a single occurrence.
中文简介正在准备中。当前显示原文说明。
Build a feature end to end — decide worktree vs here, design the architecture and debate it with codex, get the user's approval on a one-pass-readable plan, state the API/state contract, implement with visible diffs, then run two codex reviews (bugs + architecture) and document the result. Use when asked to build/implement/add a feature or do a refactor that involves design decisions.
中文简介正在准备中。当前显示原文说明。
Fix a production exception from Rollbar in an interactive Claude Code session. Fetches the occurrence data, analyzes the error, and either implements a fix or adds the error to the ignore list. Use when given a Rollbar occurrence ID.
中文简介正在准备中。当前显示原文说明。