Skip to content
Back to skills

C Api

ASecurity

"Guides agents locating Qiskit C headers and library, using

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
developmentpythonrustapibackend

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill c-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of C Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for C Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-c-api/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-c-api)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: c-api
description: "Guides agents locating Qiskit C headers and library, using
  qiskit.capi ctypes bindings, and handling public C-API build/link issues."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Qiskit C API workflows

Use this sub-skill when the task involves Qiskit's public C API from Python: locating headers, locating the shared library, using ctypes bindings, planning downstream extension builds, or diagnosing source-build/link failures.

## Read next

- `references/build-and-link.md` for `qiskit.capi.get_include()`, `get_lib()`, ctypes access, and source-build notes.
- `references/troubleshooting.md` for missing headers/library, Rust extension, stale editable install, and direct-link caveats.
- `../../references/installation.md` for source-build prerequisites.
- `../../scripts/check_qiskit_environment.py --sections capi` for a source-free C-API path check.

## Include here

- `qiskit.capi.get_include()` and `qiskit.capi.get_lib()`.
- Python-space ctypes bindings exposed under `qiskit.capi`.
- Downstream C-extension or standalone C-library build planning that uses Qiskit's public headers.
- Source-build environment variables and Rust-backed extension diagnostics.

## Exclude or route elsewhere

- Python circuit construction belongs in `../circuit/SKILL.md`.
- Python transpilation APIs belong in `../transpiler/SKILL.md`.
- Backend/provider abstractions belong in `../providers/SKILL.md`.
- Generic C or Rust build-system advice not involving Qiskit belongs to a broader build-system skill.

## Default route

Start here when the user mentions `qiskit.capi`, `get_include`, `get_lib`, `qiskit.h`, `libqiskit`, ctypes wrappers, C extension modules, `make c`, Rust build failures, or missing `_accelerate` during a Qiskit source install.

## What to remember

- The Python package contains the public C headers and the shared-object library that backs the C API.
- `get_lib()` is useful for local introspection, but direct linking is not the safest path for distributable Python extensions unless the user understands the ABI caveats.
- Source builds require the supported Rust toolchain and the package build backend; normal wheels should already contain the built extension.

Files in this skill

  • SKILL.md2.2 KB
  • references/build-and-link.md1.5 KB
  • references/troubleshooting.md1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.