audit-safety

Audit Python code in NES projects for robustness and input safety.

6|2|Updated Nov 28, 2016
One-click install
npx skills add https://github.com/matiaszanolli/midi2nes --skill audit-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-safety
Source: https://github.com/matiaszanolli/midi2nes/tree/main/.claude/commands/audit-safety
Command: npx skills add https://github.com/matiaszanolli/midi2nes --skill audit-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit is designed to audit the robustness and input safety of Python code, identifying potential failure modes in NES projects due to bad input, missing tools, or mid-pipeline failures.

Core Features & Use Cases

  • Error Handling Analysis: Identifies swallowed errors that should abort the pipeline, preventing silent failures in NES ROMs.
  • Input Validation: Ensures malformed input does not lead to unhandled exceptions or corrupted outputs.
  • Subprocess and CC65 Safety: Verifies secure subprocess execution and toolchain handling.
  • Deserialization Safety: Ensures that data loading from sources like YAML or pickle does not introduce vulnerabilities.
  • JSON-Intermediate Guards: Protects against JSON parsing errors and incomplete data.
  • File/Resource Handling: Ensures files and resources are managed correctly and temp directories are cleaned up.
  • Exception-Type Discipline: Ensures appropriate exception handling and clarity.
  • Partial-Output-on-Failure: Ensures that partial outputs do not remain in case of failures, preserving data integrity.

Quick Start

Use the audit-safety skill to perform a robustness audit on your NES project directory.

Frequently Asked Questions about audit-safety

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

FAQPage Schema
How do I audit Python code for robustness in NES projects?

To audit Python robustness in NES projects, scan your directory to identify failure modes, input validation gaps, and subprocess safety issues. This ensures reliable build processes and prevents silent failures in NES ROMs.

What causes silent pipeline failures when building NES ROMs?

Silent pipeline failures when building NES ROMs are caused by swallowed errors that should abort the process. Auditing Python code identifies these missing exception handlers and ensures appropriate error handling discipline.

How do I prevent corrupted outputs from malformed input in Python build scripts?

To prevent corrupted outputs from malformed input, validate data loading from sources like YAML or pickle. Auditing deserialization safety ensures malformed input does not cause unhandled exceptions or partial outputs.

Does this Python audit check subprocess and CC65 toolchain safety?

Yes, the Python audit verifies secure subprocess execution and CC65 toolchain handling. It checks subprocess safety to ensure missing tools or mid-pipeline failures do not compromise NES project integrity.

How do I protect against JSON parsing errors in NES build pipelines?

To protect against JSON parsing errors in NES build pipelines, implement JSON-intermediate guards. Auditing Python code identifies incomplete data handling and ensures partial outputs do not remain in case of failures.

Why are partial outputs left behind after a failed NES build process?

Partial outputs remain after a failed NES build process due to missing file and resource handling cleanup. Auditing ensures temp directories are cleaned and exception-type discipline preserves data integrity on failure.