com um clique
docs-health
// 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.
// 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.
Proactive CI/CD maintenance on a dmzoneill repo. Cleans old artifacts, updates deprecated runners, identifies chronic failures, and flags outdated test matrices.
Audit and fix git hygiene on a dmzoneill repo. Checks .gitignore, large tracked files, stale branches, and protected branch safety.
Triage and respond to a GitHub issue on a dmzoneill repo. Use when an issue needs analysis, categorization, labeling, and a response. Can also attempt fixes for straightforward bugs.
Check and fix license compliance on a dmzoneill repo. Validates LICENSE file exists, matches package metadata, and checks for dependency license conflicts.
Diagnose and fix a failed CI/CD pipeline run on a dmzoneill repo. Understands the dispatch.yaml workflow stages, fetches job logs, identifies root cause, and applies fixes.
Review a pull request on a dmzoneill repo with code analysis. Checks for bugs, security issues, style violations, and test coverage. Can approve, request changes, or comment.
| name | docs-health |
| description | 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. |
| argument-hint | ["owner/repo"] |
| allowed-tools | Read, Grep, Glob, Bash(gh:*), Bash(git:*), Bash(python:*), Bash(ls:*), Bash(mkdir:*), Bash(scripts/*) |
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 git@github.com: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 git@github.com: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:
---
name: Bug Report
about: Report a bug to help us improve
title: "[BUG] "
labels: bug
assignees: dmzoneill
---
## Describe the Bug
A clear description of what the bug is.
## Steps to Reproduce
1. Step one
2. Step two
3. ...
## Expected Behavior
What you expected to happen.
## Actual Behavior
What actually happened.
## Environment
- OS: [e.g., Ubuntu 22.04]
- Version: [e.g., 1.2.3]
And .github/ISSUE_TEMPLATE/feature_request.md:
---
name: Feature Request
about: Suggest a new feature or enhancement
title: "[FEATURE] "
labels: enhancement
assignees: dmzoneill
---
## Description
A clear description of the feature you'd like.
## Use Case
Why is this feature needed? What problem does it solve?
## Proposed Solution
How do you think this should work?
## Alternatives Considered
Any alternative solutions or workarounds you've considered.
ls ~/src/{repo}/.github/pull_request_template.md ~/src/{repo}/.github/PULL_REQUEST_TEMPLATE.md 2>/dev/null
If missing, create .github/pull_request_template.md:
## Summary
Brief description of the changes.
## Changes
- Change 1
- Change 2
## Testing
How were these changes tested?
## Checklist
- [ ] Code follows project style guidelines
- [ ] Tests added/updated as appropriate
- [ ] Documentation updated if needed
Bundle all missing files into a single commit:
cd ~/src/{repo}
git add CONTRIBUTING.md CODE_OF_CONDUCT.md SECURITY.md .github/CODEOWNERS .editorconfig .github/ISSUE_TEMPLATE/ .github/pull_request_template.md 2>/dev/null
git commit -m "chore: add community health files"
git push
Output a summary:
=== COMMUNITY HEALTH: {repo} ===
Health score: N% → N%
Files added:
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- SECURITY.md
- .github/CODEOWNERS
- .editorconfig
- .github/ISSUE_TEMPLATE/bug_report.md
- .github/ISSUE_TEMPLATE/feature_request.md
- .github/pull_request_template.md
Already present:
- [list of files that already existed]
After committing and pushing, send a Telegram notification:
~/src/github-ai-maintainer/scripts/telegram-notify.sh "Health Agent: added community files to dmzoneill/{repo} — {list of files added}"
* @dmzoneill.github/ISSUE_TEMPLATE/ directory if it doesn't exist