AgentStack
SKILL verified MIT Self-run

Faust Header Gen

skill-gertsylvest-meta-team-faust-header-gen · by gertsylvest

Generate a matching extern "C" header from a Faust-generated C file. Extracts public function signatures, applies the opaque-typedef pattern, and emits a correctly guarded header. Eliminates the manual header maintenance step and prevents header/implementation drift.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-gertsylvest-meta-team-faust-header-gen

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README — it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-gertsylvest-meta-team-faust-header-gen)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming — see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps — measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Faust Header Gen? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Faust Header Gen

Read a Faust-generated C file and produce a matching extern "C" header. Eliminates the manual step of writing and maintaining a synth.h, which was historically a source of errors whenever the Faust class name (-cn) changed or new functions were added.

Requirements

  • Python 3.8+

Instructions

Arguments are in $ARGUMENTS. Pass them directly to the generator:

python3 "$(dirname "$0")/gen_header.py" $ARGUMENTS

What the generated header contains

| Element | Detail | |---------|--------| | Include guard | #ifndef CLASSNAME_H / #define CLASSNAME_H (or custom via --guard) | | FAUSTFLOAT default | #ifndef FAUSTFLOAT / #define FAUSTFLOAT float guard so the header can be included without the generated C | | Dependency note | Comment stating faust/gui/CInterface.h must be included before this header (it defines UIGlue, MetaGlue, FAUSTFLOAT) | | extern "C" wrapping | Guarded by #ifdef __cplusplus so the header works for both C and C++ consumers | | Opaque forward declaration | typedef struct ClassName ClassName; — declares a named struct tag even though the generated C uses an anonymous struct typedef. This is the correct pattern for C++ consumers who hold only opaque pointers. | | Public function prototypes | All non-static functions whose names end with the class name, grouped into: Lifecycle, Metadata, Query, Initialisation, User Interface, DSP | | RESTRICT stripped | The generated C uses RESTRICT on parameter declarations. Headers omit it — restrict is an optimisation hint, not a type qualifier that affects linkage. | | void on zero-arg functions | newSynth() in the generated C becomes newSynth(void) in the header — correct C for "no arguments". |

Options

| Option | Default | Description | |--------|---------|-------------| | -o FILE | stdout | Write header to file instead of stdout | | --guard NAME | CLASSNAME_H | Override the include guard name | | --exports FILE | — | Also write a linker exports file (one _symbol per line, for .exp dylib builds) |

Exit codes

  • 0 — header generated successfully
  • 1 — input file not found, class name could not be detected, or no public functions found

Examples

# Write to stdout (inspect before committing)
python3 gen_header.py src/generated/synth.c

# Write to file
python3 gen_header.py src/generated/synth.c -o src/generated/synth.h

# Also generate a linker exports file
python3 gen_header.py src/generated/synth.c \
  -o src/generated/synth.h \
  --exports src/generated/synth_exports.exp

Notes

  • When to run: after every faust-build that changes the class name (--cn) or adds/removes DSP outputs. If only internal DSP logic changes (filter coefficients, signal routing), the public API surface does not change and the header does not need regenerating.
  • Anonymous struct quirk: The generated C uses typedef struct { ... } Synth; (anonymous struct). C++ forward declarations require typedef struct Synth Synth; (named struct tag). These are compatible at link time because consumers only hold Synth* pointers — they never dereference struct members through the header. This is the only divergence between the header and the generated C.
  • MetaGlue* and UIGlue* in prototypes: The header uses these types in function signatures but does not include their definitions. Include faust/gui/CInterface.h before this header. This is intentional — it avoids pulling Faust headers into the project's own include tree.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.