Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

yara-rule-authoring — Claude Code skill: what it does, how to install

Authors and reviews YARA-X detection rules for malware hunting, flagging strings that produce weak atoms and conditions that will fire on clean files.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill yara-rule-authoring -a claude-code
Open on GitHub

What yara-rule-authoring does

The skill walks through writing YARA-X rules, the Rust rewrite of YARA, for spotting malware. Most of it is judgement calls: a string has to yield usable atoms (the engine matches on four-byte chunks), a rule should name a family rather than a category, and conditions run cheap checks first — filesize, then magic bytes, strings, modules.

Helper scripts sit next to the installed SKILL.md: a linter yara_lint.py, an atom analyzer atom_analyzer.py and a review helper review.sh. Resolve their paths from the skill directory and pass absolute paths in quotes. YARA-X itself is separate: brew install yara-x or cargo install yara-x, with yr as the CLI.

Endianness is the trap. uintNN() reads little-endian, so a ZIP file starting with bytes 50 4B 03 04 needs uint32(0) == 0x04034B50. Written the other way round, the check compiles and matches nothing, and the same mistake bites on Mach-O universal binaries. Run yr scan on one known-clean sample before trusting the rule.

What it helps with

  • draft a YARA-X rule for one malware family instead of a vague category
  • check a finished rule for weak atoms before shipping it
  • port legacy YARA rules over to YARA-X
  • inspect Chrome extensions and Android apps with the crx and dex modules
  • cut false positives on Windows system files

Example prompts for the agent

  • Write a YARA-X rule for the LockBit 3.0 config block, then run the atom analyzer over its strings.
  • Lint my rule file with `yara_lint.py` and tell me which strings will match too often.
  • Convert this old rule to YARA-X and check the Mach-O magic bytes.

How to install yara-rule-authoring

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill yara-rule-authoring -a claude-code

2Manually: put the files in place

~/.claude/skills/yara-rule-authoring/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/yara-rule-authoring/

From the same set35

The whole set →
semgrep trailofbits Runs a Semgrep static security audit on your codebase. It presents a plan for user confirmation and merges all findings into SARIF. Claude Code CX Codex Cursor +1 9,500installs differential-review trailofbits Reviews code changes for security issues using Git history and test coverage. Use it for commits, diffs, and pull requests that need a written review report. Claude Code CX Codex Cursor +1 8,800installs modern-python trailofbits Configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. Claude Code CX Codex Cursor +1 8,700installs secure-workflow-guide trailofbits Guides smart contracts through Trail of Bits' 5-step security audit on check-in or before deployment. It runs static analysis, generates visual charts, and prepares fuzzing tests. Claude Code CX Codex Cursor +1 7,400installs sharp-edges trailofbits Audits API designs and configuration schemas for developer footguns. Flags dangerous defaults and fragile interfaces where the easiest path causes security vulnerabilities. Claude Code CX Codex Cursor +1 6,900installs agentic-actions-auditor trailofbits Inspects GitHub Actions workflows for prompt injection risks and insecure AI agent setups. Catches attacker inputs leaking into prompts via event contexts or environment variables. Claude Code CX Codex Cursor +1 6,700installs gh-cli trailofbits A skill that redirects GitHub requests from curl and fetch to authenticated gh CLI for repositories, pull requests, and issues. Use it for private repos and higher API limits. Claude Code CX Codex Cursor +1 6,600installs variant-analysis trailofbits Finds related occurrences of an already identified defect across a repository. Use it after a vulnerability or logic issue turns up and similar code needs checking. Claude Code CX Codex Cursor +1 6,400installs

Similar

shipping-artifacts phuryn Generates core documentation to make vibe-coded applications reviewable before release. It maps architecture, permission flows, and test coverage for audits. Claude Code CX Codex Cursor +1 1,700installs blockchain-developer sickn33 This skill guides smart contract, Web3 application, and decentralized-system work. Use it for design, reviews, and transaction checks before any on-chain action. Claude Code CX Codex Cursor +1 1,200installs production-code-audit sickn33 Skill for systematic code review covering security flaws, logic errors and performance issues before deployment. Identifies specific problems, proposes fixes and validates them. Claude Code CX Codex Cursor +1 1,200installs pptx-reference-deck-analysis kimtth Reads a PPTX reference deck without changing it, covering structure, theme, typography, layouts, and OOXML. Use it before building a new deck from a reference. Claude Code CX Codex Cursor 2,500installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. Claude Code CX Codex Cursor +1 44,800installs security-audit cloudflare Reviews codebases and APIs for vulnerabilities using safe sandboxing. Fits pre-release security reviews, pen-test triage, and architecture checks. Claude Code CX Codex Cursor +1 52,200installs

Questions about yara-rule-authoring

How do I install yara-rule-authoring in Claude Code?

Run npx skills add trailofbits/skills --skill yara-rule-authoring -a claude-code. The skill lands at ~/.claude/skills/yara-rule-authoring/SKILL.md.

What does yara-rule-authoring do?

It guides writing and reviewing YARA-X rules: string choice, atoms, condition order, metadata, migration from legacy YARA. It also covers the crx and dex modules for Chrome extensions and Android apps.

How is YARA-X different from legacy YARA?

It is a Rust rewrite with stricter validation, a built-in formatter and 99% rule compatibility, and its regex engine runs 5-10 times faster. New crx and dex modules come with it, and existing rules move over through a dedicated migration section.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor