| name | description | argument-hint | disable-model-invocation |
|---|---|---|---|
code-news |
Generate an executive newsletter summarizing recent code changes across one or more git repositories |
[repo-url-1] [repo-url-2] ... [hours=72] |
true |
Generate an executive newsletter summarizing recent code changes in markdown format.
/code-news <repo-url> # Single repo, last 72 hours
/code-news <repo-url> 48 # Single repo, last 48 hours
/code-news <repo-url-1> <repo-url-2> # Multiple repos, last 72 hours
/code-news <repo-url-1> <repo-url-2> 48 # Multiple repos, last 48 hours
At least one repository URL must be provided.
-
Parse Arguments
- At least one repository URL must be provided
- Arguments can be repository URLs (HTTP/HTTPS/SSH) or a number (hours)
- If last argument is a number, use that as hours; otherwise default to 72 hours
- URL formats supported:
- HTTPS:
https://github.com/org/repo,https://gitlab.com/org/repo - SSH:
git@github.com:org/repo.git,git@gitlab.com:org/repo.git
- HTTPS:
- Examples:
/code-news https://github.com/org/repo→ repo, 72h/code-news https://github.com/org/repo 24→ repo, 24h/code-news https://github.com/org/repo1 https://github.com/org/repo2→ both repos, 72h/code-news git@github.com:org/repo.git 48→ repo, 48h
- If no repository URLs provided, show error message and exit
-
Clone and Gather Commits from Each Repository
- For each repository URL:
- Create a temporary directory:
temp_dir=$(mktemp -d) - Clone the repository:
git clone --depth 100 <url> "$temp_dir/repo" 2>&1 - Change to the cloned directory:
cd "$temp_dir/repo" - Get the repository name from the URL (e.g., "awesome-project" from "https://github.com/org/awesome-project")
- Use
git log --since="[hours] hours ago" --pretty=format:"%H|%an|%ar|%s" --no-mergesto get commits - The remote URL is already known (the input URL), use it for commit links
- After processing, clean up:
cd - && rm -rf "$temp_dir"
- Create a temporary directory:
- If clone fails, skip that repo with a warning message and continue with others
- Use
--depth 100to clone only recent commits for faster performance
- For each repository URL:
-
Analyze Code Changes
- For each significant commit, use
git show <commit-hash> --statfirst to see files changed - For key commits, use
git show <commit-hash>to see actual changes - Identify the type of change:
- 🚨 Critical fixes (production issues, hotfixes, security fixes)
- ✨ New features (customer-facing functionality)
- 🔧 Bug fixes (non-critical)
- ⚡ Performance improvements
- 📦 Dependencies or configuration
- 🧹 Refactoring or code quality
- Understand the business impact, not just technical details
- For each significant commit, use
-
Generate the Newsletter in Markdown
For Single Repository:
# [Repository Name] - Code Activity Report **Period:** [Start Date] - [End Date] ([N] hours) **Total Commits:** [N] **Contributors:** [List unique authors] --- ## Key Changes ### 🚨 Critical Fix: [Brief Title] **Impact:** [High-level business impact in 1 sentence] **What Happened:** [2-3 sentences explaining the issue and resolution] **Customer Benefit:** - [Bullet point 1] - [Bullet point 2] **Status:** [Deployed/In Progress/Merged] 🔗 [View commit abc123](https://github.com/org/repo/commit/abc123) --- [Repeat for each significant change] ## Operational Metrics - **Response Time:** [Time from issue to fix if applicable] - **Deployment:** [Zero downtime / scheduled maintenance / etc] - **Code Quality:** [Tests added, coverage maintained, etc] ## Looking Ahead [Brief forward-looking statement about ongoing work or monitoring]
For Multiple Repositories:
# Code Activity Report - Multi-Repository Update **Period:** [Start Date] - [End Date] ([N] hours) **Repositories:** [N] --- ## Summary | Repository | Commits | Contributors | Key Changes | |------------|---------|--------------|-------------| | [repo1] | N | X, Y | Critical fix, feature | | [repo2] | N | Z | Performance improvement | --- ## [Repository 1 Name] ### 🚨 Critical Fix: [Title] **Impact:** [Impact] **Details:** [Details] 🔗 [View commit abc123](https://github.com/org/repo1/commit/abc123) --- ## [Repository 2 Name] ### ⚡ Performance: [Title] **Impact:** [Impact] **Details:** [Details] 🔗 [View commit def456](https://github.com/org/repo2/commit/def456) --- ## Overall Operational Metrics [Combined metrics across all repos]
-
Commit Link Generation
- Parse the git remote URL to determine the hosting platform:
- GitHub:
https://github.com/org/repo/commit/hash - GitLab:
https://gitlab.com/org/repo/-/commit/hash - Bitbucket:
https://bitbucket.org/org/repo/commits/hash
- GitHub:
- Handle both SSH and HTTPS remote URLs
- If remote URL is SSH format (git@...), convert to HTTPS
- For other git hosting platforms, use the pattern:
https://<host>/org/repo/commit/hash
- Parse the git remote URL to determine the hosting platform:
-
Guidelines for Executive Communication
- Focus on IMPACT over implementation
- Avoid technical jargon (no class names, function signatures, stack traces)
- Use business language:
- ✅ "Improved checkout reliability for customers"
- ❌ "Fixed NullPointerException in payment_processor.py line 234"
- Emphasize customer benefits and operational excellence
- Keep descriptions concise - executives scan content
- Use emojis for visual hierarchy:
- 🚨 Critical/urgent issues
- ✨ New features
- ⚡ Performance improvements
- 🔧 Bug fixes
- 📦 Dependencies/config
- 🧹 Refactoring
- ✅ Completed/deployed
- 📊 Metrics
-
Categorization and Prioritization
- Group commits by impact and type
- Priority order:
- 🚨 Production fixes and hotfixes (highest priority)
- ✨ Customer-facing features
- ⚡ Performance improvements
- 🔧 Bug fixes
- 📦 Dependencies and configuration
- 🧹 Internal refactoring (mention briefly or group)
- If many small commits, group similar changes together
- For minor updates (typos, formatting, small tweaks), create a "Minor Updates" section
-
Error Handling
- If a repository clone fails (invalid URL, authentication required, network error), show a warning and continue with other repos
- If no commits found in time period for a repository, state that clearly in the report
- If git commands fail after cloning, show helpful error messages
- Always clean up temporary directories, even if errors occur
- If all repository clones fail, show an error message with details
-
Output Format
- Output the complete markdown newsletter
- Include a summary if multiple repositories
- Provide clear section headers for each repository
- End with actionable information (who to contact, what's next)
# Single repo, last 72 hours
/code-news https://github.com/facebook/react
# Single repo, last 48 hours
/code-news https://github.com/microsoft/vscode 48
# Multiple repos, last 72 hours
/code-news https://github.com/org/frontend https://github.com/org/backend https://github.com/org/api
# Multiple repos with custom timeframe (24 hours)
/code-news git@github.com:org/repo1.git git@github.com:org/repo2.git 24
# Using GitLab repos
/code-news https://gitlab.com/org/project1 https://gitlab.com/org/project2 48Use this as your base template and adapt based on the content:
# [Project/Service Name] - Code Activity Report
**Period:** [Date Range]
**Total Commits:** [N]
**Contributors:** [Names]
---
## Key Changes
### 🚨 [Change Title]
**Impact:** [One sentence about business/customer impact]
**What Changed:** [2-3 sentences with context]
**Benefits:**
- [Benefit 1]
- [Benefit 2]
**Status:** [Deployed/In Review/Testing]
🔗 [View commit](link)
---
## Operational Excellence
- **Quality:** [Code quality metrics, test coverage]
- **Speed:** [Development velocity, time to deploy]
- **Reliability:** [Uptime, incident response]
## What's Next
[Forward-looking statement]
---
**Questions?** Contact [team name]- Always maintain a professional, executive-appropriate tone
- Focus on "why it matters" not "how it works"
- If there are breaking changes, highlight them prominently
- Include deployment status when relevant
- For multiple repos, provide a consolidated view at the top
- The newsletter should be ready to share with leadership