LLM Agent Skill for YARA rule authoring and review
npx skills add https://github.com/yarahq/yara-rule-skill --skill yara-skillInstall this skill with the CLI and start using the SKILL.md workflow in your workspace.
An LLM Agent Skill for expert YARA rule authoring, review, and optimization. Embeds industry best practices from the creator of YARA-Forge and yaraQA into your AI assistant's context.
The yara-rule-skill transforms your LLM agent into a YARA rule expert, capable of:
All through natural language conversation โ just paste a rule and ask.
# Clone the repository
git clone https://github.com/YARAHQ/yara-rule-skill.git
# Copy to your agent's skills folder
cp -r yara-rule-skill ~/.openclaw/skills/
# Clone the repository
git clone https://github.com/YARAHQ/yara-rule-skill.git
cd yara-rule-skill
# Package the skill
python3 scripts/package_skill.py .
# Install the packaged skill
cp yara-rule-skill.skill ~/.openclaw/skills/
This skill works with any LLM agent that supports skill files:
~/.openclaw/skills/Once installed, the skill activates automatically when you discuss YARA rules. Just ask:
"Review this YARA rule and suggest improvements"
The skill analyzes:
MAL_, HKTL_, SUSP_, etc.)"Assess the quality of this rule I found online"
The skill checks against 20+ automated quality checks:
"This rule causes performance issues, why?"
The skill identifies:
.*, .+)The skill combines three authoritative sources into your agent's context:
The skill teaches the $x*, $s*, $a*, $fp* naming convention:
| Prefix | Purpose | Example Usage |
|---|---|---|
$x* |
Highly specific (unique) | 1 of ($x*) โ triggers on signature |
$s* |
Grouped strings | all of ($s*) โ need multiple matches |
$a* |
Pre-selection (file type) | $a1 โ narrows to PE files first |
$fp* |
False positive filters | not 1 of ($fp*) โ exclude benign |
rule MAL_APT_CozyBear_ELF_Loader_Apr18 {
// MAL = Malware
// APT = Nation state actor
// CozyBear = Threat actor name
// ELF = Linux platform
// Loader = Malware type
// Apr18 = Date (April 2018)
}
The skill covers all 20 yaraQA issue IDs:
Logic Errors: CE1, SM1-6, DS1, CS1, DU1
Performance: PA1-2, RE1, CF1-2, PI1, NC1, NO1, MO1
Style: SV1-2
Resources: HS1-4
See TEST_ASSESSMENT.md for real-world rule reviews from public repositories.
yara-rule-skill/
โโโ SKILL.md # Main skill file
โโโ references/
โ โโโ performance.md # Performance optimization guide
โ โโโ style.md # Style and naming conventions
โ โโโ yaraqa-checks.md # Complete yaraQA check reference
โโโ scripts/
โ โโโ package_skill.py # Packaging script
โโโ README.md # This file
Visit https://YARAHQ.github.io/yara-rule-skill-site/ for:
Contributions welcome! Areas to help:
This skill is derived from Florian Roth's YARA guides and yaraQA tool. See individual source repositories for licensing details.