Sponsor Suno AI Music arrow_forward
Plugin

Yara Authoring

YARA-X detection rule authoring with linting and quality analysis

Type
Plugin
Repository
trailofbits/skills
GitHub stars
7.3k
License
CC-BY-SA-4.0
Repo last updated
Sep 25, 2026
Version
2.1.3
Author
Trail of Bits

What Yara Authoring is

Yara Authoring is a plugin published in the trailofbits/skills repository on GitHub, which has about 7.3k stars. The repository describes itself as: “Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows”

A plugin is a package that bundles skills, slash commands, subagents, hooks, and MCP connectors so they install together. Plugins are plain files with a manifest at .claude-plugin/plugin.json, and they work in both Claude Code and Claude Cowork.

Installing Yara Authoring adds everything it ships in one step. Connectors inside a plugin still need to be connected separately, and hooks and subagents only run in Cowork and Claude Code, not in regular chat.

How to install Yara Authoring

Claude Code

  1. Add the repository as a plugin marketplace: claude plugin marketplace add trailofbits/skills
  2. Install the plugin: claude plugin install yara-authoring@<marketplace-name>, using the marketplace name from the repository's .claude-plugin/marketplace.json.
  3. Restart the session if the new skills or commands don't appear straight away.

Claude Cowork

  1. Open Customize → Plugins and choose Add marketplace.
  2. Enter trailofbits/skills (the owner/repo shorthand works for GitHub).
  3. Find Yara Authoring in the list, click Install, then connect any connectors it needs from its Connectors tab.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/yara-authoring/.claude-plugin/plugin.json, shared under the repository's CC-BY-SA-4.0 license. Read the full file on GitHub.

A behavior-driven skill for authoring high-quality YARA-X detection rules, teaching you to think and act like an expert YARA author.

> YARA-X Focus: This skill targets YARA-X, the Rust-based successor to legacy YARA. YARA-X powers VirusTotal's Livehunt/Retrohunt production systems and is 5-10x faster for regex-heavy rules. Legacy YARA (C implementation) is in maintenance mode.

Philosophy

This skill doesn't dump YARA syntax at you. Instead, it teaches:

  • Decision trees for common judgment calls (Is this string good enough? When to abandon an approach?)
  • Expert heuristics (mutex names are gold, API names are garbage)
  • Rationalizations to reject (the shortcuts that cause production failures)

An expert uses 5 tools: yarGen, FLOSS, yr CLI, signature-base, YARA-CI. Everything else is noise.

Installation

YARA-X CLI

# macOS
brew install yara-x

# Or from source
cargo install yara-x

# Verify installation
yr --version

Plugin

/plugin marketplace add trailofbits/skills
/plugin install yara-authoring

The scripts declare their dependencies with PEP 723 inline metadata, so uv run resolves the yara-x Python package on first use. No separate install step.

Skills

yara-rule-authoring

Guides authoring of YARA-X rules for malware detection with expert judgment.

Covers:

  • Decision trees for string quality, when to abandon approaches, debugging FPs
  • Expert heuristics from experienced YARA authors
  • Rationalizations to reject (common shortcuts that fail)
  • Naming conventions (CATEGORY_PLATFORM_FAMILY_DATE format)
  • Performance optimization (atom quality, short-circuit conditions)
  • Testing workflow (goodware corpus validation)
  • YARA-X migration guide for converting legacy rules
  • Chrome extension analysis with crx module
  • Android DEX analysis with dex module

Triggers: YARA, YARA-X, malware detection, threat hunting, IOC, signature

Scripts

Two Python scripts under skills/yara-rule-authoring/scripts/, run with uv. Both accept a file or a directory, and both exit non-zero if the path yields no rules to inspect rather than reporting a clean run over nothing.

yara_lint.py

Compiles each rule with YARA-X, then checks style, metadata, and anti-patterns. See style-guide.md for the full code table.

uv run skills/yara-rule-authoring/scripts/yara_lint.py rule.yar
uv run skills/yara-rule-authoring/scripts/yara_lint.py --json rules/
uv run skills/yara-rule-authoring/scripts/yara_lint.py --strict rule.yar   # warnings fail too

atom_analyzer.py

Evaluates string quality for efficient atom extraction:

uv run skills/yara-rule-authoring/scripts/atom_analyzer.py rule.yar
uv run skills/yara-rule-authoring/scripts/atom_analyzer.py --verbose rule.yar

Both import yara_rules.py, a dependency-free module holding the parsing and analysis logic. test_yara_rules.py covers it; make python-tests picks it up.

Reference Documentation

Key Resources

  • YARA-X Documentation (official)
  • YARA-X GitHub
  • Neo23x0 YARA Style Guide
  • Neo23x0 Performance Guidelines
  • signature-base Rule Collection
  • YARA-CI

Requirements

  • Python 3.11+
  • uv for running scripts
  • YARA-X CLI (yr)

The scripts use PEP 723 inline metadata, so dependencies are resolved automatically by uv run.

Migrating from Legacy YARA

If you have existing rules written for legacy YARA:

  1. Run validation: yr check --relaxed-re-syntax rules/
  2. Fix issues identified (see SKILL.md migration section)
  3. Validate without relaxed mode: yr check rules/

> Note: Use --relaxed-re-syntax only as a temporary diagnostic tool. > Fix all identified issues rather than relying on relaxed mode permanently.

Common migration issues:

  • Unescaped { in regex patterns
  • Invalid escape sequences (\R → \\R)
  • Base64 patterns on strings < 3 characters
  • Negative array indexing

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Yara Authoring?

Yara Authoring is a plugin for Claude Code and Claude Cowork from the trailofbits/skills repository on GitHub. YARA-X detection rule authoring with linting and quality analysis

How do I install Yara Authoring in Claude Code?

Add the repository as a plugin marketplace: claude plugin marketplace add trailofbits/skills Install the plugin: claude plugin install yara-authoring@<marketplace-name>, using the marketplace name from the repository's .claude-plugin/marketplace.json. Restart the session if the new skills or commands don't appear straight away.

Can I use Yara Authoring in Claude Cowork?

Open Customize → Plugins and choose Add marketplace. Enter trailofbits/skills (the owner/repo shorthand works for GitHub). Find Yara Authoring in the list, click Install, then connect any connectors it needs from its Connectors tab.

Is Yara Authoring safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under CC-BY-SA-4.0. This directory is independent and not affiliated with Anthropic or the resource's authors.