jj-graft-third-party

Graft third-party repository history into a monorepo using jj remotes and workspaces.

11|1|Updated Apr 9, 2025
One-click install
npx skills add https://github.com/thoughtpolice/a --skill jj-graft-third-party
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jj-graft-third-party
Source: https://github.com/thoughtpolice/a/tree/main/.claude/skills/jj-graft-third-party
Command: npx skills add https://github.com/thoughtpolice/a --skill jj-graft-third-party

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Integrate third-party repository history into the monorepo by adding git remotes and creating workspaces that point at upstream branches, enabling coordinated development and patch testing across the main repo and dependencies.

Core Features & Use Cases

  • Add a remote for the upstream project to bring in history without duplicating work.
  • Fetch and expose upstream commits inside the monorepo, then create a workspace that tracks a remote branch for integrated testing and local modifications.
  • Support workflows for testing patches, maintaining forks with upstream tracking, and developing features that span both the monorepo and a dependency.

Quick Start

Begin by adding a remote for the upstream repository, fetch its history, and then create a workspace that points to the remote branch to start grafting history into your monorepo.

Frequently Asked Questions about jj-graft-third-party

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I graft upstream history into a monorepo using jj?

To graft upstream history into a monorepo using jj, you add a git remote for the upstream project, fetch its commits, and create a workspace that tracks the remote branch. This integrates the third-party repository history without duplicating work.

Can I test upstream patches in my monorepo with jj workspaces?

Yes, you can test upstream patches in your monorepo by creating a jj workspace that points to a remote branch. This exposes upstream commits inside the monorepo, allowing for integrated testing and local modifications.

What is the best way to maintain a fork with upstream tracking in a monorepo?

Maintaining a fork with upstream tracking in a monorepo is done by adding the upstream repository as a git remote and fetching its history into your jj workspace. This provides a unified history view for coordinated development across the main repo and dependencies.

Does jj work with git remotes to integrate third-party repositories?

Yes, jj works with git remotes to integrate third-party repositories. You use jj to add remotes, fetch histories, and create workspaces that reference remote branches, bringing the external project history directly into your monorepo.

How do I develop features that require changes to both a monorepo and a dependency?

You develop features spanning a monorepo and a dependency by grafting the third-party repository history using jj. Adding a remote and creating a workspace that tracks the upstream branch enables coordinated development and patch testing.

Why create a jj workspace that points to a remote branch?

Creating a jj workspace that points to a remote branch allows you to graft upstream history into your monorepo. It provides a unified history view, enabling local modifications and integrated testing of third-party code without duplicating work.