Agent skill

New Setting

by Rain-kl in Rain-kl/OpenFlare

Wavelet 项目专用:当新增或修改启动时设置、数据库系统设置、业务设置、公共可见配置、/admin/system 参数配置、/admin/settings 图形化设置界面,或前端公共配置消费逻辑时必须使用。本技能指导设置类型判定、SystemConfig 字段与 visibility、goose SQL 初始化/升级、热更新读取、公共配置暴露、shadcn 图形组件和验证流程。

Apache-2.0Auto-check passedDatabases

Install New Setting

skills CLI
$ npx skills add Rain-kl/OpenFlare --skill new-setting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Rain-kl/OpenFlare new-setting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Rain-kl/OpenFlare.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/new-setting .claude/skills/new-setting && rm -rf skills-src

Use ~/.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/

Facts

Skill name
new-setting
GitHub stars
288
Token cost
~1.7k tokens
SKILL.md length
453 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Wavelet 项目专用:当新增或修改启动时设置、数据库系统设置、业务设置、公共可见配置、/admin/system 参数配置、/admin/settings 图形化设置界面,或前端公共配置消费逻辑时必须使用。本技能指导设置类型判定、SystemConfig 字段与 visibility、goose SQL 初始化/升级、热更新读取、公共配置暴露、shadcn 图形组件和验证流程。

  • Works in 6 steps: 定义配置 key。 → 初始化默认配置。 → 读取配置。 → …
  • Tasks that involve Design systems
  • SKILL.md covers 先判定设置类型, 先定位真实链路, 新增数据库系统设置 and 新增启动时设置, plus 3 more sections
  • Calls make, pnpm and go

What it does

New Setting is an agent skill from Rain-kl/OpenFlare. Wavelet 项目专用:当新增或修改启动时设置、数据库系统设置、业务设置、公共可见配置、/admin/system 参数配置、/admin/settings 图形化设置界面,或前端公共配置消费逻辑时必须使用。本技能指导设置类型判定、SystemConfig 字段与 visibility、goose SQL 初始化/升级、热更新读取、公共配置暴露、shadcn 图形组件和验证流程。

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 Design systems and SQL. It works with SQL, shadcn/ui 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.

When your agent uses it

  • Tasks that involve Design systems
  • Tasks that involve SQL

Example prompts

  • “/new-setting”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. 定义配置 key。
  2. 初始化默认配置。
  3. 读取配置。
  4. 如果前端需要未登录或全局消费,暴露为公共可见配置。
  5. 如果管理员需要图形化配置,更新 /admin/settings。
  6. /admin/system 参数表通常不需要新代码。

What it can do on your machine

Read from SKILL.md and the folder at commit 7c2304d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • make
    • pnpm
    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

New Setting loads about 1.7k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 453 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from Rain-kl/OpenFlare at commit 7c2304d, republished under its Apache-2.0 licence (© Rain-kl). 453 words, ~1,746 tokens.

Download SKILL.mdSave it as .claude/skills/new-setting/SKILL.md (or your agent's skills folder).
name
new-setting
description
Wavelet 项目专用:当新增或修改启动时设置、数据库系统设置、业务设置、公共可见配置、/admin/system 参数配置、/admin/settings 图形化设置界面,或前端公共配置消费逻辑时必须使用。本技能指导设置类型判定、SystemConfig 字段与 visibility、goose SQL 初始化/升级、热更新读取、公共配置暴露、shadcn 图形组件和验证流程。

新增设置项

本技能覆盖 Wavelet 的设置体系。开始前先读仓库根目录 AGENTS.md,遵守项目级规则:HTTP 路由只在 internal/router/router.go 注册、API 变更后运行 make swagger、提交前运行 make code-check、不要删除 frontend/node_modules、internal/util/ 不引入框架依赖。

如果需要在 /admin/settings 增加或调整图形化设置组件,同时阅读 shadcn。如果只是新增 Go 读取逻辑、测试或错误处理,再按需阅读对应 go-* skill。

先判定设置类型

Wavelet 当前有两套设置入口:

  • 启动时设置:来自 config.yaml 或环境变量,适合进程启动前必须确定、通常不热更新的基础配置。
  • 系统设置:保存于数据库 system_configs,经 model.SystemConfig 实体(key 常量在 model)与 repository 读取层(含 Redis hash 缓存)访问,支持运行时热更新。管理入口是 /admin/system 和 /admin/settings。

系统设置分三种使用语义:

  • 业务设置:type=business,由管理员配置,影响业务规则,例如用户额度、业务限制。
  • 系统设置:type=system,由管理员配置,影响平台能力、基础开关、外部服务参数。
  • 公共可见配置:附加在业务设置或系统设置之上,由 visibility=1 控制是否通过公开接口返回给前端使用。它不是第三种数据库 type,不要把 type 写成 public。

业务设置和系统设置互斥:一个配置项只能选择 business 或 system。是否公开给前端由 visibility 决定:0 表示隐藏,1 表示 /api/v1/config/public 可见。

特殊设置组件不一定需要新增 SystemConfig 参数项。例如认证源设置、模板管理这类有独立模型和 API 的功能,应沿用对应领域模型,不要为了出现在 /admin/settings 强行创建参数配置。

先定位真实链路

修改前快速查看这些文件,确认当前实现没有漂移:

  • internal/model/system_configs.go: 配置 key 常量(ConfigKey*)、SystemConfig 实体与字段语义;不含持久化读取 API。
  • internal/repository/system_config.go: 配置读取与缓存(GetSystemConfigByKey、GetBoolByKey、GetIntByKey、GetDecimalByKey、ListVisibleSystemConfigs 等)。
  • internal/infra/persistence/migrator/goose/postgres/*.sql 和 internal/infra/persistence/migrator/goose/sqlite/*.sql: system_configs 表结构、初始化 seed、后续升级迁移。
  • internal/infra/persistence/migrator/migrator.go: goose 迁移入口和 PostgreSQL/SQLite 方言选择。
  • internal/testhelper/test_helper.go: Go 测试用默认系统配置 seed。
  • internal/apps/admin/system_config/routers.go: /api/v1/admin/system-configs 参数表 API。
  • internal/apps/config/routers.go: /api/v1/config/public 公共配置响应。
  • frontend/components/common/admin/system.tsx: /admin/system 参数表管理界面,展示所有参数配置项。
  • frontend/components/common/settings/system-settings.tsx: /admin/settings 图形化设置页入口。
  • frontend/components/common/settings/*-tab.tsx: /admin/settings 各图形化设置分组。
  • frontend/lib/services/admin/*: Admin 系统配置 service 类型和 API 封装。
  • frontend/lib/services/config/*、frontend/hooks/use-public-config、frontend/components/layout/*: 前端公共配置消费链路。

新增数据库系统设置

按影响面选择步骤,不要只改 UI 或只改默认值。

  1. 定义配置 key。

    • 在 internal/model/system_configs.go 添加 ConfigKey... 常量。
    • key 使用 lowercase snake case,例如 search_engine_indexing_enabled。
    • 值仍存为字符串;布尔值用 "true" / "false",数值用十进制字符串,复杂结构用 JSON 字符串。
  2. 初始化默认配置。

    • 如果修改初始 schema,必须同步 internal/infra/persistence/migrator/goose/postgres/ 和 internal/infra/persistence/migrator/goose/sqlite/ 中的 goose SQL。
    • 既有库新增配置时,新增一组时间戳递增的双 SQL 迁移文件,分别放在 PostgreSQL 和 SQLite 目录;不要回到 GORM AutoMigrate 或 Go 代码 seed。
    • 新库初始化也需要包含同一个默认 key:当前初始 seed 在 202606090001_initial_schema.sql 的 INSERT INTO system_configs (...) VALUES ... ON CONFLICT (key) DO NOTHING。
    • 设置正确的 Type:只能是 "system" 或 "business"。
    • 设置正确的 Visibility:公共可见填 1,内部配置填 0。
    • 默认值要和 Go 读取侧的零值或兜底值一致,避免首次启动和数据库缺失时行为不同。
    • 如果相关 Go 包测试依赖默认配置,同步 internal/testhelper/test_helper.go 的 seedDefaultConfigs 和公共 key 列表。
  3. 读取配置。

    • 后端业务代码通过 internal/repository 读取:repository.GetBoolByKey、repository.GetIntByKey、repository.GetDecimalByKey 或 repository.GetSystemConfigByKey;key 常量仍用 model.ConfigKey*。
    • 禁止新增或调用 model.Get*ByKey / model.ListVisibleSystemConfigs 等数据访问 API(model 无 CRUD)。
    • 运行时可热更新的规则不要放进 config.Config;启动时设置才走 internal/infra/config/model.go 和 config.example.yaml。
    • 不要在 handler 或业务代码里直接读 os.Getenv()。
  4. 如果前端需要未登录或全局消费,暴露为公共可见配置。

    • 把该配置的 visibility 设为 1,GetPublicConfig 会通过 repository.ListVisibleSystemConfigs 返回所有可见 key/value。
    • /api/v1/config/public 的 data 是动态对象:后端返回 map[string]string,前端类型是 Record<string, string | undefined>。
    • 前端读取时按配置 key 访问,必要时在消费侧把字符串转换为 boolean/number/JSON。
    • 检查使用方的 query key,更新后需要 invalidate ["public-config"]。
    • 只有公共配置 API 形状或注释变化时才需要更新 Swagger;单纯新增 visibility=1 的 key 通常不需要改 PublicConfigResponse 类型。
  5. 如果管理员需要图形化配置,更新 /admin/settings。

    • 先阅读 shadcn skill。
    • 根据设置语义选择现有 tab:安全类进 security-tab.tsx,运营类进 operation-tab.tsx,系统基础参数进 system-tab.tsx,其它菜单或杂项进 other-tab.tsx。
    • SystemSettingsMain 当前通过 AdminService.listSystemConfigs("system") 只加载 type=system 的配置;type=business 的配置若也需要图形化入口,先确认是否要调整查询范围或放到其它 Admin 页面。
    • 新的图形组件优先放在 frontend/components/common/settings/,使用现有 AdminService.updateSystemConfig。
    • 更新成功后 invalidate ["admin", "system-configs"];公共可见配置还要 invalidate ["public-config"]。
    • 使用 Sonner toast 反馈成功或失败。
    • 不使用 any,不要硬编码页面级 max-w-*,页面根容器保持 w-full。
  6. /admin/system 参数表通常不需要新代码。

    • 只要 SystemConfig 默认数据存在,参数表会展示配置项。
    • /admin/system 偏向所有参数配置项的键值管理,不替代 /admin/settings 的友好图形界面。
Show full SKILL.md (140 more words)Show less

新增启动时设置

只有在配置必须随进程启动确定、不能或不应热更新时,才走启动时设置。

  1. 在 internal/infra/config/model.go 添加配置字段。
  2. 在 config.example.yaml 添加示例值和说明。
  3. 确认 Viper 现有加载逻辑能绑定该字段;需要环境变量时沿用当前命名和绑定方式。
  4. 运行时代码从 config.Config.<Section>.<Field> 读取。
  5. 不要把启动时设置同步塞进 SystemConfig,除非产品明确需要运行时覆盖。

常见模式

布尔公共设置
  • model key:ConfigKeyFeatureEnabled = "feature_enabled"(定义在 internal/model)
  • goose SQL 默认值:value='false',type 按语义选 "system" 或 "business",visibility=1。
  • 后端读取:repository.GetBoolByKey(ctx, model.ConfigKeyFeatureEnabled)。
  • 公共响应:/api/v1/config/public 的 data.feature_enabled 为字符串 "true" 或 "false"。
  • 前端图形控件:Switch,保存时写 "true" / "false"。
数值业务设置
  • model key:ConfigKeyMaxSomething = "max_something"。
  • goose SQL 默认值:例如 "5",type 通常为 "business",只有前端公共消费时才设 visibility=1。
  • 后端读取:repository.GetIntByKey 或 repository.GetDecimalByKey。
  • 前端图形控件:Input type="number" 或合适的 shadcn 数值控件;保存前做最小必要校验,错误用 toast。
JSON 设置
  • 默认值使用合法 JSON,例如 "{}" 或 "[]"。
  • 在 repository 或业务 logics 中提供解析函数,像 repository.GetMenuDisplayConfig 一样把 JSON 解析错误包装成清晰错误;不要在 model 中做 IO。
  • 前端不要直接拼接 JSON 字符串;用 JSON.stringify 写入,用类型化对象在组件中操作。

验证

根据改动范围运行最小有效验证,最后提交前必须运行项目门禁。

  • 新增或修改系统配置默认值、visibility 或公共配置读取:至少运行相关 Go 包测试,例如:
bash
go test ./internal/repository ./internal/apps/config ./internal/apps/admin/system_config
  • 新增 goose 迁移后,至少用当前数据库方言跑一次迁移;如果 SQL 同时改了 PostgreSQL 和 SQLite,尽量覆盖两种方言。涉及 schema/seed 的任务还应遵循 database-migration skill。

  • 公共配置 API 注释或 handler 签名改动后:

bash
make swagger
  • 前端图形设置改动后:
bash
cd frontend && pnpm typecheck && pnpm lint
  • 提交前:
bash
make code-check

如涉及前端页面体验,启动本地服务并用浏览器验证 /admin/settings 和 /admin/system:配置能显示、保存、toast 反馈正常、刷新后值保持、公共配置消费方能即时或刷新后生效。

相关 Skills

  • shadcn:新增或调整 /admin/settings 图形化设置组件时使用。
  • database-migration:新增或修改 system_configs schema、默认 seed 或 goose SQL 迁移时使用。
  • go-error-handling:配置解析、缺失配置、非法值错误需要跨包返回时使用。
  • go-testing:为配置读取、公共配置 API 或 Admin 配置 API 添加测试时使用。
  • go-context:配置读取在请求链路或后台链路中传递取消和超时时使用。

© 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

Files

Just SKILL.md in .agents/skills/new-setting of Rain-kl/OpenFlare.

Open the folder on GitHubat commit 7c2304d

Compare with similar skills

New Setting 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.

New Setting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
New Setting this skillRain-kl/OpenFlare288—~1.7kAutomated safety check: PassApache-2.0
Basincloudflare/skills3k1 repos~684Automated safety check: PassApache-2.0
Sqlc Gen Moonbit Safetymizchi/skills356—~995Automated safety check: PassNone
Lunora Setup Hyperdriveanolilab/lunora283—~1.8kAutomated safety check: PassCustom licence
Lunora Setup Hyperdrive Globalanolilab/lunora283—~1.9kAutomated safety check: PassCustom licence
Drizzle Orm D1secondsky/claude-skills227—~2.4kAutomated safety check: PassMIT

Similar skills

  • Basin

    cloudflare/skills

    Official

    Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL.

    3k GitHub starsUsed in 1 repo~684 tokens
    DatabasesAuto-check passed
  • Post-generation safety checks for sqlc-gen-moonbit + Cloudflare D1.

    356 GitHub stars~995 tokensUpdated 6 days ago
    DatabasesAuto-check passed
  • Connects an existing, externally owned Postgres/MySQL database to a Lunora app through Cloudflare Hyperdrive.

    283 GitHub stars~1.8k tokensUpdated today
    DatabasesAuto-check passed
  • Stores a Lunora app's own .global() tables in Postgres or MySQL (PlanetScale, Neon, RDS, or any Hyperdrive-reachable database) through Cloudflare Hyperdrive instead of D1.

    283 GitHub stars~1.9k tokensUpdated today
    DatabasesAuto-check passed
  • Drizzle Orm D1

    secondsky/claude-skills

    | Type-safe ORM for Cloudflare D1 databases using Drizzle. An agent skill from secondsky/claude-skills.

    227 GitHub stars~2.4k tokensUpdated 10 days ago
    DatabasesAuto-check passed
  • Nuxt Content

    secondsky/claude-skills

    Nuxt Content v3 Git-based CMS for Markdown/MDC content sites.

    227 GitHub stars~4.3k tokensUpdated 10 days ago
    Frontend & DesignAuto-check passed

More from Rain-kl/OpenFlare

All 12 skills in this repo
  • Code Review Skill

    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.

    288 GitHub stars~2.3k tokensUpdated today
    Auto-check: notes
  • Go Logging

    Rain-kl/OpenFlare

    在选择日志方案、配置 slog、编写结构化日志语句或决定日志级别时使用。也适用于设置生产日志、为日志添加请求作用域上下文或从 log 迁移到 slog 的场景,即使用户未明确提及日志。不涵盖错误处理策略(参见 go-error-handling)。

    288 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • New API

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改自定义业务 API、新增业务路由、新增 service 层核心逻辑时必须使用。本技能指导包职责划分、推荐文件结构、路由解耦、Swagger 文档生成与质量门禁验证。

    288 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Cache Framework

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改业务缓存(RAM/Redis/DB 三层读路径)、缓存失效、多节点 pub/sub 同步、或评估高频读是否应接入缓存时必须使用。本技能说明系统标准缓存框架、参考实现、禁止写法与分布式一致性要求。

    288 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Clickhouse Batchwriter

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改 ClickHouse 批量写入、接入 internal/infra/persistence/batchwriter、将业务域异步 flush 到分析表、迁移 riskcontrol/节点访问日志/可观测时序写入、或评估 asyncinsert 与背压策略时必须使用。本技能指导分层职责、各域独立 Writer 实例、repository 批量 API…

    288 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Database Migration

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改数据库表结构、索引、初始化数据、系统配置 seed、模板 seed、默认管理员、goose SQL 迁移、internal/infra/persistence/migrator、ClickHouse 分析库 DDL 或数据库升级流程时必须使用。本技能指导在 internal/infra/persistence/migrator/goose 下编写…

    288 GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Questions about New Setting

What does New Setting do?

Wavelet 项目专用:当新增或修改启动时设置、数据库系统设置、业务设置、公共可见配置、/admin/system 参数配置、/admin/settings 图形化设置界面,或前端公共配置消费逻辑时必须使用。本技能指导设置类型判定、SystemConfig 字段与 visibility、goose SQL 初始化/升级、热更新读取、公共配置暴露、shadcn 图形组件和验证流程。. New Setting is an agent skill from Rain-kl/OpenFlare.

When should I use New Setting?

New Setting fits situations like: tasks that involve Design systems; tasks that involve SQL.

How do I install New Setting in Claude Code?

Run `npx skills add Rain-kl/OpenFlare --skill new-setting -a claude-code`. Or copy the skill folder (.agents/skills/new-setting in Rain-kl/OpenFlare) into .claude/skills/new-setting in your project. Claude Code loads it when a task matches its description.

How do I install New Setting in Codex?

Run `npx skills add Rain-kl/OpenFlare --skill new-setting -a codex`. Or copy the skill folder (.agents/skills/new-setting in Rain-kl/OpenFlare) into .agents/skills/new-setting in your project. Codex loads it when a task matches its description.

Can I use New Setting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Rain-kl/OpenFlare --skill new-setting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/new-setting, .gemini/skills/new-setting, .github/skills/new-setting and .opencode/skills/new-setting in your project.

What does New Setting need to run?

Going by SKILL.md and its folder, New Setting needs the command-line tools its instructions call (make, pnpm and go).

Does New Setting access the network?

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.

Is New Setting safe to install?

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.

What licence does New Setting use?

New Setting 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.

How many tokens does New Setting use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to New Setting?

Skills that share tags, products or a category with New Setting: Basin (cloudflare/skills, 3k stars), Sqlc Gen Moonbit Safety (mizchi/skills, 356 stars), Lunora Setup Hyperdrive (anolilab/lunora, 283 stars) and Lunora Setup Hyperdrive Global (anolilab/lunora, 283 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains New Setting?

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.