YY

yarahq/yara-rule-skill

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

60 stars 质量 60 趋势 14

LLM 代理技能用于 YARA 规则编写与审查

概览

一个面向专家的YARA规则编写、审查和优化的网站。将YARA-Forge和yaraQA的开发者提出的行业最佳实践融入你的AI助手的环境中。 这将使你的LLM代理成为YARA规则专家,具备以下能力: - 从零开始制定高质量、高性能的YARA规则——现有的质量问题和性能问题规则——通过识别性能瓶颈来降低速度——反对YARAQA中20+自动质量检查的规则 整个自然语言对话——只需粘贴一条规则并提出请求。 该技能适用于任何支持技能文件的LLM代理: - — ~/.openclaw/skills/ - —(技能文件夹位置不同)- — 请查看你平台的文档 安装后,该技能在讨论YARA规则时会自动激活。尽管提问: “审查此YARA规则并提出改进建议”

概述(AI 翻译)

LLM 代理技能,用于专家级的 YARA 规则编写、审查和优化。将 YARA-Forge 和 yaraQA 的行业最佳实践融入你的 AI 助手的语境中。

🎯 这项技能的作用

yara-rule-skill 将你的 LLM 代理转变为 YARA 规则专家,具备:

  • **从零开始编写高质量、高性能的YARA规则
  • 审查现有质量问题和性能问题规则
  • 通过识别性能瓶颈优化慢规则
  • 验证针对20+自动质量检查的规则,来自yaraQA

整个自然语言对话——只需粘贴一条规则并提出请求。

📦 安装

选项1:克隆并复制(推荐)

选项2:打包成.skill文件

支持的平台

该技能适用于任何支持技能文件的LLM代理:

  • OpenClaw — ~/.openclaw/skills/
  • Claude Desktop — (技能文件夹位置不一)
  • 其他基于MCP的代理 — 请查看你平台的文档

🚀 用途

安装后,该技能在讨论YARA规则时会自动激活。尽管提问:

用例1:复习我的规则

“审查此YARA规则并提出改进建议”

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

YARA Rule Skill (Community Edition)

An LLM agent skill for writing, reviewing, and optimizing YARA rules. It puts the practices behind YARA-Forge and yaraQA into your AI assistant’s context.

What This Skill Does

With the skill installed, your agent can:

  • Write rules from samples or strings you provide, following the YARA Style Guide
  • Review existing rules and report findings with yaraQA and guideline IDs
  • Optimize slow rules and fix “too many matches” errors
  • Validate every rule it outputs by compiling it with YARA-X and YARA 4.x
  • Prepare rules for YARA-Forge (no compile warnings, explicit score, clean metadata)

Paste a rule and ask, or describe what you want to detect.

Installation

git clone https://github.com/YARAHQ/yara-rule-skill.git

# Claude Code (personal skills)
cp -r yara-rule-skill/yara-rule-skill ~/.claude/skills/

# OpenClaw
cp -r yara-rule-skill/yara-rule-skill ~/.openclaw/skills/

Install the validator dependencies:

pip install -r yara-rule-skill/yara-rule-skill/scripts/requirements.txt

Option 2: Package as a .skill file

git clone https://github.com/YARAHQ/yara-rule-skill.git
cd yara-rule-skill
python3 installer/package_skill.py
cp yara-rule-skill.skill ~/.openclaw/skills/

Supported platforms

Any agent that supports SKILL.md skills:

  • Claude Code: ~/.claude/skills/ (personal) or .claude/skills/ (project)
  • OpenClaw: ~/.openclaw/skills/
  • Other agents: see your platform’s documentation

Usage

The skill activates when you talk about YARA rules.

Review a rule

“Review this YARA rule and suggest improvements”

You get a verdict, a findings table (ID, severity, fix), and your rule back with minimal fixes and inline comments. The returned rule always compiles.

Assess public rules

“Assess the quality of this rule I found online”

Checks logic errors (conditions that never match, fullword on paths), performance (short atoms, unanchored regex, expensive conditions), false-positive risk, metadata, and naming.

Diagnose performance

“This rule causes performance issues, why?”

Walks through the Performance Guidelines’ checklist: regex quantifiers, short or uniform atoms, alternations, loops, modules.

Write a rule

“Write a YARA rule for these strings from the sample”

Produces a named, documented rule with grouped strings ($x*, $s*, $a*, $fp*), validated before it’s returned.

What’s Included

Sources

Source Covers
YARA Style Guide Naming, metadata, string groups, condition layout
YARA Performance Guidelines Atoms, regex, short-circuit evaluation, modules
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add yarahq/yara-rule-skill
新手?先看 mcpskill.org 教程 →