Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,43 @@ Error prevention and best practices enforcement for AI agent-assisted coding.
- Model configuration recommendations (Claude 3.5+, GPT-4+, extended thinking)
- 60KB+ of reference documentation

### [reviews](./skills/reviews)

Address GitHub PR review feedback end-to-end from your agent.

**Use when:**

- User types `/reviews` or asks to "address review comments"
- Going through inline PR feedback after a code review
- Responding to a specific PR by number, URL, or branch name

**Features:**

- Fetches all reviews, inline comments, and conversation threads via REST + GraphQL
- Triages actionable vs ambiguous items; skips already-resolved threads
- Applies code changes, posts replies, and resolves threads incrementally
- Surfaces ambiguous items and disagreements for human review before proceeding
- Posts a structured summary comment to the PR
- Never pushes — the human always reviews the commit and pushes

### [rebased](./skills/rebased)

Rebase the current branch onto `origin/main` and resolve conflicts intelligently.

**Use when:**

- User types `/rebased` or asks to "rebase and fix conflicts"
- Branch has fallen behind main and needs to be brought up to date
- A rebase is already in progress and needs help resolving remaining conflicts

**Features:**

- Pre-flight checks for dirty working tree, in-progress rebases, and edge cases
- Merges both sides of each conflict by understanding intent, not blindly picking one
- Regenerates lock files (`bun.lockb`, `package-lock.json`, etc.) rather than hand-merging
- Works commit-by-commit through multi-step rebases
- Never force-pushes without explicit user confirmation

### [ascii-renderer](./skills/ascii-renderer)

Generate ASCII art from images or text using shape vector rendering.
Expand Down Expand Up @@ -97,6 +134,8 @@ npx skills add dupe-com/skills/dupe-research
npx skills add dupe-com/skills/dupe
npx skills add dupe-com/skills/nomistakes
npx skills add dupe-com/skills/ascii-renderer
npx skills add dupe-com/skills/reviews
npx skills add dupe-com/skills/rebased
```

This works with Claude Code, OpenCode, Cursor, Windsurf, Cline, Codex, AMP, Copilot, and any agent that supports the [agentskills.io](https://agentskills.io) standard.
Expand Down
49 changes: 49 additions & 0 deletions skills/rebased/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# rebased

> Intelligent git rebase with conflict resolution for AI coding agents

## What It Does

**rebased** fetches `origin/main`, starts the rebase, and works through conflicts one commit at a time — understanding the *intent* of both sides rather than blindly picking one. It handles lock files, generated files, and complex multi-step rebases, then hands the result back to you to test and force-push.

## Use When

- User types `/rebased` in their agent session
- User says "rebase me on main", "rebase and fix conflicts", "get this branch up to date with main"
- Branch has fallen behind main and needs to be brought up to date before merging

## Features

- **Pre-flight checks** — detects dirty working tree, already-in-progress rebases, detached HEAD, and main/master branches before touching anything
- **Intent-preserving resolution** — reads both sides of each conflict and merges them semantically rather than choosing one
- **Lock file handling** — regenerates `bun.lockb`, `package-lock.json`, `yarn.lock` rather than hand-merging them
- **Generated file handling** — detects migrations and snapshots and regenerates from source
- **Step-by-step loop** — processes one commit at a time, type-checking after each resolution
- **Error recovery** — handles rename conflicts, empty commits, and stuck states with clear guidance
- **Never force-pushes automatically** — always confirms with the user before any destructive operation

## Installation

```bash
npx skills add dupe-com/skills/rebased
```

## Usage

```
/rebased # rebase current branch onto origin/main
```

## Requirements

- `git` with a remote named `origin` pointing to the repo
- The base branch is named `main` (not `master` — ask the user if the default branch differs)

## Hard Rules

The skill will never:
- Run `git rebase --skip` or `--abort` without asking
- Use `--theirs`/`--ours` to wholesale discard one side
- Delete a conflicted file unless there's clear evidence it was intentionally deleted
- Bypass commit hooks with `--no-verify`
- Force-push without explicit user confirmation
124 changes: 124 additions & 0 deletions skills/rebased/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
name: rebased
description: Rebase the current branch onto origin/main and intelligently resolve any conflicts that arise. Use when the user invokes /rebased or asks to rebase the current branch on main and resolve conflicts.
allowed-tools: Bash, Read, Edit, Write
---

# Rebased

Rebases the current branch onto `origin/main` and resolves conflicts as they appear, one rebase step at a time.

## When to use

The user typed `/rebased`, or asked something like "rebase me on main", "rebase and fix conflicts", "get this branch up to date with main".

## Pre-flight checks (run in parallel)

Before touching anything, gather state:

```bash
git status --porcelain=v1 -b
git rev-parse --abbrev-ref HEAD
git rev-parse --git-dir # to detect in-progress rebase via $GIT_DIR/rebase-merge or rebase-apply
```

Decision matrix:

- **Working tree dirty** → stop and ask the user whether to stash, commit, or abort. Do not silently `git stash` — that hides their work.
- **Already on `main`/`master`** → stop and ask. Rebasing main onto itself is almost never what they want.
- **Rebase already in progress** (`.git/rebase-merge` or `.git/rebase-apply` exists) → skip the fetch/rebase-start step and jump straight to the conflict-resolution loop.
- **Detached HEAD** → stop and ask.

## Execution

### 1. Fetch and start the rebase

```bash
git fetch origin main
git rebase origin/main
```

If it returns clean ("Successfully rebased"), report that and stop.

If it stops with conflicts, proceed to the loop.

### 2. Conflict-resolution loop

Repeat until rebase is complete or the user tells you to stop.

**a. Identify what's conflicted:**

```bash
git status --porcelain=v1
git diff --name-only --diff-filter=U
```

**b. Understand the current rebase step.** This is critical — the conflict is between *their* commit (the one being replayed, marked `<<<<<<< HEAD` in working-tree convention during rebase is actually the *upstream* / `main` side; `>>>>>>> commit-sha` is the *branch* side being replayed). Get context:

```bash
git log --oneline -1 REBASE_HEAD # the commit being applied
git show --stat REBASE_HEAD # what it tried to change
git log --oneline origin/main -5 # recent main commits for context
```

**c. For each conflicted file:**

1. `Read` the file to see the conflict markers.
2. Decide the right resolution by understanding **both intents**:
- What was main trying to do? (`git log -1 -p origin/main -- <file>` for the most recent main change to this file)
- What was the branch commit trying to do? (`git show REBASE_HEAD -- <file>`)
3. Edit the file to merge both intents — do not blindly pick one side. Common patterns:
- Both sides added imports → keep both, deduped, in sorted order
- Both sides edited the same function differently → combine the changes if they're orthogonal; ask if they conflict semantically
- One side renamed/moved code the other side edited → apply the edit at the new location
- Lock files (`bun.lockb`, `package-lock.json`, `yarn.lock`) → regenerate (`bun install` / `npm install` / `yarn`) rather than hand-merge
- Generated files (migrations, snapshots) → regenerate from source
4. Remove all `<<<<<<<`, `=======`, `>>>>>>>` markers.
5. `git add <file>`.

**d. Sanity-check the resolution before continuing:**

- For TypeScript/JS, run the project's type checker on affected files if the change touches types or imports.
- For tests, **don't** run the full suite — too slow per step. Save that for after the rebase completes.

**e. Continue the rebase:**

```bash
git -c core.editor=true rebase --continue
```

The `-c core.editor=true` skips the commit-message editor. If a commit becomes empty (all its changes are now upstream), use `git rebase --skip` instead.

**f. If `--continue` produces another conflict**, loop back to step (a). Each rebase step is one commit being replayed, so you may go through this several times.

### 3. Post-rebase

When rebase finishes:

```bash
git status
git log --oneline origin/main..HEAD # show what was replayed
```

Report back: how many commits replayed, how many files had conflicts, anything you regenerated (lock files, migrations).

**Do not push.** Pushing a rebased branch requires a force-push, which is destructive — confirm with the user first, and use `--force-with-lease` not `--force`.

## Hard rules

- **Never use `git rebase --skip` or `--abort` without asking** — these throw away work.
- **Never use `git checkout --theirs`/`--ours` blindly** — these discard one side wholesale and almost always lose intent.
- **Never resolve a conflict by deleting the file** unless you have positive evidence the file was deleted on purpose on one side (check `git log --diff-filter=D`).
- **Never bypass hooks** with `--no-verify`. If a pre-commit hook blocks `--continue`, fix the underlying issue.
- **Never force-push automatically.** Always confirm.
- If the conflict resolution is non-obvious (e.g. both sides rewrote the same function with different intent), **stop and ask the user** rather than guessing.

## Error recovery

- **"could not apply ..." with no obvious conflict** → check for renames; `git status` will show "both modified" vs "added by us/them". For a rename conflict, find the new path with `git log --follow --name-status` and apply the change there.
- **Lock-file conflict that won't resolve cleanly** → `git checkout --theirs <lockfile> && <install-command> && git add <lockfile>` (using "theirs" = the branch being replayed onto, i.e. main's lockfile as the base).
- **Stuck and want to bail out** → tell the user the state, then ask before running `git rebase --abort`. Their working tree will return to pre-rebase state.

## Reporting

End with a one-line summary: `Rebased <branch> onto origin/main: N commits replayed, M files had conflicts (resolved). Run tests before pushing.`
18 changes: 18 additions & 0 deletions skills/rebased/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "1.0.0",
"organization": "Dupe.com",
"author": "Ramin Bozorgzadeh",
"date": "May 2026",
"abstract": "Rebases the current branch onto origin/main and intelligently resolves merge conflicts one commit at a time. Understands both sides of each conflict, merges intent rather than blindly picking a side, regenerates lock files and generated files, and reports what was resolved. Never force-pushes without confirmation.",
"references": [
"https://agentskills.io/specification",
"https://git-scm.com/docs/git-rebase"
],
"compatibility": ["claude-code", "opencode", "cursor", "amp"],
"tags": [
"git",
"rebase",
"conflict-resolution",
"workflow"
]
}
52 changes: 52 additions & 0 deletions skills/reviews/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# reviews

> End-to-end GitHub PR review workflow for AI coding agents

## What It Does

**reviews** handles the full cycle of addressing PR review feedback: fetching every comment and inline thread, triaging what's actionable vs ambiguous, making code changes, posting replies, resolving threads, and leaving a summary comment on the PR.

## Use When

- User types `/reviews` in their agent session
- User says "address review comments", "go through PR feedback", "handle the review on #123"
- Responding to inline comments after a code review

## Features

- **Full comment fetch** — pulls top-level reviews, inline comments, and conversation-tab comments in parallel via GitHub REST + GraphQL
- **Smart triage** — categorizes comments as actionable, question, disagreement, ambiguous, or out-of-scope; skips already-resolved threads
- **Code changes** — applies edits using exact file + line context from the diff hunk
- **Selective replies** — posts replies only where they add value for other reviewers
- **Thread resolution** — resolves threads immediately after addressing them (not in a batch at the end)
- **Human-in-the-loop** — surfaces ambiguous items and disagreements for the user before proceeding
- **Summary comment** — posts a structured summary to the PR listing fixed, won't-fix, and follow-up items
- **Never pushes** — always leaves the final push decision to the human

## Installation

```bash
npx skills add dupe-com/skills/reviews
```

## Usage

```
/reviews # address reviews on the current branch's PR
/reviews 3239 # address reviews on PR #3239
/reviews feature/foo # address reviews on the PR for branch feature/foo
```

## Requirements

- `gh` CLI installed and authenticated (`gh auth status`)
- Write access to the repository (for posting replies and resolving threads)

## Hard Rules

The skill will never:
- Push the resulting commit (that's yours to review and push)
- Close, merge, approve, or dismiss-review the PR
- Delete or edit other people's comments
- Resolve threads it didn't address
- Silently accept a suggestion it disagrees with
Loading
Loading