Flox Environments
affaan-m/ECC
Create reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager.
Wavelet 项目专用:当新增或修改业务缓存(RAM/Redis/DB 三层读路径)、缓存失效、多节点 pub/sub 同步、或评估高频读是否应接入缓存时必须使用。本技能说明系统标准缓存框架、参考实现、禁止写法与分布式一致性要求。
$ npx skills add Rain-kl/OpenFlare --skill cache-framework -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Rain-kl/OpenFlare cache-framework --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Rain-kl/OpenFlare.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cache-framework .claude/skills/cache-framework && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cache-framework" agent skill from https://github.com/Rain-kl/OpenFlare/tree/main/.agents/skills/cache-framework into .claude/skills/cache-framework/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-framework", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Rain-kl/OpenFlare/tree/main/.agents/skills/cache-frameworkType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Rain-kl/OpenFlare --skill cache-framework -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Rain-kl/OpenFlare cache-framework --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Rain-kl/OpenFlare.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/cache-framework .agents/skills/cache-framework && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cache-framework" agent skill from https://github.com/Rain-kl/OpenFlare/tree/main/.agents/skills/cache-framework into .agents/skills/cache-framework/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-framework", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Rain-kl/OpenFlare --skill cache-framework -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Rain-kl/OpenFlare cache-framework --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Rain-kl/OpenFlare.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/cache-framework .cursor/skills/cache-framework && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cache-framework" agent skill from https://github.com/Rain-kl/OpenFlare/tree/main/.agents/skills/cache-framework into .cursor/skills/cache-framework/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-framework", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Rain-kl/OpenFlare.git --path .agents/skills/cache-framework--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Rain-kl/OpenFlare --skill cache-framework -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Rain-kl/OpenFlare cache-framework --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Rain-kl/OpenFlare.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/cache-framework .gemini/skills/cache-framework && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cache-framework" agent skill from https://github.com/Rain-kl/OpenFlare/tree/main/.agents/skills/cache-framework into .gemini/skills/cache-framework/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-framework", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Rain-kl/OpenFlare cache-frameworkInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Rain-kl/OpenFlare --skill cache-framework -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Rain-kl/OpenFlare.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/cache-framework .github/skills/cache-framework && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cache-framework" agent skill from https://github.com/Rain-kl/OpenFlare/tree/main/.agents/skills/cache-framework into .github/skills/cache-framework/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-framework", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Rain-kl/OpenFlare --skill cache-framework -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Rain-kl/OpenFlare cache-framework --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Rain-kl/OpenFlare.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/cache-framework .opencode/skills/cache-framework && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cache-framework" agent skill from https://github.com/Rain-kl/OpenFlare/tree/main/.agents/skills/cache-framework into .opencode/skills/cache-framework/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-framework", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cache-frameworkWavelet 项目专用:当新增或修改业务缓存(RAM/Redis/DB 三层读路径)、缓存失效、多节点 pub/sub 同步、或评估高频读是否应接入缓存时必须使用。本技能说明系统标准缓存框架、参考实现、禁止写法与分布式一致性要求。
Cache Framework is an agent skill from Rain-kl/OpenFlare. Wavelet 项目专用:当新增或修改业务缓存(RAM/Redis/DB 三层读路径)、缓存失效、多节点 pub/sub 同步、或评估高频读是否应接入缓存时必须使用。本技能说明系统标准缓存框架、参考实现、禁止写法与分布式一致性要求。
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Databases, covering Event-driven systems. It works with Redis and Cloudflare. The repository describes itself as: OpenFlare is an open-source CDN orchestration and edge security platform. It supports reverse proxy, centralized configuration synchronization, in-network tunneling (Tunnels)… The licence is Apache-2.0.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 7c2304d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gomakeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cache Framework loads about 1.7k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 346 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Rain-kl/OpenFlare at commit 7c2304d, republished under its Apache-2.0 licence (© Rain-kl). 346 words, ~1,726 tokens.
.claude/skills/cache-framework/SKILL.md (or your agent's skills folder).开始前阅读根目录 AGENTS.md(含 Skill 关联索引)。Wavelet 标准读路径为 本地 RAM → Redis → PostgreSQL(由快到慢),不是 DB 优先。
详细性能背景见 docs/PERFORMANCE.md。
| 关联 | 何时一并阅读 |
|---|---|
| database-migration | 缓存对象对应新表/列/索引,或 seed 变更 |
| new-setting | 系统配置类缓存(GetSystemConfigByKey、ListSystemConfigsByKeys) |
| file-upload | 上传元数据 upload:meta:{id}、ingest/remove/cleanup 失效钩子 |
| clickhouse-batchwriter | 分析写入走 batchwriter,不要用本技能模式缓存 CH flush 队列 |
| new-api | 在 Handler 层接入 GetXxxCached 或评估高频读 |
| new-async-task | Worker/定时任务变更数据后必须 Invalidate*(如 system:cleanup) |
参考:internal/repository/system_config_cache.go + GetSystemConfigByKey / ListSystemConfigsByKeys。
| 层级 | 技术 | 职责 |
|---|---|---|
| L1 本地 | pkg/cache/ram(Otter v2) | 进程内热数据,最低延迟 |
| L2 共享 | Redis db.GetJSON / SetJSON / HSetJSON + db.PrefixedKey | 跨节点共享,带 TTL 或写穿 |
| L3 权威 | PostgreSQL via db.DB(ctx) | 唯一数据源 |
func GetThingCached(ctx context.Context, key string) (Thing, error) {
ensureThingCacheListener() // 订阅 pub/sub,仅 sync.Once
if v, ok := thingRAM.GetIfPresent(key); ok {
return cloneThing(v), nil
}
if db.Redis != nil {
var v Thing
if err := db.GetJSON(ctx, redisKey(key), &v); err == nil {
thingRAM.Set(key, cloneThing(v))
return v, nil
}
}
v, err := loadThingFromDB(ctx, key)
if err != nil {
return Thing{}, err
}
populateThingCache(ctx, v) // 回写 RAM + Redis
return v, nil
}DB miss 或业务创建成功后,必须回写上层:
func populateThingCache(ctx context.Context, v Thing) {
thingRAM.Set(v.Key, cloneThing(v))
if db.Redis != nil {
_ = db.SetJSON(ctx, redisKey(v.Key), v, cacheTTL)
}
}数据变更(Admin 更新、软删除、状态迁移)时:
thingRAM.Invalidate(key) 或 InvalidateAll()Del / HDel 对应 keyfunc InvalidateThingCache(ctx context.Context, key string) error {
ensureThingCacheListener()
thingRAM.Invalidate(key)
if db.Redis != nil {
if err := db.Redis.Del(ctx, db.PrefixedKey(redisKey(key))).Err(); err != nil {
return err
}
publishThingRAMInvalidation(ctx, key) // 只广播 RAM 失效
}
return nil
}const thingInvalidationChannel = "domain:thing_invalidation"
func startThingCacheInvalidationListener() {
if db.Redis == nil {
return
}
go func() {
pubsub := db.Redis.Subscribe(context.Background(), thingInvalidationChannel)
defer func() { _ = pubsub.Close() }()
for msg := range pubsub.Channel() {
// 解析 payload,Invalidate RAM;勿重复 Del Redis
thingRAM.Invalidate(parsedKey)
}
}()
}sync.Once 启动监听;ensureListener 必须在 db.Redis == nil 时直接 return,不可消费 Once(否则测试或 Redis 晚初始化时监听器永不启动)。StopThingCacheListener + 重置 Once(参考 StopUploadMetaCacheListener、StopAuthSourceCacheListener)。| 域 | 文件 | L1 | L2 | pub/sub |
|---|---|---|---|---|
| 系统配置 | repository/system_config_cache.go | pkg/cache/store | ❌ 无 Redis 缓存 | system:config_broadcast (别名 system:config_invalidation) ✅ |
| CAPTCHA 运行时 | apps/cap/runtime_settings.go | atomic.Pointer | (借配置 Redis) | 订阅 system:config_invalidation ✅ |
| 上传元数据 | apps/upload/cache/meta_cache.go | Otter | Redis JSON | upload:meta_invalidation ✅ |
| 上传访问白名单 | apps/upload/cache/access_cache.go | 进程内 TTL | (借配置读路径) | upload:file_access_invalidation ✅ |
| Auth Source | repository/auth_source_cache.go | Otter | Redis JSON | oauth:auth_source_invalidation ✅ |
| OAuth 用户/Token | apps/oauth/cache.go | 自研 map | Redis JSON | ❌ 无 pub/sub(历史债) |
| 推送渠道 | repository/push_channel.go | 无 | Redis JSON | ❌ 仅 Redis Del |
| Storage 驱动 | internal/infra/objectstore/storage.go | RWMutex 快照 | — | storage:config_invalidation ✅ |
pkg/cache/ram.MustNew;禁止自研 map+mutex+TTL,除非有充分理由并文档说明。SetJSON;配置类多条目用 Redis Hash(HSetJSON)。upload:meta:{id});统一 db.PrefixedKey。Reset*RAMCacheForTest 仅清本机 RAMgo test 相关包 + make code-check。| 入口 | 动作 |
|---|---|
ingest.persistUploadRecord 创建成功 | SetUploadMetaCache |
ingest.Remove / RemoveOwned | InvalidateUploadMetaCache |
task/cleanup.go 软删除 pending 文件 | InvalidateUploadMetaCache |
直接 repository.SoftDeleteUpload | 禁止 — 必须走 upload.Remove |
// ❌ 自研 L1,与 pkg/cache/ram 重复
var mu sync.RWMutex
var items = map[uint64]entry{}
// ❌ 只清本机 RAM + Redis,无 pub/sub(多节点 RAM 脏读)
func Invalidate(ctx context.Context, id uint64) {
localDelete(id)
redis.Del(...)
}
// ❌ DB 变更后忘记 Worker 路径
// cleanup 任务删了 upload 行,但未 InvalidateUploadMetaCache
// ❌ 在 Handler 里直接查 DB,绕过已有 GetXxxCached
// ❌ Redis key 不用 PrefixedKey(多环境共 Redis 时冲突)
// ❌ 在 init() 里启动 pub/sub 监听 — 与 bootstrap 规范冲突;用 sync.Once 懒启动模型 json:"-" 时,Redis DTO 用独立 *RedisRecord struct 显式序列化字段(见 auth_source_cache.go)。
批量接口必须与单 key 一致走 Redis(ListSystemConfigsByKeys 在 RAM miss 后逐 key HGetJSON,再 DB IN)。
可用进程内快照 + 订阅上游 pub/sub(access_cache.go、cap/runtime_settings.go),不必强行 Redis L2。
沿用 oauth/cache.go;新增逻辑调用 SetCachedUser / SetCachedToken 预热,变更调用 InvalidateCachedUser / InvalidateCachedToken。
go test ./internal/repository/... ./internal/apps/upload/cache/...
make code-checkpkg/cache/ram(或已文档化的例外)ensureListener + pub/sub 清他机 RAMpkg/cache/ram/cache.gointernal/infra/persistence/redis.go(GetJSON, SetJSON, HGetJSON, PrefixedKey)internal/repository/system_config_cache.gointernal/apps/upload/cache/meta_cache.gointernal/repository/auth_source_cache.godocs/PERFORMANCE.md© Rain-kl, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/cache-framework of Rain-kl/OpenFlare.
Open the folder on GitHubat commit 7c2304d
Cache Framework next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cache Framework this skillRain-kl/OpenFlare | 288 | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Flox Environmentsaffaan-m/ECC | 275k | 2 repos | ~3.5k | Automated safety check: Notes | MIT | |
| Flox Environmentsaffaan-m/ECC | 275k | — | ~2.8k | Automated safety check: Pass | MIT | |
| Redis Patternsaffaan-m/ECC | 275k | — | ~2.7k | Automated safety check: Pass | MIT | |
| Infra AuditSethGammon/Citadel | 922 | — | ~2.1k | Automated safety check: Notes | MIT | |
| Use Sealoshashgraph-online/awesome-codex-plugins | 1.2k | — | ~2.2k | Automated safety check: Pass | Apache-2.0 |
affaan-m/ECC
Create reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager.
affaan-m/ECC
Floxで再現可能なクロスプラットフォーム開発環境を作成します — Nixに基づく宣言的な環境マネージャー。次の場合は必ずこのスキルを使用してください: システムレベルの依存関係(コンパイラー、データベース、openssl・libvips・BLAS・LAPACKなどのネイティブライブラリー)を持つプロジェクトを設定する場合…
affaan-m/ECC
Redisデータ構造パターン、キャッシング戦略、分散ロック、レート制限、Pub/Sub、本番アプリケーション用コネクション管理。
SethGammon/Citadel
Reads docker-compose, env files, ORM configs, and connection strings to map current infrastructure.
hashgraph-online/awesome-codex-plugins
Deploy and operate apps on Sealos Cloud: sign in to a Sealos account, deploy any project or self-hosted app (from the template store, an official Docker image, or project source code), provision…
rohitg00/awesome-claude-code-toolkit
Redis patterns including caching strategies, pub/sub, streams for event processing, Lua scripts, and data structures
Rain-kl/OpenFlare
Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, PHP, Python, Django, Go, C/.NET, Kotlin, Swift, NestJS, C/C++, and more.
Rain-kl/OpenFlare
在选择日志方案、配置 slog、编写结构化日志语句或决定日志级别时使用。也适用于设置生产日志、为日志添加请求作用域上下文或从 log 迁移到 slog 的场景,即使用户未明确提及日志。不涵盖错误处理策略(参见 go-error-handling)。
Rain-kl/OpenFlare
Wavelet 项目专用:当新增或修改自定义业务 API、新增业务路由、新增 service 层核心逻辑时必须使用。本技能指导包职责划分、推荐文件结构、路由解耦、Swagger 文档生成与质量门禁验证。
Rain-kl/OpenFlare
Wavelet 项目专用:当新增或修改 ClickHouse 批量写入、接入 internal/infra/persistence/batchwriter、将业务域异步 flush 到分析表、迁移 riskcontrol/节点访问日志/可观测时序写入、或评估 asyncinsert 与背压策略时必须使用。本技能指导分层职责、各域独立 Writer 实例、repository 批量 API…
Rain-kl/OpenFlare
Wavelet 项目专用:当新增或修改数据库表结构、索引、初始化数据、系统配置 seed、模板 seed、默认管理员、goose SQL 迁移、internal/infra/persistence/migrator、ClickHouse 分析库 DDL 或数据库升级流程时必须使用。本技能指导在 internal/infra/persistence/migrator/goose 下编写…
Rain-kl/OpenFlare
Wavelet 项目专用:当业务需要上传文件、读取已上传文件、在 Worker/任务中程序化摄取字节流、选择存储引擎能力、或排查 wuploads / 文件统计异常时必须使用。本技能指导 storage 与 upload 分层、upload.Ingest 策略选型、前后端接入与禁止旁路写表。
Works with
Categories
Wavelet 项目专用:当新增或修改业务缓存(RAM/Redis/DB 三层读路径)、缓存失效、多节点 pub/sub 同步、或评估高频读是否应接入缓存时必须使用。本技能说明系统标准缓存框架、参考实现、禁止写法与分布式一致性要求。. Cache Framework is an agent skill from Rain-kl/OpenFlare.
Cache Framework fits situations like: tasks that involve Event-driven systems.
Run `npx skills add Rain-kl/OpenFlare --skill cache-framework -a claude-code`. Or copy the skill folder (.agents/skills/cache-framework in Rain-kl/OpenFlare) into .claude/skills/cache-framework in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Rain-kl/OpenFlare --skill cache-framework -a codex`. Or copy the skill folder (.agents/skills/cache-framework in Rain-kl/OpenFlare) into .agents/skills/cache-framework in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Rain-kl/OpenFlare --skill cache-framework -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cache-framework, .gemini/skills/cache-framework, .github/skills/cache-framework and .opencode/skills/cache-framework in your project.
Going by SKILL.md and its folder, Cache Framework needs the command-line tools its instructions call (go and make).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cache Framework is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cache Framework: Flox Environments (affaan-m/ECC, 275k stars), Flox Environments (affaan-m/ECC, 275k stars), Redis Patterns (affaan-m/ECC, 275k stars) and Infra Audit (SethGammon/Citadel, 922 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Rain-kl (a GitHub user) maintains it in Rain-kl/OpenFlare, which has 288 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.
Source: Rain-kl/OpenFlare on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.