Apache Doris Skills is a collection of agent instructions containing Apache Doris database knowledge for designing, sizing, operating, diagnosing, and contributing to Doris clusters. It serves developers and operators using Claude Code, Cursor, Codex, Cline, Amp, and other agent tools, with the skills providing decision logic and evidence-based workflows.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/apache/doris-skills/doris-best-practicesnpx skills add apache/doris-skills --skill doris-best-practicesgit clone --depth 1 https://github.com/apache/doris-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/apache/doris-skills/doris-best-practices)<a href="https://agentmods.dev/skills/apache/doris-skills/doris-best-practices"><img src="https://agentmods.dev/badge/skills/apache/doris-skills/doris-best-practices.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00256 | $0.04360 |
| Opus 5 | $0.00128 | $0.02180 |
| Sonnet 5 | $0.00051 | $0.00872 |
| Haiku 4.5 | $0.00026 | $0.00436 |
Grade A, and why
doris-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 320 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Apache Doris Best Practices
Problem-first table design intelligence for Apache Doris. 37 rules, 7 use case templates, 4 sizing guides. All details in
references/directory.
1 ▸ Problem-First Routing
I need to build…
| Problem | Template(s) | Key Rules |
|---|---|---|
| Real-time log/event analytics | usecase-log-event |
DUPLICATE, RANGE partition, dynamic TTL, ZSTD |
| CDC / MySQL sync to Doris | usecase-cdc-sync |
UNIQUE MoW, sequence_col, HASH bucket |
| Dashboard with pre-aggregated metrics | usecase-dashboard-metrics |
AGGREGATE, BITMAP_UNION, sync MV |
| User-facing API with low-latency point queries | usecase-point-query |
UNIQUE MoW, store_row_column, BloomFilter |
| Star schema with JOIN-heavy analytics | usecase-star-schema-join |
Colocation, same bucket key/count |
| Small dimension / lookup table | usecase-dimension-lookup |
DUPLICATE, RANDOM bucket, 3 buckets |
| Observability (logs + traces + metrics) | usecase-observability |
3 tables: DUP logs, DUP traces, AGG metrics |
| Vehicle/fleet tracking | usecase-log-event + usecase-point-query |
Time-series + point-query hybrid |
| E-commerce order analytics | usecase-star-schema-join + usecase-dashboard-metrics |
Star schema + AGG rollups |
| Full-text search / content search | schema-index-text-search |
Inverted index, MATCH, BM25 |
| User behavior / funnel analysis | schema-types-bitmap-count-distinct |
BITMAP_UNION, bitmap_intersect |
| Semi-structured JSON data | schema-types-variant-json |
VARIANT type, schema_template |
My query is slow after evidence shows…
For live slow-query or runtime diagnosis, do not use this table as the first response. First read references/cli-investigation.md and collect or attempt evidence (profile get, profile list, profile history, tablet, EXPLAIN, or auth status). Use this table only after evidence points to the symptom.
| Symptom | Check These Rules | Quick Fix |
|---|---|---|
| Full table scan on WHERE clause | schema-keys-selectivity-first |
Move filtered column to sort key position 1 |
| JOINs are slow / shuffle | usecase-star-schema-join |
Small dims (<1GB): broadcast + runtime filter. Large: colocation |
| COUNT DISTINCT is slow | schema-types-bitmap-count-distinct |
Switch to BITMAP_UNION aggregation |
| LIKE '%keyword%' is slow | schema-index-ngram-for-like |
Add NGram BloomFilter index |
| Point query latency too high | usecase-point-query |
Enable store_row_column + Prepared Statement |
| Storage growing too fast | schema-partition-auto-on-demand + schema-props-compression |
AUTO PARTITION + ZSTD compression + scheduled DROP PARTITION |
| Sync MV not being used | schema-mv-sync-rollup |
Use raw columns (not date_trunc) in MV GROUP BY; unique aliases |
| Async MV rewrite fails | schema-mv-async-join + schema-mv-async-limits |
Check State/RefreshState; query MV directly if predicate fails |
| Data skew / hot tablets | schema-bucket-composite-for-skew |
Composite bucket key or RANDOM |
| Import fails / data version error | schema-mv-async-limits |
Check concurrent MV refresh limit (max 3) |
| VARCHAR in key kills perf | schema-keys-fixed-length-types |
Move VARCHAR after fixed-length types |
| Writes slow on UNIQUE table | schema-model-prefer-mow |
Ensure MoW is enabled (not MoR) |
What ships with it
50 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/cli-investigation.md 17 KB
- references/schema-bucket-cloud-mandatory-hash.md 740 B
- references/schema-bucket-composite-for-skew.md 1.4 KB
- references/schema-bucket-hash-vs-random.md 1.6 KB
- references/schema-bucket-high-cardinality-key.md 797 B
- references/schema-bucket-target-size.md 1.3 KB
- references/schema-cache-file-cache.md 784 B
- references/schema-cache-query-partition.md 598 B
- references/schema-ddl-gotchas.md 4.9 KB
- references/schema-index-bitmap.md 676 B
- references/schema-index-bloomfilter.md 804 B
- references/schema-index-inverted.md 778 B
- references/schema-index-ngram-for-like.md 728 B
- references/schema-index-text-search.md 1.3 KB
- references/schema-index-vector.md 906 B
- references/schema-keys-avoid-float.md 833 B
- references/schema-keys-cluster-key-for-mow.md 1.1 KB
- references/schema-keys-fixed-length-types.md 933 B
- references/schema-keys-prefix-index-limits.md 1.7 KB
- references/schema-keys-selectivity-first.md 2.1 KB
- references/schema-model-avoid-agg-for-updates.md 1.5 KB
- references/schema-model-choose-for-workload.md 1.5 KB
- references/schema-model-prefer-mow.md 916 B
- references/schema-model-sequence-col-for-cdc.md 1.2 KB
- references/schema-mv-async-join.md 2.5 KB
- references/schema-mv-async-limits.md 1.4 KB
- references/schema-mv-sync-rollup.md 1.8 KB
- references/schema-partition-auto-on-demand.md 1.5 KB
- references/schema-partition-dynamic-ttl.md 1.4 KB
- references/schema-partition-range-for-timeseries.md 2.1 KB
- references/schema-partition-skip-for-small.md 911 B
- references/schema-props-cloud-forced.md 405 B
- references/schema-props-compression.md 534 B
- references/schema-types-bitmap-count-distinct.md 1.1 KB
- references/schema-types-doris-specifics.md 1002 B
- references/schema-types-native-vs-string.md 695 B
- references/schema-types-variant-json.md 1.2 KB
- references/schema-types-zonemap-limitations.md 796 B
- references/sizing-be-cloud.md 577 B
- references/sizing-be-integrated.md 514 B
- references/sizing-fe.md 511 B
- references/sizing-storage-formula.md 620 B
- references/start-self-hosted.md 1.6 KB
- references/usecase-cdc-sync.md 1.8 KB
- references/usecase-dashboard-metrics.md 1.4 KB
- references/usecase-dimension-lookup.md 1.1 KB
- references/usecase-log-event.md 1.8 KB
- references/usecase-observability.md 2.7 KB
- references/usecase-point-query.md 1.4 KB
- references/usecase-star-schema-join.md 2.9 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 320 lines · 256 tokens per session scan A 317ab6669aad
doris-best-practices is a skill published in the GitHub repository apache/doris-skills (39 stars, last pushed 2d ago), licensed Apache-2.0. It adds 256 tokens to every session and 4,360 once invoked, about $0.0013 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
yida-data-management
宜搭数据管理。表单实例/子表/流程实例/任务中心的查询、新增、更新,以及普通表单单实例的精确删除。表单走 /v1/form/,流程走 /v1/process/,不能混用。.
yida-aggregate-table
宜搭聚合表(virtualView)管理。用于列出、创建空聚合表、读取/预览设计配置、保存草稿、发布配置和查询构建状态;严格区分 stash 与 live revision,并在写入前校验固定前端已确认的六数组契约。.
yida-db-seq-fix
PostgreSQL Sequence 自动修复工具。检测并修复宜搭环境检测自动建表时 Sequence 起始值问题,避免主键冲突。当用户提到"Sequence"、"主键冲突"、"自增ID错误"、"db-seq-fix"时触发。.
upstash-redis-kv
Read and write to Upstash Redis-compatible key-value store via REST API. Use when there is a need to save or retrieve key-value data, use Redis features (caching, counters, lists, sets, hashes, sorted sets, etc.) for the current interaction, or when the user explicitly asks to use Upstash or Redis.
laravel-eloquent
Eloquent and query-layer engineering rules for Laravel — eliminating N+1, choosing a pagination strategy, short atomic transactions, casts and scopes on the model, where raw SQL is allowed, and how migrations declare the schema those queries depend on. Use when writing or reviewing Eloquent models, migrations, query…
laravel-async
Asynchronous and caching rules for Laravel — idempotent queued jobs with retries and backoff, domain events for side effects, queue separation and failure handling, deterministic cache keys with event-driven invalidation, and scheduled tasks that queue rather than block. Use when writing or reviewing jobs, events…