| name | api-surface-gate |
| description | Enforce zksync-js public API safety when diffs touch package exports, typesVersions, entrypoint barrels, or exported core types. Validate checklist, classify compatibility impact, and require docs/changelog alignment. |
| metadata | {"short-description":"Guard export surface changes and API checklist compliance"} |
API Surface Gate
Use this skill to prevent accidental public API drift.
Use This Skill When
package.json changes in exports or typesVersions
src/index.ts changes
src/core/index.ts changes
src/adapters/ethers/index.ts changes
src/adapters/viem/index.ts changes
src/core/types/** changes
- Any change appears to add/remove/rename exported symbols
Use explicit invocation as $api-surface-gate before merge for export-facing diffs.
Responsibilities
- Detect whether API Gate is triggered by touched files.
- Compare export deltas (added, removed, renamed, type-only changes).
- Require explicit API checklist acknowledgement:
No API change, or
API change with compatibility and docs/changelog context.
- Classify compatibility impact using current pre-1.0 release policy.
- Confirm docs/tests/changelog alignment for externally visible API changes.
Guardrails
- Do not approve silent export removals or renames.
- Do not allow adapter-specific types to leak into
src/core entrypoints.
- Do not treat entrypoint changes as internal-only without explicit evidence.
Output Format
Provide a concise report with:
- Triggered API files
- API delta summary
- Compatibility classification (
non-breaking or breaking candidate)
- Required follow-ups:
- PR API checklist status
- docs/changelog updates needed
- test coverage updates needed
References