Agent skill

Logstore

by Rain-kl in Rain-kl/OpenFlare

OpenFlare / Wavelet:当新增或修改日志/分析用途表(节点访问日志、用户访问日志、可观测时序)、接入 internal/repository/logstore、切换日志主库、实现 PG/SQLite 回落,或判断一张表该走业务主库还是日志库时必须使用。

Apache-2.0Auto-check passedDatabases

Install Logstore

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

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

GitHub CLI
$ gh skill install Rain-kl/OpenFlare logstore --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/logstore .claude/skills/logstore && 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
logstore
GitHub stars
288
Token cost
~751 tokens
SKILL.md length
187 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

OpenFlare / Wavelet:当新增或修改日志/分析用途表(节点访问日志、用户访问日志、可观测时序)、接入 internal/repository/logstore、切换日志主库、实现 PG/SQLite 回落,或判断一张表该走业务主库还是日志库时必须使用。

  • Works in 10 steps: Model(internal/model/analytics):TableName… → 三套 DDL:CH MergeTree + toYYYYMM;PG… → 挂到已有域或新接口:能进 AccessLogStore /… → …
  • Databases work in your project
  • SKILL.md covers 先判定, 分层, 新增一张日志表 and 禁止, plus 1 more section
  • Calls go and make

What it does

Logstore is an agent skill from Rain-kl/OpenFlare. OpenFlare / Wavelet:当新增或修改日志/分析用途表(节点访问日志、用户访问日志、可观测时序)、接入 internal/repository/logstore、切换日志主库、实现 PG/SQLite 回落,或判断一张表该走业务主库还是日志库时必须使用。

Its SKILL.md is about 750 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. It works with SQLite, Cloudflare, ClickHouse and SQL. 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

  • Databases work in your project

Example prompts

  • “/logstore”

Workflow steps

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

  1. Model(internal/model/analytics):TableName + InsertColumns / BatchInsertSQL。
  2. 三套 DDL:CH MergeTree + toYYYYMM;PG PARTITION BY RANGE(时间列)(主键含分区键);SQLite 普通表。不要在主库建 CH 物化视图,聚合实时算。
  3. 挂到已有域或新接口:能进 AccessLogStore / ObservabilityStore / UserAccessLogStore 就不要再拆包。新域才新增接口并放进 Store。
  4. 方法最少集:BatchInsert(含 ensureWritable)、业务查询、ListForMigration、MigrationRange、DeleteAll、DeleteBefore、EnsurePartitions(仅 PG 预建)。
  5. 双实现:CH 委托 analyticsrepo;GORM 共用一套,方言 SQL 放 dialect_*.go。零值 id 用 idgen.NextUint64ID()。
  6. buildStore:CH / GORM 两分支都挂上。
  7. 写入:独立 batchwriter;FlushFunc → logstore.Active。节点日志/可观测走 SetAccessLogHooks / SetObservabilityHooks,不要让 apps 碰 ChConn。
  8. 切换任务:clearTarget + copy* 增加该表;源数据不删,失败不翻转。
  9. 清理:访问类走 log_retention_days_*;性能指标走 metric_retention_days。不要擅自共用错误的 TTL。
  10. import-lint:apps 新增对 analytics 或 infra/persistence(batchwriter/idgen 除外)的 import 必须失败。

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:

    • go
    • make

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

  • Network

    No URLs in SKILL.md.

    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

Logstore loads about 751 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 187 words of instructions outside code blocks.

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

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). 187 words, ~751 tokens.

Download SKILL.mdSave it as .claude/skills/logstore/SKILL.md (or your agent's skills folder).
name
logstore
description
OpenFlare / Wavelet:当新增或修改日志/分析用途表(节点访问日志、用户访问日志、可观测时序)、接入 internal/repository/logstore、切换日志主库、实现 PG/SQLite 回落,或判断一张表该走业务主库还是日志库时必须使用。

日志用途表开发

开始前阅读根目录 AGENTS.md。DDL 用 database-migration;高频写入队列用 clickhouse-batchwriter;切换任务用 new-async-task。本技能只回答:这张表是不是日志表,以及如何接入可切换的日志主库。

设计背景见 日志存储解耦。

先判定

日志表同时满足:

  • 追加写入、几乎不更新单行
  • 按时间查询/聚合,允许按保留天数删除
  • 关闭 ClickHouse 后仍要能写、能查
  • 不参与网站/节点/证书等事务一致性

不要做成日志表:Zone、节点、配置版本、任务执行、上传元数据。这些走主库 repository。

当前日志域:

域接口表
节点访问日志AccessLogStoreof_node_access_logs
可观测ObservabilityStoreof_node_metric_snapshots / of_node_edge_health / of_node_obs_frps / of_node_obs_frpc
用户访问审计UserAccessLogStorew_user_access_logs

分层

层级路径职责
抽象internal/repository/logstore接口 + Active/BuildForMigration;apps 只面向这里或 repository 门面
CH 实现logstore/clickhouse_store.go 委托 analytics原生批量 + 现有聚合 SQL
主库实现logstore/postgres_store.goPG(按月分区)与 SQLite(普通表)共用 GORM
Modelinternal/model/analytics实体与批量 SQL,无 IO
入队chwriter / risk_control + batchwriterflush 调 logstore BatchInsert*;CH 入队经 hooks
切换of_log_db_switch冻结 → chwriter.Drain → 逐表复制 → 翻转
约束logstore/imports_test.goapps 禁止 import repository/analytics

log_database 只能是「随主库」或 clickhouse。log_database / log_db_migration 受保护。

新增一张日志表

  1. Model(internal/model/analytics):TableName + InsertColumns / BatchInsertSQL。
  2. 三套 DDL:CH MergeTree + toYYYYMM;PG PARTITION BY RANGE(时间列)(主键含分区键);SQLite 普通表。不要在主库建 CH 物化视图,聚合实时算。
  3. 挂到已有域或新接口:能进 AccessLogStore / ObservabilityStore / UserAccessLogStore 就不要再拆包。新域才新增接口并放进 Store。
  4. 方法最少集:BatchInsert(含 ensureWritable)、业务查询、ListForMigration、MigrationRange、DeleteAll、DeleteBefore、EnsurePartitions(仅 PG 预建)。
  5. 双实现:CH 委托 analyticsrepo;GORM 共用一套,方言 SQL 放 dialect_*.go。零值 id 用 idgen.NextUint64ID()。
  6. buildStore:CH / GORM 两分支都挂上。
  7. 写入:独立 batchwriter;FlushFunc → logstore.Active。节点日志/可观测走 SetAccessLogHooks / SetObservabilityHooks,不要让 apps 碰 ChConn。
  8. 切换任务:clearTarget + copy* 增加该表;源数据不删,失败不翻转。
  9. 清理:访问类走 log_retention_days_*;性能指标走 metric_retention_days。不要擅自共用错误的 TTL。
  10. import-lint:apps 新增对 analytics 或 infra/persistence(batchwriter/idgen 除外)的 import 必须失败。

禁止

  • apps 直连 analyticsrepo / db.ChConn / db.ChDB 做日志读写
  • 只建 CH、不建主库回落
  • Handler 内逐条 PrepareBatch
  • 业务表塞进 logstore
  • 管理端改 log_database / log_db_migration

验证

bash
go test ./internal/repository/logstore ./internal/repository/analytics
go test ./internal/apps/openflare/... ./internal/apps/admin/logs ./internal/apps/admin/status
make swagger
make code-check

对照:of_node_access_logs 或 w_user_access_logs 的 model、三库 goose、logstore 双实现、chwriter/risk_control flush、LogDBSwitchHandler。

© 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/logstore of Rain-kl/OpenFlare.

Open the folder on GitHubat commit 7c2304d

Compare with similar skills

Logstore 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.

Logstore compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Logstore this skillRain-kl/OpenFlare288—~751Automated safety check: PassApache-2.0
Warehouse SQLHybridAIOne/hybridclaw158—~1.8kAutomated safety check: PassMIT
Cloudflare D1secondsky/claude-skills227—~3.9kAutomated safety check: PassMIT
Clickhouse Logs Queriessupabase/supabase111k—~2.4kAutomated safety check: PassApache-2.0
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Chdb SQLvemetric/vemetric3951 repos~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Warehouse SQL

    HybridAIOne/hybridclaw

    Review and run read-only natural-language SQL against a customer data warehouse with cached schema introspection and explicit write grants.

    158 GitHub stars~1.8k tokensUpdated today
    DatabasesAuto-check passed
  • Cloudflare D1

    secondsky/claude-skills

    Cloudflare D1 serverless SQLite on edge. An agent skill from secondsky/claude-skills.

    227 GitHub stars~3.9k tokensUpdated 11 days ago
    Backend & APIsAuto-check passed
  • Clickhouse Logs Queries

    supabase/supabase

    Official

    Write, review, and migrate Supabase logs queries against the ClickHouse-backed logs table (the logs.all.otel analytics endpoint).

    111k GitHub stars~2.4k tokensUpdated today
    DatabasesAuto-check passed
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated today
    DatabasesAuto-check passed
  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    395 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Bisect

    ClickHouse/ClickHouse

    Bisect a ClickHouse regression using pre-built master binaries from CI.

    50k GitHub stars~1.4k tokensUpdated today
    DatabasesAuto-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 yesterday
    Auto-check: notes
  • Go Logging

    Rain-kl/OpenFlare

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

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

    Rain-kl/OpenFlare

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

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

    Rain-kl/OpenFlare

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

    288 GitHub stars~1.7k tokensUpdated yesterday
    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 yesterday
    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 yesterday
    Auto-check passed

Categories

Questions about Logstore

What does Logstore do?

OpenFlare / Wavelet:当新增或修改日志/分析用途表(节点访问日志、用户访问日志、可观测时序)、接入 internal/repository/logstore、切换日志主库、实现 PG/SQLite 回落,或判断一张表该走业务主库还是日志库时必须使用。. Logstore is an agent skill from Rain-kl/OpenFlare.

When should I use Logstore?

Logstore fits situations like: databases work in your project.

How do I install Logstore in Claude Code?

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

How do I install Logstore in Codex?

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

Can I use Logstore 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 logstore -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/logstore, .gemini/skills/logstore, .github/skills/logstore and .opencode/skills/logstore in your project.

What does Logstore need to run?

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

Does Logstore 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 Logstore 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 Logstore use?

Logstore 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 Logstore use?

About 751 tokens (SKILL.md is roughly 3k 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 Logstore?

Skills that share tags, products or a category with Logstore: Warehouse SQL (HybridAIOne/hybridclaw, 158 stars), Cloudflare D1 (secondsky/claude-skills, 227 stars), Clickhouse Logs Queries (supabase/supabase, 111k stars) and SQL Database Support for pREST (prest/prest, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Logstore?

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.