repository-writeback
하는 일
이 스킬은 풀 리퀘스트를 통해 dbt 프로젝트의 시맨틱 레이어를 바꾸는 과정을 안내합니다. 필드 설명, 지표 메모, AI 힌트를 업데이트하려는 분석 엔지니어를 위한 스킬입니다.
사용하는 경우
- ✓풀 리퀘스트로 dbt 프로젝트의 필드 설명을 바꾸고 싶을 때.
- ✓에이전트에게 어떤 필드를 써야 할지 알려 주는 AI 힌트를 추가하고 싶을 때.
- ✓병합된 풀 리퀘스트에 의존하는 콘텐츠의 후속 작업이 필요할 때.
스킬 링크
https://github.com/lightdash/lightdash/blob/main/packages/backend/src/ee/services/ai/skills/builtInSkills/repository-writeback/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“orders 모델의 매출 지표 설명을 업데이트하고, 변경 사항을 담은 풀 리퀘스트를 열어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 에이전트가 먼저 대상 파일을 읽고, 변경이 필요한지 확인한 뒤, 정확히 지정된 파일로 풀 리퀘스트를 열도록 지시합니다. 필드 설명과 AI 힌트의 차이, 그리고 각각을 어디에 두어야 하는지 설명합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Repository writeback
editDbtProject changes this project's semantic layer through a pull request; its description and parameters cover the call and the prompt. This skill covers what to change and what follows.
Ask or act. When the user's request already asks for the change ("fix it", "open a PR", "clean these up", "update the descriptions"), call editDbtProject without asking again. When you suggest a fix the user did not ask for, offer it, naming the fields involved, and wait for a yes. When it is unclear whether a request should land in the repository at all, ask one short question.
Read first. Before editDbtProject, read the files you intend to change with exploreRepo: confirm the change is needed (when the code already does what was asked, say so instead of opening an empty pull request), name the exact target file in the prompt, and match the surrounding conventions.
Descriptions and AI hints. A field carries two metadata channels:
descriptiondefines what the field is (its grain, its source, what it measures), and people read it in the catalog and the UI.ai_hint(model- and field-level) tells the agent when to choose this field over a similar one: routing directives ("use this metric for X; combine with Y to break down by Z"), join recipes, and caveats such as "not suitable for X, useother_model".
Put agent steering in ai_hint and keep description edits to the field's own definition: steering in a description pollutes the human-facing semantic layer and fits it to one question. Disambiguate two legitimately similar fields that cannot be merged with an ai_hint on each.
Impact of removals and renames. When a change removes or renames a field, call analyzeFieldImpact right after editDbtProject starts, for each field id that goes away (the old id for a rename), and add a few lines to your reply: whether it breaks content, the totals (charts, dashboards, dependent metrics, scheduled deliveries) and the most notable items, or that nothing references the field. The check is advisory: the pull request stands whatever it returns. Skip it for additions and for description- or SQL-only edits.
Value correctness. The impact check shows what would break, not whether the numbers survive. When a change claims to preserve values (merging duplicate metrics, replacing or repointing a field, splitting a metric into parts that should sum back to it, refactoring a field's SQL), prove the claim before calling the change safe, with the cheapest sufficient method:
- By construction: read the field definitions and the model SQL (with
exploreRepowhen the metadata is not enough). The same aggregation over the same rows, a uniqueness or non-null guarantee (arow_number() = 1dedup, a primary key) or a split whose parts partition the original is enough; state the guarantee in plain terms. - By data: when the SQL cannot guarantee it (unions, multi-stream models, nullable join keys, differing filters or grains), query the fields at a total grain and across a time dimension and check the expected relationship on every row: equality for a replacement or dedup, parts summing to the original for a split.
Settle it before calling editDbtProject when you can, otherwise in the same turn, and report it with the impact. When the numbers diverge, name the rows or periods that differ and rework the change or ask the user how to proceed rather than calling it safe. Skip this for additions and description- or label-only edits.
Splitting work into pull requests. Group edits that belong together (several description fixes on one model, the changes that add one metric) in one pull request, and split unrelated changes with startNewPullRequest so each can be reviewed and merged alone; when unsure, prefer a new pull request, since a spare one is easy to close and mixed changes are not easy to separate. When the split is obvious, make it and tell the user what went where. When a broad request ("improve the semantic layer") could reasonably be one pull request or several, lay out the groupings and ask before opening any.
listWorkstreams shows the pull requests this thread opened, getPullRequestDiff what one contains, and closePullRequest discards one the user asks to drop, for example after you fold its change into the one you continue with prUrl.
After a merge. Merging from the pull request card in the thread recompiles the project and sends you a follow-up turn that p
자주 묻는 질문
설명과 AI 힌트의 차이는 무엇인가요?
설명은 필드가 무엇인지 말하고, AI 힌트는 에이전트에게 언제 그 필드를 선택해야 하는지 알려 줍니다.
요청하지 않아도 풀 리퀘스트를 여나요?
요청에 이미 변경이 포함되어 있으면 풀 리퀘스트를 열고, 그렇지 않으면 변경을 제안한 뒤 승인을 기다립니다.
변경 전에 확인하나요?
네, 먼저 파일을 읽고, 코드가 이미 요청된 대로 작동하면 그렇다고 말합니다.
상세 정보
작성자의 원본 설명
Workflow for semantic-layer pull requests (`editDbtProject`), covering when to ask first, descriptions versus AI hints, impact and value checks, splitting work into pull requests, and the content migration after a merge. Load it before changing the dbt project and when a merged pull request needs follow-up.
repo: lightdash/lightdash
인기도
- GitHub 스타
- 6.2k
- 순위
- #14400
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
breakup-pr
6.2k에이전트가 큰 풀 리퀘스트를 검토하고 병합할 수 있는 작은 스택형 조각으로 나누도록 돕습니다.
lightdash-agent-slack-messaging
6.2k에이전트가 제공된 근거만 바탕으로, Lightdash 관리자를 위한 명확하고 친근한 유지 보수 및 활동 보고서를 작성하도록 돕습니다.
developing-in-lightdash
6.2k에이전트가 Lightdash 대시보드와 차트를 JSON으로 읽고, 만들고, 수정하도록 돕습니다. 차트 종류별 설정도 포함합니다.
filter-expressions
6.2k에이전트가 Lightdash 지표 쿼리에 쓸 필터 식을 올바르게 작성하도록 돕습니다. 사용자 정의 지표에 대한 필터도 포함합니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.