agentleFS
JustLookAtNowJustLookAtNow/pt_mate/.agents/skills/flutter-screenshot/SKILL.md

flutter-screenshot

Skill512 starsChanged 5 months agoMITView on GitHub

Capture and show two Flutter UI screenshots for this project: one landscape/large-screen preview and one portrait/mobile preview, without using Flutter Web.

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user asks to screenshot the Flutter app or a changed UI in this repository, especially when they want both …

    line 8
  2. Very specific:

    Use lib/main.dart unless a narrow preview is safer.

    line 13
  3. Very specific:

    If a page-specific preview is needed, create a temporary entrypoint under /tmp and delete it after screenshots.

    line 14
  4. Distinctive:

    Run the bundled script from the repository root:

    line 15
  5. Very specific:

    Use a longer --settle-seconds value when the first capture shows a loading screen.

    line 41
  6. Distinctive:

    Run the script with escalated permissions when the sandbox blocks GUI launch or X11 capture.

    line 42
  7. Very specific:

    Keep screenshots in /tmp long enough for the user to view them.

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Choose the entrypoint:
    • Use lib/main.dart unless a narrow preview is safer.
    • If a page-specific preview is needed, create a temporary entrypoint under /tmp and delete it after screenshots. Do not add preview entrypoints to the repo.
  2. 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_screenshots
  3. The script starts flutter run -d linux, locates the app window, captures:
    • large.png at 1280x720
    • mobile.png at 393x852
  4. Open both images with view_image before replying. Confirm they are not blank and show the expected screen.
  5. Reply in Chinese with both Markdown image links:

    大屏预览:
    ![大屏预览](/tmp/pt_mate_screenshots/large.png)
    
    手机版预览:
    ![手机版预览](/tmp/pt_mate_screenshots/mobile.png)

Notes

  • The script requires the Linux desktop Flutter target, X11, and ImageMagick import.
  • In WSLg or remote desktop sessions, DISPLAY may be unset even when X11 is available. If xwininfo works with DISPLAY=:0, prefix the screenshot command with DISPLAY=:0.
  • Use a longer --settle-seconds value 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 /tmp long enough for the user to view them; clean up temporary preview Dart files when done.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.