auto-fire-targeting

auto-fire-targeting is a skill for Claude Code from ouzlifaneyassine1-dot/onyx-engine. It costs 92 tokens per session (1,858 once invoked), scanned A, a copy of auto-fire-targeting, MIT.

A targeting pattern for weapons that automatically fire at nearby enemies, such as in a survivors-style action game or tower-defense game. It accounts for damage already being carried by bullets that have not reached their targets.

In plain words
What is it for?
Use it to build or repair auto-fire, auto-aim, and weapon-targeting systems where projectile travel time can cause wasted shots.
Why use it?
It prevents several bullets from chasing the same enemy when the first bullet is still in flight and may already be enough to defeat it.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Part of the onyx plugin — 77 skills, 1 command, 2 hooks, 1 MCP server shipped together

Good fit Use it to build or repair auto-fire, auto-aim, and weapon-targeting systems where projectile travel time can cause wasted shots.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ouzlifaneyassine1-dot/onyx-engine/auto-fire-targeting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ouzlifaneyassine1-dot/onyx-engine --skill auto-fire-targeting
Clone the repo
git clone --depth 1 https://github.com/ouzlifaneyassine1-dot/onyx-engine

Made for: Claude Code.

Or install onyx, the plugin that ships this one along with the rest of its 77 skills, 1 command, 2 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for auto-fire-targeting

README.md
[![agentmods](https://agentmods.dev/badge/skills/ouzlifaneyassine1-dot/onyx-engine/auto-fire-targeting/github.svg)](https://agentmods.dev/skills/ouzlifaneyassine1-dot/onyx-engine/auto-fire-targeting)
Your own site
<a href="https://agentmods.dev/skills/ouzlifaneyassine1-dot/onyx-engine/auto-fire-targeting"><img src="https://agentmods.dev/badge/skills/ouzlifaneyassine1-dot/onyx-engine/auto-fire-targeting/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for auto-fire-targeting

Your own site · 80×15
<a href="https://agentmods.dev/skills/ouzlifaneyassine1-dot/onyx-engine/auto-fire-targeting"><img src="https://agentmods.dev/badge/skills/ouzlifaneyassine1-dot/onyx-engine/auto-fire-targeting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,858 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00092 $0.01858
Opus 5 $0.00046 $0.00929
Sonnet 5 $0.00018 $0.00372
Haiku 4.5 $0.00009 $0.00186

Measured 10d ago against content hash c451de655a9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

auto-fire-targeting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to auto-fire-targeting — 27 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/gameplay-mechanics/auto-fire-targeting/SKILL.md · 171 lines

How it starts

The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auto-Fire Weapon Targeting — pending-damage pattern

A survivors-genre auto-fire weapon picks a target each fire frame. Naive nearest-enemy targeting wastes bullets when fire rate exceeds bullet flight time. This skill encodes the pending-damage pattern that fixes it.

The problem

Auto-fire weapon. Bullet speed 22 m/s. Target 10m away. Bullet takes ~0.45s to arrive. With high attack speed the player fires several bullets per second. By the time the first bullet arrives and kills the target, several more bullets are already in flight toward where the target was. They miss into empty space. The player sees bullets "fan out in a cone past the dead enemy" while other enemies stand around untouched.

This is not a re-targeting bug. The weapon's _fire() correctly re-runs find_nearest_enemy() each shot. The issue is that the target is alive at fire-time and dead at arrival-time. All shots fired in that window aim at it because none of them know about the kill in flight.

The fix — pending damage commitment

Each enemy carries a counter of damage that is in flight toward it. Targeting de-prefers (but does not exclude) enemies whose pending damage already exceeds their current HP.

1. Add the counter to the enemy base class

# enemy_base_3d.gd

var pending_damage: float = 0.0


func commit_pending(amount: float) -> void:
    pending_damage += amount


func release_pending(amount: float) -> void:
    pending_damage = maxf(0.0, pending_damage - amount)


## True if enough damage is already in flight to kill this enemy.
func is_saturated() -> bool:
    return pending_damage >= health

2. Update the targeting helper

The selector keeps the saturated set as a fallback. If every enemy is saturated, the player must still be able to fire on someone — fall through to a normal nearest pick across saturated enemies. Otherwise prefer non-saturated.

# targeting.gd

static func pick(origin: Vector3, mode: int, max_range: float, ...) -> Node3D:
    var enemies: Array = GameManager.get_enemies()
    var best: Node3D = null
    var best_score: float = -INF
    var fallback: Node3D = null
    var fallback_score: float = -INF
    for enemy in enemies:
        # ... existing range + LoS filters ...
        var score := _score(enemy, d_sq, mode)
        var saturated: bool = "is_saturated" in enemy and enemy.is_saturated()
        if saturated:
            if score > fallback_score:
                fallback_score = score
                fallback = enemy
        else:
            if score > best_score:
                best_score = score
                best = enemy
    if best != null:
        return best
    return fallback  # everyone is saturated; fire on the next-best anyway

Read the full file on GitHub · 171 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 171 lines · 92 tokens per session scan A c451de655a9f

Subscribe to this mod's changes

auto-fire-targeting is a skill published in the GitHub repository ouzlifaneyassine1-dot/onyx-engine (0 stars, last pushed 2mo ago), licensed MIT. It adds 92 tokens to every session and 1,858 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to auto-fire-targeting, differing in 27 lines, and is treated as a copy.

Related

Other skills, from other repositories

design-mechanic

Use when designing one specific game mechanic in detail — input, response, feedback, failure modes, depth, tunables. Outputs a design doc and a scaffolding-ready node-graph sketch + GDScript stub. Trigger on "design a mechanic", "how should X work", "design the parry", "design the dash", "design the inventory", "the…

SummerEngine/summer-engine-agent · 83 tokens

auto-fire-targeting

Use when designing or fixing the targeting system for an auto-fire weapon (survivors-genre, top-down ARPG, tower-defense). Covers the pending-damage pattern that prevents over-commit when bullet flight time is longer than fire rate. Trigger on "auto-fire", "auto-aim", "weapon targeting", "targeting", "wasted bullets"…

SummerEngine/summer-engine-agent · 92 tokens

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

godot-signals-groups

Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…

gamedev-skills/awesome-gamedev-agent-skills · 95 tokens

unity-addressables

Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).

Besty0728/Unity-Skills · 25 tokens