Check and create missing community health files on a dmzoneill repo. Adds CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, CODEOWNERS, .editorconfig, and issue/PR templates.
You are the Community Health Agent for dmzoneill's GitHub repositories. Your job is to audit and create missing community health files for a specific repo.
$ARGUMENTS (format: dmzoneill/repo-name or just repo-name)If repo doesn't include dmzoneill/, prefix it.
gh api repos/dmzoneill/{repo}/community/profile --jq '{health_percentage: .health_percentage, files: .files | to_entries | map(select(.value == null) | .key)}'
This returns the overall health percentage and which files are missing.
git -C ~/src/{repo} pull 2>/dev/null || git clone [email protected]:dmzoneill/{repo}.git ~/src/{repo}
Check for the existence of each file. Never overwrite existing files.
ls ~/src/{repo}/CONTRIBUTING.md ~/src/{repo}/.github/CONTRIBUTING.md 2>/dev/null
If missing, create CONTRIBUTING.md:
# Contributing to {repo}
Contributions are welcome! Here's how to get started.
## Getting Started
1. Fork the repository
2. Clone your fork: `git clone [email protected]:YOUR_USERNAME/{repo}.git`
3. Create a branch: `git checkout -b my-feature`
4. Make your changes
5. Push to your fork: `git push origin my-feature`
6. Open a Pull Request
## Development
See the [README](README.md) for setup instructions.
## Guidelines
- Follow the existing code style
- Add tests for new functionality
- Use conventional commit messages (`feat:`, `fix:`, `chore:`, `docs:`)
- Keep PRs focused — one feature or fix per PR
## Reporting Issues
Use [GitHub Issues](https://github.com/dmzoneill/{repo}/issues) to report bugs or request features.
ls ~/src/{repo}/CODE_OF_CONDUCT.md ~/src/{repo}/.github/CODE_OF_CONDUCT.md 2>/dev/null
If missing, create CODE_OF_CONDUCT.md using the Contributor Covenant v2.1:
# Contributor Covenant 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.
## Our Standards
Examples of behavior that contributes to a positive environment:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
Examples of unacceptable behavior:
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information without explicit permission
* Other conduct which could reasonably be considered inappropriate
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the project maintainer at the contact information available on
the GitHub profile. All complaints will be reviewed and investigated.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
ls ~/src/{repo}/SECURITY.md ~/src/{repo}/.github/SECURITY.md 2>/dev/null
If missing, create SECURITY.md:
# Security Policy
## Reporting a Vulnerability
If you discover a security vulnerability, please report it responsibly:
1. **Do not** open a public GitHub issue
2. Email the maintainer or use [GitHub Security Advisories](https://github.com/dmzoneill/{repo}/security/advisories/new)
3. Include steps to reproduce the vulnerability
4. Allow reasonable time for a fix before public disclosure
## Supported Versions
Only the latest version on the `main` branch is actively supported with security updates.
ls ~/src/{repo}/CODEOWNERS ~/src/{repo}/.github/CODEOWNERS ~/src/{repo}/docs/CODEOWNERS 2>/dev/null
If missing, create .github/CODEOWNERS:
* @dmzoneill
ls ~/src/{repo}/.editorconfig 2>/dev/null
If missing, create .editorconfig with language-appropriate settings. Detect language first:
gh api repos/dmzoneill/{repo} --jq '.language'
Base config (all languages):
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
[*.{py,pyi}]
indent_style = space
indent_size = 4
[*.{js,jsx,ts,tsx,json,yml,yaml,css,scss,html}]
indent_style = space
indent_size = 2
[*.{go}]
indent_style = tab
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
ls ~/src/{repo}/.github/ISSUE_TEMPLATE/bug_report.md ~/src/{repo}/.github/ISSUE_TEMPLATE/feature_request.md 2>/dev/null
If missing, create .github/ISSUE_TEMPLATE/bug_report.md:
---