GitHub Repository Setup for Public Contributions
Last Updated: 2025-11-30 Repository: claude-mpm-skills Maintainer: @bobmatnyc
Table of Contents
- 1. Overview
- 2. General Settings
- 3. Branch Protection Rules
- 4. Security Settings
- 5. GitHub Actions Settings
- 6. Issue and PR Settings
- 7. Discussions Settings
- 8. Labels Setup
- 9. Collaborators and Teams
- 10. Repository Insights
- 11. Pre-Launch Checklist
- 12. Post-Launch Monitoring
- 13. Automated CI Workflows
- Appendix A: Label Creation Script
- Appendix B: Troubleshooting
1. Overview
Purpose of This Document
This guide provides step-by-step instructions to configure the claude-mpm-skills repository for safe, high-quality public contributions. These settings enable:
- Quality Control: Branch protection and required reviews prevent broken code from merging
- Automated Validation: CI workflows enforce skill self-containment standards
- Community Safety: Security policies and code of conduct protect contributors
- Efficient Triage: Label taxonomy and issue templates streamline issue management
- Contributor Experience: Clear templates and guidelines reduce friction
When to Apply These Settings
Before making the repository public or accepting external contributions. This prevents:
- Direct commits to
mainbranch - Merging of malformed skills or sensitive data
- Unclear contribution expectations
- Security vulnerabilities being publicly disclosed
How to Access Repository Settings
- Navigate to
https://github.com/OWNER/claude-mpm-skills - Click Settings tab (requires admin/owner permissions)
- Follow section-specific instructions below
Note: Some settings require repository admin or owner permissions.
2. General Settings
Navigate to: Settings → General
Repository Details
Description:
Production-ready Claude Code skills for intelligent project development
Website:
https://github.com/OWNER/claude-mpm-skills#readme
(Update with documentation site URL if available)
Topics/Tags:
Add the following topics for discoverability:
claude-code
claude
anthropic
skills
ai-development
development-tools
project-management
automation
typescript
python
nextjs
ai-workflows
code-generation
developer-productivity
mcp-servers
How to add:
- Click "⚙️" next to "About" section on repository homepage
- Add topics in "Topics" field (comma-separated)
- Click "Save changes"
Features to Enable
| Feature | Enable? | Rationale |
|---|---|---|
| Issues | ✅ Yes | Primary contribution and bug tracking channel |
| Discussions | ✅ Yes | Q&A, skill proposals, community feedback |
| Projects | ⚠️ Optional | Useful for roadmap tracking (recommend enabling) |
| Wiki | ❌ No | Use /docs/ directory instead for version control |
| Sponsorships | ⚠️ Optional | Enable if FUNDING.yml is created |
| Preserve this repository | ✅ Yes | Arctic Code Vault archival |
Configuration Steps:
- Go to Settings → General → Features
- Check/uncheck boxes according to table above
- Scroll down and click Save
3. Branch Protection Rules for main
Navigate to: Settings → Branches → Add branch protection rule
Required Configuration
Branch name pattern:
main
Pull Request Requirements
✅ Require a pull request before merging
- ✅ Require approvals:
1- Rationale: Single maintainer workflow, ensures code review
- ✅ Dismiss stale pull request approvals when new commits are pushed
- Rationale: Prevents outdated approvals after significant changes
- ✅ Require review from Code Owners
- Rationale:
.github/CODEOWNERSexists and routes to @bobmatnyc
- Rationale:
- ❌ Require approval of the most recent reviewable push
- Rationale: Optional - adds extra review burden for small changes
✅ Require status checks to pass before merging
- ✅ Require branches to be up to date before merging
- Rationale: Prevents merge conflicts and ensures latest code tested
- Status checks that are required:
- ✅
validate / validate(from.github/workflows/validate-skills.yml)
- ✅
How to add required checks:
- After enabling "Require status checks", a search box appears
- Type
validateand selectvalidate / validate - If not visible, ensure the workflow has run at least once on a PR
✅ Require conversation resolution before merging
- Rationale: All review comments must be addressed before merge
⚠️ Require signed commits (Optional - Recommended)
- Rationale: Increases security, verifies commit authorship
- Trade-off: Adds setup burden for new contributors
- Recommendation: Enable if security is paramount, otherwise skip initially
❌ Require linear history
- Rationale: Too strict for open source - requires rebasing knowledge
- Recommendation: Disabled for contributor friendliness
❌ Require deployments to succeed before merging
- Rationale: N/A for skill library (no deployment process)
Enforcement Settings
✅ Do not allow bypassing the above settings
- Rationale: Applies rules to administrators (prevents accidental direct commits)
⚠️ Restrict who can push to matching branches
- Options:
- Enable and add only
@bobmatnyc(strict control) - Disable (allow trusted collaborators to push)
- Enable and add only
- Recommendation: Enable for single-maintainer workflow
❌ Allow force pushes
- Rationale: Never enable - protects commit history
❌ Allow deletions
- Rationale: Never enable - prevents accidental branch deletion
Summary Configuration
Branch name pattern: main
Pull Request Settings:
✅ Require pull request reviews (1 approval)
✅ Dismiss stale reviews
✅ Require Code Owners review
Status Checks:
✅ Require status checks to pass
✅ Require branches to be up to date
Required checks:
- validate / validate
Other Requirements:
✅ Require conversation resolution
⚠️ Require signed commits (optional)
❌ Require linear history
Enforcement:
✅ Do not allow bypassing
⚠️ Restrict who can push (recommended)
❌ Allow force pushes
❌ Allow deletions
Save the rule: Click Create or Save changes at bottom of page.
4. Security Settings
Navigate to: Settings → Security & analysis
Recommended Security Features
| Feature | Enable? | Description |
|---|---|---|
| Private vulnerability reporting | ✅ Yes | Allows researchers to privately report security issues |
| Dependency graph | ✅ Yes | Automatically track dependencies |
| Dependabot alerts | ✅ Yes | Get alerts for vulnerabilities in dependencies |
| Dependabot security updates | ✅ Yes | Auto-create PRs to update vulnerable dependencies |
| Dependabot version updates | ⚠️ Optional | Auto-create PRs for all dependency updates (can be noisy) |
| Code scanning (CodeQL) | ⚠️ If available | GitHub Advanced Security - only on Pro/Enterprise plans |
| Secret scanning | ✅ Yes | Detect secrets in code (available for public repos) |
| Secret scanning push protection | ✅ Yes | Block commits containing secrets |
Configuration Steps
Private vulnerability reporting:
- Click Enable next to "Private vulnerability reporting"
- Ensure
SECURITY.mdexists (see Pre-Launch Checklist)
Dependency graph:
- Should be enabled by default for public repos
- If not, click Enable
Dependabot alerts:
- Click Enable if not already active
- Alerts appear in Security → Dependabot tab
Dependabot security updates:
- Click Enable
- Creates PRs automatically when security vulnerabilities found
Secret scanning:
- Available by default for public repositories
- Verify status shows "Enabled"
Secret scanning push protection:
- Click Enable to block pushes with secrets
Security Policy
Ensure SECURITY.md exists in repository root with vulnerability reporting instructions. See template in Pre-Launch Checklist.
5. GitHub Actions Settings
Navigate to: Settings → Actions → General
Actions Permissions
Actions permissions:
✅ Allow all actions and reusable workflows
Rationale: Open source project benefits from community actions. Monitor for malicious actions in PRs.
Alternative (more restrictive):
⚠️ Allow OWNER, and select non-OWNER, actions and reusable workflows
Use if security is paramount.
Workflow Permissions
Default workflow permissions:
✅ Read repository contents and packages permissions
Rationale: Minimal permissions for CI validation workflows.
Additional permissions:
✅ Allow GitHub Actions to create and approve pull requests
Rationale: Enables automation like Dependabot PRs.
Warning: Do NOT enable write access to repository contents unless absolutely necessary (prevents accidental auto-commits).
Fork Pull Request Workflows
Fork pull request workflows from outside collaborators:
✅ Require approval for first-time contributors
Rationale: Prevents malicious workflows from external contributors.
Fork pull request workflows from contributors:
✅ Require approval for all outside collaborators
Rationale: All external PRs reviewed before running workflows.
Configuration Summary
Actions Permissions:
✅ Allow all actions and reusable workflows
Workflow Permissions:
✅ Read repository contents and packages
✅ Allow GitHub Actions to create and approve pull requests
❌ Read and write permissions (contents)
Fork Pull Request Workflows:
✅ Require approval for first-time contributors
✅ Require approval for all outside collaborators
Save: Scroll down and click Save.
6. Issue and PR Settings
Navigate to: Settings → General → Features
Issue Settings
Issues:
✅ Enable issues
Issue Templates:
- ✅ Already created in
.github/ISSUE_TEMPLATE/:bug_report.yml(structured bug reports)feature_request.yml(feature suggestions)new_skill_proposal.yml(skill contribution workflow)config.yml(template chooser configuration)
No additional configuration needed - templates auto-detected by GitHub.
Pull Request Settings
Navigate to: Settings → General → Pull Requests
Merge Button Options:
| Option | Enable? | Rationale |
|---|---|---|
| Allow merge commits | ✅ Yes | Standard workflow for multi-commit PRs with logical progression |
| Allow squash merging | ✅ Yes | Recommended for atomic skill additions - creates clean history |
| Allow rebase merging | ⚠️ Optional | Advanced users only - can confuse new contributors |
Recommendation: Enable all three, default to squash merging.
How to set default:
- Go to Settings → General → Pull Requests
- Under "Allow merge commits", check the box
- Under "Allow squash merging", check the box (select as default)
- Under "Allow rebase merging", check if desired
Additional PR Settings:
| Setting | Enable? | Rationale |
|---|---|---|
| Always suggest updating pull request branches | ✅ Yes | Prompts contributors to sync with main |
| Allow auto-merge | ✅ Yes | Enables PR auto-merge when checks pass |
| Automatically delete head branches | ✅ Yes | Keeps repository clean after merge |
Configuration:
- Check Always suggest updating pull request branches
- Check Allow auto-merge
- Check Automatically delete head branches
- Scroll down and click Save
7. Discussions Settings
Navigate to: Settings → General → Features → Discussions
Enable Discussions
- Check ✅ Discussions checkbox
- Click Set up discussions
Create Discussion Categories
GitHub creates default categories. Customize as follows:
| Category | Emoji | Description | Format | Who Can Post |
|---|---|---|---|---|
| Announcements | 📣 | New skill releases, bundle updates | Announcement | Maintainers only |
| Ideas | 💡 | Skill proposals and feature requests | Open discussion | Anyone |
| Q&A | 🙏 | Questions about using skills | Q&A | Anyone |
| Show and Tell | 🎉 | Share your skill implementations | Open discussion | Anyone |
| General | 💬 | Everything else | Open discussion | Anyone |
How to configure:
- Go to repository Discussions tab
- Click ⚙️ (settings icon) or "Edit" next to category
- Modify name, emoji, description per table
- For Announcements: Check "Only maintainers can post"
- Save each category
Discussion Templates (Optional)
Create discussion templates in .github/DISCUSSION_TEMPLATE/:
.github/
└── DISCUSSION_TEMPLATE/
├── skill-idea.md
└── implementation-help.md
Example: skill-idea.md
---
title: "[Skill Idea] "
labels: ["type: new-skill"]
---
## Skill Name
<!-- e.g., "PostgreSQL Query Optimization" -->
## Category
<!-- toolchains/python, universal/, etc. -->
## Use Case
<!-- What problem does this skill solve? -->
## Key Features
<!-- What would this skill include? -->
8. Labels Setup
Label Taxonomy Overview
A comprehensive label system enables efficient issue triage and filtering. Labels are organized into categories:
- Priority (🟥🟧🟨🟩) - Urgency and importance
- Status (🚦🔍🚧🏁👀⛔✅) - Workflow state
- Type (🐛✨🚀📖🔧💬🎨) - Issue classification
- Skill Category (skill:*) - Domain-specific
- Effort (effort:*) - Implementation complexity
- Community (good first issue, help wanted, etc.)
- Automated (🤖 auto:*) - CI/bot-applied
Label Application Rules
Every issue must have:
- One
prioritylabel (🟥🟧🟨🟩) - One
typelabel (🐛✨🚀📖🔧💬🎨) - One
statuslabel (starts withstatus: triage)
Optional labels:
- One or more
skill:*labels - One
effort:*label (recommended for tasks) - Community labels as appropriate
Creating Labels
Option 1: Automated Script (Recommended)
See Appendix A: Label Creation Script for complete bash script using GitHub CLI.
Option 2: Manual Creation
Navigate to: Issues → Labels → New label
Create each label with specifications below:
Priority Labels (Mandatory)
| Label Name | Color | Description |
|---|---|---|
🟥 priority: critical |
#b60205 |
Must be fixed ASAP - broken core functionality |
🟧 priority: high |
#d93f0b |
Blocks dependent work or affects many users |
🟨 priority: medium |
#fbca04 |
Important but non-blocking |
🟩 priority: low |
#cfda2c |
Nice to have, no rush |
Status Labels (Workflow)
| Label Name | Color | Description |
|---|---|---|
🚦 status: triage |
#eeeeee |
Needs initial review and labeling |
🔍 status: needs-info |
#d4c5f9 |
Awaiting information from reporter |
🚧 status: blocked |
#333333 |
Cannot proceed due to dependency |
🏁 status: ready |
#0e8a16 |
Ready for implementation |
👀 status: in-review |
#fbca04 |
Under active review |
⛔ status: wontfix |
#ffffff |
Rejected/out of scope |
✅ status: done |
#1d76db |
Completed (before closing) |
Type Labels (Classification)
| Label Name | Color | Description |
|---|---|---|
🐛 type: bug |
#d73a4a |
Something isn't working correctly |
✨ type: enhancement |
#a2eeef |
Improvement to existing feature |
🚀 type: new-skill |
#0075ca |
Proposal for new skill |
📖 type: documentation |
#0075ca |
Documentation improvements |
🔧 type: tooling |
#d4c5f9 |
CI/CD, scripts, automation |
💬 type: question |
#d876e3 |
User question or clarification |
🎨 type: design |
#e99695 |
UI/UX, repository structure |
Skill Category Labels
| Label Name | Color | Description |
|---|---|---|
skill: python |
#3572A5 |
Python skills |
skill: typescript |
#2b7489 |
TypeScript skills |
skill: javascript |
#f1e05a |
JavaScript skills |
skill: nextjs |
#000000 |
Next.js skills |
skill: ui |
#563d7c |
UI/styling skills |
skill: ai |
#ff6f00 |
AI/ML skills |
skill: platform |
#89e051 |
Platform/deployment skills |
skill: universal |
#ededed |
Universal skills |
Effort Labels (Contributor Guidance)
| Label Name | Color | Description |
|---|---|---|
effort: small |
#c2e0c6 |
< 2 hours of work |
effort: medium |
#fef2c0 |
2-8 hours of work |
effort: large |
#f9d0c4 |
1-3 days of work |
effort: epic |
#d93f0b |
Multi-day or requires research |
Community Labels
| Label Name | Color | Description |
|---|---|---|
good first issue |
#7057ff |
Good for newcomers (GitHub recognized) |
help wanted |
#008672 |
Maintainer requests community help (GitHub recognized) |
🔒 staff only |
#d73a4a |
Requires maintainer privileges |
duplicate |
#cfd3d7 |
Duplicate of another issue |
invalid |
#e4e669 |
Invalid issue (spam, off-topic) |
Automated Labels (Applied by CI)
| Label Name | Color | Description |
|---|---|---|
🤖 auto: validation-failed |
#b60205 |
CI validation checks failed |
🤖 auto: sensitive-data |
#d73a4a |
Potential credentials detected |
🤖 auto: manifest-error |
#d93f0b |
manifest.json validation failed |
Total Labels: 40
9. Collaborators and Teams
Navigate to: Settings → Access → Collaborators and teams
Recommended Team Structure
| Role | Access Level | Members | Permissions |
|---|---|---|---|
| Maintainers | Admin | @bobmatnyc | Full repository access, settings, merge |
| Contributors | Write | Trusted contributors | Can merge PRs, manage issues |
| Triage | Triage | Community moderators | Manage issues/PRs without merging |
| External | Read | Public | Fork and submit PRs |
Adding Collaborators
- Click Add people or Add teams
- Search for GitHub username
- Select role from dropdown
- Click Add
Creating Teams (Organization Repos Only)
If repository is under GitHub organization:
- Go to organization Teams page
- Click New team
- Name:
claude-mpm-maintainers,claude-mpm-contributors, etc. - Add team members
- In repository settings, add team with appropriate role
Single Maintainer Setup
For @bobmatnyc as sole maintainer:
- No additional collaborators needed initially
- Branch protection ensures all PRs reviewed before merge
- Add trusted contributors over time as community grows
10. Repository Insights
Navigate to: Insights → Community
Community Health Checklist
Verify all items are checked (✅):
| Item | Status | Location |
|---|---|---|
| Description | ✅ | Repository settings |
| README | ✅ | README.md |
| Code of conduct | ⚠️ Required | CODE_OF_CONDUCT.md |
| Contributing guidelines | ✅ | CONTRIBUTING.md |
| License | ✅ | LICENSE |
| Issue templates | ✅ | .github/ISSUE_TEMPLATE/ |
| Pull request template | ✅ | .github/pull_request_template.md |
| Security policy | ⚠️ Required | SECURITY.md |
Missing items must be created before going public. See Pre-Launch Checklist.
Community Standards Badge
Once all files exist, repository displays "Community standards: Complete" badge.
To verify:
- Go to Insights → Community
- Check percentage (target: 100%)
- Create missing files from checklist
11. Pre-Launch Checklist
Complete these tasks before making repository public or announcing to community:
Required Files
CODE_OF_CONDUCT.md- Download from Contributor Covenant- Save to repository root
- Update contact email to maintainer email
SECURITY.md- Create in repository root:
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 1.x.x | :white_check_mark: |
## Reporting a Vulnerability
**DO NOT** create a public issue for security vulnerabilities.
Instead, please report security vulnerabilities via GitHub's private vulnerability reporting:
1. Go to the **Security** tab
2. Click **Report a vulnerability**
3. Fill out the form with details
Alternatively, email security concerns to: [MAINTAINER_EMAIL]
We aim to respond within 48 hours and provide a fix within 7 days for critical vulnerabilities.
## Scope
This repository contains Claude Code skills (documentation and configuration). Security concerns include:
- Exposure of API keys or secrets in skill examples
- Malicious code in skill instructions
- Dependency vulnerabilities (if any)
- Social engineering via skill content
## Out of Scope
- Issues with Claude Code itself (report to Anthropic)
- General skill usage questions (use Discussions)
Repository Configuration
- Branch protection enabled on
main(see Section 3) - Security features enabled (see Section 4)
- GitHub Actions permissions configured (see Section 5)
- Issue and PR templates tested (create test issue/PR)
- Labels created (run script from Appendix A)
- Repository description and topics set (see Section 2)
- Discussions enabled with categories (see Section 7)
Documentation Review
-
CONTRIBUTING.mdupdated with self-containment standard reference -
README.mdincludes badges:   -
README.mdincludes contribution section linking toCONTRIBUTING.md - All documentation links tested (no broken links)
CI/CD Validation
-
.github/workflows/validate-skills.ymltested (create test PR) - Self-containment validation working (check for relative paths)
- Manifest validation working (test with invalid JSON)
- Sensitive data detection working (test with fake API key)
Testing
- Create test issue using each template (verify fields work)
- Create test PR using template (verify checklist appears)
- Trigger CI workflow and verify it runs
- Test branch protection (attempt direct push to main - should fail)
- Test required reviews (verify PR cannot merge without approval)
Final Verification
- Community health at 100% (check Insights → Community)
- All required status checks configured
- CODEOWNERS file present and correct
- Repository visibility set appropriately (public vs private)
12. Post-Launch Monitoring
Week 1 (High Attention Period)
Daily tasks:
- Monitor new issues (are templates being used correctly?)
- Respond to first-time contributors within 24 hours
- Watch for CI failures on PRs
- Check Discussions for questions
Metrics to track:
- Number of issues opened
- Issue template compliance rate
- Average time to first response
- PR submission rate
- CI pass/fail rate
Month 1 (Adjustment Period)
Weekly tasks:
- Review label usage (are labels being applied correctly?)
- Identify common questions → add to FAQ or documentation
- Evaluate issue template effectiveness (missing fields?)
- Monitor community engagement in Discussions
- Review and merge Dependabot PRs
Adjust as needed:
- Refine issue templates if missing critical information
- Add new labels based on emerging patterns
- Update CONTRIBUTING.md with lessons learned
- Create discussion templates for common topics
Ongoing Maintenance
Monthly:
- Review community health score
- Audit open issues (close stale issues, update priorities)
- Update documentation based on contributor feedback
- Evaluate contributor growth (new vs repeat)
- Review CI workflow efficiency (reduce run time if possible)
Quarterly:
- Analyze contribution trends (which skills most requested?)
- Update roadmap based on community input
- Recognize top contributors (shoutouts in Discussions)
- Review and update security policy if needed
- Evaluate label taxonomy (add/remove/rename labels)
Annually:
- Complete documentation audit
- Update Code of Conduct if needed
- Review contributor guidelines for clarity
- Assess repository structure (reorganize if needed)
13. Automated CI Workflows
Current Workflow: validate-skills.yml
Located at: .github/workflows/validate-skills.yml
Current checks:
- ✅ Skill structure validation (SKILL.md, metadata.json presence)
- ✅ Manifest validation (JSON syntax)
- ✅ Sensitive data detection (API keys, secrets)
Recommended Enhancements
Enhanced Self-Containment Check
Create: .github/workflows/self-containment-check.yml
name: Self-Containment Validation
on:
pull_request:
paths:
- 'toolchains/**'
- 'universal/**'
- 'frameworks/**'
- 'bundled/**'
jobs:
validate-self-containment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for relative path dependencies
run: |
echo "🔍 Checking for relative path violations..."
# Check for relative path imports in SKILL.md files
VIOLATIONS=$(grep -r "\.\./\|\.\./" --include="SKILL.md" toolchains/ universal/ frameworks/ bundled/ 2>/dev/null || true)
if [ -n "$VIOLATIONS" ]; then
echo "❌ Found relative path dependencies:"
echo "$VIOLATIONS"
echo ""
echo "Skills must be self-contained. See docs/SKILL_SELF_CONTAINMENT_STANDARD.md"
exit 1
fi
echo "✅ No relative path dependencies found"
- name: Check for skill dependencies
run: |
echo "🔍 Checking for hard skill dependencies..."
# Look for phrases indicating dependencies
DEPS=$(grep -r "requires.*skill\|depends on.*skill\|see.*skill" --include="SKILL.md" toolchains/ universal/ frameworks/ bundled/ 2>/dev/null || true)
if [ -n "$DEPS" ]; then
echo "⚠️ Potential skill dependencies found:"
echo "$DEPS"
echo ""
echo "Review these references - skills should be self-contained."
echo "Use soft references if complementary skills mentioned."
# Warning only - don't fail build
fi
- name: Validate metadata.json
run: |
echo "🔍 Validating all metadata.json files..."
FAILED=0
for file in $(find toolchains/ universal/ frameworks/ bundled/ -name "metadata.json" 2>/dev/null); do
echo "Checking $file..."
if ! python3 -m json.tool "$file" > /dev/null 2>&1; then
echo "❌ Invalid JSON in $file"
FAILED=1
fi
done
if [ $FAILED -eq 1 ]; then
exit 1
fi
echo "✅ All metadata.json files valid"
- name: Check for complete examples
run: |
echo "🔍 Checking for code example completeness..."
# Check for common indicators of incomplete examples
INCOMPLETE=$(grep -r "# \.\.\.\|// \.\.\.\|truncated\|abbreviated" --include="SKILL.md" toolchains/ universal/ frameworks/ bundled/ 2>/dev/null || true)
if [ -n "$INCOMPLETE" ]; then
echo "⚠️ Potential incomplete examples found:"
echo "$INCOMPLETE"
echo ""
echo "Examples should be complete and runnable."
# Warning only
fi
Label Auto-Assignment
Create: .github/workflows/auto-label.yml
name: Auto-Label Issues and PRs
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
auto-label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Label new issues
if: github.event_name == 'issues'
uses: actions/github-script@v7
with:
script: |
// Auto-apply triage status to new issues
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['🚦 status: triage']
});
- name: Label skill-related PRs
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const { data: files } = await github.rest.pulls.listFiles({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
const labels = [];
// Detect skill categories based on changed files
const pathPatterns = {
'skill: python': /toolchains\/python/,
'skill: typescript': /toolchains\/typescript/,
'skill: javascript': /toolchains\/javascript/,
'skill: nextjs': /frameworks\/nextjs/,
'skill: ai': /toolchains\/.*\/ai/,
'skill: universal': /universal\//
};
for (const [label, pattern] of Object.entries(pathPatterns)) {
if (files.some(file => pattern.test(file.filename))) {
labels.push(label);
}
}
// Check for new skills
const hasNewSkill = files.some(file =>
file.filename.includes('SKILL.md') && file.status === 'added'
);
if (hasNewSkill) {
labels.push('🚀 type: new-skill');
}
// Apply labels
if (labels.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: labels
});
}
PR Size Labeling
Create: .github/workflows/pr-size.yml
name: PR Size Labeling
on:
pull_request:
types: [opened, synchronize]
jobs:
size-label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'effort: small'
xs_max_size: '50'
s_label: 'effort: small'
s_max_size: '150'
m_label: 'effort: medium'
m_max_size: '400'
l_label: 'effort: large'
l_max_size: '800'
xl_label: 'effort: epic'
fail_if_xl: 'false'
Workflow Best Practices
Do:
- ✅ Keep workflows focused (one responsibility per workflow)
- ✅ Use descriptive job and step names
- ✅ Add comments explaining complex logic
- ✅ Test workflows on fork before deploying
- ✅ Use official GitHub actions when possible
- ✅ Set appropriate permissions (minimal required)
Don't:
- ❌ Store secrets in workflow files (use repository secrets)
- ❌ Run workflows on every commit (filter by path/files)
- ❌ Auto-merge PRs without review
- ❌ Grant write access to forks
- ❌ Ignore workflow security warnings
Appendix A: Label Creation Script
Save as scripts/create-labels.sh:
#!/bin/bash
# GitHub label creation script for claude-mpm-skills
# Requires: GitHub CLI (gh) - Install: https://cli.github.com/
# Usage: bash scripts/create-labels.sh
set -e
echo "🏷️ Creating labels for claude-mpm-skills..."
echo ""
# Check if gh CLI is installed
if ! command -v gh &> /dev/null; then
echo "❌ GitHub CLI (gh) not found"
echo "Install from: https://cli.github.com/"
exit 1
fi
# Check if authenticated
if ! gh auth status &> /dev/null; then
echo "❌ Not authenticated with GitHub CLI"
echo "Run: gh auth login"
exit 1
fi
echo "Creating Priority Labels..."
gh label create "🟥 priority: critical" --color b60205 --description "Must be fixed ASAP" --force
gh label create "🟧 priority: high" --color d93f0b --description "Blocks dependent work" --force
gh label create "🟨 priority: medium" --color fbca04 --description "Important but non-blocking" --force
gh label create "🟩 priority: low" --color cfda2c --description "Nice to have, no rush" --force
echo "Creating Status Labels..."
gh label create "🚦 status: triage" --color eeeeee --description "Needs initial review" --force
gh label create "🔍 status: needs-info" --color d4c5f9 --description "Awaiting information" --force
gh label create "🚧 status: blocked" --color 333333 --description "Cannot proceed" --force
gh label create "🏁 status: ready" --color 0e8a16 --description "Ready for implementation" --force
gh label create "👀 status: in-review" --color fbca04 --description "Under active review" --force
gh label create "⛔ status: wontfix" --color ffffff --description "Rejected/out of scope" --force
gh label create "✅ status: done" --color 1d76db --description "Completed" --force
echo "Creating Type Labels..."
gh label create "🐛 type: bug" --color d73a4a --description "Something isn't working" --force
gh label create "✨ type: enhancement" --color a2eeef --description "Improvement to existing feature" --force
gh label create "🚀 type: new-skill" --color 0075ca --description "Proposal for new skill" --force
gh label create "📖 type: documentation" --color 0075ca --description "Documentation improvements" --force
gh label create "🔧 type: tooling" --color d4c5f9 --description "CI/CD, scripts, automation" --force
gh label create "💬 type: question" --color d876e3 --description "User question" --force
gh label create "🎨 type: design" --color e99695 --description "UI/UX, repository structure" --force
echo "Creating Skill Category Labels..."
gh label create "skill: python" --color 3572A5 --description "Python skills" --force
gh label create "skill: typescript" --color 2b7489 --description "TypeScript skills" --force
gh label create "skill: javascript" --color f1e05a --description "JavaScript skills" --force
gh label create "skill: nextjs" --color 000000 --description "Next.js skills" --force
gh label create "skill: ui" --color 563d7c --description "UI/styling skills" --force
gh label create "skill: ai" --color ff6f00 --description "AI/ML skills" --force
gh label create "skill: platform" --color 89e051 --description "Platform/deployment" --force
gh label create "skill: universal" --color ededed --description "Universal skills" --force
echo "Creating Effort Labels..."
gh label create "effort: small" --color c2e0c6 --description "< 2 hours of work" --force
gh label create "effort: medium" --color fef2c0 --description "2-8 hours of work" --force
gh label create "effort: large" --color f9d0c4 --description "1-3 days of work" --force
gh label create "effort: epic" --color d93f0b --description "Multi-day or requires research" --force
echo "Creating Community Labels..."
gh label create "good first issue" --color 7057ff --description "Good for newcomers" --force
gh label create "help wanted" --color 008672 --description "Maintainer requests community help" --force
gh label create "🔒 staff only" --color d73a4a --description "Requires maintainer privileges" --force
gh label create "duplicate" --color cfd3d7 --description "Duplicate of another issue" --force
gh label create "invalid" --color e4e669 --description "Invalid issue" --force
echo "Creating Automated Labels..."
gh label create "🤖 auto: validation-failed" --color b60205 --description "CI validation checks failed" --force
gh label create "🤖 auto: sensitive-data" --color d73a4a --description "Potential credentials detected" --force
gh label create "🤖 auto: manifest-error" --color d93f0b --description "manifest.json validation failed" --force
echo ""
echo "✅ All labels created successfully!"
echo ""
echo "Total: 40 labels across 7 categories"
To use:
# Make executable
chmod +x scripts/create-labels.sh
# Run script
bash scripts/create-labels.sh
Prerequisites:
- Install GitHub CLI:
brew install gh(macOS) or see https://cli.github.com/ - Authenticate:
gh auth login - Run script from repository root
Appendix B: Troubleshooting
Common Issues
Issue: Branch protection not enforcing
Symptoms: PRs merge without reviews or status checks
Solutions:
- Verify protection rule applies to
main(notmasteror typo) - Check "Do not allow bypassing" is enabled
- Confirm you're not an admin bypassing rules
- Verify status check name matches exactly (case-sensitive)
Issue: Status checks not appearing in branch protection
Symptoms: Cannot select CI workflow in required checks
Solutions:
- Workflow must run at least once on a PR to be selectable
- Check workflow name matches:
validate / validate - Verify workflow triggers on
pull_requestevents - Look for workflow errors in Actions tab
Issue: Labels not applying automatically
Symptoms: Auto-label workflow not triggering
Solutions:
- Verify workflow file in
.github/workflows/directory - Check workflow permissions (needs
issues: write) - Ensure workflow triggers on correct events
- Check Actions tab for errors
- Verify repository allows Actions to run
Issue: Secret scanning blocking legitimate code
Symptoms: Push blocked for fake/example API keys
Solutions:
- Use placeholders:
YOUR_API_KEY,<API_KEY>,{API_KEY} - Mark as example in comments:
# Example only - not real - Bypass protection if absolutely needed (not recommended)
Issue: Dependabot PRs not creating
Symptoms: No automatic dependency update PRs
Solutions:
- Verify Dependabot is enabled in Settings → Security
- Check for
dependabot.ymlconfiguration errors - Ensure repository has dependencies to update
- Check Dependabot logs in Insights → Dependency graph
Issue: Community health checklist incomplete
Symptoms: Missing checkmarks in Insights → Community
Solutions:
- Verify file names are exact (case-sensitive)
- Ensure files in correct locations (root,
.github/, ordocs/) - Files must be on default branch (
main) - Wait 5-10 minutes for GitHub to detect new files
- Hard refresh browser cache
Additional Resources
Official GitHub Documentation
- About protected branches
- Configuring issue templates
- Managing labels
- [Securing your repos
…(truncated)