Favicon of contrib-op-shape-inference-memory-safety

contrib-op-shape-inference-memory-safety Skill

AI Agent SkillC++Open source

Audit and fix out-of-range output writes in ONNX Runtime operator shape-inference functions. Use when reviewing or fixing a contrib (or standard) op TypeAndShapeInference where a getNumOutputs() guard precedes a write to a higher output index - optional trailing outputs make a smaller output count schema-valid, so getO Published by microsoft in onnxruntime.

Decision snapshot

Is this a fit?

Best for

Security review, Writing, Includes SKILL.md, Reusable instructions

Works with

Compatibility not yet detected.

Access

Permission behavior not yet detected.

Setup

Copy skill directory

Project health

2 months ago · MIT license

Considerations

No specific cautions were detected. Review the source and requested permissions before installing.

What is contrib-op-shape-inference-memory-safety Skill?

Audit and fix out-of-range output writes in ONNX Runtime operator shape-inference functions. Use when reviewing or fixing a contrib (or standard) op TypeAndShapeInference where a getNumOutputs() guard precedes a write to a higher output index - optional trailing outputs make a smaller output count schema-valid, so getO Published by microsoft in onnxruntime. This profile combines repository metadata with install, compatibility, and usage signals so developers can quickly decide whether it fits their agent workflow before opening the source repository.

Trust signal
95/100
Maintenance signal
90/100
Adoption signal
100/100

Automated repository signals based on public metadata such as recency, license, installation evidence, and adoption. These are not a security audit or endorsement. See how SkillIndex evaluates profiles.

Key capabilities

  • Includes SKILL.md support
  • Reusable instructions support
  • Security review
  • Writing
  • Security review use cases
  • Writing use cases

Declared skill metadata

  • Source file: .agents/skills/contrib-op-shape-inference-memory-safety/SKILL.md

These fields retain source and confidence evidence from the indexed SKILL.md.

Compatibility and setup

Copy skill directory
  • Install or run with Copy skill directory

When to use contrib-op-shape-inference-memory-safety Skill

  • Use it for security review.
  • Use it for writing.

Built with

C++Copy skill directory

Editorial notes

Source

  • Creator: microsoft
  • Repository: microsoft/onnxruntime
  • Skill file: .agents/skills/contrib-op-shape-inference-memory-safety/SKILL.md

What it does

Audit and fix out-of-range output writes in ONNX Runtime operator shape-inference functions. Use when reviewing or fixing a contrib (or standard) op TypeAndShapeInference where a getNumOutputs() guard precedes a write to a higher output index - optional trailing outputs make a smaller output count schema-valid, so getO

Skill instructions

Contrib-Op Shape-Inference Output-Index Safety Reusable method for finding and fixing the bug class where an operator's TypeAndShapeInference function guards an output write with getNumOutputs() N but then writes an output index greater than N. For a node that declares fewer outputs, the written index is past the end of the inference context's output vector. Scope: schema-level shape inference in onnxruntime/core/graph/contribops/.cc and shapeinferencefunctions.cc. This runs once during Graph::Resolve (model-load time), EP-agnostic - there is no per-EP (CPU/CUDA/ROCm) kernel duplicate of this code to chase. Op kernels allocate outputs via the bounds-safe OpKernelContext::Output(index) and are a separate concern. 1. The pattern cpp // onnxruntime/core/graph/contribops/bertdefs.cc (before) propagateElemTypeFromInputToOutput(ctx, 0, 0); if (ctx.getNumOutputs() 1) { // guard says " 1" propagateElemTypeFromInputToOutput(ctx, 0, 1); propagateElemTypeFromInputToOutput(ctx, 0, 2); // but write

Verified compatibility and discovery

Frequently asked questions

What is contrib-op-shape-inference-memory-safety?

contrib-op-shape-inference-memory-safety is a open-source AI agent skill with Copy skill directory. Audit and fix out-of-range output writes in ONNX Runtime operator shape-inference functions.

Who is contrib-op-shape-inference-memory-safety best for?

contrib-op-shape-inference-memory-safety is best for reusing agent instructions, scripts, and references, security review workflows, writing workflows.

How do I install contrib-op-shape-inference-memory-safety?

Install or run contrib-op-shape-inference-memory-safety using Copy skill directory. Check contrib-op-shape-inference-memory-safety for the latest setup command.

Is contrib-op-shape-inference-memory-safety actively maintained?

contrib-op-shape-inference-memory-safety may need a closer maintenance check before production use.

Share:

Stars
21,083
Forks
4,049
Last commit
2 months ago
Last verified
Not yet verified
Metadata fetched
Aug 21, 2026
Repository age
8 years
License
MIT

Project health auto-fetched from the source repository.

Maintain this resource?

Review this source-backed profile, send a correction with evidence, or link to it from your documentation. Claims verify your relationship to the project; profile facts still require source evidence and editorial review.

Alternatives to contrib-op-shape-inference-memory-safety