Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rule-engine-propagate

БесплатноБез исполняемых скриптовНе проверен

Find code units that match a given rule for batch application. Uses reverse search (regex + Cortex semantic) to identify propagation candidates. Triggers…

sfc-gh-dflippoот sfc-gh-dflippo★ 35 звёзд на GitHub

Об этом скилле

Rule Propagation — Find Matching Code Units

Given a rule, find all code units in the project that the rule applies to using a lightweight, interactive reverse search (regex + Cortex semantic matching).

Prerequisites

  • Rule engine set up (../SKILL.md)
  • SQL files synced to RULE_ENGINE.CODE_UNITS_SQL (run sync_sql_files if not done yet)
  • A rule to propagate (by ID or name)

Step 1: Identify the Rule

Accept a rule ID, rule name, or description from the user. If the user says "my latest rule" or "the rule I just created", check recent rules:

SELECT id, name, replacement_mode, created_at
FROM RULE_ENGINE.RULES
ORDER BY created_at DESC
LIMIT 5;

If the user provides a description rather than an exact ID, use find_similar_rules to locate it.

Step 2: Ensure SQL Files Are Synced

Before searching, make sure the project's converted SQL files are indexed:

Use the sync_sql_files tool with directory set to <project_dir>/snowflake.

If the user recently synced or you know files are up to date, skip this step.

Step 3: Find Matching Code Units

Use the reverse_search_rules tool with rule_id set to the identified rule ID.

This runs:

  1. Regex matching — REGEXP_LIKE(sql_content, match_pattern) against all synced SQL
  2. Cortex semantic search — finds structurally similar code that the regex might miss

Step 4: Review and Filter Results

Present the matches to the user:

Rule "EXEC to CALL" matches N code units:

# Code Unit Type Match Source
1 dbo.GetOrderTotal procedure regex
2 dbo.CalcDiscount procedure regex
3 dbo.UpdateInventory procedure semantic

Options:

  1. Apply to all N — batch apply
  2. Select specific ones — pick by number
  3. Review each first — I'll show the relevant code sections

For semantic matches (lower confidence), briefly read the file and verify the pattern actually applies.

Step 5: Hand Off to Apply

Once the user selects targets:

→ Load ../apply/SKILL.md with the selected rule(s) and target file list.

Pass along:

  • The rule details (id, replacement_mode, replacement_find, replacement_replace, ai_context, examples)
  • The list of target file paths
  • Whether this is a batch-all or selective application

Quick Shortcut

For rapid propagation without interactive review:

"Apply rule <rule_id> to all matching code units"

This chains Steps 1–5 automatically: identify rule → sync → reverse search → apply all.

Полный SKILL.md на GitHub

Установить rule-engine-propagate в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл rule-engine-propagate?

Find code units that match a given rule for batch application. Uses reverse search (regex + Cortex semantic) to identify propagation candidates. Triggers: propagate rule, find candidates, which objects match, apply rule everywhere.

Как установить скилл rule-engine-propagate?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rule-engine-propagate запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rule-engine-propagate с