automotive-hooks

Automates ASPICE compliance checks through Git hooks across five lifecycle stages.

7|2|Updated May 19, 2026
One-click install
npx skills add https://github.com/pangzhenying2025/hermes-automotive-skills --skill automotive-hooks-pangzhenying2025
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: automotive-hooks
Source: https://github.com/pangzhenying2025/hermes-automotive-skills/tree/main/skills/automotive-hooks
Command: npx skills add https://github.com/pangzhenying2025/hermes-automotive-skills --skill automotive-hooks-pangzhenying2025

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Automotive software teams must enforce ASPICE compliance, MISRA coding rules, AUTOSAR naming conventions, and quality gates consistently, but manual enforcement in code reviews is error-prone and inconsistent. ## Core Features & Use Cases - Pre-commit validation: Runs MISRA-C checks, AUTOSAR naming verification, cyclomatic complexity analysis, license header checks, file size limits, and ASPICE work product traceability on staged files. - Pre-push and pre-merge gates: Enforces code coverage thresholds (line, branch, function), dependency vulnerability audits across npm/pip/Maven/Cargo, breaking API change detection, documentation completeness, and integration test execution. - Post-commit and post-deploy automation: Collects commit metrics into JSONL records and verifies monitoring endpoints, Prometheus scraping, Grafana dashboards, and alert rules after deployment. - Use Case: An automotive ECU firmware team installs these hooks so every commit is automatically checked for MISRA violations and requirements traceability, and every push is blocked if coverage drops below 80% or critical dependency vulnerabilities exist. ## Quick Start Set up the automotive Git hooks from this skill in my repository so that MISRA, AUTOSAR naming, and coverage checks run automatically on commit and push.

Frequently Asked Questions about automotive-hooks

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

FAQPage Schema
How do I enforce MISRA-C compliance with Git pre-commit hooks?▼

Use the misra-check.sh pre-commit hook, which runs cppcheck with the MISRA addon when available, or falls back to grep-based checks for goto statements, dynamic memory allocation, pointer indirection depth, and prohibited standard library functions in staged C/C++ files.

How to block a Git push when code coverage is too low?▼

The coverage-gate.sh pre-push hook parses Cobertura XML, JaCoCo XML, or LCOV reports and blocks the push when line coverage falls below 80%, branch below 70%, or function coverage below 90%. It searches common report locations automatically.

What tools do the dependency audit hooks support?▼

The dependency-audit.sh hook supports npm audit, pip-audit or safety for Python, OWASP Dependency-Check reports for Maven, and cargo-audit for Rust. It blocks pushes on critical and high severity vulnerabilities by default.

Does the breaking change check work with protobuf and CAN databases?▼

Yes, the pre-merge breaking-change-check.sh inspects public C/C++ headers, protobuf files, OpenAPI specs, and DBC/ARXML CAN definitions. Removed functions, fields, RPC methods, or API paths block the merge unless acknowledged in commit messages.

Why does the AUTOSAR naming check skip some of my files?▼

The autosar-naming.sh hook only checks files whose paths contain autosar, mcal, or rte identifiers. Files outside AUTOSAR-style directories are intentionally skipped to avoid false positives on non-AUTOSAR code.

Can I bypass a failing hook in an emergency?▼

Most hooks document git commit --no-verify as a bypass, though it is marked not recommended, especially for safety-critical MISRA checks. Some checks like ASPICE traceability and markdown lint only warn without blocking.