api-critic

Analyze C++ public headers for const-correctness, ownership, and usability issues.

Updated Mar 7, 2016
One-click install
npx skills add https://github.com/BarrettLowe/dotfiles --skill api-critic-barrettlowe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-critic
Source: https://github.com/BarrettLowe/dotfiles/tree/main/claude/skills/api-critic
Command: npx skills add https://github.com/BarrettLowe/dotfiles --skill api-critic-barrettlowe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of reviewing C++ public headers for quality, ensuring adherence to interface standards and reducing human error in the review process.

Core Features & Use Cases

  • Ownership & Lifetime Analysis: Checks for proper ownership semantics and lifetime guarantees.
  • const-Correctness Validation: Ensures that methods do not modify state unless explicitly designed to do so.
  • Usability Evaluation: Ensures parameter ordering, default arguments, and usability guidelines are followed.
  • Implementation Leakage Prevention: Prevents exposing implementation details to the caller.
  • Consistency Checks: Ensures naming conventions and error reporting are consistent.
  • Use Case: Before merging a new public API or designing a library interface, use this Skill to ensure the header adheres to quality standards.

Quick Start

Review the header file 'api_interface.hpp' with the api-critic skill.

Frequently Asked Questions about api-critic

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

FAQPage Schema
How do I automate C++ header file review for interface quality?

Automated C++ header review analyzes public APIs for const-correctness, ownership clarity, and implementation leakage. It parses read-only headers to flag potential interface quality issues for manual review before merging.

What is const-correctness validation in C++ public headers?

Const-correctness validation ensures C++ methods do not modify state unless explicitly designed to do so. It checks public headers to enforce proper ownership semantics and lifetime guarantees across the interface.

How do I prevent implementation leakage in C++ library interfaces?

Prevent implementation leakage by analyzing C++ public headers to ensure internal details are not exposed to callers. Automated interface checks verify parameter ordering and naming conventions to maintain strict API boundaries.

Can I check C++ ownership semantics and lifetime guarantees automatically?

Yes, C++ ownership semantics and lifetime guarantees can be checked automatically. Interface analysis tools parse public headers to validate ownership clarity and ensure consistency in error reporting across the API.

Does automated C++ API review work on private source files?

Automated C++ API review operates exclusively on read-only public headers. It analyzes interface quality, usability, and naming consistency, ensuring implementation details remain encapsulated rather than evaluating private source code.