Golden Age of Piracy > Pirate Codes
Every pirate code was unique and was crafted by the pirates who sailed on the ship. It is important to realize how useful these are for history because we only have a few of them. Most pirates would destroy the articles the first chance they got as they would be used against them at trial.
However, some pirates were captured with the articles still intact and this led them to be preserved for history. You can read each pirates code here.