Agent skill

Resolve Pegasus Conflicts

by saaspegasus in saaspegasus/django-boilerplate

Resolve merge conflicts when upgrading SaaS Pegasus. An agent skill from saaspegasus/django-boilerplate.

MITAuto-check passedDevelopment

Install Resolve Pegasus Conflicts

skills CLI
$ npx skills add saaspegasus/django-boilerplate --skill resolve-pegasus-conflicts -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install saaspegasus/django-boilerplate resolve-pegasus-conflicts --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/saaspegasus/django-boilerplate.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/resolve-pegasus-conflicts .claude/skills/resolve-pegasus-conflicts && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
resolve-pegasus-conflicts
GitHub stars
177
Token cost
~3.2k tokens
SKILL.md length
1,614 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Resolve merge conflicts when upgrading SaaS Pegasus. An agent skill from saaspegasus/django-boilerplate.

  • Works in 2 steps: Check git status: Run git status to see… → Ask the user: If unclear, ask whether they
  • The user has merge conflicts after running git merge during a Pegasus upgrade
  • Calls git, npm and uv
  • They need help with the merge process

What it does

Resolve Pegasus Conflicts is an agent skill from saaspegasus/django-boilerplate. Resolve merge conflicts when upgrading SaaS Pegasus. Use when the user has merge conflicts after running git merge during a Pegasus upgrade, or when they need help with the merge process. Also use when the user mentions 'merge pegasus".

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: The original SaaS Boilerplate for Django, trusted by thousands. The licence is MIT.

When your agent uses it

  • The user has merge conflicts after running git merge during a Pegasus upgrade
  • They need help with the merge process
  • The user mentions merge pegasus

Example prompts

  • “merge pegasus”
  • “/resolve-pegasus-conflicts”

Requirements

  • Python 3
  • Node.js
  • Docker

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Check git status: Run git status to see if there's an active merge in progress
  2. Ask the user: If unclear, ask whether they

What it can do on your machine

Read from SKILL.md and the folder at commit e9d11b0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • npm
    • uv
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Resolve Pegasus Conflicts loads about 3.2k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 1,614 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from saaspegasus/django-boilerplate at commit e9d11b0, republished under its MIT licence (© saaspegasus). 1,614 words, ~3,202 tokens.

Download SKILL.mdSave it as .claude/skills/resolve-pegasus-conflicts/SKILL.md (or your agent's skills folder).
name
resolve-pegasus-conflicts
description
Resolve merge conflicts when upgrading SaaS Pegasus. Use when the user has merge conflicts after running git merge during a Pegasus upgrade, or when they need help with the merge process. Also use when the user mentions 'merge pegasus".

Resolve Pegasus Conflicts

Instructions

This skill helps users resolve merge conflicts when upgrading their SaaS Pegasus codebase. Most users will invoke this skill when they have merge conflicts after merging their main branch into a Pegasus upgrade branch, but you can also help run the merge process for them.

When invoked

First, determine what the user needs help with by checking their current state:

  1. Check git status: Run git status to see if there's an active merge in progress
  2. Ask the user: If unclear, ask whether they:
    • Already ran git merge and need help resolving conflicts (most common)
    • Want you to run the merge process for them
    • Need help understanding which conflicts to prioritize
If there's an active merge with conflicts

The user has already run git merge <main branch> and has conflicts to resolve. Help them resolve the conflicts using these strategies:

Database Migrations

Principle: When main/local and Pegasus disagree about a migration, main/local wins. Main's migration files typically reflect what the local DB (and prod) have already applied, so that history is the baseline you protect. When a Pegasus migration conflicts with or duplicates something main has already applied, you should drop Pegasus's version in favour of main's, then run ./manage.py makemigrations to re-express any genuine change as a clean forward diff (the change lives in the merged models, so makemigrations re-derives it).

  • On a conflict: For conflicted migration files, accept the user's version from main with git checkout --theirs <migration-file>, then run ./manage.py makemigrations after all conflicts are resolved.
  • Watch for silent (conflict-free) migration changes — this is easy to miss: Pegasus regenerates its own auto-generated migrations and sometimes renames them (e.g. 0002_customuser_language... → 0002_customuser_customer...). A rename is a delete-on-one-side + add-on-the-other, which git merges with no conflict markers — so it slips through silently and leaves you with a duplicate/competing migration the conflict step never flagged. After merging, always diff the migration dirs against main to catch this:
    git diff --name-status main HEAD -- '*/migrations/*.py'
    Treat any R (rename) the same as a conflict: restore main's file (git checkout main -- <file>), delete Pegasus's regenerated copy (git rm <file>), then ./manage.py makemigrations to regenerate the forward diff cleanly. Brand-new app migrations (all A, e.g. a freshly added ecommerce app) are fine — keep those as-is.
  • djstripe migration references: If djstripe was upgraded, check if app migrations reference old djstripe migrations that no longer exist (see the "djstripe 2.10 upgrade" section below).
Dependency Lock Files (uv.lock, requirements.txt, package-lock.json)
  • Strategy: Accept Pegasus changes to lock files, merge source files manually
  • Source files: pyproject.toml, requirements.in, package.json
  • Lock files: uv.lock, requirements.txt, package-lock.json
  • Action:
    1. For source files: Merge carefully, keeping customizations
    2. For lock files: Accept ours (Pegasus version) with git checkout --ours <lock-file> and git add <lock-file>
    3. Immediately regenerate: Run uv sync (for uv.lock) or npm install (for package-lock.json) right after resolving to ensure dependencies are properly synced
  • Important: Don't wait until post-merge steps - regenerate lock files immediately after resolving them
Static Assets (JavaScript/CSS bundles in static/)
  • Strategy: Delete and regenerate
  • Action: Accept either version (doesn't matter), will be rebuilt
  • Regenerate: Run npm run build or npm run dev after merge
Configuration Files (.env.example, settings files)
  • Strategy: Merge carefully, keep customizations
  • Action: Review both sides and combine them intelligently
Other Files
  • Strategy: Evaluate case-by-case
  • Action: Read both versions, understand the changes, merge intelligently
If running the full merge process

If the user wants you to run the merge:

  1. Fetch latest changes: Run git fetch to download the latest branches and commits from the remote (this ensures you can see the latest Pegasus upgrade branch)
  2. Find the latest upgrade branch: Run git branch -a to list all branches and look for the latest Pegasus upgrade branch (usually prefixed with pegasus-YYYY.MM, e.g., pegasus-2025.01)
  3. Check current branch: Run git status to see if they're already on the upgrade branch
  4. Checkout the upgrade branch: If not already on it, run git checkout <pegasus-branch-name>
  5. Pull latest changes: Run git pull to ensure the upgrade branch is up to date with the remote
  6. Identify main branch: Determine the main development branch (usually main or master)
  7. Run merge: Execute git merge <main-branch> to merge the main development branch into the Pegasus upgrade branch
  8. Handle conflicts: Follow the conflict resolution strategies above
  9. Dependency sync: Once conflicts have been resolved, you should re-sync dependencies.
    • Python: uv sync
    • JavaScript: npm install
Post-merge steps

After all conflicts are resolved and the merge is complete, run the verification steps below. By default, work straight through them without pausing for confirmation between steps — the user kicked off an upgrade and expects forward motion. Stop only if a step fails, or if the user has said they want to review before pushing.

  1. Frontend install + build: npm install && npm run build
  2. Python dependency sync: uv sync
  3. Migrations: ./manage.py makemigrations then ./manage.py migrate. If migrate fails partway, see "Recovering from a partial migration" below.
  4. Tests: ./manage.py test
  5. Ruff format + lint: make ruff (auto-formats and auto-fixes lint issues)

Commit any pending changes produced by the steps above (e.g. new migrations, formatting fixes) with a clear message. Docker users can substitute make upgrade for the build/migrate steps.

Show full SKILL.md (786 more words)Show less
Recovering from a partial migration

migrate commits each migration separately, so a failure partway through can leave earlier migrations applied while a later one fails — the DB is now in a half-migrated state that no longer matches its starting baseline. The local dev DB is typically kept at the same migration state as production, so it matters that you put it back. For Pegasus's schema-only, reversible migrations this is straightforward to undo.

  1. See what actually applied — check, don't theorize. Surprising schema (tables/columns you didn't expect) is far more likely to be something you just applied than pre-existing cruft. Confirm with timestamps:
    ./manage.py dbshell -- -c "SELECT app, name, applied FROM django_migrations ORDER BY applied DESC LIMIT 20;"
    The recent timestamps are what this run applied.
  2. Reverse them back to the last good state, in reverse-dependency order (unapply the app that depends on another before the one it depends on):
    ./manage.py migrate <app> <last_good_migration>   # or `zero` to unapply an app entirely
  3. If the reverse errors loudly (e.g. IrreversibleError — a data migration with no reverse defined), stop and raise to a human rather than forcing it. Don't pre-gate on atomic = False or side effects; just attempt the reverse and let it fail loudly if it can't. (If a forward op already dropped data, that loss happened on apply — reversing won't recover it, and that's also a human escalation.)
  4. Once back at a clean baseline, fix the offending migration (see "Database Migrations" above — usually a Pegasus rename/duplicate), then re-run ./manage.py migrate and confirm the full chain applies cleanly from the baseline.
Pushing

If everything above passed, the default is to push so the user can open a PR:

git push -u origin <branch-name>

Then report the branch name and a summary of what was upgraded. The push output includes a "Create a pull request" URL — surface that link to the user and tell them that's where they can review the diff and open the PR.

Hold off on pushing (and ask first) if any of these are true:

  • A verification step failed or had warnings worth a human look
  • The user said earlier they wanted to review before pushing, or asked to "stop before push"
  • The merge required non-trivial judgment calls you're not confident about
  • There are local commits unrelated to the upgrade that the user may not want pushed
Important reminders
  • Enable rerere: Suggest running git config rerere.enabled true to remember conflict resolutions for future upgrades
  • Never squash: When merging Pegasus PRs in GitHub, always use "Create a merge commit" (not squash or rebase)
  • Review changes: Always review what changed in the upgrade before committing
  • Always compare clean versions: When resolving non-trivial conflicts, use git show HEAD:<file> and git show main:<file> to see the clean versions from each branch, rather than trying to parse the conflict markers in place
Examples
Example 1: User has conflicts (most common)
User: "I have merge conflicts after upgrading Pegasus"
You: [Check git status, see conflicts in migrations and uv.lock]
You: "I can see you have conflicts in migrations and uv.lock. Let me help resolve these:
- For migrations: I'll keep your version and we'll regenerate them
- For uv.lock: I'll accept the Pegasus version and regenerate it
[Proceed to resolve conflicts]"
Example 2: User wants help with the merge
User: "Can you help me merge my changes into the Pegasus upgrade branch?"
You: "I can help with that. Let me:
1. Find the latest Pegasus upgrade branch
2. Check out that branch (or confirm you're already on it)
3. Merge your main development branch into it
4. Help resolve any conflicts that come up
[Proceed with finding branch and running git merge main]"
Edge cases
  • No pegasus upgrade branch: If the user doesn't have a pegasus-YYYY.MM branch, direct them to the Pegasus upgrade documentation
  • Too many conflicts: If there are dozens of conflicts across many files, suggest reviewing them in priority order (migrations first, then lock files, then configuration)
  • Custom modifications: Be conservative with user customizations - when in doubt, keep their changes and note what was different in Pegasus
  • Unfamiliar file types: If you encounter conflicts in files you're not sure how to handle, explain both sides of the conflict and ask the user which approach makes sense
djstripe 2.10 upgrade (Pegasus 2026.2.2+)

Pegasus 2026.2.2 upgraded djstripe from 2.9 to 2.10. This is a significant upgrade that requires extra steps beyond normal conflict resolution.

Migration squash

djstripe 2.10 squashed all previous migrations into 0001_initial and 0002_2_10. After resolving migration conflicts, check if any app migrations reference old djstripe migrations (e.g. ('djstripe', '0012_2_8')) that no longer exist. If so, update those dependencies to ('djstripe', '0001_initial'). Do NOT delete migrations — update their dependency references instead.

Fields moved to stripe_data

Many model fields were removed as DB columns and now read from the stripe_data JSONField via @property accessors. Key changes on Product: default_price, type are now properties. This means:

  • select_related("default_price") will fail — remove it, just use .get() directly
  • filter(), order_by(), values() on removed fields will fail — use stripe_data__<field> instead
  • Property access like product.default_price.id still works (it does a DB lookup from stripe_data)
Re-sync stripe data after migrating

After running ./manage.py migrate, run ./manage.py djstripe_sync_models Product Price to repopulate stripe_data for existing records. Without this, properties like product.default_price will return None because the old FK data isn't in stripe_data yet.

Obsolete workarounds

The RunSQL migration that altered djstripe_paymentintent.capture_method column length (workaround for dj-stripe#2038) is no longer needed. Clear its operations list (keep the migration file as a no-op for the dependency chain).

© saaspegasus, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/resolve-pegasus-conflicts of saaspegasus/django-boilerplate.

Open the folder on GitHubat commit e9d11b0

Compare with similar skills

Resolve Pegasus Conflicts next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Resolve Pegasus Conflicts compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Resolve Pegasus Conflicts this skillsaaspegasus/django-boilerplate177—~3.2kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost56k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed

More from saaspegasus/django-boilerplate

  • Pegasus Projects

    saaspegasus/django-boilerplate

    A skill your agent uses when the user asks to create, view, or modify a SaaS Pegasus project via the pegasus CLI — e.g.

    177 GitHub stars~5.1k tokensUpdated yesterday
    Auto-check passed
  • Upgrade Pegasus

    saaspegasus/django-boilerplate

    Upgrade to the latest version of SaaS Pegasus. An agent skill from saaspegasus/django-boilerplate.

    177 GitHub stars~621 tokensUpdated yesterday
    Auto-check passed
  • Fix Types

    saaspegasus/django-boilerplate

    Interactively fix any type checking issues in Python code. An agent skill from saaspegasus/django-boilerplate.

    177 GitHub stars~806 tokensUpdated yesterday
    Auto-check passed
  • Upgrade Python Deps

    saaspegasus/django-boilerplate

    Upgrade Python dependencies using uv, then run post-upgrade checks to ensure nothing is broken.

    177 GitHub stars~570 tokensUpdated yesterday
    Auto-check passed
  • Upgrade JS Deps

    saaspegasus/django-boilerplate

    Upgrade JavaScript dependencies using npm-check-updates, then run post-upgrade checks to ensure nothing is broken.

    177 GitHub stars~402 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Resolve Pegasus Conflicts

What does Resolve Pegasus Conflicts do?

Resolve merge conflicts when upgrading SaaS Pegasus. An agent skill from saaspegasus/django-boilerplate. Resolve Pegasus Conflicts is an agent skill from saaspegasus/django-boilerplate. Resolve merge conflicts when upgrading SaaS Pegasus.

When should I use Resolve Pegasus Conflicts?

Resolve Pegasus Conflicts fits situations like: the user has merge conflicts after running git merge during a Pegasus upgrade; they need help with the merge process; the user mentions merge pegasus.

How do I install Resolve Pegasus Conflicts in Claude Code?

Run `npx skills add saaspegasus/django-boilerplate --skill resolve-pegasus-conflicts -a claude-code`. Or copy the skill folder (.claude/skills/resolve-pegasus-conflicts in saaspegasus/django-boilerplate) into .claude/skills/resolve-pegasus-conflicts in your project. Claude Code loads it when a task matches its description.

How do I install Resolve Pegasus Conflicts in Codex?

Run `npx skills add saaspegasus/django-boilerplate --skill resolve-pegasus-conflicts -a codex`. Or copy the skill folder (.claude/skills/resolve-pegasus-conflicts in saaspegasus/django-boilerplate) into .agents/skills/resolve-pegasus-conflicts in your project. Codex loads it when a task matches its description.

Can I use Resolve Pegasus Conflicts in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add saaspegasus/django-boilerplate --skill resolve-pegasus-conflicts -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/resolve-pegasus-conflicts, .gemini/skills/resolve-pegasus-conflicts, .github/skills/resolve-pegasus-conflicts and .opencode/skills/resolve-pegasus-conflicts in your project.

What does Resolve Pegasus Conflicts need to run?

Going by SKILL.md and its folder, Resolve Pegasus Conflicts needs the command-line tools its instructions call (git, npm, uv and make). Our summary lists: Python 3; Node.js; Docker.

Does Resolve Pegasus Conflicts access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Resolve Pegasus Conflicts safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Resolve Pegasus Conflicts use?

Resolve Pegasus Conflicts is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Resolve Pegasus Conflicts use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Resolve Pegasus Conflicts?

Skills that share tags, products or a category with Resolve Pegasus Conflicts: Finishing a Development Branch (obra/superpowers, 297k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 56k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Resolve Pegasus Conflicts?

saaspegasus (a GitHub organization) maintains it in saaspegasus/django-boilerplate, which has 177 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

Source: saaspegasus/django-boilerplate on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.