# Yara rule authoring

> Yara rule authoring is an open-source agent skill for security. Guides authoring of high-quality YARA-X detection rules for malware identification. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/trailofbits/skills/tree/main/plugins/yara-authoring/skills/yara-rule-authoring
- **Repository:** https://github.com/trailofbits/skills
- **GitHub stars:** 8,243
- **License:** CC-BY-SA-4.0
- **Skill name:** yara-rule-authoring
- **Collection:** https://github.com/trailofbits/skills
- **Categories:** security
- **Listing updated:** 2026-11-17

## About

Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.

## When your agent uses it

> Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs shell and Python scripts](https://github.com/trailofbits/skills/tree/HEAD/plugins/yara-authoring/skills/yara-rule-authoring)
- [No network calls found in its scripts](https://github.com/trailofbits/skills/tree/HEAD/plugins/yara-authoring/skills/yara-rule-authoring)
- [License: CC-BY-SA-4.0](https://github.com/trailofbits/skills/tree/HEAD/plugins/yara-authoring/skills/yara-rule-authoring)

## Install

### Claude Code

This skill ships in the `yara-authoring` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add trailofbits/skills
/plugin install yara-authoring@trailofbits
```

Or copy only this skill to `~/.claude/skills/yara-rule-authoring`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/trailofbits/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/yara-rule-authoring &&
cp -R "$tmp/plugins/yara-authoring/skills/yara-rule-authoring" ~/.claude/skills/yara-rule-authoring &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/yara-rule-authoring` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/yara-rule-authoring` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/trailofbits/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/yara-rule-authoring &&
cp -R "$tmp/plugins/yara-authoring/skills/yara-rule-authoring" ~/.agents/skills/yara-rule-authoring &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/yara-rule-authoring` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/yara-rule-authoring` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/trailofbits/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/yara-rule-authoring &&
cp -R "$tmp/plugins/yara-authoring/skills/yara-rule-authoring" ~/.cursor/skills/yara-rule-authoring &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/yara-rule-authoring` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/trailofbits/skills.git --path plugins/yara-authoring/skills/yara-rule-authoring
```

Or copy the folder to `~/.gemini/skills/yara-rule-authoring` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/yara-rule-authoring`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/trailofbits/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/yara-rule-authoring &&
cp -R "$tmp/plugins/yara-authoring/skills/yara-rule-authoring" ~/.copilot/skills/yara-rule-authoring &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/yara-rule-authoring` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/trailofbits/skills.git
```

Then copy `skills/plugins/yara-authoring/skills/yara-rule-authoring` into your agent's skills folder as `yara-rule-authoring`. Agents that support SKILL.md read one folder per skill.

## FAQ

### How do I install Yara rule authoring in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/yara-rule-authoring to use it in all your projects, or to .claude/skills/yara-rule-authoring in one project. Or install the yara-authoring plugin, which includes it: /plugin marketplace add trailofbits/skills, then /plugin install yara-authoring@trailofbits.

### Does Yara rule authoring run scripts?

Yes. It runs shell and Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Yara rule authoring?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Yara rule authoring?

The closest alternatives to Yara rule authoring are Security review, Audit integrity, MCP implementation security review, Threat model analyst and Github actions hardening.

## Alternatives

- [Security review](https://ai-powered.com/skills/security-review): Security review is an open-source agent skill for security.
- [Audit integrity](https://ai-powered.com/skills/audit-integrity): Audit integrity is an open-source agent skill for security.
- [MCP implementation security review](https://ai-powered.com/skills/mcp-implementation-security-review): MCP implementation security review is an open-source agent skill for security.
- [Threat model analyst](https://ai-powered.com/skills/threat-model-analyst): Threat model analyst is an open-source agent skill for security.
- [Github actions hardening](https://ai-powered.com/skills/github-actions-hardening): Github actions hardening is an open-source agent skill for developer tools.
- [Tm7 threat model](https://ai-powered.com/skills/tm7-threat-model): Tm7 threat model is an open-source agent skill for security.
- [Secret scanning](https://ai-powered.com/skills/secret-scanning): Secret scanning is an open-source agent skill for security.
- [Dependabot](https://ai-powered.com/skills/dependabot): Dependabot is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/yara-rule-authoring
