agentleFS
ariaraminariaramin/flutter-skills/skills/flutter-pro-image-editor-engineering/SKILL.md

flutter-pro-image-editor-engineering

Skill8 starsChanged 48 days agoMITView on GitHub

Design, implement, review, debug, test, optimize, and migrate production Flutter image-editing flows built with pro_image_editor. Use for ProImageEditor constructors and callbacks, paint/crop/filter/tune/blur/text/emoji/sticker tools, custom widget layers, undo/redo and persisted editor state, JPG/PNG export, transparency, large-image memory or OOM issues, isolate and Web Worker generation, editor lifecycle, upload pipelines, EXIF/GPS privacy, or version-sensitive pro_image_editor APIs. Trigger even when the request only says the Flutter image editor is slow, resets, freezes during export, loses quality, or behaves differently on Web/mobile/desktop. Do not use for image selection without editing (use an image_picker skill) or generic Flutter image rendering and caching without pro_image_editor (use an image-performance skill).

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 17 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Treat pro_image_editor as an image-processing pipeline with UI, memory, lifecycle, persistence, and privacy consequences—not as an ordinary …

    line 9
  2. Distinctive:

    Read only the references needed:

    line 13
  3. Very specific:

    Every ProImageEditor constructor, callback, configuration, controller, and persisted-state caller affected by the change.

    line 30
  4. Distinctive:

    Search for at least:

    line 35
  5. Distinctive:

    Must the original remain available for re-editing or recovery?

    line 53
  6. Distinctive:

    Must editor history or individual layers persist?

    line 55
  7. Distinctive:

    Must EXIF/GPS be removed, preserved, or ignored?

    line 56
  8. Distinctive:

    If the repository answers these questions, do not ask the user again.

    line 59
  9. Distinctive:

    Use this default architecture:

    line 63
  10. Very specific:

    Prefer ProImageEditor.file for an existing supported native file and ProImageEditor.memory when bytes already exist or a browser picker …

    line 77
  11. Distinctive:

    Do not add file-to-bytes-to-base64 round trips or claim file input is zero-copy.

    line 78
  12. Distinctive:

    Keep gesture-time state local to the editor.

    line 80
  13. Distinctive:

    Keep isolate/Web Worker generation enabled initially.

    line 81
  14. Distinctive:

    Leave layer capture disabled unless the caller consumes captured layers.

    line 85
  15. Distinctive:

    Do not log image bytes, base64, sensitive paths, filenames, EXIF, coordinates, or persisted private editor state.

    line 88
  16. Distinctive:

    Never assert that metadata is stripped or retained without testing the actual unchanged and re-encoded paths.

    line 89
  17. Distinctive:

    Run the narrowest applicable checks, then expand when the risk requires it:

    line 108
  18. Very specific:

    Run focused unit/widget/integration tests.

    line 111
  19. Very specific:

    Verify small and maximum-size sources, repeated open/export/close, output dimensions, format, quality, and alpha.

    line 113
  20. Distinctive:

    Test metadata with fixtures when privacy depends on it.

    line 114
  21. Distinctive:

    Test every shipped platform whose source, worker, filesystem, gesture, or layout behavior differs.

    line 115
  22. Distinctive:

    Before finishing, review the diff for redundant byte copies, stale APIs, new unbounded work, original-media overwrite, and accidental …

    line 118

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 pro_image_editor Engineering

Treat pro_image_editor as an image-processing pipeline with UI, memory, lifecycle, persistence, and privacy consequences—not as an ordinary widget.

Route the task

Read only the references needed:

TaskReference
Architecture, current API, configuration, constructors, source selectionreferences/01-api-and-inputs.md
Large-image memory, processors, formats, transparency, export, qualityreferences/02-processing-memory-and-export.md
History, editing tools, layers, gestures, lifecycle, files, uploadreferences/03-state-tools-and-lifecycle.md
Metadata/privacy, platforms, accessibility, state integration, failures, profilingreferences/04-platform-privacy-and-performance.md
Tests, debugging, anti-patterns, review/readiness checklists, version-sensitive factsreferences/05-testing-audits-and-versioning.md

For exact APIs, first inspect the project's resolved package version and installed source. The bundled facts are validated against pro_image_editor 13.3.1, Flutter 3.44+, and Dart 3.12+; treat them as a baseline, not proof for another version.

Inspect before changing code

Inspect:

  • pubspec.yaml, pubspec.lock, Flutter/Dart constraints, and supported platforms.
  • Every ProImageEditor constructor, callback, configuration, controller, and persisted-state caller affected by the change.
  • Source type and dimensions, required output dimensions/format/alpha, and metadata policy.
  • Existing image-picker, storage, upload, navigation, state-management, and error-handling paths.
  • Installed pro_image_editor source when a signature, default, enum value, or behavior is version-sensitive.

Search for at least:

ProImageEditor ProImageEditorCallbacks ProImageEditorConfigs
ImageGenerationConfigs MainEditorConfigs StateHistoryConfigs
onImageEditingComplete onCompleteWithParameters onCloseEditor
importStateHistory exportStateHistory captureLayersOnDone
UniqueKey readAsBytes base64 maxOutputSize outputFormat

Trace all completion and cancellation paths before editing. Fix shared causes once instead of patching one caller.

Define the contract

Establish only requirements that affect the implementation:

  1. Which platforms ship?
  2. Which source types and maximum dimensions are accepted?
  3. Must the original remain available for re-editing or recovery?
  4. What output dimensions, format, quality, and transparency are required?
  5. Must editor history or individual layers persist?
  6. Must EXIF/GPS be removed, preserved, or ignored?
  7. What work must happen after export, and who owns it?

If the repository answers these questions, do not ask the user again. Otherwise choose the conservative behavior that preserves the original and avoids privacy claims.

Implement the smallest complete flow

Use this default architecture:

source media
→ minimal source preparation
→ stable ProImageEditor route
→ transient editor-owned state
→ one final export
→ close editor
→ persistence/upload/business work

Apply these rules:

  • Prefer ProImageEditor.file for an existing supported native file and ProImageEditor.memory when bytes already exist or a browser picker supplies bytes.
  • Do not add file-to-bytes-to-base64 round trips or claim file input is zero-copy.
  • Preserve stable widget/session identity; never introduce UniqueKey() to force routine rebuilds.
  • Keep gesture-time state local to the editor. Do not mirror every pointer update into global state, storage, analytics, or the network.
  • Keep isolate/Web Worker generation enabled initially. Change processor mode or concurrency only from profile evidence.
  • Bound final dimensions when the product does not need full source resolution. Preserve the original separately when re-editability or fidelity matters.
  • Choose JPG for opaque photographic output and PNG when alpha or lossless output is required. Verify actual output dimensions and alpha pixels.
  • Bound history deliberately for long sessions or large sources.
  • Leave layer capture disabled unless the caller consumes captured layers.
  • Give completion one owner and make downstream side effects idempotent when duplicate delivery is possible.
  • Move uploads, database writes, and other business work outside the editor's interaction and export lifecycle when the product permits.
  • Do not log image bytes, base64, sensitive paths, filenames, EXIF, coordinates, or persisted private editor state.
  • Never assert that metadata is stripped or retained without testing the actual unchanged and re-encoded paths.

Diagnose from evidence

Classify the bottleneck before optimizing:

open latency → source decode, dimensions, copies, editor initialization
gesture jank → rebuilds, layer/path/history growth, blur/filter raster cost
export freeze → capture, raw buffers, encoding, app callback work
memory spike/OOM → decoded pixels, concurrent full-image buffers, history, layers
web-only failure → byte/file semantics, Worker availability, Wasm fallback
reset/lost edits → changing key/type/source identity or incorrect state ownership

Measure profile/release builds on the slowest supported device or browser. Keep debug measurements out of performance conclusions.

Validate the result

Run the narrowest applicable checks, then expand when the risk requires it:

  • Format and analyze changed Dart code.
  • Run focused unit/widget/integration tests.
  • Exercise cancel, successful Done, export failure, and duplicate completion.
  • Verify small and maximum-size sources, repeated open/export/close, output dimensions, format, quality, and alpha.
  • Test metadata with fixtures when privacy depends on it.
  • Test every shipped platform whose source, worker, filesystem, gesture, or layout behavior differs.
  • Profile UI/raster timing, export duration, and peak memory for performance work.

Before finishing, review the diff for redundant byte copies, stale APIs, new unbounded work, original-media overwrite, and accidental sensitive logging.

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.