Automates Gentoo overlay development tasks including ebuild creation, version bumps, dependency management, quality checks, and semantic commits with issue tracking.
Automates Gentoo overlay development workflows including ebuild maintenance, version upgrades, dependency management, quality assurance, and semantic commit practices.
This skill helps maintain Gentoo overlay repositories by:
1. **After every successful `git commit`, automatically amend to add co-authorship:**
```bash
git commit --amend --no-edit --trailer="Co-authored-by: copilot <[email protected]>"
```
2. **Use semantic commit format:** `<type>(<scope>): <subject>`
- Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
- Example: `feat: add hat wobble`
3. **Always ask user confirmation before `git push --force`**
4. **Package upgrade priority:**
- Check GitHub issues FIRST for upgrade requests
- If no issues found, ASK user if they want to check `overlay.toml` for available upgrades
- Never proceed with overlay.toml check without explicit consent
Follow this exact sequence:
1. **Check if package has special handling rules documented in CLAUDE.md or project docs**
2. **Identify upgrade needs:**
- For GitHub packages: Fetch open issues via `https://api.github.com/repos/OWNER/REPO/issues`
- Present matches (Title + URL) to user
- If no issues: ASK if user wants to check `.github/workflows/overlay.toml` for version info
3. **ALWAYS ask user if they want to create a new feature branch** (typically named after the package)
4. **Get latest release info:**
- For GitHub projects: Request `https://api.github.com/repos/[org]/[project]/releases/latest`
- For regex sources: Check `overlay.toml` package `url` configuration
5. **Create new ebuild:** Copy existing ebuild (do NOT manually replace `${PV}`)
6. **Update version-specific variables** (e.g., `BUILD_ID`, `SRC_URI` hashes)
7. **Verify dependencies and features** for changes
8. **Pre-commit QA (MANDATORY):**
```bash
ebuild <package>.ebuild manifest --force
pkgcheck scan --verbose <package>.ebuild
```
- Fix any errors and repeat until clean
- Only proceed after pkgcheck passes
9. **Check old version stability (MANDATORY):**
- Read old ebuild's `KEYWORDS` line
- **If stable keywords present** (e.g., `amd64` without `~`): ASK user if they want to delete old version
- **If major/minor version upgrade** (e.g., `1.2.3` → `1.3.0` or `2.0.0`): ASK user if they want to delete old version
- **Patch-only changes** (e.g., `0.3.13` → `0.3.22`): Can auto-delete
- Otherwise: Proceed with deletion automatically
10. **Commit strategy:**
- **Recommended:** Single commit (add new + remove old + manifest)
- **Alternative:** Two commits (add new first, remove old second)
- Both commits MUST include `Part-of: [GitHub issue URL]`
- Only FIRST commit should include `Closes: [GitHub issue URL]`
11. **Remove old ebuild** (if approved): `git rm <old-ebuild>`
12. **Regenerate manifest post-removal:**
```bash
ebuild <new-package>.ebuild manifest --force
```
13. **Branch cleanup (MANDATORY):** After successful commit/push, ASK user if they want to delete the feature branch and return to master
1. **Package search:** Use `emerge --search [package]` for fuzzy search
- If multiple matches: ASK user to specify which package
2. **Dependency ordering:** Sort all dependencies in `DEPEND`, `RDEPEND`, `BDEPEND` alphabetically by package atom
Follow this sequence for EVERY commit:
1. **Stage specific files:** `git add [files]` (NEVER `git add .`)
- For package upgrades: Only stage ebuild, manifest, metadata
2. **Commit:**
- For `.ebuild` changes: `pkgdev commit --signoff` (NO `-m` flag)
- For other changes: `git commit --signoff` with semantic message
3. **Verify commit succeeded**
4. **Handle related issues (MANDATORY for package upgrades):**
- Run `git remote -v`
- For GitHub remotes: Fetch `https://api.github.com/repos/OWNER/REPO/issues`
- Present numbered list of potential matches
- Ask user to select issue to close
- If selected: Amend commit with `Closes: [issue URL]`
5. **Verify commit message (MANDATORY):**
```bash
git show --format=%B -s
```
- Ensure all trailers (`Closes:`, `Co-authored-by:`) are present
- Re-amend if needed
6. **Push to remote:**
- Get current branch name
- Ask user if they want to push
7. **Display repository link (MANDATORY):**
- Extract URL from `git remote -v`
- Convert SSH to HTTPS (e.g., `[email protected]:owner/repo.git` → `https://github.com/owner/repo`)
- Display: "Changes pushed successfully! Repository: [URL]"
8. **Branch cleanup (MANDATORY):**
- Ask: "Would you like to delete the [branch-name] branch and return to master? (y/n)"
- If yes:
```bash
git checkout master
git branch -d [branch-name]
```
1. Remove entire package directory: `[category]/[package]`
2. Search globally for package name references
3. Remove from:
- `README.md` (package table)
- `CLAUDE.md` (Special Cases)
- `.github/workflows/overlay.toml`
- Any other files found
```bash
curl https://api.github.com/repos/owner/repo/issues
git checkout -b bump-package-name
curl https://api.github.com/repos/owner/repo/releases/latest
cp package-1.0.0.ebuild package-1.1.0.ebuild
ebuild package-1.1.0.ebuild manifest --force
pkgcheck scan --verbose package-1.1.0.ebuild
git add package-1.1.0.ebuild Manifest
pkgdev commit --signoff
git commit --amend --no-edit --trailer="Co-authored-by: copilot <[email protected]>"
git commit --amend --no-edit --trailer="Closes: https://github.com/owner/repo/issues/123"
git show --format=%B -s
git push origin bump-package-name
git checkout master
git branch -d bump-package-name
```
```bash
emerge --search libfoo
DEPEND="
dev-libs/bar
dev-libs/libfoo
sys-apps/util
"
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/gentoo-overlay-package-manager/raw