Token导航 LogoToken导航

Agent Skill · 研究检索

flet-storage(车队存储)

flet-storage 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

flet-storage 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 59,579。

总安装 384周安装 16GitHub Stars 9下载 128核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:flet-storage(车队存储)
来源仓库:https://github.com/bogdanovycha/flet-storage
仓库路径:skills/flet-storage
安装命令:
npx skills add https://github.com/bogdanovycha/flet-storage --skill flet-storage
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bogdanovycha/flet-storage --skill flet-storage

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

flet-storage 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于关键词搜索、任务场景匹配或来源线索筛选等研究检索场景。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

安装前需确认权限范围、维护状态及是否触发联网或文件读写操作。建议结合原始 README 核验具体用法和功能边界。

来源仓库内路径:skills/flet-storage

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bogdanovycha/flet-storage --skill flet-storage;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

flet-storage 怎么安装?

在终端执行 npx skills add https://github.com/bogdanovycha/flet-storage --skill flet-storage。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

flet-storage 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

flet-storage 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

flet-storage 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

flet-storage 用的人多吗?

公开数据是累计安装 384 次,近一周安装 16 次,下载 128 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

flet-storage 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
flet-storage

车队存储 · 本页

3849操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Flet Storage Skill

This skill provides context, examples, and best practices for integrating and working with the flet-storage package in Python Flet applications.

What is flet-storage?

flet-storage is an asynchronous Python library built on top of Flet's SharedPreferences. It simplifies data persistence by providing:

  • Automatic JSON Serialization: Transparently handles Python data types like dict, list, set, str, int, float, bool, and None. Sets are automatically preserved during serialization and deserialization.
  • Namespaced Storage: Automatically prefixes keys with an app_name to prevent data collisions between different Flet applications on the same device or web domain.
  • Asynchronous API: Offers non-blocking data operations for modern async Flet apps.
  • Robust API methods: Includes get_or_default(), contains_key(), and safe parallelized clear() operations.

When to Use This Skill

Activate this skill when the user:

  • Asks how to save user preferences, session tokens, or local cache in a Flet app.
  • Mentions flet-storage or SharedPreferences in Flet.
  • Encounters issues with JSON serialization when storing data in Flet, especially with Python sets.
  • Needs to persist data between app sessions.
  • Asks about storing configuration, UI state, or small datasets locally.

Language Policy

CRITICAL: When using this skill, ALWAYS communicate with the user in their preferred language (the language they used to ask the question). If the user asks in Ukrainian, respond in Ukrainian. If they ask in English, respond in English, and so on.

How to Guide the User

1. Installation

If the user hasn't installed it, suggest installing the package via pip:

pip install flet-storage

2. Basic Setup and Usage Example

Provide this typical usage pattern when users ask how to initialize and use the library:

import flet as ft
from flet_storage import FletStorage

async def main(page: ft.Page):
    # Initialize storage with an app namespace to avoid key collisions
    storage = FletStorage(app_name="my_awesome_app")

    # Writing data (automatically serializes dicts, lists, sets, etc.)
    await storage.set("user_settings", {"theme": "dark", "notifications": True})
    await storage.set("login_attempts", 3)

    # Working with Python sets (automatically preserved!)
    await storage.set("favorite_tags", {"python", "flet", "async"})
    tags = await storage.get("favorite_tags")  # Returns a set, not a list

    # Reading data
    settings = await storage.get("user_settings")  # Returns a standard Python dict
    attempts = await storage.get_or_default("login_attempts", 0)

    # Checking for keys
    if await storage.contains_key("user_settings"):
        print("Settings found!")

    # Deleting a specific key
    await storage.remove("login_attempts")

    # Clearing all data associated with THIS app_name namespace
    await storage.clear()

    page.add(ft.Text(f"Settings loaded: {settings}"))
    page.add(ft.Text(f"Tags loaded (type: {type(tags).__name__}): {tags}"))

ft.run(main)

3. Key Methods to Remember

  • await storage.set(key: str, value: Any): Serializes and saves a value. Supports set directly.
  • await storage.get(key: str): Retrieves and deserializes a value. Reconstructs set objects automatically. Raises KeyError if the key does not exist.
  • await storage.get_or_default(key: str, default: Any): Retrieves a value or returns the provided default if the key is missing.
  • await storage.contains_key(key: str): Returns True if the key exists, otherwise False.
  • await storage.remove(key: str): Deletes the specific key from storage.
  • await storage.get_keys(): Retrieves a list of all keys belonging to the current application namespace.
  • await storage.clear(): Clears all stored data that belongs to the initialized app_name namespace.

4. Storage Limitations

Important to know when designing your app:

  • Web (localStorage): ~5-10MB typical limit
  • Desktop/Mobile: More generous, but still intended for configuration and small datasets
  • Use case: Perfect for user preferences, auth tokens, small lists, UI state, cached data
  • Not suitable for: Large datasets (>1-5MB), media files, database-like operations

For large datasets or complex queries, recommend using SQLite (sqlite3 module) or backend APIs instead.

5. Error Handling

Guide users on proper exception handling:

# Handling missing keys
try:
    user_data = await storage.get("user")
except KeyError:
    print("User data not found, using defaults")
    user_data = {"name": "Guest"}

# Handling corrupted JSON data
try:
    settings = await storage.get("settings")
except ValueError as e:
    print(f"Corrupted data: {e}")
    await storage.remove("settings")  # Clean up bad data

# Safe pattern using get_or_default (recommended)
user_data = await storage.get_or_default("user", {"name": "Guest"})

6. Working with Sets (Advanced Example)

async def manage_tags(storage: FletStorage):
    # Initialize with empty set if not exists
    tags = await storage.get_or_default("tags", set())

    # Add tags
    tags.add("python")
    tags.add("flet")
    await storage.set("tags", tags)

    # Remove tag
    tags.discard("python")
    await storage.set("tags", tags)

    # Check membership
    if "flet" in tags:
        print("Flet tag exists!")

    return tags

Important: Sets are stored internally as {"__type__": "set", "values": [...]}. If you store a dict with key "__type__" equal to "set", it may be misinterpreted during deserialization.

7. Data Caching Pattern

Show users how to implement time-based cache expiration:

import time

async def cache_data(storage: FletStorage, key: str, data: Any, ttl: int = 3600):
    """Cache data with time-to-live in seconds."""
    cache_entry = {
        "data": data,
        "expires_at": time.time() + ttl
    }
    await storage.set(f"cache_{key}", cache_entry)

async def get_cached_data(storage: FletStorage, key: str) -> Any | None:
    """Retrieve cached data if not expired."""
    try:
        cache_entry = await storage.get(f"cache_{key}")
        if time.time() < cache_entry["expires_at"]:
            return cache_entry["data"]
        else:
            await storage.remove(f"cache_{key}")
            return None
    except KeyError:
        return None

8. Cross-Platform Compatibility

flet-storage works across all Flet platforms:

  • ✅ Web: Uses browser localStorage
  • ✅ Windows/macOS/Linux: Uses platform-specific preferences storage
  • ✅ Android/iOS: Uses native storage APIs

Tested platforms:

  • Android (production apps)
  • Web applications
  • Linux (compiled binaries)
  • Windows (development environment)

Note: iOS/macOS community testing welcome - underlying Flet implementation should work seamlessly.

Best Practices and Caveats

  1. Always Use Namespaces: Strongly recommend initializing FletStorage with a unique app_name. Web browsers and some desktop environments share local storage per domain/user, and omitting a namespace can lead to apps overwriting each other's data.
  2. Always Use ft.run() to Launch the App: Modern Flet uses ft.run(main) — never ft.app(target=main), which is deprecated. All generated code examples must use ft.run().
  3. Async Environment: Remind the user that flet-storage functions are async. They must be awaited, and the Flet main function (or event handlers using it) must be asynchronous (async def).
  4. Security: Stored data (where flet-storage saves information) is not encrypted. Warn the user against storing sensitive data like clear-text passwords or high-privilege API keys unless they manually encrypt it first.
  5. Use get_or_default() for Optional Data: Instead of try-except blocks, prefer get_or_default() for cleaner code when dealing with optional configuration.
  6. Regular Cleanup: For apps with temporary data (caches, session data), implement periodic cleanup to prevent storage bloat:
   # Example: Clean up old cached data
   async def cleanup_old_cache(storage: FletStorage):
       keys = await storage.get_keys()
       for key in keys:
           if key.startswith("cache_"):
               await storage.remove(key)
  1. Structure Your Data: Store related data together in dictionaries for better organization and fewer storage operations.
  2. Use Sets for Unique Collections: Sets are automatically preserved and are perfect for storing unique items like tags, favorites, or categories.

Common Pitfalls to Avoid

  1. Forgetting to await:
   # ❌ Wrong - missing await
   storage.set("key", "value")

   # ✅ Correct
   await storage.set("key", "value")
  1. Not using async function:
   # ❌ Wrong - sync function
   def save_data(storage):
       await storage.set("key", "value")  # SyntaxError!

   # ✅ Correct
   async def save_data(storage):
       await storage.set("key", "value")
  1. Storing too much data:
   # ❌ Bad - large dataset in storage
   await storage.set("all_users", huge_list_of_10000_users)

   # ✅ Better - use backend/database for large data
   await storage.set("cached_recent_users", recent_10_users)
  1. Not handling exceptions:
   # ❌ Risky - will crash if key missing
   user = await storage.get("user")

   # ✅ Safe - using get_or_default
   user = await storage.get_or_default("user", {"name": "Guest"})

   # ✅ Also safe - explicit error handling
   try:
       user = await storage.get("user")
   except KeyError:
       user = {"name": "Guest"}
  1. Using deprecated ft.app() to launch the app:
   # ❌ Wrong - ft.app() is deprecated and should never be used
   ft.app(target=main)

   # ✅ Correct - always use ft.run() in modern Flet
   ft.run(main)

Data Migration Pattern

When updating app structure, show how to safely migrate data:

async def migrate_storage(storage: FletStorage):
    """Migrate storage schema from v1 to v2."""
    version = await storage.get_or_default("schema_version", 1)

    if version == 1:
        # Migrate from v1 to v2
        old_settings = await storage.get_or_default("settings", {})
        new_settings = {
            "ui": {
                "theme": old_settings.get("theme", "light"),
                "language": old_settings.get("language", "en")
            },
            "notifications": old_settings.get("notifications", True),
            "version": 2
        }
        await storage.set("settings", new_settings)
        await storage.set("schema_version", 2)
        print("Migrated to schema v2")

Additional Resources

Important Notes

  • Requires Python >= 3.10.
  • Requires Flet >= 0.80.0.
  • MUST run scripts/check_update.py before providing assistance to ensure version alignment.

License

MIT License

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

平台分布

Codex

34.3%
按下载量换算44

Claude

29.3%
按下载量换算38

Cursor

21.39%
按下载量换算27

Gemini CLI

9.79%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills