Claude Skills Guide

Claude Code for OSS CoC Enforcement Workflow Tutorial

Open source communities thrive when contributors feel safe and respected. A well-enforced Code of Conduct (CoC) is essential for healthy projects, but manually managing violations can be time-consuming and emotionally draining. This tutorial shows you how to build automated CoC enforcement workflows using Claude Code skills, helping maintainers handle reports consistently while reducing administrative burden.

Understanding CoC Enforcement Challenges

Every open source project maintainer knows this scenario: a community member files a CoC violation report, and you’re uncertain about the proper response sequence. Should you notify the accused first? How long should you wait for responses? When does an issue require escalation to the CoC committee?

These questions have no universal answers, but establishing clear workflows ensures consistent handling. The goal isn’t automation for its own sake—it’s creating repeatable processes that protect both reporters and the accused while documenting every step for accountability.

Building Your CoC Enforcement Skill

A Claude Code skill for CoC enforcement should guide maintainers through a structured response workflow. Let’s build one step by step.

Skill Structure and Front Matter

Every skill begins with front matter that defines its scope and available tools:

---
name: coc-enforcement
description: Guided workflow for handling Code of Conduct violation reports
---

The tools field is intentionally limited. CoC enforcement primarily requires document management and communication, not system operations. Restricting tools follows the principle of least privilege.

Defining the Workflow Stages

Your skill should guide maintainers through distinct stages:

  1. Report Intake - Documenting the initial complaint
  2. Triage - Assessing severity and determining urgency
  3. Investigation - Gathering information from involved parties
  4. Decision - Determining appropriate response
  5. Action - Implementing the consequences
  6. Follow-up - Ensuring resolution and documenting the case

Let’s create prompts for each stage:

# Code of Conduct Enforcement Workflow

This workflow guides you through handling a CoC violation report. Follow each stage sequentially, documenting your decisions at each step.

## Stage 1: Report Intake

First, gather essential information. Create or update a case file in your project's CoC records directory (typically `.coc/cases/`).

Document the following:
- Reporter's name and contact information (or "anonymous" if preferred)
- Date and time of the incident
- Description of the reported behavior
- Names of individuals involved
- Any witnesses or supporting evidence

Ask clarifying questions if the report is vague. A good report should answer: Who, What, When, Where, and Why does this violate our CoC?

## Stage 2: Triage

Assess the report using these criteria:

**Severity Levels:**
- **Critical**: Threats, harassment targeting protected groups, illegal behavior
- **High**: Repeated minor violations, escalation attempts, power imbalance abuse
- **Medium**: Single incident of disruptive behavior
- **Low**: Minor disagreements, tone issues, first-time minor violations

Determine urgency: Critical and High severity cases require response within 24 hours. Medium severity requires response within 72 hours.

Creating Response Templates

Consistency matters in CoC enforcement. Create templates for common communications:

## Communication Templates

Use these templates, customizing bracketed content:

### Initial Acknowledgment

> Dear [Reporter Name],
> 
> Thank you for bringing this concern to our attention. We take all reports seriously and are committed to addressing this matter thoughtfully.
> 
> Your report has been assigned case number [CASE-ID]. We will keep you informed of significant developments while respecting privacy considerations.
> 
> Our estimated timeline for initial assessment is [TIMEFRAME].
> 
> [Your Name], CoC Committee

### Accused Party Notification

> Dear [Accused Name],
> 
> A report has been filed regarding behavior that may violate our Code of Conduct. We are reaching out to gather your perspective before determining next steps.
> 
> This is an informational outreach, not a determination of wrongdoing. Your response will be valued and considered fairly.
> 
> Please respond within [TIMEFRAME] so we can include your perspective in our review.
> 
> [Your Name], CoC Committee

Automating Documentation

One of Claude Code’s strengths is systematic file operations. Use this to maintain audit trails:

# Create case directory structure
mkdir -p .coc/cases/$(date +%Y-%m)-${CASE_ID}
touch .coc/cases/$(date +%Y-%m)-${CASE_ID}/{intake.md,investigation.md,decision.md,actions.md}

Your skill can guide maintainers to populate each file sequentially, creating an immutable record of the entire process.

Decision Documentation Template

# Case Decision - [CASE-ID]

## Summary
[Brief description of the violation]

## Findings
- Evidence reviewed: [list]
- Parties interviewed: [list]
- Previous incidents: [list]

## Determination
- Severity: [level]
- Violation substantiated: [yes/no/partially]

## Response
- Action taken: [specific consequence]
- Duration: [if applicable]
- Conditions for reinstatement: [if applicable]

## Reasoning
[Explain the factors considered and how the response was determined]

## Sign-off
- Reviewer: [name]
- Date: [date]

Escalation Workflows

Not every case can be resolved at the maintainer level. Build escalation paths into your skill:

## Escalation Triggers

The following situations require immediate escalation to the full CoC committee:

1. **Threats of violence** - Any credible threat to physical safety
2. **Legal concerns** - Potential illegal activity or regulatory issues  
3. **Repeat offender** - Same individual accumulating multiple substantiated reports
4. **Committee member involved** - Conflict of interest requiring external review
5. **Complex testimony** - Conflicting accounts requiring detailed investigation

When escalating, prepare a summary document containing:
- Original report
- All investigation materials
- Preliminary assessment
- Recommended response range

Best Practices for CoC Workflow Skills

Maintain Confidentiality

Your skill should remind users never to share identifiable details in public channels. Use private repositories or encrypted storage for case files.

Establish Clear Timelines

Document expected response windows and hold yourself accountable. Inaction erodes trust faster than imperfect action.

Record Everything

Every conversation, decision, and action should be documented. This protects both the project and individuals involved.

Seek Training

CoC enforcement often involves sensitive situations. Consider training from organizations like Linux Foundation’s TODO Group or Community Lights.

Extending Your Workflow

Once the basic workflow is working, consider enhancements:

Conclusion

Automating your CoC enforcement workflow with Claude Code doesn’t replace human judgment—it enhances consistency and documentation. By structuring your responses, creating templates, and maintaining thorough records, you build a system that protects your community while respecting everyone’s privacy.

The key is starting simple: document your current process, identify repetitive tasks, and let Claude Code handle the scaffolding. Over time, refine your workflow based on real experiences. Your contributors will appreciate knowing there’s a fair, transparent system in place.

Remember: enforcement isn’t about punishment. It’s about creating an environment where everyone can contribute confidently. A well-designed workflow makes that possible.

Built by theluckystrike — More at zovo.one