flutter-path-provider-production-storage
Skill8 starsChanged 49 days agoMITView on GitHub
Design, implement, review, debug, test, secure, migrate, and optimize production Flutter filesystem storage using path_provider. Use whenever a Flutter task involves temporary/cache/support/documents/downloads directories, Android external storage, file persistence, local databases, exports, offline files, cache cleanup, path traversal, filesystem migrations, disk-full handling, large-file I/O, or uncertainty about where app data should live—even if the request only asks “where should I save this file?”.
In this repository70 other files it gives its agents.
- camerawesome-flutterSkill
- dart-args-production-cliSkill
- dart-flutter-equatable-engineeringSkill
- dart-flutter-ffi-systems-engineeringSkill
- dart-metaSkill
- document-camera-frameSkill
- document-scan-flutterSkill
- figma-to-flutter-expertSkill
- flutter-animations-production-engineeringSkill
- flutter-app-hardening-reverse-engineeringSkill
- flutter-app-icon-engineeringSkill
- flutter-application-security-engineeringSkill
- flutter-app-links-deep-link-engineeringSkill
- flutter-cachingSkill
- flutter-concurrency-memory-performanceSkill
- flutter-confetti-engineeringSkill
- flutter-dart-package-engineeringSkill
- flutter-design-system-from-design-mdSkill
- flutter-dio-cache-interceptor-engineeringSkill
- flutter-dio-engineeringSkill
- flutter-doc-scannerSkill
- flutter-drift-persistence-engineeringSkill
- flutter-expert-tipsSkill
- flutter-firebase-analyticsSkill
- flutter-firebase-core-engineeringSkill
- flutter-firebase-messagingSkill
- flutter-get-it-injectable-dependency-injectionSkill
- flutter-go-router-engineeringSkill
- flutter-hive-persistence-engineeringSkill
- flutter-image-performanceSkill
- flutter-image-picker-production-engineeringSkill
- flutter-lints-static-analysis-engineeringSkill
- flutter-local-notifications-production-engineeringSkill
- flutter-memory-leak-engineeringSkill
- flutter-mobile-developmentSkill
- flutter-motion-engineeringSkill
- flutter-multi-environmentSkill
- flutter-native-splash-engineeringSkill
- flutter-package-plugin-selectionSkill
- flutter-performance-jank-optimizationSkill
- flutter-permission-handler-engineeringSkill
- flutter-pinputSkill
- flutter-production-build-releaseSkill
- flutter-production-engineeringSkill
- flutter-production-loggingSkill
- flutter-pro-image-editor-engineeringSkill
- flutter-secure-storage-security-engineeringSkill
- flutter-sentry-engineeringSkill
- flutter-share-plus-engineeringSkill
- flutter-skeletonizer-engineeringSkill
- flutter-squadron-concurrency-engineeringSkill
- flutter-supabase-engineeringSkill
- flutter-svg-engineeringSkill
- flutter-ui-performance-engineeringSkill
- flutter-url-launcher-engineeringSkill
- flutter-video-player-production-engineeringSkill
- flutter-webview-production-engineeringSkill
- freezed-production-engineeringSkill
- html-to-flutterSkill
- hydrated-blocSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
63 rules. About 0 are common, 47 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈47
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Treat path_provider as a directory-location resolver, not as a storage policy, filesystem, database, encryption layer, cache manager, …
- Distinctive: line 24
Read only what the task needs:
- Distinctive: line 70
Must users manage/see it directly?
- Distinctive: line 71
Must it survive restart/cache cleanup?
- Distinctive: line 72
Should it be backed up?
- Distinctive: line 74
Must another app access it?
- Distinctive: line 78
Must the same feature work across which platforms?
- Very specific: line 89
Do not start with getApplicationDocumentsDirectory() and justify it afterward.
- Distinctive: line 103
Treat as disposable at any time.
- Distinctive: line 105
Treat as evictable. If deletion breaks correctness or violates an offline promise, it is not cache data.
- Distinctive: line 109
Use when document/user-ownership semantics fit.
- Distinctive: line 111
Do not assume “global public Downloads.” Semantics differ materially by platform.
- Distinctive: line 133
use SAF for user-selected documents/save locations.
- Distinctive: line 134
use MediaStore for appropriate shared media.
- Very specific: line 135
do not use MANAGE_EXTERNAL_STORAGE as a convenience shortcut.
- Distinctive: line 137
Treat Documents, Application Support/Library, Caches, and disposable storage according to Apple lifecycle/backup semantics.
- Distinctive: line 138
Do not persist absolute container paths when a relative logical identifier can be resolved against the current container root.
- Very specific: line 141
Use resolved known-folder/XDG semantics.
- Distinctive: line 147
Do not confuse nullable with unsupported.
- Very specific: line 157
Never add ! because a directory happened to exist on one machine.
- Distinctive: line 164
Do not silently save into private Support and tell the user the file was saved to Downloads.
- Very specific: line 174
Never hardcode /, \\, /sdcard, /storage/emulated/0, /Users/..., C:\\Users\\..., or /home/....
- Very specific: line 175
Do not pass untrusted path segments directly to p.join.
- Distinctive: line 176
Prefer app-issued IDs, UUIDs, or hashes for internal file names.
- Distinctive: line 187
Do not store absolute application-container paths without a specific stable-path requirement.
- Very specific: line 191
Use Directory.create(recursive: true) for owned descendants.
- Distinctive: line 192
Do not repeatedly create the same hierarchy before every tiny operation if a scoped storage component can initialize its owned root once.
- Distinctive: line 195
Default to asynchronous filesystem APIs on UI-sensitive paths.
- Distinctive: line 204
Do not categorically ban sync I/O.
- Very specific: line 212
Prefer file-backed/streaming APIs.
- Very specific: line 226
Do not market this as universally crash-atomic.
- Distinctive: line 231
Do not always write:
- Very specific: line 239
Use exists() only when existence itself is part of the decision.
- Distinctive: line 242
Every managed cache needs:
- Distinctive: line 249
Do not rely solely on OS cleanup when product limits or privacy require deterministic removal.
- Very specific: line 250
Avoid full recursive cache scans on every startup.
- Very specific: line 251
Do not replace a mature repository cache package merely to standardize on path_provider.
- Distinctive: line 255
Prefer existing database-package conventions.
- Distinctive: line 256
Do not relocate an existing DB without an idempotent migration and rollback/recovery plan.
- Distinctive: line 257
Do not copy an open DB as arbitrary bytes unless the engine explicitly supports that backup procedure.
- Very specific: line 268
Do not put all three under one downloads/ policy.
- Distinctive: line 279
Avoid copying originals merely because another local path feels simpler.
- Distinctive: line 282
Treat external identifiers/filenames as untrusted.
- Distinctive: line 289
never use a simple string-prefix test as a security boundary.
- Distinctive: line 291
Never recursively delete a root derived from raw UI/network input.
- Distinctive: line 295
Do not store refresh tokens, encryption keys, recovery secrets, or equivalent credentials in ordinary files solely because they live under …
- Distinctive: line 296
Use keystore/keychain-backed secure storage or an encrypted design with independently protected keys according to the threat model.
- Distinctive: line 302
create only when needed;
- Distinctive: line 304
delete after processing when policy requires it.
- Distinctive: line 307
do not depend on eventual OS cleanup for a privacy requirement.
- Distinctive: line 322
Do not delete user-owned exports during cache cleanup.
- Distinctive: line 323
Do not implement logout as deletion of the whole Support root unless every file genuinely belongs to that account.
- Distinctive: line 343
Never delete critical old data first.
- Distinctive: line 347
If the product needs reinstall-independent identity/data, design it using server/account state, platform backup semantics, or user-owned …
- Very specific: line 371
Do not swallow persistent-storage failures with catch (_) {}.
- Distinctive: line 382
Use clear ownership/serialization.
- Distinctive: line 383
Do not assume file-lock behavior is identical across POSIX and Windows.
- Distinctive: line 387
Consider SQLite/object stores, indexed cache metadata, grouped files, or another structured storage system when access patterns require it.
- Distinctive: line 390
Avoid before first frame unless necessary:
- Very specific: line 399
Do not call path-provider APIs from widget build(), animation callbacks, or tight loops.
- Distinctive: line 410
Keep filesystem paths out of UI/business state unless users are explicitly managing files.
- Distinctive: line 434
Use integration tests for actual DB persistence, Downloads semantics, Android external storage, sandbox/entitlement behavior, …
- Distinctive: line 458
every shipped platform's capability/semantics are considered.
≈ “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.
Files
Flutter path_provider Production Storage Engineering
Treat path_provider as a directory-location resolver, not as a storage policy, filesystem, database, encryption layer, cache manager, sharing API, or durability guarantee.
Choose storage from data semantics first:
lifecycle
+ recoverability
+ ownership
+ user visibility
+ backup policy
+ sensitivity
+ size
+ platform support
→ directory category
→ I/O strategy
→ cleanup/migration/security policyReference routing
Read only what the task needs:
| Need | Reference |
| Directory semantics, support matrix, Android/iOS/macOS/Windows/Linux mappings | references/01-storage-semantics-platforms.md |
| Portable paths, directory creation, async/stream I/O, reliable writes, cache, DBs, downloads, media | references/02-portable-paths-io-cache.md |
| Path traversal, symlinks, secrets, privacy, cleanup, multi-account, updates, migrations, sharing, errors, concurrency | references/03-security-privacy-lifecycle-migrations.md |
| Startup/performance, architecture, state management, tests, failure tests, desktop/mobile UX | references/04-performance-architecture-testing.md |
| Anti-patterns, review checklists, implementation workflow, completion and source-reconciliation notes | references/05-antipatterns-checklists-workflow.md |
1. Inspect before changing storage
Before editing, inspect:
pubspec.yamlandpubspec.lock;- Flutter/Dart SDK constraints;
- resolved
path_providerand federated implementation versions; - target platforms/minimum OS versions;
- Android storage permissions and Gradle/manifest setup;
- Apple entitlements and document/file-sharing settings;
- desktop sandbox/packaging;
- existing database, cache, secure-storage, download/export, migration, logout, and account-cleanup code;
- tests and CI. Search for:
getTemporaryDirectory
getApplicationSupportDirectory
getApplicationDocumentsDirectory
getApplicationCacheDirectory
getLibraryDirectory
getDownloadsDirectory
getExternalStorageDirectory
getExternalCacheDirectories
getExternalStorageDirectories
Directory.systemTemp
readAsBytes / readAsString / writeAsBytes / writeAsString
*Sync
listSync
recursive:
/storage/ /sdcard/ /Users/ C:\Users\ /home/Flag hardcoded roots, separator concatenation, databases in temp/cache, persistent files in cache, caches in Documents, absolute sandbox paths persisted in DBs, broad Android storage permissions, unsafe filenames, unbounded logs/caches, recursive startup scans, and duplicate storage abstractions.
2. Classify the data before choosing a directory
For every file category answer:
- Is it reconstructible?
- Can the OS safely delete it?
- Is it user-generated or user-owned?
- Must users manage/see it directly?
- Must it survive restart/cache cleanup?
- Should it be backed up?
- Is it sensitive or secret?
- Must another app access it?
- Is it an explicit export?
- Is it temporary processing output?
- How large can it become?
- Must the same feature work across which platforms? Then classify:
lifecycle: ephemeral | cache | persistent | user-owned
recoverability: reproducible | partial | irreplaceable
visibility: app-private | user-visible | shareable
backup: desired | undesired | platform-dependent
sensitivity: public | private | sensitive | secret
size: tiny | moderate | largeDo not start with getApplicationDocumentsDirectory() and justify it afterward.
3. Use semantic directory selection
Default decision model:
| Data semantics | Prefer |
| Disposable staging/intermediate work | Temporary |
| Reconstructible/redownloadable derived data | Application Cache |
| Persistent app-owned internal implementation data | Application Support |
| User-generated/non-recreatable document data | Documents or user-selected save location |
| Explicit user export/download | Platform-appropriate user-selected/shared flow; review Downloads semantics |
| Large Android app-owned data where external capacity is useful | Android app-specific external storage, if disappearance is tolerated |
| Secrets/credentials/keys | Secure-storage/key-management solution, not ordinary path_provider files |
Temporary
Treat as disposable at any time. Never store a primary DB, durable offline state, or irreplaceable user content there.
Cache
Treat as evictable. If deletion breaks correctness or violates an offline promise, it is not cache data.
Application Support
Strong default for persistent app-owned internal data such as DBs, config, metadata, and durable internal state when existing libraries do not already define a correct location.
Documents
Use when document/user-ownership semantics fit. Do not use it as a universal persistent root.
Downloads
Do not assume “global public Downloads.” Semantics differ materially by platform. Handle null/unavailable resolution and use native Save As/document flows when users are choosing an owned destination.
4. Respect platform differences
Android
Current source baseline maps:
Temporary / Cache → internal cacheDir
Support → filesDir
Documents → private getDir("flutter", MODE_PRIVATE)
Downloads → app-specific external Downloads
External Storage → getExternalFilesDir(null)
External Cache → externalCacheDirs
Typed External Storage → getExternalFilesDirs(type)Depend on categories, not literal mappings. Rules:
- “external” does not mean SD card;
- app-specific external storage is not arbitrary shared storage;
- broad storage permission is generally unnecessary for app-private/app-specific directories;
- removable/external storage may disappear;
- scoped storage still governs shared files;
- use SAF for user-selected documents/save locations;
- use MediaStore for appropriate shared media;
- do not use
MANAGE_EXTERNAL_STORAGEas a convenience shortcut.
iOS/macOS
Treat Documents, Application Support/Library, Caches, and disposable storage according to Apple lifecycle/backup semantics. Do not persist absolute container paths when a relative logical identifier can be resolved against the current container root. For macOS user-owned Save/Open flows, respect sandbox and user-selected access semantics.
Windows/Linux
Use resolved known-folder/XDG semantics; never manufacture user paths. Desktop cache/uninstall/backup behavior is not identical to mobile. Define application cleanup explicitly where correctness depends on it.
Web
path_provider and ordinary dart:io filesystem workflows are not supported. Isolate filesystem implementation behind platform boundaries for apps that also target Web.
5. Handle nullable and unsupported directories explicitly
Do not confuse nullable with unsupported. Potential results include:
Directory
null
UnsupportedError
MissingPlatformDirectoryException
FileSystemException later during useNever add ! because a directory happened to exist on one machine.
Feature behavior must remain semantically honest:
Downloads unavailable
→ disable direct-download action or offer Save AsDo not silently save into private Support and tell the user the file was saved to Downloads.
6. Build paths portably
Use package:path:
final file = File(
p.join(root.path, 'accounts', accountId, 'media', '$id.jpg'),
);Never hardcode /, \\, /sdcard, /storage/emulated/0, /Users/..., C:\\Users\\..., or /home/....
Do not pass untrusted path segments directly to p.join. An absolute later segment can replace earlier components.
Prefer app-issued IDs, UUIDs, or hashes for internal file names. Keep display names separate.
7. Prefer relative logical persistence over absolute sandbox paths
Persist:
accountId = acc_72
relativeAsset = media/originals/a8f2.jpgThen resolve against the current Support/Documents root. This improves Apple update resilience, migrations, tests, and portability. Do not store absolute application-container paths without a specific stable-path requirement.
8. Create only owned child directories
path_provider may create some category roots, but application child directories are your responsibility.
Use Directory.create(recursive: true) for owned descendants.
Do not repeatedly create the same hierarchy before every tiny operation if a scoped storage component can initialize its owned root once.
9. Choose I/O from data size and semantics
Default to asynchronous filesystem APIs on UI-sensitive paths.
| Need | Prefer |
| Entire modest file needed | readAsBytes() / readAsString() async |
| Large upload/hash/parser | File.openRead() |
| Streaming generated output | File.openWrite() |
| File-to-file copy | File.copy() |
| Database consistency | DB engine transaction/WAL/backup mechanisms |
| Huge tree traversal | async Directory.list(); ideally metadata/index instead of rescans |
| Do not categorically ban sync I/O; ban unjustified sync I/O on latency-sensitive isolates. |
10. Never materialize huge files without need
Reject:
500 MB video → readAsBytes() → second byte copy → write/uploadPrefer file-backed/streaming APIs.
For a plain copy, use File.copy() instead of readAsBytes() followed by writeAsBytes().
Separate I/O from CPU-heavy compression/encryption/parsing. Async I/O itself does not require an isolate; move CPU work only when profiling shows UI-isolate contention.
11. Treat persistent writes as a reliability design
For important single-file state, a staging sibling + replace pattern can reduce corruption risk:
create parent
→ write sibling temp on same filesystem
→ optional justified flush
→ rename/replace target
→ clean temp on failureDo not market this as universally crash-atomic; filesystem semantics vary.
For databases, use the database engine's durability model rather than hand-rolling file replacement.
flush: true is not a universal hardware-power-loss durability guarantee. Use it only when the latency/I/O cost is justified.
12. Avoid TOCTOU-style existence checks by default
Do not always write:
if (await file.exists()) {
return file.readAsBytes();
}when the operation itself can report the real failure and the file can disappear between check and use.
Use exists() only when existence itself is part of the decision. Otherwise handle PathNotFoundException/FileSystemException at the operation boundary.
13. Design cache as a subsystem
Every managed cache needs:
- owner;
- invalidation rule;
- TTL or freshness rule;
- size/count bound when growth matters;
- corruption recovery;
- logout/account-removal policy.
Do not rely solely on OS cleanup when product limits or privacy require deterministic removal.
Avoid full recursive cache scans on every startup. For large caches, maintain metadata/indexes or use an existing proven cache manager.
Do not replace a mature repository cache package merely to standardize on
path_provider.
14. Keep databases out of temp/cache
Primary DBs are durable data. Prefer existing database-package conventions; otherwise Application Support is usually the clearest internal persistent category. Do not relocate an existing DB without an idempotent migration and rollback/recovery plan. Do not copy an open DB as arbitrary bytes unless the engine explicitly supports that backup procedure.
15. Separate downloaded-content semantics
“Downloaded” describes origin, not lifecycle. Classify as:
redownloadable/reconstructible asset → Cache
promised offline app-owned content → persistent app-owned storage
user-owned export/download → user-selected/shared destinationDo not put all three under one downloads/ policy.
16. Treat media by ownership and derivative status
Typical mapping:
thumbnail / rebuildable resize → Cache
transcode intermediate → Temporary
required app-owned offline original → persistent storage
user export → user-selected/shared destinationAvoid copying originals merely because another local path feels simpler.
17. Defend path boundaries
Treat external identifiers/filenames as untrusted. Best design: never accept arbitrary filesystem paths for internal storage. Convert external identifiers into controlled names. For user-controlled relative paths when genuinely required:
- reject absolute paths;
- normalize;
- verify containment;
- account for symlinks if the threat model includes attacker-controlled filesystem contents;
- never use a simple string-prefix test as a security boundary. Deletion requires stricter validation than reading. Never recursively delete a root derived from raw UI/network input.
18. path_provider is not secure storage
App-private filesystem access is not encryption. Do not store refresh tokens, encryption keys, recovery secrets, or equivalent credentials in ordinary files solely because they live under Support/Documents. Use keystore/keychain-backed secure storage or an encrypted design with independently protected keys according to the threat model. Review backup exposure for sensitive persistent data.
19. Treat cache/temp privacy seriously
Disposable locations can still contain sensitive plaintext. For sensitive ephemeral files:
- create only when needed;
- minimize retention;
- delete after processing when policy requires it;
- purge account-scoped sensitive cache on logout/account removal where required;
- avoid private filenames;
- do not depend on eventual OS cleanup for a privacy requirement.
20. Define cleanup ownership before writing files
For each category record:
owner
expiration
max bytes/count
replacement policy
delete trigger
logout policy
account-removal policy
user-export exemptionDo not delete user-owned exports during cache cleanup. Do not implement logout as deletion of the whole Support root unless every file genuinely belongs to that account. Separate global and account-scoped storage with stable internal account IDs.
21. Treat upgrades as migrations
App updates generally preserve persistent data. Expect old schemas, old directory layouts, orphaned files, stale absolute paths, and partial migrations. A robust migration is:
detect old
→ detect already-completed new state
→ create target
→ stage copy/move
→ verify
→ make new state authoritative
→ persist migration marker/version
→ delete old only after success
→ resume safely after interruptionRemember that rename() can fail across filesystems; copy + verify + delete may be required.
Never delete critical old data first.
22. Never assume reinstall survival
App-private storage is not a portable reinstall contract. If the product needs reinstall-independent identity/data, design it using server/account state, platform backup semantics, or user-owned storage as appropriate.
23. Sharing is not a path problem
A filesystem path does not grant another app access. Use platform-native mechanisms:
- Android content URI/FileProvider-style sharing, SAF, MediaStore;
- Apple share/document/save flows and macOS sandbox-aware user selection;
- desktop Save As/Open UX for user-owned files.
path_providerdiscovers roots; it is not a sharing or Save As API.
24. Handle filesystem failure as normal production reality
Expect:
missing path
access denied/read-only
no space
external storage disappearance
collision
corruption
rename/copy/delete failure
unsupported directory
nullable location unavailableDo not swallow persistent-storage failures with catch (_) {}.
Translate errors at the appropriate application boundary while retaining privacy-safe diagnostics.
On disk-full/write failure, preserve the previous valid durable artifact where possible. Do not unconditionally delete all caches or retry forever.
25. Coordinate concurrent access
path_provider provides no locking.
Prevent races between:
- multiple writers;
- migrations and normal opens;
- cleanup and producers;
- replacement and readers. Use clear ownership/serialization. For complex mutable state, prefer a transactional database instead of ad hoc shared files. Do not assume file-lock behavior is identical across POSIX and Windows.
26. Do not turn the filesystem into a database accidentally
Thousands/millions of tiny mutable JSON files can create metadata I/O, listings, migration, cleanup, and transaction problems. Consider SQLite/object stores, indexed cache metadata, grouped files, or another structured storage system when access patterns require it.
27. Protect startup and frame latency
Avoid before first frame unless necessary:
- recursive storage scans;
- full cache-size calculation;
- huge JSON decoding;
- giant migrations;
- resolving every directory eagerly;
- cleanup of large trees;
- opening unused files.
Resolve stable roots lazily or once per scoped storage service.
Do not call path-provider APIs from widget
build(), animation callbacks, or tight loops. Directory lookup is rarely the dominant cost compared with file I/O, decoding, compression, encryption, DB work, and traversal. Measure the complete pipeline.
28. Keep architecture proportional
A small semantic AppDirectories abstraction is useful when it centralizes real policy, testing, account segregation, migration, or platform gating.
Do not build:
PathRepository → PathUseCase → PathService → DirectoryManagerjust to wrap three Future-returning directory calls. Keep filesystem paths out of UI/business state unless users are explicitly managing files. Model product state such as:
offline available
download failed
export saved
location unavailablerather than raw Directory objects.
29. Test application storage policy with controlled roots
Unit-test using temporary test-owned directories, not real app Support/Documents directories. Test:
- directory-selection policy;
- path construction;
- path traversal rejection;
- cleanup/eviction;
- migration interruption/resume;
- missing/corrupt files;
- unavailable optional locations;
- account segregation;
- error translation.
At adapter level, fake
PathProviderPlatform.instancewhen testing plugin-wrapper behavior. Use integration tests for actual DB persistence, Downloads semantics, Android external storage, sandbox/entitlement behavior, exports/sharing, and real-version migrations.
30. Review gates
Reject or escalate code that:
- stores a primary DB in Temporary/Cache;
- treats Cache as durable;
- uses Documents for every persistent file;
- hardcodes OS roots;
- concatenates path separators manually;
- assumes Android external storage is SD/public shared storage;
- requests broad Android storage permission for app-private/app-specific files;
- assumes Downloads always exists or means the same thing everywhere;
- performs huge
readAsBytes()or recursivelistSync()on UI/startup paths; - uses user input directly as a path/deletion root;
- stores secrets as ordinary files without threat-model review;
- persists absolute sandbox paths without necessity;
- leaves caches/logs unbounded;
- assumes upgrades/reinstalls clean or preserve data automatically;
- creates a parallel storage architecture without need.
Production definition of done
Approve the storage change only when:
- data lifecycle/category is explicit;
- installed package/platform versions are verified;
- every shipped platform's capability/semantics are considered;
- temp/cache loss cannot break correctness;
- persistent/irreplaceable data is in durable semantics;
- user-owned exports have user-owned/save semantics;
- backup/privacy policy is known;
- secrets use appropriate protection;
- Android permissions are minimal and scoped-storage rules respected;
- paths are portable and traversal-safe;
- nullable/unsupported locations are handled;
- large files avoid unnecessary memory copies;
- UI-critical sync I/O and huge scans are absent;
- cache/log growth is bounded where needed;
- cleanup ownership is explicit;
- disk-full and I/O errors are recoverable/actionable;
- account/logout behavior is intentional;
- migrations are resumable and non-destructive;
- reinstall survival is not assumed;
- concurrent writers are coordinated;
- automated tests pass;
- platform integration tests cover semantics that depend on the OS.
Final engineering rule
Never ask only:
“Which
path_providerfunction gives me a path?” Ask: “What lifecycle, recoverability, ownership, visibility, backup, sensitivity, size, sharing, and migration semantics does this data require?” Then usepath_providerto resolve the platform-appropriate root and design I/O, cleanup, security, migration, and failure handling around those semantics.
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
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.

