This skill should be used when the user asks to "review a script template", "audit a template", "check template implementation", "validate ts-templates code", or mentions reviewing BitCom templates like AIP, MAP, SIGMA, BAP.
This skill should be used when the user asks to "review a script template", "audit a template", "check template implementation", "validate ts-templates code", or mentions reviewing BitCom templates like AIP, MAP, SIGMA, BAP.
Validates ScriptTemplate implementations against best practices.
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
// BAD: String splitting
const parts = script.toASM().split(' ')
// BAD: Buffer usage
const field = Buffer.from(chunks[0].data).toString()
// BAD: TextEncoder
new TextEncoder().encode(field)
Utils Usage Review
Verify correct Utils functions:
Operation
Correct
Incorrect
String → bytes
Utils.toArray(str, 'utf8')
Buffer.from(), TextEncoder
Bytes → string
Utils.toUTF8(bytes)
Buffer.toString(), TextDecoder
Bytes → hex
Utils.toHex(bytes)
Buffer.toString('hex')
Bytes → base64
Utils.toBase64(bytes)
Buffer.toString('base64')
Signature Verification Review
For protocols with signatures:
Uses BSM.sign() for signing
Tries all 4 recovery factors (0-3)
Uses Signature.fromCompact() for decoding
Verifies address matches recovered public key
Sets valid field after verification
BitCom Integration Review
For OP_RETURN protocols:
Uses BitCom class for lock()
Creates Protocol array with correct structure
Proper pipe delimiter handling
decode() accepts BitComDecoded parameter
Common Issues
Issue 1: Missing Null Checks
// BAD: Can throw on missing data
const field = Utils.toUTF8(chunks[0].data)
// GOOD: Handle missing data
const field = Utils.toUTF8(chunks[0].data ?? [])
Issue 2: Wrong Chunk Index
Verify chunk indices match protocol specification: