5.7 KiB
5.7 KiB
GitHub Repository Setup Skill
Automated GitHub repository creation following official best practices and modern standards
Overview
This skill automates the setup of GitHub repositories with four distinct modes tailored to different use cases. Each mode follows GitHub's official best practices, implementing appropriate security features, documentation standards, and workflow automation.
Features
Four Modes
-
Quick Mode (~30s)
- Fast public repo setup
- Essential files: README, LICENSE, .gitignore
- Perfect for experiments and prototypes
-
Enterprise Mode (~120s)
- Production-ready setup
- Full security features (Dependabot, secret scanning, CodeQL)
- CI/CD workflows with GitHub Actions
- Branch protection with required reviews
- Automated testing and deployment
-
Open Source Mode (~90s)
- Community-focused configuration
- Community health files (CODE_OF_CONDUCT, CONTRIBUTING)
- Issue and PR templates
- GitHub form schema integration
- Contributor guidelines
-
Private/Team Mode (~90s)
- Internal collaboration setup
- CODEOWNERS configuration
- Governance documentation
- Team access controls
- Review requirements
Security Features (Based on GitHub Official Best Practices)
- ✅ Dependabot alerts and automated security fixes
- ✅ Secret scanning with push protection
- ✅ Code scanning with CodeQL (enterprise mode)
- ✅ SECURITY.md with vulnerability reporting
- ✅ Branch protection rules
- ✅ Required status checks
Documentation Standards
- ✅ Comprehensive README with badges
- ✅ Appropriate LICENSE selection
- ✅ Technology-specific .gitignore
- ✅ Community health files
- ✅ Contributing guidelines
- ✅ Support resources
CI/CD Automation
- ✅ GitHub Actions workflows
- ✅ Automated testing
- ✅ Linting and code quality checks
- ✅ Security scanning
- ✅ Deployment pipelines (optional)
Prerequisites
- GitHub CLI (
gh) - Installation guide - Git - Configured with user.name and user.email
- GitHub Account - Authenticated via
gh auth login - Permissions - Repository creation access (organization admin for org repos)
Usage
Quick Examples
# Quick mode - minimal setup
"Create a quick GitHub repo for testing"
# Enterprise mode - full production setup
"Set up an enterprise GitHub repository with CI/CD"
# Open source mode - community project
"Create an open source GitHub project"
# Private/team mode - internal collaboration
"Set up a private team repository with governance"
Detailed Workflow
- Invoke the skill with your request
- Select mode (or let AI detect from your request)
- Provide repository details:
- Name
- Description
- Visibility (public/private/internal)
- Technology stack (for .gitignore)
- License preference
- Review configuration and confirm
- Skill executes setup automatically
- Receive validation report and next steps
What Gets Created
All Modes
- Repository with proper visibility
- README.md with project info
- LICENSE file
- .gitignore for tech stack
- Initial git setup with main branch
Additional (Enterprise/Open Source/Team)
- Security features enabled
- CI/CD workflows configured
- Issue and PR templates
- Branch protection rules
- Community health files
- CODEOWNERS (team mode)
Example Output
✅ Repository Setup Complete: myorg/my-project
## Enabled Features
- ✅ Repository created (public)
- ✅ Dependabot alerts enabled
- ✅ Secret scanning active
- ✅ Branch protection configured
- ✅ CI workflow created
- ✅ Issue templates added
- ✅ Community files complete
## Quick Start
gh repo clone myorg/my-project
cd my-project
git checkout -b feature/initial-code
# Add your code
git commit -m "feat: initial implementation"
git push -u origin feature/initial-code
gh pr create
## Repository URL
https://github.com/myorg/my-project
Best Practices Applied
This skill implements GitHub's official best practices:
- Security First - Dependabot, secret scanning, and push protection enabled by default
- Documentation Standards - README, LICENSE, and community health files
- Branch Protection - Protected main branch with required reviews
- CI/CD Integration - Automated testing and quality checks
- Collaboration Workflow - PR-based development with templates
- Access Control - CODEOWNERS for critical files
- Community Guidelines - Clear contribution and conduct standards
Customization
After initial setup, you can customize:
- Modify CI/CD workflows in
.github/workflows/ - Adjust branch protection rules via GitHub settings
- Update issue templates in
.github/ISSUE_TEMPLATE/ - Edit CODEOWNERS for review requirements
- Configure additional integrations
Troubleshooting
Authentication Issues
# Check auth status
gh auth status
# Re-authenticate
gh auth login
Permission Errors
- Ensure you have repository creation permissions
- For organization repos, confirm admin access
- Check organization security settings
CLI Not Found
# Install GitHub CLI
brew install gh # macOS
# Or visit: https://cli.github.com/
References
- GitHub Best Practices for Repositories
- Community Health Files
- GitHub Actions Documentation
- Branch Protection Rules
License
Apache-2.0
Version
v0.1.0 - Initial release