Implement comprehensive content moderation and community protection

- Added Code of Conduct with clear behavioral standards
- Created Contributing guidelines with submission requirements
- Implemented structured issue templates (bug reports, features, new agents, moderation)
- Disabled blank issues to enforce template usage
- Added automated content moderation via GitHub Actions:
  * Real-time scanning for hate speech, threats, and profanity
  * Automatic closure/locking of critical violations
  * Moderation alerts for maintainer review
- Set up welcome system for new contributors with community guidelines
- Enabled GitHub Discussions as alternative to issues for general questions
- Closed and locked existing hate speech issue #30
- Blocked offending user account

This creates a multi-layered defense against inappropriate content while
maintaining an open, welcoming environment for legitimate contributors.
This commit is contained in:
Seth Hobson
2025-08-01 16:42:41 -04:00
parent bb90279a91
commit ea5644ab9b
9 changed files with 882 additions and 0 deletions

70
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@@ -0,0 +1,70 @@
# Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
## Our Standards
### Acceptable Behavior
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
- Contributing constructively to discussions about AI agents and development
### Unacceptable Behavior
The following behaviors are considered harassment and are unacceptable:
- **Hate speech**: The use of abusive or threatening speech that expresses prejudice against a particular group, especially on the basis of race, religion, gender, sexual orientation, or other characteristics
- **Discriminatory language**: Slurs, offensive comments, or language targeting protected characteristics
- **Personal attacks**: Insulting, demeaning, or hostile comments directed at individuals
- **Harassment**: Deliberate intimidation, stalking, following, or threatening
- **Doxxing**: Publishing private information without consent
- **Spam**: Excessive off-topic content, promotional material, or repetitive posts
- **Trolling**: Deliberately inflammatory or disruptive behavior
- **Sexual harassment**: Unwelcome sexual attention or advances
## Enforcement
### Reporting
If you experience or witness unacceptable behavior, please report it by:
- Creating an issue with the `moderation` label
- Contacting the repository maintainers directly
- Using GitHub's built-in reporting mechanisms
### Consequences
Community leaders will follow these guidelines in determining consequences:
1. **Warning**: First offense or minor violation
2. **Temporary restriction**: Temporary loss of interaction privileges
3. **Permanent ban**: Severe or repeated violations
### Enforcement Actions
- **Immediate removal**: Hate speech, threats, or doxxing will result in immediate content removal and user blocking
- **Issue/PR closure**: Inappropriate content will be closed and locked
- **Account blocking**: Repeat offenders will be blocked from the repository
## Scope
This Code of Conduct applies within all community spaces, including:
- Issues and pull requests
- Discussions and comments
- Wiki and documentation
- External representations of the project
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
## Contact
Questions about the Code of Conduct can be directed to the repository maintainers through GitHub issues or discussions.

125
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,125 @@
# Contributing to Agents
Thank you for your interest in contributing to this collection of Claude Code subagents! This guide will help you contribute effectively while maintaining a positive community environment.
## Before You Contribute
1. **Read our [Code of Conduct](.github/CODE_OF_CONDUCT.md)** - All interactions must follow our community standards
2. **Search existing issues** - Check if your suggestion or bug report already exists
3. **Use appropriate templates** - Follow the provided issue and PR templates
## Types of Contributions
### Subagent Improvements
- Bug fixes in existing agent prompts
- Performance optimizations
- Enhanced capabilities or instructions
- Documentation improvements
### New Subagents
- Well-defined specialized agents for specific domains
- Clear use cases and examples
- Comprehensive documentation
- Integration with existing workflows
### Infrastructure
- GitHub Actions improvements
- Template enhancements
- Community tooling
## Contribution Process
### 1. Issues First
- **Always create an issue before starting work** on significant changes
- Use the appropriate issue template
- Provide clear, detailed descriptions
- Include relevant examples or use cases
### 2. Pull Requests
- Fork the repository and create a feature branch
- Follow existing code style and formatting
- Include tests or examples where appropriate
- Reference the related issue in your PR description
- Use clear, descriptive commit messages
### 3. Review Process
- All PRs require review from maintainers
- Address feedback promptly and professionally
- Be patient - reviews may take time
## Content Guidelines
### What We Accept
- ✅ Constructive feedback and suggestions
- ✅ Well-researched feature requests
- ✅ Clear bug reports with reproduction steps
- ✅ Professional, respectful communication
- ✅ Documentation improvements
- ✅ Specialized domain expertise
### What We Don't Accept
- ❌ Hate speech, discrimination, or harassment
- ❌ Spam, promotional content, or off-topic posts
- ❌ Personal attacks or inflammatory language
- ❌ Duplicate or low-effort submissions
- ❌ Requests for malicious or harmful capabilities
- ❌ Copyright infringement
## Quality Standards
### For Subagents
- Clear, specific domain expertise
- Well-structured prompt engineering
- Practical use cases and examples
- Appropriate safety considerations
- Integration with existing patterns
### For Documentation
- Clear, concise writing
- Accurate technical information
- Consistent formatting and style
- Practical examples
## Community Guidelines
### Communication
- **Be respectful** - Treat all community members with dignity
- **Be constructive** - Focus on improving the project
- **Be patient** - Allow time for responses and reviews
- **Be helpful** - Share knowledge and assist others
### Collaboration
- **Give credit** - Acknowledge others' contributions
- **Share knowledge** - Help others learn and grow
- **Stay focused** - Keep discussions on topic
- **Follow up** - Respond to feedback and requests
## Getting Help
- 📖 **Documentation**: Check existing README files and agent descriptions
- 💬 **Discussions**: Use GitHub Discussions for questions and brainstorming
- 🐛 **Issues**: Report bugs or request features through issue templates
- 📧 **Direct Contact**: Reach out to maintainers for sensitive matters
## Recognition
Contributors who consistently provide high-quality submissions and maintain professional conduct will be:
- Acknowledged in release notes
- Given priority review for future contributions
- Potentially invited to become maintainers
## Enforcement
Violations of these guidelines may result in:
1. **Warning** - First offense or minor issues
2. **Temporary restrictions** - Suspension of contribution privileges
3. **Permanent ban** - Severe or repeated violations
Reports of violations should be made through:
- GitHub's built-in reporting tools
- Issues tagged with `moderation`
- Direct contact with maintainers
---
Thank you for helping make this project a welcoming, productive environment for everyone!

70
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
name: Bug Report
description: Report a bug or issue with an existing subagent
title: "[BUG] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for reporting a bug! Please fill out this template to help us understand and resolve the issue.
**Important**: This template is for technical bugs only. For questions, discussions, or general feedback, please use GitHub Discussions instead.
- type: checkboxes
id: preliminary-checks
attributes:
label: Preliminary Checks
description: Please confirm you have completed these steps
options:
- label: I have read the [Code of Conduct](.github/CODE_OF_CONDUCT.md)
required: true
- label: I have searched existing issues to ensure this is not a duplicate
required: true
- label: This report contains only technical information about a bug
- type: input
id: subagent
attributes:
label: Affected Subagent
description: Which subagent is experiencing the issue?
placeholder: e.g., python-pro, frontend-developer, etc.
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is
placeholder: Describe the unexpected behavior...
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Use subagent for...
2. Provide input...
3. Observe output...
4. See error...
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: What you expected to happen
placeholder: The subagent should have...
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Any other context, screenshots, or examples
placeholder: Add any other context about the problem here...

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: GitHub Discussions
url: https://github.com/wshobson/agents/discussions
about: For questions, brainstorming, and general discussions about subagents
- name: Community Guidelines
url: https://github.com/wshobson/agents/blob/main/.github/CODE_OF_CONDUCT.md
about: Read our Code of Conduct and community standards
- name: Contributing Guide
url: https://github.com/wshobson/agents/blob/main/.github/CONTRIBUTING.md
about: Learn how to contribute effectively to this project

View File

@@ -0,0 +1,77 @@
name: Feature Request
description: Suggest an improvement or new feature for existing subagents
title: "[FEATURE] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thank you for suggesting a feature! Please provide detailed information to help us understand your request.
**Note**: For new subagent proposals, please use the "New Subagent Proposal" template instead.
- type: checkboxes
id: preliminary-checks
attributes:
label: Preliminary Checks
description: Please confirm you have completed these steps
options:
- label: I have read the [Code of Conduct](.github/CODE_OF_CONDUCT.md)
required: true
- label: I have searched existing issues to ensure this is not a duplicate
required: true
- label: This is a constructive feature request for legitimate use cases
required: true
- type: input
id: subagent
attributes:
label: Target Subagent
description: Which subagent would this feature enhance?
placeholder: e.g., python-pro, frontend-developer, etc.
validations:
required: true
- type: textarea
id: problem-description
attributes:
label: Problem Description
description: What problem does this feature solve?
placeholder: Currently, users need to... This is frustrating because...
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: Proposed Solution
description: Describe your preferred solution
placeholder: I would like the subagent to be able to...
validations:
required: true
- type: textarea
id: use-cases
attributes:
label: Use Cases
description: Provide specific examples of how this would be used
placeholder: |
1. When developing...
2. For projects that...
3. To help with...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Other solutions you've considered
placeholder: I also considered... but this wouldn't work because...
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Any other relevant information
placeholder: Add any other context, examples, or screenshots here...

View File

@@ -0,0 +1,106 @@
name: Moderation Report
description: Report inappropriate content, behavior, or Code of Conduct violations
title: "[MODERATION] "
labels: ["moderation"]
body:
- type: markdown
attributes:
value: |
**⚠️ Use this template to report violations of our Code of Conduct, inappropriate content, or concerning behavior.**
All reports are taken seriously and will be reviewed by maintainers. False reports may result in moderation action.
**For urgent safety concerns or severe violations, you may also use GitHub's built-in reporting tools.**
- type: checkboxes
id: preliminary-checks
attributes:
label: Reporting Guidelines
description: Please confirm you understand these guidelines
options:
- label: I am reporting a genuine violation of the Code of Conduct
required: true
- label: I understand that false reports may result in moderation action
required: true
- label: I have attempted to resolve minor issues through direct communication (if applicable)
required: false
- type: dropdown
id: violation-type
attributes:
label: Type of Violation
description: What type of inappropriate behavior are you reporting?
options:
- Hate speech or discriminatory language
- Personal attacks or harassment
- Spam or off-topic content
- Inappropriate or offensive content
- Threats or intimidation
- Doxxing or privacy violations
- Impersonation
- Other Code of Conduct violation
validations:
required: true
- type: input
id: location
attributes:
label: Location of Violation
description: Where did this occur? (issue number, PR, comment link, etc.)
placeholder: e.g., Issue #123, PR #456, comment in issue #789
validations:
required: true
- type: input
id: user-involved
attributes:
label: User(s) Involved
description: GitHub username(s) of the person(s) involved (if known)
placeholder: e.g., @username1, @username2
- type: textarea
id: description
attributes:
label: Description of Violation
description: Detailed description of what happened and why it violates our Code of Conduct
placeholder: Please provide specific details about the violation...
validations:
required: true
- type: textarea
id: evidence
attributes:
label: Evidence
description: Any additional evidence (quotes, screenshots, etc.)
placeholder: |
You can include:
- Direct quotes (use > for blockquotes)
- Links to specific comments
- Screenshots (drag and drop images here)
- Timestamps of when violations occurred
- type: textarea
id: impact
attributes:
label: Impact
description: How has this affected you or the community?
placeholder: This behavior has made me feel... It affects the community by...
- type: checkboxes
id: previous-reports
attributes:
label: Previous Reports
options:
- label: This is the first time I'm reporting this user/behavior
- label: I have reported this user/behavior before
- type: markdown
attributes:
value: |
**What happens next:**
- Maintainers will review your report within 24-48 hours
- We may follow up with questions if needed
- We will take appropriate action based on our Code of Conduct
- We will update you on the resolution when possible
Thank you for helping maintain a respectful community.

111
.github/ISSUE_TEMPLATE/new_subagent.yml vendored Normal file
View File

@@ -0,0 +1,111 @@
name: New Subagent Proposal
description: Propose a new specialized subagent for the collection
title: "[NEW AGENT] "
labels: ["new-subagent"]
body:
- type: markdown
attributes:
value: |
Thank you for proposing a new subagent! Quality subagents require careful design and clear specialization.
**Important**: Only propose subagents for legitimate, constructive use cases. Proposals for malicious or harmful capabilities will be rejected and may result in moderation action.
- type: checkboxes
id: preliminary-checks
attributes:
label: Preliminary Checks
description: Please confirm you have completed these steps
options:
- label: I have read the [Code of Conduct](.github/CODE_OF_CONDUCT.md)
required: true
- label: I have reviewed existing subagents to ensure this is not a duplicate
required: true
- label: This proposal is for legitimate, constructive use cases only
required: true
- label: I have domain expertise in the proposed area
required: true
- type: input
id: agent-name
attributes:
label: Proposed Agent Name
description: What should this subagent be called?
placeholder: e.g., blockchain-developer, devops-security, etc.
validations:
required: true
- type: textarea
id: domain-expertise
attributes:
label: Domain Expertise
description: What specific domain or technology does this agent specialize in?
placeholder: This agent specializes in...
validations:
required: true
- type: textarea
id: unique-value
attributes:
label: Unique Value Proposition
description: How is this different from existing subagents? What unique capabilities does it provide?
placeholder: Unlike existing agents, this one would...
validations:
required: true
- type: textarea
id: use-cases
attributes:
label: Primary Use Cases
description: What specific tasks would this agent handle?
placeholder: |
1. Design and implement...
2. Optimize performance for...
3. Debug issues related to...
4. Review code for...
validations:
required: true
- type: textarea
id: tools-capabilities
attributes:
label: Required Tools & Capabilities
description: What tools and capabilities would this agent need?
placeholder: |
- File manipulation for...
- Bash commands for...
- Specialized knowledge of...
- Integration with...
validations:
required: true
- type: textarea
id: examples
attributes:
label: Example Interactions
description: Provide 2-3 example interactions showing how users would work with this agent
placeholder: |
**Example 1:**
User: "Implement a smart contract for..."
Agent response: "I'll create a secure smart contract with..."
**Example 2:**
User: "Optimize this blockchain query..."
Agent response: "Let me analyze the query and suggest optimizations..."
validations:
required: true
- type: textarea
id: expertise-evidence
attributes:
label: Your Expertise
description: What experience or credentials do you have in this domain?
placeholder: I have X years of experience in... I've worked with... I hold certifications in...
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Any other relevant information, resources, or considerations
placeholder: Relevant documentation, similar tools, potential challenges...

207
.github/workflows/content-moderation.yml vendored Normal file
View File

@@ -0,0 +1,207 @@
name: Content Moderation
on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]
pull_request:
types: [opened, edited]
pull_request_review_comment:
types: [created, edited]
jobs:
moderate-content:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: read
steps:
- name: Check for inappropriate content
id: content-check
uses: actions/github-script@v7
with:
script: |
// Define inappropriate content patterns
const hateWords = [
// Racial slurs (censored for detection)
'n[i1]gg[e3]r', 'n[i1]gg[a4]', 'ch[i1]nk', 'sp[i1]c', 'k[i1]k[e3]',
'w[e3]tb[a4]ck', 'b[e3][a4]n[e3]r', 'g[o0][o0]k', 'r[a4]gh[e3][a4]d',
// Homophobic/transphobic slurs
'f[a4]gg[o0]t', 'tr[a4]nn[y1]', 'd[y1]k[e3]',
// Religious/ethnic slurs
'j[e3]w', 'r[a4]gh[e3][a4]d', 'c[a4]m[e3]lj[o0]ck[e3]y',
// General offensive terms
'r[e3]t[a4]rd', 'sp[a4]st[i1]c'
];
const profanity = [
'f[u*]ck[i1]ng?', 'sh[i1]t', 'b[i1]tch', 'c[u*]nt', 'p[i1]ss',
'd[a4]mn', 'h[e3]ll', 'cr[a4]p', '[a4]ss', 'b[a4]st[a4]rd'
];
const threats = [
'k[i1]ll y[o0]u', 'd[i1][e3]', 'murd[e3]r', 'h[a4]rm y[o0]u',
'hurt y[o0]u', 'destroy y[o0]u', 'end y[o0]u'
];
// Get content based on event type
let content = '';
let contentType = '';
let itemNumber = 0;
if (context.eventName === 'issues') {
content = context.payload.issue.title + ' ' + context.payload.issue.body;
contentType = 'issue';
itemNumber = context.payload.issue.number;
} else if (context.eventName === 'issue_comment') {
content = context.payload.comment.body;
contentType = 'issue comment';
itemNumber = context.payload.issue.number;
} else if (context.eventName === 'pull_request') {
content = context.payload.pull_request.title + ' ' + context.payload.pull_request.body;
contentType = 'pull request';
itemNumber = context.payload.pull_request.number;
} else if (context.eventName === 'pull_request_review_comment') {
content = context.payload.comment.body;
contentType = 'PR comment';
itemNumber = context.payload.pull_request.number;
}
if (!content) return;
const normalizedContent = content.toLowerCase()
.replace(/[^a-z0-9\s]/g, '')
.replace(/\s+/g, ' ');
// Check for violations
let violation = null;
let severity = 'low';
// Check hate speech (highest severity)
for (const word of hateWords) {
const regex = new RegExp(word, 'i');
if (regex.test(normalizedContent)) {
violation = 'hate speech';
severity = 'critical';
break;
}
}
// Check threats (high severity)
if (!violation) {
for (const threat of threats) {
const regex = new RegExp(threat, 'i');
if (regex.test(normalizedContent)) {
violation = 'threats';
severity = 'high';
break;
}
}
}
// Check excessive profanity (medium severity)
if (!violation) {
let profanityCount = 0;
for (const word of profanity) {
const regex = new RegExp(word, 'gi');
const matches = normalizedContent.match(regex);
if (matches) profanityCount += matches.length;
}
if (profanityCount >= 3) {
violation = 'excessive profanity';
severity = 'medium';
}
}
// Set outputs
core.setOutput('violation', violation || 'none');
core.setOutput('severity', severity);
core.setOutput('content-type', contentType);
core.setOutput('item-number', itemNumber);
if (violation) {
console.log(`⚠️ Detected ${violation} (${severity} severity) in ${contentType} #${itemNumber}`);
}
- name: Handle critical violations
if: steps.content-check.outputs.violation != 'none' && steps.content-check.outputs.severity == 'critical'
uses: actions/github-script@v7
with:
script: |
const itemNumber = ${{ steps.content-check.outputs.item-number }};
const contentType = '${{ steps.content-check.outputs.content-type }}';
const violation = '${{ steps.content-check.outputs.violation }}';
if (contentType === 'issue') {
// Close and lock the issue immediately
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: itemNumber,
state: 'closed'
});
await github.rest.issues.lock({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: itemNumber,
lock_reason: 'off-topic'
});
// Add moderation comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: itemNumber,
body: `🚫 **This issue has been automatically closed and locked due to a Code of Conduct violation.**\n\n**Violation**: ${violation}\n\n**This action was taken because the content violates our community standards. Repeated violations may result in being blocked from this repository.**\n\n📖 Please review our [Code of Conduct](.github/CODE_OF_CONDUCT.md) and [Contributing Guidelines](.github/CONTRIBUTING.md).`
});
}
- name: Handle high severity violations
if: steps.content-check.outputs.violation != 'none' && steps.content-check.outputs.severity == 'high'
uses: actions/github-script@v7
with:
script: |
const itemNumber = ${{ steps.content-check.outputs.item-number }};
const contentType = '${{ steps.content-check.outputs.content-type }}';
if (contentType === 'issue') {
// Add warning label and comment
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: itemNumber,
labels: ['moderation-review']
});
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: itemNumber,
body: `⚠️ **Content Warning**: This ${contentType} has been flagged for moderation review due to potentially inappropriate content.\n\nPlease ensure all content follows our [Code of Conduct](.github/CODE_OF_CONDUCT.md). A maintainer will review this shortly.`
});
}
- name: Notify maintainers
if: steps.content-check.outputs.violation != 'none'
uses: actions/github-script@v7
with:
script: |
const violation = '${{ steps.content-check.outputs.violation }}';
const severity = '${{ steps.content-check.outputs.severity }}';
const contentType = '${{ steps.content-check.outputs.content-type }}';
const itemNumber = ${{ steps.content-check.outputs.item-number }};
// Create a moderation alert issue
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `[MODERATION ALERT] ${violation} detected in ${contentType} #${itemNumber}`,
body: `🚨 **Automated Moderation Alert**\n\n**Details:**\n- **Type**: ${violation} (${severity} severity)\n- **Location**: ${contentType} #${itemNumber}\n- **Action taken**: ${severity === 'critical' ? 'Automatically closed and locked' : 'Flagged for review'}\n\n**Next steps:**\n- [ ] Review the flagged content\n- [ ] Take additional action if needed\n- [ ] Consider blocking repeat offenders\n\n**Links:**\n- [View ${contentType} #${itemNumber}](https://github.com/${context.repo.owner}/${context.repo.repo}/${contentType === 'issue' ? 'issues' : 'pull'}/${itemNumber})\n\nThis alert was generated automatically by the content moderation system.`,
labels: ['moderation', 'automated-alert']
});
console.log(`📧 Created moderation alert for ${violation} in ${contentType} #${itemNumber}`);

View File

@@ -0,0 +1,105 @@
name: Welcome New Contributors
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
welcome:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Check if first-time contributor
id: check-contributor
uses: actions/github-script@v7
with:
script: |
const author = context.payload.sender.login;
// Check if this is their first contribution
const { data: issues } = await github.rest.search.issuesAndPullRequests({
q: `repo:${context.repo.owner}/${context.repo.repo} author:${author}`,
sort: 'created',
order: 'asc',
per_page: 2
});
const isFirstTime = issues.items.length <= 1;
core.setOutput('is-first-time', isFirstTime);
core.setOutput('author', author);
console.log(`User ${author} is ${isFirstTime ? 'a first-time' : 'a returning'} contributor`);
- name: Welcome first-time contributors
if: steps.check-contributor.outputs.is-first-time == 'true'
uses: actions/github-script@v7
with:
script: |
const author = '${{ steps.check-contributor.outputs.author }}';
const isIssue = context.eventName === 'issues';
const number = isIssue ? context.payload.issue.number : context.payload.pull_request.number;
const welcomeMessage = `👋 **Welcome to the Claude Code Agents project, @${author}!**
Thank you for your ${isIssue ? 'issue submission' : 'pull request'}! We appreciate your interest in contributing to our collection of specialized subagents.
## 📋 Community Guidelines
Before we proceed, please take a moment to review our community standards:
- 📖 **[Code of Conduct](.github/CODE_OF_CONDUCT.md)** - Our community standards and behavioral expectations
- 🤝 **[Contributing Guidelines](.github/CONTRIBUTING.md)** - How to contribute effectively
- 💬 **[GitHub Discussions](https://github.com/${context.repo.owner}/${context.repo.repo}/discussions)** - For questions and general discussion
## 🛡️ Community Values
We maintain a **respectful, inclusive, and professional environment**. Our community does not tolerate:
- Hate speech, discrimination, or harassment
- Personal attacks or inflammatory language
- Spam, trolling, or off-topic content
- Any content that violates our Code of Conduct
## ✅ What Makes a Great Contribution
${isIssue ? `**For Issues:**
- Clear, specific problem descriptions
- Steps to reproduce (for bugs)
- Constructive feature requests with use cases
- Professional, respectful language` : `**For Pull Requests:**
- Well-documented changes
- Following existing code style
- Clear commit messages
- Addressing a specific issue or improvement`}
## 🚀 Next Steps
A maintainer will review your ${isIssue ? 'issue' : 'pull request'} soon. Please feel free to:
- Add any additional context if needed
- Respond to questions from maintainers
- Join our [Discussions](https://github.com/${context.repo.owner}/${context.repo.repo}/discussions) for general questions
Thank you for helping make this project better! 🎉`;
if (isIssue) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: number,
body: welcomeMessage
});
} else {
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: number,
body: welcomeMessage,
event: 'COMMENT'
});
}
console.log(`Welcomed first-time contributor @${author}`);