Regarding antibiotics true are :
Surgical site infections or also k/a wound infections
are infections of the tissue, organs or spaces exposed by surgeons during the performance of an invasive procedure.
they are classified as below

Classification of Surgical Wounds
Clean Wound (Class I)

include those in which no infection is present; only skin microflora potentially contaminate the wound. No hollow viscus is entered. No inflammation
examples: Hernia repair, breast biopsy

Clean/contaminated wounds (Class II)

include those in which a hollow viscus such as the respiratory, alimentary or genitourinary tracts with indigenous bacterial flora is opened, but under controlled circumstances without significant spillage of contents. No inflammation.
examples: Cholecystectomy, elective GI surgery.

Contaniinated.wounds (Class III)

include open accidental wounds encountered early after injury, those with the extensive introduction of bacteria into a normally sterile area of the body due to major breaks in sterile technique (eg. open cardiac massage); uncontrolled spillage of viscous contents such as from the intestine. Inflammation is apparent
examples: Penetrating abdominal trauma, large tissue injury, enterotomy during bowel obstruction.

Dirty wounds (Class IV)

include traumatic wounds in which a significant delay in treatment has occurred and in which necrotic tissue is present. Includes wounds in which pus is present. Includes those wounds created to access a perforated viscus accompanied by a high degree of contamination. Severe inflammation is seen
examples : Perforated diverticulitis, necrotizing soft tissue infection
Various steps are described for the prevention of SSIs, but we will discuss those related to use of antibiotics only

Use of antibiotics as nrovhvlaxis of SSIs
No prophylaxis for clean contaminated surgery
No prophylaxis for gastric ulcer surgery
Prophylaxis for colorectal surgery
Local irrigation with antibiotic contraindicated when systemic antibiotics given.