Flutter Screenshot Skill
Use this skill when the user asks to screenshot the Flutter app or a changed UI in this repository, especially when they want both desktop/large-screen and mobile/portrait previews. This project does not use Flutter Web for screenshots.
Workflow
Choose the entrypoint:
- Use
lib/main.dartunless a narrow preview is safer. - If a page-specific preview is needed, create a temporary entrypoint under
/tmpand delete it after screenshots. Do not add preview entrypoints to the repo.
- Use
Run the bundled script from the repository root:
python3 .agents/skills/flutter-screenshot/scripts/capture_flutter_screenshots.py \ --target lib/main.dart \ --output-dir /tmp/pt_mate_screenshotsThe script starts
flutter run -d linux, locates the app window, captures:large.pngat1280x720mobile.pngat393x852
Open both images with
view_imagebefore replying. Confirm they are not blank and show the expected screen.Reply in Chinese with both Markdown image links:
大屏预览:  手机版预览: 
Notes
- The script requires the Linux desktop Flutter target, X11, and ImageMagick
import. - In WSLg or remote desktop sessions,
DISPLAYmay be unset even when X11 is available. Ifxwininfoworks withDISPLAY=:0, prefix the screenshot command withDISPLAY=:0. - Use a longer
--settle-secondsvalue when the first capture shows a loading screen; verify the captured images before copying or reporting them. - Run the script with escalated permissions when the sandbox blocks GUI launch or X11 capture.
- Keep screenshots in
/tmplong enough for the user to view them; clean up temporary preview Dart files when done.