compare-bindings

Compare C# API definition files to detect attribute and method differences.

1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/dalexsoto/NSSharp --skill compare-bindings
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compare-bindings
Source: https://github.com/dalexsoto/NSSharp/tree/main/.agents/skills/compare-bindings
Command: npx skills add https://github.com/dalexsoto/NSSharp --skill compare-bindings

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers ensure the quality and completeness of C# bindings generated for Objective-C APIs by comparing them against a reference.

Core Features & Use Cases

  • Attribute Analysis: Compares counts of key binding attributes like [Export], [NullAllowed], [Abstract], etc.
  • API Surface Comparison: Identifies missing or extra exported methods between two sets of bindings.
  • Naming and Type Mismatches: Detects differences in method names, return types, and parameter types.
  • Use Case: After generating C# bindings for a new version of a library using NSSharp, compare them against the previous version's bindings (generated by Objective Sharpie) to ensure no regressions and to measure improvements in API coverage.

Quick Start

Compare the generated bindings in '/tmp/nssharp_output.cs' against the reference bindings in 'reference/ApiDefinition.cs'.

Frequently Asked Questions about compare-bindings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compare C# bindings to detect missing or extra exported methods?

Comparing C# API definition files parses their content to identify missing or extra exported methods, discrepancies in method signatures, and differences in attribute usage. This evaluates the quality and completeness of generated bindings while detecting regressions.

Why does my C# binding generation tool produce API surface mismatches against the reference?

API surface mismatches occur when a generated C# binding file has differences in method names, return types, or parameter types compared to a reference file. Comparing the definition files detects these naming and type mismatches to evaluate binding quality.

Can I use Python scripts to analyze C# API definition files for attribute usage?

Yes, Python scripts can parse and analyze the content of C# API definition files. This analysis compares counts of key binding attributes like Export, NullAllowed, and Abstract to ensure generated API quality.

What is the best way to measure improvements in Objective-C to C# binding generation tools?

The best way to measure improvements is by comparing newly generated C# bindings against a previous reference version. This identifies missing exports and attribute discrepancies, verifying that API coverage has improved without introducing regressions.

Do I need Python to compare two C# API definition files for regression testing?

Yes, Python is required to run the scripts that parse and analyze the C# API definition files. The scripts compare attribute usage and method signatures to detect regressions and evaluate binding completeness.

How do I check for missing binding attributes like NullAllowed or Abstract in generated C# code?

You can check for missing binding attributes by comparing the generated C# file against a reference API definition. The comparison analyzes attribute counts for elements like NullAllowed and Abstract to identify discrepancies in the generated bindings.