SANKit
Read and write PGN format and test moves for legality.
...In addition to flagging errors at the move level, the program provides three boards around the move.
NOTE: plan on budgeting a fair amount of time to read, re-read, and experiment with the documentation and cryptic uncommented code. You are on your own