[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CQM31QA2XY54B1CWMRRM7K":3,"skill-same:01M7CQM31QA2XY54B1CWMRRM7K":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7CQM31QA2XY54B1CWMRRM7K","dbt-model-style",null,"Apply dbt + Redshift style and structure when writing, editing, or reviewing a dbt SQL model; excludes logic and layer design.","kouko\u002Floom-plugins","kouko","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1480254?v=4","01M7CQCPAJR9C92XDGR0QDCQ98","01M7CQCPB8FTVY1BT26ENK1YP4",0,"MIT","https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fdbt-model-style\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: dbt-model-style\ndescription: |\n  Apply dbt + Redshift style and structure when writing, editing, or reviewing a dbt SQL model; excludes logic and layer design.\n---\n\n# dbt Model Style\n\n## Purpose & scope\n\nAn opinionated dbt + Redshift model-writing template. Tune `(adapt)` items per project; treat MUST as required, SHOULD as the default, and MAY as situational.\n\n`\u003Cskill-dir>` is this skill's folder: `${CLAUDE_SKILL_DIR}` on Claude Code; on any other host, the directory that holds this SKILL.md.\n\n**When it applies**: whenever you author \u002F edit \u002F review **any** dbt model. **Write comment text and frontmatter *values* in the user's working language** (the examples in this doc stay in Chinese as a demonstration).\n\n**Style & structure only — not computation.** This skill covers how CTEs are arranged, how columns are named, how comments are written, how JOINs are declared. It does **not** cover calculation logic, business rules, metric formulas, NULL\u002Fdenominator semantics, or layer-dependency design — those are a separate matter, out of scope here.\n\nIf a request mixes style and logic, do the style part here and identify the calculation or business-rule part as out of scope. Split the edit; do not silently change computation or refuse the whole request.\n\n**One boundary that genuinely blurs — name-vs-content.** A few style rules can only be *checked* by glancing at the computation: the **name-matches-content MUST** (§3) says a `__paid` column must not smuggle in trial rows, so confirming the **name matches what the column computes** requires reading the logic. That read-to-verify-the-name is in scope; **changing** the computation to fix a mismatch is not — flag the mismatch and hand the logic fix back.\n\n> The one MUST to remember: **the `final` CTE has zero logic — column selection + comments only.** Every other MUST is structural discipline that keeps a model traceable and machine-parseable.\n\n---\n\n## Scope of enforcement (read first — don't run wild)\n\nThis template applies to **newly created models and the model you're currently editing** — whichever you touch, bring it up to standard.\n\n- **Do not proactively mass-backfill \u002F rewrite existing models just to satisfy this guide.** That's pure churn and risk; don't do it unless the user explicitly asks.\n- When editing an existing model, use the **boy-scout rule (bounded)**: bring the **part you touch** (that CTE, those few columns, the header) up to standard — don't rewrite the whole file on the way.\n- An existing model that doesn't match this guide but you aren't touching this time → **leave it; it's not a bug.**\n- A large-scale rollout is a **separate, explicitly-authorized task**, not a side effect of writing a model.\n\n---\n\n## The whole picture: writing order\n\nUse the complete runnable model in `references\u002Fexample-model.sql`. Write inside-out:\n\n1. **Decide `grain` and `keys` first** — what one row represents, the primary \u002F join keys. This shapes the whole model.\n2. Write the **reference CTE** (UPPERCASE, `SELECT *` off the upstream).\n3. Write the **intermediate transform CTEs** — one CTE per step, **all calculation\u002Flogic lives here**.\n4. Write **`final`** — explicit column list + aligned comments + tags, **no logic and no `AS` aliases** (every column arrives already named).\n5. Close with `SELECT * FROM final`, add `config`.\n6. Backfill both headers: `summary`\u002F`purpose`\u002F`sources`\u002F`related` and business rules.\n\n---\n\n## 1. CTE structure\n\n### 1.1 The three CTE roles\n\n- **MUST** — the CTE that first references an external model is **UPPERCASE**, drops the `stg_\u002Fint_\u002Fmart_` prefix, and contains `SELECT *` (no column-by-column list). The name reflects the referenced model's business content; for over-long names, extract the key dimensions (`int_dim__metric_by_segment_region` → `SEGMENT_REGION`).\n- **MUST** — **don't rename CTEs.** Once a CTE name is set, keep it — the name must trace back to the model it references; renaming breaks that thread. (This is about the CTE's *own name*, distinct from §3's *column aliases*.)\n- **MUST** — intermediate transform CTEs use **lowercase descriptive** names (`daily_with_week` \u002F `weekly_aggregation`) reflecting what the step does.\n- **MUST** — **one concern per CTE.** Better to add a CTE than to cram two derivations together to \"save a CTE\" — split, and a future change touches only one, with no cross-contamination.\n- **MUST** — the model always ends with `SELECT * FROM final`.\n\n### 1.2 The `final` CTE iron law (highest priority)\n\n**MUST — the `final` CTE must contain no business logic and no renaming.** Only column selection + comments. Every `CASE`, `WHERE` filter, arithmetic expression, **and every output-name alias (`x AS y`)** moves up into a dedicated preceding CTE: a column reaches `final` already carrying the name it will have in the table.\n\nMove every `CASE`, `WHERE`, arithmetic expression, and rename into a preceding CTE. This makes `final` a stable, directly diffable column-schema contract.\n\nRenaming counts as logic here even though SQL treats an alias as free. An `AS` in `final` means the published column name exists nowhere upstream in the model, so a reader who greps the file for the name they saw in the warehouse lands on one line — the alias — and has to re-read the whole model to find where the value came from. It also breaks the diff property: `final` should compare line-for-line against the table's column list, and an alias makes the two sides disagree by design. Name the column in the CTE that computes it.\n\n---\n\n## 2. Minimize explicit declaration \u002F maximize `.*` passthrough\n\n**SHOULD \u002F MAY — an optional conciseness idiom.** Pass columns through with `.*` so adding an upstream column changes only one line in `final`. **Be concise when you can; fall back to explicit declaration the moment it doesn't fit.** It never overrides `final` zero-logic (§1.2).\n\nChoose among four cases:\n\n- Single source: use `SOURCE_CTE.*` plus derived columns.\n- JOIN: `JOIN ... USING (key)` plus unqualified `SELECT *` keeps one key; `a.*, b.*` duplicates it.\n- Few renames: rename them in the preceding CTE (§1.2 forbids `AS` in `final`), then `source_cte.*` passes everything through.\n- Fall back to an explicit list for value collisions or differently named keys.\n\n> **When a CTE JOINs ≥2 sources and you intend `.*` passthrough, read `references\u002Fdotstar-passthrough.md` in full before writing it** — that file holds the exact `USING` + unqualified-`*` rule, the duplicate-column trap, and the fallback chain. (Single-source passthrough — the common case — doesn't need it.)\n\n---\n\n## 3. Naming\n\n- **MUST** — **model \u002F column names are a user-facing contract.** Once pushed and documented, don't rename them for cosmetics — downstream models, Tableau filter keys, and BI reports depend on them. When you need to change what's shown, change the **display label**; keep the technical column id unchanged.\n- **MUST** — **name matches content.** A column name's qualifier is its promise: a `__paid` metric must not smuggle in trial rows. To add coverage, open a **parallel column** (`__trial` \u002F `__total`) — don't loosen the existing column's semantics.\n- **MUST — variant-naming principle (stable prefix, suffix distinguishes the variant)**: keep the shared base and distinguish time, class, source, or scope with a `__`-separated suffix.\n- **MUST — prefix per the dbt official style guide**: layer prefix + `__` separating source\u002Fentity (`stg_\u003Csource>__\u003Centity>`, `int_`, marts use `fct_` \u002F `dim_`). This is a general dbt convention, not a claim unique to this template.\n- **MUST** — **always qualify column references with the source CTE** (`source_cte.col`); no bare column names, no short table aliases (`t` \u002F `o` \u002F `ci`); write the full CTE name inside JOINs too.\n- **(adapt)** — define project-specific prefix and variant-suffix vocabularies. Put version suffixes only on new models; never bulk-rename existing ones.\n\n---\n\n## 4. Column layout & comments\n\n- **MUST** — 4-space indent; vertically align `SELECT` columns and inline `--` comments.\n\n- **MUST** — every `final` column has a purpose comment; group columns with section headers.\n\n- **MUST — a `final` column comment is the column's business definition, written for someone who only ever sees this `final` CTE.** Shape: `\u003Chuman-readable name>：\u003Cwhat the number means in business terms>`. Assume the reader has the published schema and nothing else — no upstream model, no column list, no idea what your internal buckets or channel prefixes are — because that is literally what a schema catalogue or a BI tooltip gives them. Three failure modes:\n  - `-- 淨額（銷售 − 退款）` — no name to anchor on, and nothing about what this number covers.\n  - `-- credit_card__net_amount：綁定信用卡的淨額，…` — opens by repeating the technical identifier already printed on that same line.\n  - `-- 綁定信用卡淨額：將寬表對應三個通路的 net_amount 欄位在這一週涵蓋的每一天加總` — assembly instructions over upstream columns. Accurate, and useless to the reader: they cannot see those columns, and it still does not say what the number means.\n  Passing: `-- 綁定信用卡淨額：這一週顧客用綁定信用卡付掉的金額，已扣掉退款`. Say what the number counts, what moves it, and what the reader must not do with it (「不可與其他類別相加」). Name an upstream identifier only when the reader genuinely needs it to act — not to show your work.\n\n- **MUST — no emoji in column comments.** A warning is stated in words (「不可與其他類別相加」), never carried by a `⚠️`: the glyph survives copy-paste into a schema catalogue, a BI tooltip or a terminal that renders it as tofu, and it says nothing the sentence does not. Ordinary symbols are fine — ASCII operators, and notation that *is* the calculation (`SUM(...)`, `COUNT(DISTINCT ...)`, `+`, `×`) — since that is the answer to \"how is this computed\".\n\n- **MAY** — continue long column comments on aligned `--` lines so they remain attached to the column.\n\n- **(adapt)** A schema generator may merge aligned continuation lines and normalize their indentation.\n\n- **SHOULD** — tag column roles such as `[OUTPUT]`, `[METADATA]`, and `[AUDIT]`; extend tags per project.\n- **SHOULD** — **3-site comment sync**: when you change a column's description, update the header frontmatter\u002Fnarrative, the internal inline comment, and the `final` column comment **all three at once**. Drift leaves readers with contradictory descriptions of the same column.\n- **MAY** — align CJK comments\u002Ftables by **visual width** (CJK char = 2, ASCII = 1), not character count, or mixed CJK\u002FASCII goes ragged.\n- **(adapt)** — if your project generates schema YAML from inline comments (instead of hand-written `.yml`), then **inline comments = the single source of truth for the schema**; comment quality is load-bearing, not decoration.\n\n---\n\n## 5. The header: two blocks (frontmatter payload + human-facing prose)\n\nThe header splits into **two separate `\u002F* *\u002F` blocks** — this split is functional, not cosmetic:\n\n> **Mechanism (adapt)**: this two-block design assumes your project **(a)** uses dbt `persist_docs` to write the model description into the warehouse table comment (column comments into column comments), and **(b)** has tooling that takes the **first `\u002F* ... *\u002F` block** as the description (e.g. some sql→yml scripts use a non-greedy regex that grabs only the first block). Under that assumption, **only the first block reaches the table comment** — seen by humans reading the comment and by SQL-aware LLMs\u002FMCPs (MCP = a Model Context Protocol server an agent queries, e.g. a Redshift comment server); the second block stays in the `.sql` for humans. If your project doesn't enable `persist_docs`, the two-block split is still a good readability convention — it just loses the \"reaches the comment\" incentive.\n\n> **Is it wired up? (check once, per project)** — the \"first block reaches the comment\" payoff is **invisible from the `.sql` alone**, so confirm the machinery before maintaining the header on faith:\n> 1. `dbt_project.yml` has `persist_docs: {relation: true, columns: true}` (or the model\u002Ffolder-level equivalent).\n> 2. After a `dbt run`, the comment actually landed — check with `\\d+ \u003Cschema>.\u003Ctable>` in `psql`, or `get_table_comment` via the redshift-comment MCP.\n>\n> **If step 2 confirms the comment landed** → the comment-reaching incentives apply (field-order-for-truncation at the ~1000-char list\u002Fsearch cut, `summary`\u002F`purpose` keywords feeding `search_tables`, first block as the agent-facing description).\n> **If the comment did not land** (whether `persist_docs` is off or just misconfigured) → treat §5 as **readability-only**: keep the two-block split + YAML shape (they still help humans and the validator), and keep `summary`\u002F`purpose` keyword-rich (it still aids a human reading the `.sql`) — the keyword **MUST** is *not* cancelled; only its *`search_tables`-discoverability* incentive and the truncation-ordering rule go moot. Don't optimize for a comment nothing reads.\n>\n> `scripts\u002Fvalidate_header.py` checks the header's **shape** (fields present, parseable YAML, balanced `\u002F* *\u002F`) — it does **not** verify the comment persisted. The two steps above are the only persistence check.\n\n### 5.1 First `\u002F* *\u002F`: frontmatter + short narrative (→ table comment, for MCP\u002Fagent)\n\n```sql\n\u002F* ---\ntitle:   區域 B 每日指標值（雙來源合併）\nsummary: 來源 A（本地）+ 來源 B（forecast）合併後的每日指標值，來源 B 優先 \u002F 來源 A fallback\ngrain:   一列 = 一個 (metric_date, entity_id)\npurpose: 區域 B 每日指標值的日\u002F月趨勢、entity 別分析；每日營運報表的指標來源\nkeys:\n  primary: [metric_date, entity_id]\n  join:    [metric_date, entity_id]\nrelated:\n  - { table: int_dim__entity_dimension, join_on: entity_id, adds: entity 基本資料 \u002F 地區 \u002F 分類 }\n  - { table: int_metric__daily_dimension, join_on: [metric_date, entity_id], adds: 其他每日指標 }\nsources: [int_metric__daily_value__region_b__source_a, int_metric__daily_value__region_b__source_b__by_sub]\nrefresh: 日更 T+1（依上游 FDW 延遲）\n---\n\n來源 B-only 的 row 沒對到來源 A 是正常現象（來源 A 只攤本地）。分析總值時用 daily_value（已 merge），勿用 from_source_a \u002F from_source_b 的透明欄位相加。\n*\u002F\n```\n\n- **MUST** — the first `\u002F* *\u002F` contains: ① a `---`-fenced **YAML frontmatter**, ② followed by a **1–3 sentence unstructured narrative** (context the frontmatter can't express — also written for the MCP\u002Fagent).\n\nField requirements are **layered** (staging isn't queried directly by analysts\u002FMCP and is usually 1:1 with its source, so it's relaxed):\n\n- **All layers MUST**: `title` (use the user's working language for the model name, replacing the old `# heading`), `summary`, `grain`, `sources`.\n- **Consumer layers (intermediate \u002F marts \u002F dash) additionally MUST**: `purpose`, `keys` (`primary` + `join`).\n- **Consumer layers SHOULD**: `related` (joinable dimension tables + `join_on` key + `adds` = what it expands — key to agent analysis efficiency; accept the manual-upkeep \u002F possible-staleness cost), `refresh`.\n- **Staging layer**: the four all-layer MUST fields suffice; `purpose` \u002F `keys` \u002F `related` are usually trivial and may be omitted.\n- **MAY field**: `layer` (omit if inferable from name\u002Fpath; if set, it overrides the validator's layer inference).\n- **Order fields by importance** (`title` → `summary` → `grain` → `purpose` → `keys` → `related` → `sources` → `refresh`): if the description persists into a warehouse comment, tooling often **truncates to ~1000 chars** in list\u002Fsearch, so the most important must come first to survive.\n\n#### Frontmatter content requirements\n\n- **MUST — `grain` required and precise**: what one row represents (\"one entity per day\" \u002F \"one record per month per category\"). This is the single most important field for understanding content + joining correctly.\n- **MUST — strictly parseable YAML**: quote values containing `:` \u002F `#` \u002F leading whitespace and other special chars; lists use `[...]`; objects use `{ key: val }`.\n- **MUST — `summary` \u002F `purpose` carry analytical keywords**: an MCP's `search_tables` matches on comment keywords, so good ones improve the table's discoverability.\n- **`keys.join` semantics**: the keys **downstream can JOIN this table on to expand analysis**. If there's no join key beyond the primary key (common for a single-upstream terminal mart), setting `join` = `primary` or **omitting `join`** is fine — don't fill it just for the sake of it.\n- **Omit `related` when there's none**: list only tables that **really exist and can be joined to expand analysis**; if none, **omit the whole `related`** — don't fabricate.\n- **Use `join_on`, not `on`**: the related join-key field is `join_on`. **A bare `on` is a reserved boolean in YAML 1.1** — PyYAML parses `on:` as `True` and the frontmatter breaks — which is exactly why we avoid it.\n\n### 5.2 Second `\u002F* *\u002F`: detailed business rules \u002F mapping (human-facing, not in the comment)\n\n```sql\n\u002F* 重要業務規則 \u002F 過濾邏輯\n   * 來源 B 優先、來源 A fallback，單一單位為 canonical\n   * source flag: 'source_b' | 'source_a'\n\n   業務邏輯 Mapping (如適用):\n        - 分類名稱       來源代碼       來源名稱\n*\u002F\n```\n\n- **SHOULD** — put verbose business rules, filter logic, and mapping tables here, to avoid bloating the table comment.\n- **Position: immediately after the first block and before `config`** (the two comment blocks are adjacent, then `config`, then the first CTE).\n\n### 5.3 Common\n\n- **MUST — every `\u002F* *\u002F` must be closed.** An unclosed `\u002F* ==` makes the rest of the file get eaten as comment text, breaking Redshift parsing and `dbt run`.\n- **SHOULD** — when `config` (`sort` \u002F `tags`) or the schema changes, keep the frontmatter (especially `grain` \u002F `keys` \u002F `sources`) and the narrative in sync — no drift.\n\n---\n\n## 6. SQL syntax style (Redshift)\n\nStyle-level syntax choices (not calculation logic):\n\n- **MUST** — use `LISTAGG(col, ' | ')`, **not `STRING_AGG`** (Redshift has none).\n- **MUST** — small mapping\u002Flookup uses `UNION ALL`, **not `FROM (VALUES ...)`** (Redshift has none). **(adapt)** inline UNION ALL table vs a dbt seed — per project convention.\n\n```sql\nFROM (\n              SELECT 'code1' AS code, 'name1' AS category\n    UNION ALL SELECT 'code2' AS code, 'name2' AS category\n) AS mapping_table\n```\n\n- **MUST** — always **specify the JOIN type explicitly** (`INNER` \u002F `LEFT`); no implicit `FROM a, b WHERE` joins.\n- **MUST** — same-named join columns use `USING (col, ...)`, terser than a verbose `ON a.x = b.x AND ...`; for the precise preconditions when combined with `.*` passthrough see §2 \u002F `references\u002Fdotstar-passthrough.md`.\n- **note** — Redshift doesn't support `SELECT * EXCEPT` or `FILTER (WHERE ...)`; rewrite the latter with an inline `CASE` or a JOIN.\n\n---\n\n## 7. Config block\n\n- **MUST** — wrap table materialization in an environment guard:\n\n```sql\n{% if target.type=='redshift' %}\n{{ config(\n    materialized = 'table',\n    sort = ['primary_key_column', 'date_column'],\n    tags = ['some_tag']\n) }}\n{% endif %}\n```\n\n- **MUST** — the key is **`materialized`**, not `materialization` (the latter is invalid; there are mis-spelled cases in the wild — don't copy them).\n- **SHOULD** — choose `sort` keys that match the columns actually filtered \u002F joined.\n\n---\n\n## Anti-pattern quick reference\n\n| Anti-pattern | Fix |\n|---|---|\n| `CASE` \u002F `WHERE` \u002F arithmetic \u002F any `AS` alias inside `final` | Move into a dedicated preceding CTE; `final` selects only (§1.2) |\n| Declaring every column just to rename a few | Rename in the preceding CTE + `.*` for the rest (§1.2 §2) |\n| Renaming a CTE \u002F using short aliases `t` `o` | Keep the CTE name; qualify columns with the full CTE name (§1.1 §3) |\n| Cosmetically renaming an already-pushed column | Change the display label; keep the technical id (§3) |\n| Forgetting to close `\u002F* ==` | Every `\u002F*` needs a `*\u002F` (§5) |\n| `STRING_AGG` \u002F `FROM (VALUES)` \u002F `materialization=` | `LISTAGG` \u002F `UNION ALL` \u002F `materialized=` (§6 §7) |\n| Cramming multiple derivations into one CTE | One concern per CTE (§1.1) |\n\n---\n\n## After writing \u002F editing\n\n1. Run `checklists\u002Fdbt-model-self-check.md` item by item.\n2. Run mechanical validation:\n   ```bash\n   # Always checked: layered required header fields + parseable, keys\u002Frelated shape, \u002F* *\u002F balance, materialized spelling\n   python \u003Cskill-dir>\u002Fscripts\u002Fvalidate_header.py models\u002F\n   # Opt-in: related\u002Fsources tables actually exist in the manifest (cures `related` staleness)\n   python \u003Cskill-dir>\u002Fscripts\u002Fvalidate_header.py --manifest target\u002Fmanifest.json models\u002F\n   ```\n   A non-zero exit code = violations. Without `--manifest` it stays **zero-config and runs on a lone file** (only PyYAML, usually already in a dbt env). **(adapt)** the layered required-key lists are at the top of the script (`BASE_REQUIRED` \u002F `CONSUMER_EXTRA`) — tune to your frontmatter schema; adopters wire it into pre-commit \u002F CI \u002F a dbt step.\n3. Ship \u002F open the PR only after it passes.\n","# dbt Model Style\n\n## Purpose & scope\n\nAn opinionated dbt + Redshift model-writing template. Tune `(adapt)` items per project; treat MUST as required, SHOULD as the default, and MAY as situational.\n\n`\u003Cskill-dir>` is this skill's folder: `${CLAUDE_SKILL_DIR}` on Claude Code; on any other host, the directory that holds this SKILL.md.\n\n**When it applies**: whenever you author \u002F edit \u002F review **any** dbt model. **Write comment text and frontmatter *values* in the user's working language** (the examples in this doc stay in Chinese as a demonstration).\n\n**Style & structure only — not computation.** This skill covers how CTEs are arranged, how columns are named, how comments are written, how JOINs are declared. It does **not** cover calculation logic, business rules, metric formulas, NULL\u002Fdenominator semantics, or layer-dependency design — those are a separate matter, out of scope here.\n\nIf a request mixes style and logic, do the style part here and identify the calculation or business-rule part as out of scope. Split the edit; do not silently change computation or refuse the whole request.\n\n**One boundary that genuinely blurs — name-vs-content.** A few style rules can only be *checked* by glancing at the computation: the **name-matches-content MUST** (§3) says a `__paid` column must not smuggle in trial rows, so confirming the **name matches what the column computes** requires reading the logic. That read-to-verify-the-name is in scope; **changing** the computation to fix a mismatch is not — flag the mismatch and hand the logic fix back.\n\n> The one MUST to remember: **the `final` CTE has zero logic — column selection + comments only.** Every other MUST is structural discipline that keeps a model traceable and machine-parseable.\n\n---\n\n## Scope of enforcement (read first — don't run wild)\n\nThis template applies to **newly created models and the model you're currently editing** — whichever you touch, bring it up to standard.\n\n- **Do not proactively mass-backfill \u002F rewrite existing models just to satisfy this guide.** That's pure churn and risk; don't do it unless the user explicitly asks.\n- When editing an existing model, use the **boy-scout rule (bounded)**: bring the **part you touch** (that CTE, those few columns, the header) up to standard — don't rewrite the whole file on the way.\n- An existing model that doesn't match this guide but you aren't touching this time → **leave it; it's not a bug.**\n- A large-scale rollout is a **separate, explicitly-authorized task**, not a side effect of writing a model.\n\n---\n\n## The whole picture: writing order\n\nUse the complete runnable model in `references\u002Fexample-model.sql`. Write inside-out:\n\n1. **Decide `grain` and `keys` first** — what one row represents, the primary \u002F join keys. This shapes the whole model.\n2. Write the **reference CTE** (UPPERCASE, `SELECT *` off the upstream).\n3. Write the **intermediate transform CTEs** — one CTE per step, **all calculation\u002Flogic lives here**.\n4. Write **`final`** — explicit column list + aligned comments + tags, **no logic and no `AS` aliases** (every column arrives already named).\n5. Close with `SELECT * FROM final`, add `config`.\n6. Backfill both headers: `summary`\u002F`purpose`\u002F`sources`\u002F`related` and business rules.\n\n---\n\n## 1. CTE structure\n\n### 1.1 The three CTE roles\n\n- **MUST** — the CTE that first references an external model is **UPPERCASE**, drops the `stg_\u002Fint_\u002Fmart_` prefix, and contains `SELECT *` (no column-by-column list). The name reflects the referenced model's business content; for over-long names, extract the key dimensions (`int_dim__metric_by_segment_region` → `SEGMENT_REGION`).\n- **MUST** — **don't rename CTEs.** Once a CTE name is set, keep it — the name must trace back to the model it references; renaming breaks that thread. (This is about the CTE's *own name*, distinct from §3's *column aliases*.)\n- **MUST** — intermediate transform CTEs use **lowercase descriptive** names (`daily_with_week` \u002F `weekly_aggregation`) reflecting what the step does.\n- **MUST** — **one concern per CTE.** Better to add a CTE than to cram two derivations together to \"save a CTE\" — split, and a future change touches only one, with no cross-contamination.\n- **MUST** — the model always ends with `SELECT * FROM final`.\n\n### 1.2 The `final` CTE iron law (highest priority)\n\n**MUST — the `final` CTE must contain no business logic and no renaming.** Only column selection + comments. Every `CASE`, `WHERE` filter, arithmetic expression, **and every output-name alias (`x AS y`)** moves up into a dedicated preceding CTE: a column reaches `final` already carrying the name it will have in the table.\n\nMove every `CASE`, `WHERE`, arithmetic expression, and rename into a preceding CTE. This makes `final` a stable, directly diffable column-schema contract.\n\nRenaming counts as logic here even though SQL treats an alias as free. An `AS` in `final` means the published column name exists nowhere upstream in the model, so a reader who greps the file for the name they saw in the warehouse lands on one line — the alias — and has to re-read the whole model to find where the value came from. It also breaks the diff property: `final` should compare line-for-line against the table's column list, and an alias makes the two sides disagree by design. Name the column in the CTE that computes it.\n\n---\n\n## 2. Minimize explicit declaration \u002F maximize `.*` passthrough\n\n**SHOULD \u002F MAY — an optional conciseness idiom.** Pass columns through with `.*` so adding an upstream column changes only one line in `final`. **Be concise when you can; fall back to explicit declaration the moment it doesn't fit.** It never overrides `final` zero-logic (§1.2).\n\nChoose among four cases:\n\n- Single source: use `SOURCE_CTE.*` plus derived columns.\n- JOIN: `JOIN ... USING (key)` plus unqualified `SELECT *` keeps one key; `a.*, b.*` duplicates it.\n- Few renames: rename them in the preceding CTE (§1.2 forbids `AS` in `final`), then `source_cte.*` passes everything through.\n- Fall back to an explicit list for value collisions or differently named keys.\n\n> **When a CTE JOINs ≥2 sources and you intend `.*` passthrough, read `references\u002Fdotstar-passthrough.md` in full before writing it** — that file holds the exact `USING` + unqualified-`*` rule, the duplicate-column trap, and the fallback chain. (Single-source passthrough — the common case — doesn't need it.)\n\n---\n\n## 3. Naming\n\n- **MUST** — **model \u002F column names are a user-facing contract.** Once pushed and documented, don't rename them for cosmetics — downstream models, Tableau filter keys, and BI reports depend on them. When you need to change what's shown, change the **display label**; keep the technical column id unchanged.\n- **MUST** — **name matches content.** A column name's qualifier is its promise: a `__paid` metric must not smuggle in trial rows. To add coverage, open a **parallel column** (`__trial` \u002F `__total`) — don't loosen the existing column's semantics.\n- **MUST — variant-naming principle (stable prefix, suffix distinguishes the variant)**: keep the shared base and distinguish time, class, source, or scope with a `__`-separated suffix.\n- **MUST — prefix per the dbt official style guide**: layer prefix + `__` separating source\u002Fentity (`stg_\u003Csource>__\u003Centity>`, `int_`, marts use `fct_` \u002F `dim_`). This is a general dbt convention, not a claim unique to this template.\n- **MUST** — **always qualify column references with the source CTE** (`source_cte.col`); no bare column names, no short table aliases (`t` \u002F `o` \u002F `ci`); write the full CTE name inside JOINs too.\n- **(adapt)** — define project-specific prefix and variant-suffix vocabularies. Put version suffixes only on new models; never bulk-rename existing ones.\n\n---\n\n## 4. Column layout & comments\n\n- **MUST** — 4-space indent; vertically align `SELECT` columns and inline `--` comments.\n\n- **MUST** — every `final` column has a purpose comment; group columns with section headers.\n\n- **MUST — a `final` column comment is the column's business definition, written for someone who only ever sees this `final` CTE.** Shape: `\u003Chuman-readable name>：\u003Cwhat the number means in business terms>`. Assume the reader has the published schema and nothing else — no upstream model, no column list, no idea what your internal buckets or channel prefixes are — because that is literally what a schema catalogue or a BI tooltip gives them. Three failure modes:\n  - `-- 淨額（銷售 − 退款）` — no name to anchor on, and nothing about what this number covers.\n  - `-- credit_card__net_amount：綁定信用卡的淨額，…` — opens by repeating the technical identifier already printed on that same line.\n  - `-- 綁定信用卡淨額：將寬表對應三個通路的 net_amount 欄位在這一週涵蓋的每一天加總` — assembly instructions over upstream columns. Accurate, and useless to the reader: they cannot see those columns, and it still does not say what the number means.\n  Passing: `-- 綁定信用卡淨額：這一週顧客用綁定信用卡付掉的金額，已扣掉退款`. Say what the number counts, what moves it, and what the reader must not do with it (「不可與其他類別相加」). Name an upstream identifier only when the reader genuinely needs it to act — not to show your work.\n\n- **MUST — no emoji in column comments.** A warning is stated in words (「不可與其他類別相加」), never carried by a `⚠️`: the glyph survives copy-paste into a schema catalogue, a BI tooltip or a terminal that renders it as tofu, and it says nothing the sentence does not. Ordinary symbols are fine — ASCII operators, and notation that *is* the calculation (`SUM(...)`, `COUNT(DISTINCT ...)`, `+`, `×`) — since that is the answer to \"how is this computed\".\n\n- **MAY** — continue long column comments on aligned `--` lines so they remain attached to the column.\n\n- **(adapt)** A schema generator may merge aligned continuation lines and normalize their indentation.\n\n- **SHOULD** — tag column roles such as `[OUTPUT]`, `[METADATA]`, and `[AUDIT]`; extend tags per project.\n- **SHOULD** — **3-site comment sync**: when you change a column's description, update the header frontmatter\u002Fnarrative, the internal inline comment, and the `final` column comment **all three at once**. Drift leaves readers with contradictory descriptions of the same column.\n- **MAY** — align CJK comments\u002Ftables by **visual width** (CJK char = 2, ASCII = 1), not character count, or mixed CJK\u002FASCII goes ragged.\n- **(adapt)** — if your project generates schema YAML from inline comments (instead of hand-written `.yml`), then **inline comments = the single source of truth for the schema**; comment quality is load-bearing, not decoration.\n\n---\n\n## 5. The header: two blocks (frontmatter payload + human-facing prose)\n\nThe header splits into **two separate `\u002F* *\u002F` blocks** — this split is functional, not cosmetic:\n\n> **Mechanism (adapt)**: this two-block design assumes your project **(a)** uses dbt `persist_docs` to write the model description into the warehouse table comment (column comments into column comments), and **(b)** has tooling that takes the **first `\u002F* ... *\u002F` block** as the description (e.g. some sql→yml scripts use a non-greedy regex that grabs only the first block). Under that assumption, **only the first block reaches the table comment** — seen by humans reading the comment and by SQL-aware LLMs\u002FMCPs (MCP = a Model Context Protocol server an agent queries, e.g. a Redshift comment server); the second block stays in the `.sql` for humans. If your project doesn't enable `persist_docs`, the two-block split is still a good readability convention — it just loses the \"reaches the comment\" incentive.\n\n> **Is it wired up? (check once, per project)** — the \"first block reaches the comment\" payoff is **invisible from the `.sql` alone**, so confirm the machinery before maintaining the header on faith:\n> 1. `dbt_project.yml` has `persist_docs: {relation: true, columns: true}` (or the model\u002Ffolder-level equivalent).\n> 2. After a `dbt run`, the comment actually landed — check with `\\d+ \u003Cschema>.\u003Ctable>` in `psql`, or `get_table_comment` via the redshift-comment MCP.\n>\n> **If step 2 confirms the comment landed** → the comment-reaching incentives apply (field-order-for-truncation at the ~1000-char list\u002Fsearch cut, `summary`\u002F`purpose` keywords feeding `search_tables`, first block as the agent-facing description).\n> **If the comment did not land** (whether `persist_docs` is off or just misconfigured) → treat §5 as **readability-only**: keep the two-block split + YAML shape (they still help humans and the validator), and keep `summary`\u002F`purpose` keyword-rich (it still aids a human reading the `.sql`) — the keyword **MUST** is *not* cancelled; only its *`search_tables`-discoverability* incentive and the truncation-ordering rule go moot. Don't optimize for a comment nothing reads.\n>\n> `scripts\u002Fvalidate_header.py` checks the header's **shape** (fields present, parseable YAML, balanced `\u002F* *\u002F`) — it does **not** verify the comment persisted. The two steps above are the only persistence check.\n\n### 5.1 First `\u002F* *\u002F`: frontmatter + short narrative (→ table comment, for MCP\u002Fagent)\n\n```sql\n\u002F* ---\ntitle:   區域 B 每日指標值（雙來源合併）\nsummary: 來源 A（本地）+ 來源 B（forecast）合併後的每日指標值，來源 B 優先 \u002F 來源 A fallback\ngrain:   一列 = 一個 (metric_date, entity_id)\npurpose: 區域 B 每日指標值的日\u002F月趨勢、entity 別分析；每日營運報表的指標來源\nkeys:\n  primary: [metric_date, entity_id]\n  join:    [metric_date, entity_id]\nrelated:\n  - { table: int_dim__entity_dimension, join_on: entity_id, adds: entity 基本資料 \u002F 地區 \u002F 分類 }\n  - { table: int_metric__daily_dimension, join_on: [metric_date, entity_id], adds: 其他每日指標 }\nsources: [int_metric__daily_value__region_b__source_a, int_metric__daily_value__region_b__source_b__by_sub]\nrefresh: 日更 T+1（依上游 FDW 延遲）\n---\n\n來源 B-only 的 row 沒對到來源 A 是正常現象（來源 A 只攤本地）。分析總值時用 daily_value（已 merge），勿用 from_source_a \u002F from_source_b 的透明欄位相加。\n*\u002F\n```\n\n- **MUST** — the first `\u002F* *\u002F` contains: ① a `---`-fenced **YAML frontmatter**, ② followed by a **1–3 sentence unstructured narrative** (context the frontmatter can't express — also written for the MCP\u002Fagent).\n\nField requirements are **layered** (staging isn't queried directly by analysts\u002FMCP and is usually 1:1 with its source, so it's relaxed):\n\n- **All layers MUST**: `title` (use the user's working language for the model name, replacing the old `# heading`), `summary`, `grain`, `sources`.\n- **Consumer layers (intermediate \u002F marts \u002F dash) additionally MUST**: `purpose`, `keys` (`primary` + `join`).\n- **Consumer layers SHOULD**: `related` (joinable dimension tables + `join_on` key + `adds` = what it expands — key to agent analysis efficiency; accept the manual-upkeep \u002F possible-staleness cost), `refresh`.\n- **Staging layer**: the four all-layer MUST fields suffice; `purpose` \u002F `keys` \u002F `related` are usually trivial and may be omitted.\n- **MAY field**: `layer` (omit if inferable from name\u002Fpath; if set, it overrides the validator's layer inference).\n- **Order fields by importance** (`title` → `summary` → `grain` → `purpose` → `keys` → `related` → `sources` → `refresh`): if the description persists into a warehouse comment, tooling often **truncates to ~1000 chars** in list\u002Fsearch, so the most important must come first to survive.\n\n#### Frontmatter content requirements\n\n- **MUST — `grain` required and precise**: what one row represents (\"one entity per day\" \u002F \"one record per month per category\"). This is the single most important field for understanding content + joining correctly.\n- **MUST — strictly parseable YAML**: quote values containing `:` \u002F `#` \u002F leading whitespace and other special chars; lists use `[...]`; objects use `{ key: val }`.\n- **MUST — `summary` \u002F `purpose` carry analytical keywords**: an MCP's `search_tables` matches on comment keywords, so good ones improve the table's discoverability.\n- **`keys.join` semantics**: the keys **downstream can JOIN this table on to expand analysis**. If there's no join key beyond the primary key (common for a single-upstream terminal mart), setting `join` = `primary` or **omitting `join`** is fine — don't fill it just for the sake of it.\n- **Omit `related` when there's none**: list only tables that **really exist and can be joined to expand analysis**; if none, **omit the whole `related`** — don't fabricate.\n- **Use `join_on`, not `on`**: the related join-key field is `join_on`. **A bare `on` is a reserved boolean in YAML 1.1** — PyYAML parses `on:` as `True` and the frontmatter breaks — which is exactly why we avoid it.\n\n### 5.2 Second `\u002F* *\u002F`: detailed business rules \u002F mapping (human-facing, not in the comment)\n\n```sql\n\u002F* 重要業務規則 \u002F 過濾邏輯\n   * 來源 B 優先、來源 A fallback，單一單位為 canonical\n   * source flag: 'source_b' | 'source_a'\n\n   業務邏輯 Mapping (如適用):\n        - 分類名稱       來源代碼       來源名稱\n*\u002F\n```\n\n- **SHOULD** — put verbose business rules, filter logic, and mapping tables here, to avoid bloating the table comment.\n- **Position: immediately after the first block and before `config`** (the two comment blocks are adjacent, then `config`, then the first CTE).\n\n### 5.3 Common\n\n- **MUST — every `\u002F* *\u002F` must be closed.** An unclosed `\u002F* ==` makes the rest of the file get eaten as comment text, breaking Redshift parsing and `dbt run`.\n- **SHOULD** — when `config` (`sort` \u002F `tags`) or the schema changes, keep the frontmatter (especially `grain` \u002F `keys` \u002F `sources`) and the narrative in sync — no drift.\n\n---\n\n## 6. SQL syntax style (Redshift)\n\nStyle-level syntax choices (not calculation logic):\n\n- **MUST** — use `LISTAGG(col, ' | ')`, **not `STRING_AGG`** (Redshift has none).\n- **MUST** — small mapping\u002Flookup uses `UNION ALL`, **not `FROM (VALUES ...)`** (Redshift has none). **(adapt)** inline UNION ALL table vs a dbt seed — per project convention.\n\n```sql\nFROM (\n              SELECT 'code1' AS code, 'name1' AS category\n    UNION ALL SELECT 'code2' AS code, 'name2' AS category\n) AS mapping_table\n```\n\n- **MUST** — always **specify the JOIN type explicitly** (`INNER` \u002F `LEFT`); no implicit `FROM a, b WHERE` joins.\n- **MUST** — same-named join columns use `USING (col, ...)`, terser than a verbose `ON a.x = b.x AND ...`; for the precise preconditions when combined with `.*` passthrough see §2 \u002F `references\u002Fdotstar-passthrough.md`.\n- **note** — Redshift doesn't support `SELECT * EXCEPT` or `FILTER (WHERE ...)`; rewrite the latter with an inline `CASE` or a JOIN.\n\n---\n\n## 7. Config block\n\n- **MUST** — wrap table materialization in an environment guard:\n\n```sql\n{% if target.type=='redshift' %}\n{{ config(\n    materialized = 'table',\n    sort = ['primary_key_column', 'date_column'],\n    tags = ['some_tag']\n) }}\n{% endif %}\n```\n\n- **MUST** — the key is **`materialized`**, not `materialization` (the latter is invalid; there are mis-spelled cases in the wild — don't copy them).\n- **SHOULD** — choose `sort` keys that match the columns actually filtered \u002F joined.\n\n---\n\n## Anti-pattern quick reference\n\n| Anti-pattern | Fix |\n|---|---|\n| `CASE` \u002F `WHERE` \u002F arithmetic \u002F any `AS` alias inside `final` | Move into a dedicated preceding CTE; `final` selects only (§1.2) |\n| Declaring every column just to rename a few | Rename in the preceding CTE + `.*` for the rest (§1.2 §2) |\n| Renaming a CTE \u002F using short aliases `t` `o` | Keep the CTE name; qualify columns with the full CTE name (§1.1 §3) |\n| Cosmetically renaming an already-pushed column | Change the display label; keep the technical id (§3) |\n| Forgetting to close `\u002F* ==` | Every `\u002F*` needs a `*\u002F` (§5) |\n| `STRING_AGG` \u002F `FROM (VALUES)` \u002F `materialization=` | `LISTAGG` \u002F `UNION ALL` \u002F `materialized=` (§6 §7) |\n| Cramming multiple derivations into one CTE | One concern per CTE (§1.1) |\n\n---\n\n## After writing \u002F editing\n\n1. Run `checklists\u002Fdbt-model-self-check.md` item by item.\n2. Run mechanical validation:\n   ```bash\n   # Always checked: layered required header fields + parseable, keys\u002Frelated shape, \u002F* *\u002F balance, materialized spelling\n   python \u003Cskill-dir>\u002Fscripts\u002Fvalidate_header.py models\u002F\n   # Opt-in: related\u002Fsources tables actually exist in the manifest (cures `related` staleness)\n   python \u003Cskill-dir>\u002Fscripts\u002Fvalidate_header.py --manifest target\u002Fmanifest.json models\u002F\n   ```\n   A non-zero exit code = violations. Without `--manifest` it stays **zero-config and runs on a lone file** (only PyYAML, usually already in a dbt env). **(adapt)** the layered required-key lists are at the top of the script (`BASE_REQUIRED` \u002F `CONSUMER_EXTRA`) — tune to your frontmatter schema; adopters wire it into pre-commit \u002F CI \u002F a dbt step.\n3. Ship \u002F open the PR only after it passes.\n",{"name":5,"description":7},"main","3b1a9972644517911454530dc1876f88525b1f37","loom-workflow\u002Fskills\u002Fdbt-model-style","https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins","https:\u002F\u002Fgithub.com\u002Fkouko","2026-11-15 00:45:02",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add kouko\u002Floom-plugins --skill dbt-model-style",{"tool":35,"command":36},"bunx","bunx skills add kouko\u002Floom-plugins --skill dbt-model-style",{"tool":38,"command":39},"pnpm","pnpm dlx skills add kouko\u002Floom-plugins --skill dbt-model-style","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fdbt-model-style\u002FSKILL.md",true,[43,49,53,57,61],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"checklists\u002Fdbt-model-self-check.md","REFERENCE","参考文档",4306,"https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fdbt-model-style\u002Fchecklists\u002Fdbt-model-self-check.md",{"path":50,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":51,"sourceHtmlUrl":52},"README.md",1712,"https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fdbt-model-style\u002FREADME.md",{"path":54,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fdotstar-passthrough.md",4086,"https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fdbt-model-style\u002Freferences\u002Fdotstar-passthrough.md",{"path":58,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fexample-model.sql",4503,"https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fdbt-model-style\u002Freferences\u002Fexample-model.sql",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"scripts\u002Fvalidate_header.py","SCRIPT","脚本",12843,"https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fdbt-model-style\u002Fscripts\u002Fvalidate_header.py",[68,75,82,89,96,103],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7CQNVD2W5MP7PKX3MD0YSQE","using-loom-workflow","Route broad Loom workflow-tool requests to the right skill. Use when the request spans tools or the right workflow skill is unclear.","https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fusing-loom-workflow\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7CQNNTPVG52CS2C6Q9HJ2E2","skill-retro","Review selected past or current Claude Code or Codex sessions against readable target skill sources and related integration. Produce source-linked proposals without applying changes.","https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fskill-retro\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7CQNHR1BDKJ63CC4R1RY9GE","recap-state","Give an in-session recap of current progress for 'where were we', '我們剛剛在幹嘛', '剛剛講到哪', '我跟丟了', 'ちょっと振り返って', '今どこだっけ', or '振り返り'. The built-in \u002Frecap is an away-summary.","https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Frecap-state\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M7CQNE1A9272WPRE1MM3JRFK","project-retro","Review one current or specified coding session for source-backed project\ndevelopment improvements. Use for a requested retrospective, including\n振り返り seeking improvements; not for current-progress recaps or recurring skill mining.","https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Fproject-retro\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":18},"01M7CQNACJB36T0A039HT89P38","loom-visualization","Show comparisons, flows, decisions, states or reasoning chains as tables, ASCII or Mermaid in coding chat, including when a Loom station reports to the user (intent restatement, choices, acceptance test results); not Obsidian notes.","https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Floom-visualization\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":18},"01M7CQN7TVS0XF44JXQBWA32Z1","loom-memory","Record repo-wide lessons when saving to your own memory or asked to remember; recall, reconcile, or forget them when a task needs it.","https:\u002F\u002Fgithub.com\u002Fkouko\u002Floom-plugins\u002Fblob\u002Fmain\u002Floom-workflow\u002Fskills\u002Floom-memory\u002FSKILL.md",[],[]]