validate-bsv-script

Validate and analyze BSV locking/unlocking scripts for correctness and security using @bsv/sdk Script parsing.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 7, 2026

When & Why to Use This Skill

This Claude skill provides a comprehensive solution for validating and analyzing Bitcoin SV (BSV) locking and unlocking scripts. By utilizing the @bsv/sdk, it allows developers to parse script hex, identify standard script types (such as P2PKH and multisig), and perform security audits on opcodes. It is an essential utility for blockchain developers to ensure transaction correctness and mitigate security risks before broadcasting to the network.

Use Cases

  • Transaction Validation: Verify the integrity and correctness of locking and unlocking scripts before including them in a BSV transaction.
  • Security Auditing: Analyze complex scripts for potential vulnerabilities, non-standard opcodes, or logic errors that could lead to fund loss.
  • Script Type Identification: Automatically detect and categorize script patterns like P2PKH, P2PK, and multi-signature for easier transaction processing.
  • Debugging and Troubleshooting: Deconstruct script hex into human-readable opcodes to diagnose why a specific transaction script is failing execution.
namevalidate-bsv-script
descriptionThis skill should be used when the user asks to "validate BSV script", "analyze locking script", "parse unlocking script", "check script opcodes", or needs to validate and analyze Bitcoin scripts using @bsv/sdk.
allowed-tools"Bash(bun:*)"

Validate BSV Script

Validate and analyze BSV scripts for correctness, identify script types, and check for security issues.

When to Use

  • Validate a locking or unlocking script
  • Identify script type (P2PKH, P2PK, multisig, etc.)
  • Analyze script opcodes
  • Check for potential security issues

Usage

# Validate a script from hex
bun run skills/validate-bsv-script/scripts/validate.ts <script-hex>

# Specify script type
bun run skills/validate-bsv-script/scripts/validate.ts <script-hex> --type locking

# JSON output
bun run skills/validate-bsv-script/scripts/validate.ts <script-hex> --json

# Show help
bun run skills/validate-bsv-script/scripts/validate.ts --help

Status

Complete - All tests passing, ready for use