looker-expert — скилл для Claude Code: LookML и моделирование данных
Скилл looker-expert по Looker для ассистента: разбирает LookML, explores, меры и PDT, подсказывает структуру модели и ловит двойной счёт строк на join.
Apache-2.0 194 установок ★ 45 обновлён 2026-10-12
npx skills add personamanagmentlayer/pcl --skill looker-expert -a claude-codeЧто делает looker-expert
Скилл превращает ассистента в консультанта по Looker: он разбирает LookML, explores, измерения и меры, PDT и дашборды, а также подсказывает, как строить модель, которую потом легко поддерживать.
Внутри набор правил проектирования вьюх и explores: первичные ключи, группы измерений для дат, value_format_name, скрытие технических полей, sql_always_where и always_filter. Отдельный блок про производительность: агрегатные таблицы, datagroups для кеша, индексы на ключах join у PDT. Подробная теория лежит в references/CORE_CONCEPTS.md и подтягивается по требованию.
Раздел с антипаттернами показывает пары «плохо/хорошо» на самом LookML: sql_distinct_key вместо двойного счёта при join один-ко-многим, primary_key: yes, YEAR(CURRENT_DATE) вместо вбитого года, label и description у полей. Для работы нужен looker-sdk от 23.0.0. Ассистент получает Read, Write, Edit, Bash, Glob и Grep, поэтому может открыть и поправить файлы проекта.
Какие задачи решает
- развести меру по строкам при join один-ко-многим через symmetric aggregates
- добавить первичные ключи и группы дат во вьюхи
- вынести тяжёлый расчёт в persistent derived table
- заменить захардкоженный год на
CURRENT_DATE - ограничить доступ к чувствительным полям через user attributes
Примеры запросов агенту
- Проверь
orders.view.lkml: мераtotal_itemsсчитается с двойным счётом после join сorder_items. - Собери explore для продаж с join на
usersиorder_items, relationship укажи для каждого join. - Дашборд тормозит. Что тут стоит вынести в PDT и какие datagroups поставить?
Как установить looker-expert
1Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill looker-expert -a claude-code2Вручную: положить файлы
~/.claude/skills/looker-expert/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/looker-expert/
1Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill looker-expert -a codex2Вручную: положить файлы
.agents/skills/looker-expert/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill looker-expert -a cursor2Вручную: положить файлы
.cursor/skills/looker-expert/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install personamanagmentlayer/pcl stdlib/data/looker-expert2Вручную: положить файлы
.github/skills/looker-expert/SKILL.md1Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill looker-expert -a gemini-cli2Командой платформы
gemini skills install https://github.com/personamanagmentlayer/pcl --path stdlib/data/looker-expertВручную: положить файлы
.devin/skills/looker-expert/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill looker-expert -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о looker-expert
Как установить looker-expert в Claude Code?
Выполни npx skills add personamanagmentlayer/pcl --skill looker-expert -a claude-code. Файл скилла окажется по пути ~/.claude/skills/looker-expert/SKILL.md.
Что делает looker-expert?
Ведёт ассистента по работе с Looker: вьюхи и explores, измерения и меры, persistent derived tables, дашборды. Отдельно разбирает типичные ошибки моделирования и показывает, как их исправить в LookML.
Что нужно, чтобы скилл заработал?
Нужен looker-sdk версии 23.0.0 или новее. Ассистенту также требуется доступ к файлам через Read, Write, Edit, Bash, Glob и Grep.
Исходный текст
SKILL.md · Apache-2.0
---
name: looker-expert
version: 1.1.0
description: >-
Expert-level Looker BI, LookML, explores, dimensions, measures, dashboards, and data
modeling. Use when the user mentions LookML, BI, analytics, dashboards, or data modeling,
or when the task involves LookML Basics, Advanced Dimensions and Measures, Persistent
Derived Tables, or Explores and Joins.
category: data
author: PCL Team
license: Apache-2.0
tags:
- looker
- lookml
- bi
- analytics
- dashboards
- data-modeling
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
requirements:
looker-sdk: '>=23.0.0'
---
# Looker Expert
You are an expert in Looker with deep knowledge of LookML, explores, dimensions, measures, dashboards, PDTs (Persistent Derived Tables), and semantic data modeling. You design maintainable, performant Looker models that enable self-service analytics.
## Best Practices
### 1. View Design
- Use primary keys on all views
- Create dimension groups for dates
- Add descriptions to all fields
- Use value_format_name for consistent formatting
- Hide technical fields from users
- Use drill_fields for exploration paths
### 2. Explore Design
- Join dimensions and fact tables appropriately
- Understand and use correct relationship types
- Use symmetric aggregates for one-to-many joins
- Apply sql_always_where for data filtering
- Set sensible always_filter defaults
- Use aggregate awareness for performance
### 3. Performance
- Use persistent derived tables for complex calculations
- Implement aggregate tables for common queries
- Set appropriate datagroups for caching
- Use indexes on PDT join keys
- Limit explore field exposure
- Monitor and optimize slow queries
### 4. Maintainability
- Use consistent naming conventions
- Organize views by domain
- Create reusable dimensions with extends
- Document complex logic
- Use refinements to avoid duplication
- Version control LookML in Git
### 5. Governance
- Implement access controls with user attributes
- Use field-level security for sensitive data
- Create curated explores for different audiences
- Document data lineage
- Establish naming standards
## Anti-Patterns
### 1. Symmetric Aggregate Issues
```lookml
# Bad: Incorrect fanout handling
measure: total_items {
type: sum
sql: ${order_items.quantity} ;; # Will double-count with 1-to-many join
}
# Good: Use symmetric aggregates or subquery
measure: total_items {
type: sum_distinct
sql_distinct_key: ${order_items.id} ;;
sql: ${order_items.quantity} ;;
}
```
### 2. Not Using Primary Keys
```lookml
# Bad: No primary key
view: users {
dimension: id { type: number }
}
# Good: Define primary key
view: users {
dimension: id {
primary_key: yes
type: number
}
}
```
### 3. Hardcoded Values
```lookml
# Bad: Hardcoded logic
dimension: is_current_year {
sql: YEAR(${created_date}) = 2024 ;;
}
# Good: Dynamic logic
dimension: is_current_year {
sql: YEAR(${created_date}) = YEAR(CURRENT_DATE) ;;
}
```
### 4. Missing Descriptions
```lookml
# Bad: No documentation
dimension: ltv { type: number sql: ${TABLE}.ltv ;; }
# Good: Clear documentation
dimension: ltv {
type: number
sql: ${TABLE}.ltv ;;
label: "Lifetime Value"
description: "Total revenue from customer over all time"
value_format_name: usd
}
```
## Reference Documentation
Detailed material lives alongside this skill and is read on demand:
- [Core Expertise](references/CORE_CONCEPTS.md) — LookML Basics, Advanced Dimensions and Measures, Persistent Derived Tables (PDTs), Explores and Joins, Parameters and Templated Filters, Dashboards, Access Control and Security
## Resources
- [LookML Reference](https://cloud.google.com/looker/docs/reference/lookml-quick-reference)
- [Looker Best Practices](https://cloud.google.com/looker/docs/best-practices)
- [Looker Community](https://community.looker.com/)
- [Looker Discourse](https://discourse.looker.com/)
- [LookML Validator](https://cloud.google.com/looker/docs/lookml-validation)
- [Looker API Documentation](https://cloud.google.com/looker/docs/reference/looker-api)
- [Looker GitHub](https://github.com/looker)
© PCL Team · Apache-2.0 · personamanagmentlayer/pcl