monte-carlo-prevent
它能做什么
这个工具可以帮你检查数据的健康状况,并在修改数据代码之前了解改动会带来什么影响。它会展示数据表的质量信息、正在触发的告警,以及数据之间的关联关系。
适用场景
- ✓打开或编辑数据代码文件(SQL 或 dbt)时。
- ✓提到某个数据表或数据模型的名称时。
- ✓在修改现有数据模型之前。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/monte-carlo-prevent/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在我添加新列之前,帮我检查 'user_data' 表的健康状况和当前的告警。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会连接 Monte Carlo,获取你的数据质量信息。它会分析数据表的健康状况、告警以及数据流向,在你修改之前为你提供背景信息。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Monte Carlo Prevent Skill
This skill brings Monte Carlo's data observability context directly into your editor. When you're modifying a dbt model or SQL pipeline, use it to surface table health, lineage, active alerts, and to generate monitors-as-code without leaving Claude Code.
Reference files live next to this skill file. Use the Read tool (not MCP resources) to access them:
- Full workflow step-by-step instructions:
references/workflows.md(relative to this file) - MCP parameter details:
references/parameters.md(relative to this file) - Troubleshooting:
references/TROUBLESHOOTING.md(relative to this file)
When to activate this skill
Do not wait to be asked. Run the appropriate workflow automatically whenever the user:
References or opens a
.sqlfile or dbt model (files inmodels/) → run Workflow 1Mentions a table name, dataset, or dbt model name in passing → run Workflow 1
Describes a planned change to a model (new column, join update, filter change, refactor) → STOP — run Workflow 4 before writing any code
Adds a new column, metric, or output expression to an existing model → run Workflow 4 first, then ALWAYS offer Workflow 2 regardless of risk tier — do not skip the monitor offer
Asks about data quality, freshness, row counts, or anomalies → run Workflow 1
Wants to triage or respond to a data quality alert → run Workflow 3
Present the results as context the engineer needs before proceeding — not as a response to a question.
When NOT to activate this skill
Do not invoke Monte Carlo tools for:
- Seed files (files in seeds/ directory)
- Analysis files (files in analyses/ directory)
- One-off or ad-hoc SQL scripts not part of a dbt project
- Configuration files (dbt_project.yml, profiles.yml, packages.yml)
- Test files unless the user is specifically asking about data quality
If uncertain whether a file is a dbt model, check for {{ ref() }} or {{ source() }} Jinja references — if absent, do not activate.
Macros and snapshots — gate edits, skip auto-context
Macro files (macros/) and snapshot files (snapshots/) are not models, so
do not auto-fetch Monte Carlo context (Workflow 1) when they are opened. However,
macros are inlined into every model that calls them at compile time — a one-line
macro change can silently alter dozens of models. Snapshots control historical
tracking and are similarly sensitive.
The pre-edit hook gates these files. If the hook fires for a macro or snapshot, identify which models are affected and run the change impact assessment (Workflow 4) for those models before proceeding with the edit.
REQUIRED: Change impact assessment before any SQL edit
Before editing or writing any SQL for a dbt model or pipeline, you MUST run Workflow 4.
This applies whenever the user expresses intent to modify a model — including phrases like:
- "I want to add a column…"
- "Let me add / I'm adding…"
- "I'd like to change / update / rename…"
- "Can you add / modify / refactor…"
- "Let's add…" / "Add a
<column>column" - Any other description of a planned schema or logic change
- "Exclude / filter out / remove [records/customers/rows]…"
- "Adjust / increase / decrease [threshold/parameter/value]…"
- "Fix / bugfix / patch [issue/bug]…"
- "Revert / restore / undo [change/previous behavior]…"
- "Disable / enable [feature/logic/flag]…"
- "Clean up / remove [references/columns/code]…"
- "Implement [backend/feature] for…"
- "Create [models/dbt models] for…" (when modifying existing referenced tables)
- "Increase / decrease / change [max_tokens/threshold/date constant/numeric parameter]…"
- Any change to a hardcoded value, constant, or configuration parameter within SQL
- "Drop / remove / delete [column/field/table]"
- "Rename [column/field] to [new name]"
- "Add [column]" (short imperative form, e.g. "add a created_at column")
- Any single-verb imperative command targeting a column, table, or model (e.g. "drop X", "rename Y", "add Z", "remove W")
Parameter changes (threshold values, date constants, numeric limits) appear safe but silently change model output. Treat them the same as logic changes for impact assessment purposes.
Do not write or edit any SQL until the change impact assessment (Workflow 4) has been presented to the user. The assessment must come first — not after the edit, not in parallel.
Pre-edit gate — check before modifying any file
…
常见问题
什么时候应该使用这个工具?
只要你准备编辑数据代码,尤其是 dbt 模型,就可以使用它。在添加列、修改过滤条件或重构代码之前,这一步尤其重要。
如果编辑前不用这个工具,会怎样?
你可能在不知情的情况下改动了其他数据代码,从而导致意料之外的数据质量或可用性问题。
这个工具会自动创建或修改代码吗?
不会。它只提供信息和告警,帮助你做出判断。它可能会建议创建 'monitors-as-code',但最终修改代码还是需要你自己来完成。
详情
作者的原始描述
Surfaces Monte Carlo data observability context (table health, alerts, lineage, blast radius) before SQL/dbt edits.
热度
- GitHub 星标
- 48k
- 排名
- #5245
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。