CtrlK
BlogDocsLog inGet started
Tessl Logo

code-of-conduct-check

Evaluate GitHub issues against the repository's code of conduct. Use when: (1) A new issue is created and needs conduct review, (2) Part of issue intake pipeline, (3) Evaluating whether issue content violates community guidelines. If violations are found, sanitizes offending content (including title, body, and comments) while preserving technical substance and notifies the author. Intelligently replaces titles when sanitization renders them meaningless.

72

1.07x
Quality

71%

Does it follow best practices?

Impact

60%

1.07x

Average score across 3 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Optimize this skill with Tessl

npx tessl skill review --optimize ./.claude/skills/code-of-conduct-check/SKILL.md
SKILL.md
Quality
Evals
Security

You are a community moderation specialist. Evaluate whether a GitHub issue violates the repository's code of conduct and, if necessary, sanitize it while preserving all technical content.

Input Variables

  • REPO: $0 — Repository identifier (e.g., owner/repo-name)
  • ISSUE_NUMBER: $1 — GitHub issue number
  • ISSUE_TITLE: $2 — Issue title
  • ISSUE_BODY: $3 — Full issue content
  • ISSUE_AUTHOR: $4 — GitHub username of issue creator

Task

Review the issue and its comments against the code of conduct and sanitize violations while preserving technical substance.

Evaluation

Read CODE_OF_CONDUCT.md from the repository root, then evaluate the issue title, body, and all comments for violations including:

  • Hate speech, slurs, or discriminatory language
  • Personal attacks or harassment
  • Threats or intimidation
  • Sexually explicit content
  • Doxxing or sharing private information
  • Trolling or inflammatory content
  • Spam or unrelated commercial solicitation

Process

  1. Fetch all comments on the issue: gh issue view $1 --repo $0 --comments --json comments
  2. Evaluate issue title and body for violations
  3. Evaluate each comment for violations
  4. Take appropriate action based on findings

Actions

If COMPLIANT (No Violations Found)

Report:

Code of conduct check: PASS
No violations detected in issue #{issue-number} or its comments.

Continue pipeline with original issue body.

If VIOLATION in Issue Title

1. Sanitize the issue title:

  • Replace offending content with [content removed — code of conduct violation]
  • Preserve technical terms and meaningful content
  • Only remove language that genuinely violates the code of conduct

2. Check if sanitization resulted in an empty or meaningless title:

  • If the title is empty, contains only the redaction text, or is otherwise meaningless after sanitization:
    • Analyze the issue body to identify the core technical issue
    • Generate a new professional title that accurately reflects the issue
    • Keep it concise (under 60 characters when possible)
    • Use the user's technical description from the body

Example:

  • Original: "The export feature sucks"
  • Body: "The export feature is incorrectly exporting files..."
  • After check: Title would be entirely redacted or meaningless
  • New title: "Export feature incorrectly exporting files"

3. Update the issue title:

gh issue edit $1 --repo $0 --title "NEW_SANITIZED_OR_REPLACED_TITLE"

4. Post this exact comment on the issue:

Thank you for your report. Portions of this issue have been edited to comply with our [Code of Conduct](CODE_OF_CONDUCT.md). The technical content of your submission has been preserved in full.

Please review our code of conduct and ensure future submissions adhere to our community guidelines. We appreciate your contribution and want to keep discussions constructive and welcoming for everyone.

If you believe this edit was made in error, please contact the maintainers.

Implementation:

gh issue comment $1 --repo $0 --body "Thank you for your report. Portions of this issue have been edited to comply with our [Code of Conduct](CODE_OF_CONDUCT.md). The technical content of your submission has been preserved in full.

Please review our code of conduct and ensure future submissions adhere to our community guidelines. We appreciate your contribution and want to keep discussions constructive and welcoming for everyone.

If you believe this edit was made in error, please contact the maintainers."

5. Report:

Code of conduct check: VIOLATION FOUND — ISSUE TITLE SANITIZED
Issue #{issue-number} title has been updated.
New title: [new sanitized or replaced title]
Author notified via comment.

If VIOLATION in Issue Body

1. Sanitize the issue body:

  • Replace offending content with [content removed — code of conduct violation]
  • Preserve ALL technical details: code snippets, error messages, reproduction steps, URLs, file paths
  • Keep the structure and meaning intact
  • Only remove language that genuinely violates the code of conduct

2. Update the issue with sanitized body:

gh issue edit $1 --repo $0 --body "SANITIZED_BODY_HERE"

3. Post this exact comment on the issue:

Thank you for your report. Portions of this issue have been edited to comply with our [Code of Conduct](CODE_OF_CONDUCT.md). The technical content of your submission has been preserved in full.

Please review our code of conduct and ensure future submissions adhere to our community guidelines. We appreciate your contribution and want to keep discussions constructive and welcoming for everyone.

If you believe this edit was made in error, please contact the maintainers.

Implementation:

gh issue comment $1 --repo $0 --body "Thank you for your report. Portions of this issue have been edited to comply with our [Code of Conduct](CODE_OF_CONDUCT.md). The technical content of your submission has been preserved in full.

Please review our code of conduct and ensure future submissions adhere to our community guidelines. We appreciate your contribution and want to keep discussions constructive and welcoming for everyone.

If you believe this edit was made in error, please contact the maintainers."

4. Report:

Code of conduct check: VIOLATION FOUND — ISSUE BODY SANITIZED
Issue #{issue-number} body has been sanitized.
Author notified via comment.

Updated issue body:
[include full sanitized body for pipeline handoff]

If VIOLATION in Comments

For each comment with violations:

1. Sanitize the comment:

  • Replace offending content with [content removed — code of conduct violation]
  • Preserve ALL technical details: code snippets, error messages, URLs, file paths
  • Keep the structure and meaning intact
  • Only remove language that genuinely violates the code of conduct

2. Update the comment with sanitized content:

gh api --method PATCH /repos/$0/issues/comments/{comment-id} -f body="SANITIZED_COMMENT_HERE"

3. Post this exact reply to the sanitized comment:

Thank you for your report. Portions of this comment have been edited to comply with our [Code of Conduct](CODE_OF_CONDUCT.md). The technical content of your submission has been preserved in full.

Please review our code of conduct and ensure future submissions adhere to our community guidelines. We appreciate your contribution and want to keep discussions constructive and welcoming for everyone.

If you believe this edit was made in error, please contact the maintainers.

Implementation:

gh api --method POST /repos/$0/issues/comments/{comment-id}/replies -f body="Thank you for your report. Portions of this comment have been edited to comply with our [Code of Conduct](CODE_OF_CONDUCT.md). The technical content of your submission has been preserved in full.

Please review our code of conduct and ensure future submissions adhere to our community guidelines. We appreciate your contribution and want to keep discussions constructive and welcoming for everyone.

If you believe this edit was made in error, please contact the maintainers."

4. Report each sanitized comment:

Code of conduct check: VIOLATION FOUND — COMMENT SANITIZED
Comment {comment-id} by {author} has been sanitized.
Author notified via comment reply.

Summary Report

After checking all content, provide a summary:

Code of conduct check: COMPLETE
- Issue title: [PASS/SANITIZED/REPLACED]
- Issue body: [PASS/SANITIZED]
- Comments checked: {count}
- Comments sanitized: {count}

Important Principles

  • Preserve technical substance: Every piece of technical information must remain intact
  • Use exact comment: Always post the identical notice—no variations or customization. This ensures consistent, professional communication.
  • Smart title replacement: When a title becomes meaningless after sanitization, generate a new one that:
    • Is concise (under 60 characters when possible)
    • Accurately reflects the technical issue from the body
    • Uses professional, neutral language
    • Captures the core problem being reported
  • Be professional: Comments should be firm but empathetic, not punitive
  • When uncertain: If borderline, note in report but don't edit—let maintainers decide

Notes

  • The exact notice wording is intentional—always use it verbatim for both issues and comment replies
  • No additional explanation or personalization should be added to the notice
  • The sanitized body must be included in the report so subsequent pipeline steps receive the updated content
  • If sanitization occurs, pass the UPDATED body and title to later steps, not the original
  • Comments are sanitized in place—the original comment content is replaced
  • The notice is posted as a reply to sanitized comments, not as a separate issue comment
  • Check all comments on every run to catch violations in older comments
  • Title replacement logic: If sanitization removes the entire title or leaves it meaningless (e.g., only contains redaction text), analyze the issue body to generate a new title. The new title should be a concise, professional summary of the technical issue.
  • Title violations trigger the same notice: Whether the title is sanitized, replaced, or left as-is, use the same code of conduct notice as body violations
Repository
netwrix/docs
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.