target-hxcpp

target-hxcpp is a skill for Claude Code from AxGord/claude-workflow. It costs 35 tokens per session (4,639 once invoked), scanned A, original, MIT.

A reference guide for building Haxe programs with hxcpp, the Haxe target that produces C++ code, including projects that use OpenFL. It documents build settings, cross-compilation, type conversion, garbage collection, and startup behavior.

In plain words
What is it for?
It helps developers configure hxcpp builds, connect Haxe code to C++, manage references safely, and investigate garbage-collection or initialization problems.
Why use it?
Haxe objects and native C++ objects follow different memory rules, so incorrect interoperation can cause crashes or objects being deleted too early. The guide collects these target-specific pitfalls in one place.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the workflow plugin — 31 skills, 4 agents, 5 hooks, 1 MCP server shipped together

Good fit It helps developers configure hxcpp builds, connect Haxe code to C++, manage references safely, and investigate garbage-collection or initialization problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/axgord/claude-workflow/target-hxcpp
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 AxGord/claude-workflow --skill target-hxcpp
Clone the repo
git clone --depth 1 https://github.com/AxGord/claude-workflow

Made for: Claude Code.

Or install workflow, the plugin that ships this one along with the rest of its 31 skills, 4 agents, 5 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 target-hxcpp

README.md
[![agentmods](https://agentmods.dev/badge/skills/axgord/claude-workflow/target-hxcpp/github.svg)](https://agentmods.dev/skills/axgord/claude-workflow/target-hxcpp)
Your own site
<a href="https://agentmods.dev/skills/axgord/claude-workflow/target-hxcpp"><img src="https://agentmods.dev/badge/skills/axgord/claude-workflow/target-hxcpp/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 target-hxcpp

Your own site · 80×15
<a href="https://agentmods.dev/skills/axgord/claude-workflow/target-hxcpp"><img src="https://agentmods.dev/badge/skills/axgord/claude-workflow/target-hxcpp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,639 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 original No closer match found 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.00035 $0.04639
Opus 5.5 $0.00014 $0.01856
Sonnet 5.5 $0.00007 $0.00928
Haiku 4.5 $0.00003 $0.00464

Measured 2d ago against content hash 0a696ea4d869, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

target-hxcpp 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 2d 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.

templates/skills-stack/target-hxcpp/SKILL.md · 352 lines

How it starts

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

hxcpp (Haxe C++) — Gotchas & Pitfalls

For any Haxe code built with -cpp, with or without OpenFL. See references/build-and-types.md for defines, cross-compilation, build.xml and the Haxe→C++ type mapping. OpenFL/lime specifics are in target-openfl-native.

hxcpp GC ↔ C++ Interop

GC roots — heap-stored Haxe objects are invisible to GC

GC scans the stack, not the C++ heap. Storing a Haxe object in a C++ member → premature collection.

// WRONG — invisible to GC
class NativeHelper { value myHaxeObj; };

// RIGHT
class NativeHelper {
    AutoGCRoot *root;
    NativeHelper(value obj) { root = new AutoGCRoot(obj); }
    value get() { return root->get(); }
};

@:unreflective suppresses GC scanning

@:unreflective on a field prevents GC from tracing it. Only use on fields with native C++ types, never on fields holding Haxe objects.

Moving GC (HXCPP_GC_MOVING)

Invalidates raw C++ pointers to Haxe objects after collection. Also shows erratic memory growth during long load/unload cycles — may exceed non-moving GC over time.

Static Init Boot Order (__boot_all)

Each class's static-variable initializers AND its RTTI payload (__mClass->__rtti__, from @:rtti) are set inside that class's generated __boot(). __boot_all() calls these in a generator-chosen order — not declaration order, not strictly alphabetical.

Observed (hxcpp 4.x): for a class A with an eager static static var _instance:A = new A();, dependency objects constructed inside A's constructor body get hoisted to boot before A. The same dependency constructed in a field-declaration initializer (public final child:B = new B();) does NOT get hoisted — it boots after A, in roughly module-alphabetical order.

Consequence: a runtime guard that inspects another class's boot state during construction (e.g. haxe.rtti.Rtti.hasRtti(Type.getClass(this)) in a base-class constructor) passes when new B() sits in the ctor body, but throws ("requires @:rtti notation") when the identical init is moved to the field declaration — B.__boot() hasn't assigned __rtti__ yet.

Read the full file on GitHub · 352 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 352 lines · 35 tokens per session scan A 0a696ea4d869

Subscribe to this mod's changes

target-hxcpp is a skill published in the GitHub repository AxGord/claude-workflow (7 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 4,639 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-28.

Related

target-hxcpp compared with skills from other repositories

target-hxcpp next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
target-hxcppAxGord/claude-workflowSkill7todayMITA35Claude Code
ia-c-systemsiliaal/whetstoneSkill37todayMITA84Claude Code
ia-cpp-systemsiliaal/whetstoneSkill37todayMITA80Claude Code
cpp-proJeffallan/claude-skillsSkill13ktodayMITA79Claude Code
phx-investigateoliver-kriska/claude-elixir-phoenixSkill5783d agoMITA35Claude Code, Codex
phx-traceoliver-kriska/claude-elixir-phoenixSkill5783d agoMITA47Claude Code, Codex
shiny-py-optimizeposit-dev/skillsSkill57617d agoMITA105Claude Code