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★ 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(runsync_sql_filesif 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:
- Regex matching —
REGEXP_LIKE(sql_content, match_pattern)against all synced SQL - 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.GetOrderTotalprocedure regex 2 dbo.CalcDiscountprocedure regex 3 dbo.UpdateInventoryprocedure semantic Options:
- Apply to all N — batch apply
- Select specific ones — pick by number
- 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.
Установить 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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic