repository-writeback
Ce qu’il fait
Cette compétence guide les modifications de la couche sémantique d'un projet dbt par pull request. Elle s'adresse aux ingénieurs analytiques qui veulent que l'agent mette à jour les descriptions de champs, les notes de métriques et les indications pour l'IA de leurs modèles dbt.
Quand l’utiliser
- ✓Quand vous voulez mettre à jour les descriptions de champs dans un projet dbt via une pull request.
- ✓Quand vous voulez ajouter des indications pour l'IA qui précisent à un agent quel champ utiliser pour une question.
- ✓Quand une pull request fusionnée nécessite un suivi sur le contenu qui en dépend.
Lien du skill
https://github.com/lightdash/lightdash/blob/main/packages/backend/src/ee/services/ai/skills/builtInSkills/repository-writeback/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Mets à jour les descriptions des métriques de revenus dans le modèle orders, et ouvre une pull request avec la modification.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
La compétence demande à l'agent de lire d'abord les fichiers cibles, de confirmer que la modification est nécessaire, puis d'ouvrir la pull request en nommant précisément le fichier. Elle explique la différence entre la description d'un champ et son indication pour l'IA, et comment garder chacune au bon endroit.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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
Questions fréquentes
Quelle est la différence entre une description et une indication pour l'IA ?
Une description dit ce qu'est un champ, tandis qu'une indication pour l'IA précise à un agent quand choisir ce champ.
Ouvrira-t-elle une pull request sans demander ?
Si votre demande prévoit déjà la modification, elle ouvre la pull request ; sinon elle propose la modification et attend un accord.
Vérifie-t-elle la modification avant ?
Oui, elle lit les fichiers d'abord et signale si le code fait déjà ce qui est demandé.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 6.2k
- Position au classement
- #14400
- Licence
- —
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
breakup-pr
6.2kAide votre agent à découper une grande pull request en petites tranches empilées qui peuvent être relues et fusionnées une à une.
lightdash-agent-slack-messaging
6.2kAide votre agent à rédiger des rapports de maintenance et d'activité clairs et bienveillants pour les administrateurs Lightdash, en se basant uniquement sur les preuves disponibles.
developing-in-lightdash
6.2kAide votre agent à lire, créer et modifier des tableaux de bord et des graphiques Lightdash au format JSON, y compris les réglages propres à chaque type de graphique.
filter-expressions
6.2kAide votre agent à écrire des expressions de filtre correctes pour les requêtes de métriques Lightdash, y compris les filtres sur des métriques personnalisées.
Skills similaires
discrawl
394kPermet à votre agent de rechercher et de résumer une archive locale des messages Discord, de vérifier sa fraîcheur et de lire les messages privés.
clickhouse-io
280kAide votre agent à optimiser requêtes et schémas ClickHouse selon les bonnes pratiques pour les analyses hautes performances. À utiliser si les requêtes sont trop lentes.
scientific-db-pubmed-database
280kAide votre agent à rechercher des articles scientifiques dans le domaine biomédical. Utile pour les recherches nécessitant des informations médicales précises.