flutter-read-logs: add plugin for reading run logs as context#3
Open
papeye wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new flutter-read-logs plugin to the LeanCode Claude Code plugins set, enabling on-demand ingestion of the most recent flutter run output (captured per-project under /tmp) so runtime behavior can be investigated without manual log copy/paste.
Changes:
- Introduces the
/read-logsskill plus aflutter-read-logs-usagerouting/help skill. - Adds plugin documentation (
plugins/flutter-read-logs/README.md) and initial changelog/manifest. - Registers the plugin in the root README and marketplace manifest.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds flutter-read-logs to the top-level plugin list. |
| plugins/flutter-read-logs/skills/read-logs/SKILL.md | New /read-logs skill with path resolution, format normalization, and setup guidance. |
| plugins/flutter-read-logs/skills/flutter-read-logs-usage/SKILL.md | New usage/routing skill for setup and when-to-use guidance. |
| plugins/flutter-read-logs/README.md | Plugin-level README describing setup and workflow. |
| plugins/flutter-read-logs/CHANGELOG.md | Initial plugin changelog entry. |
| plugins/flutter-read-logs/.claude-plugin/plugin.json | Plugin manifest for Claude Code marketplace tooling. |
| .claude-plugin/marketplace.json | Registers the new plugin and its skills in the marketplace index. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+76
to
+92
| CLEAN="${L%.log}.clean.log" | ||
| if head -50 "$L" | grep -q '\[DAP\]\|"event":"output"'; then | ||
| echo "[format: DAP — extracting app output]" | ||
| # grep first: only the output-event lines reach the JSON parser, not the whole protocol — | ||
| # so extraction cost tracks app output, not total DAP traffic. | ||
| grep '"event":"output"' "$L" | python3 -c ' | ||
| import json, sys | ||
| for line in sys.stdin: | ||
| i = line.find("{") | ||
| if i < 0: continue | ||
| try: m = json.loads(line[i:]) | ||
| except Exception: continue | ||
| if m.get("event") == "output": | ||
| sys.stdout.write(m.get("body", {}).get("output", "")) | ||
| ' > "$CLEAN" 2>/dev/null | ||
| # jq fallback if python3 is unavailable: | ||
| # grep '"event":"output"' "$L" | sed -E 's/^[^{]*//' | jq -rj 'select(.event=="output") | .body.output' > "$CLEAN" |
Author
There was a problem hiding this comment.
Worked for me fine but I'll verify
Comment on lines
+100
to
+101
| (If a DAP log can't be extracted because neither `python3` nor `jq` is present, tell the | ||
| user to `brew install jq` and fall back to reading matching raw lines so they're not blocked.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new
flutter-read-logsplugin: a/read-logsskill that pulls the running app's latestflutter runoutput into context (auth flow, a crash, a race, "why did X happen at runtime"), plus aflutter-read-logs-usagerouting skill and a README documenting setup.Why
There was no way for Claude to see a running app's output — diagnosing runtime behaviour meant copy-pasting terminal logs. This captures
flutter runoutput per-project and surfaces the relevant slice on demand. Piloted in a LeanCode app (meg-app) before extracting it here.How it works
/tmp/flutter-<repo>.log, derived from--git-common-dirso the main checkout and all worktrees share one file. Overwritten each launch; lives in/tmp.scripttranscript and VS Code/Cursordart.dapLogFile(DAP; app output extracted fromevent:"output"lines via a grep-prefiltered python/jq pass).dapLogFilekeeps F5; Zed wraps the run task inscript(macOS + Linux forms). Never commits; warns before editing a tracked config file. Sensitive-data caution included.Notes
README.md; theread-logsskill repeats it inline (with a note) because it applies setup at runtime — the sanctioned exception in the contributor guide.dapLogFile→ simulator F5 → read) and CI is green. Couldn't rungo run ./cmd/validate-pluginslocally (no Go); relying on CI.Ad
i_created_a_claude_code_comamn.mp4