context-methodology

Separate AI configuration from project code using git worktrees.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/iknite/claude-code-marketplace --skill context-methodology
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-methodology
Source: https://github.com/iknite/claude-code-marketplace/tree/main/worktree-context/skills/context-methodology
Command: npx skills add https://github.com/iknite/claude-code-marketplace --skill context-methodology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides knowledge about the context branch methodology - a pattern for separating AI assistant configuration from project source code using git worktrees.

Core Features & Use Cases

  • Two independent histories in the same repository: a context branch for CLAUDE.md and .claude/ while the main/master branch contains the project code.
  • Guided workflow for creating feature worktrees, hooking up AI config, and managing PRs without mixing AI and code history.
  • Use Case: You can keep AI prompts and tooling in the context branch, while the application code remains clean on the default branch.

Quick Start

From the context worktree, review the context methodology and start applying the separation of concerns between AI configuration and code.

Frequently Asked Questions about context-methodology

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

FAQPage Schema
How do I separate AI configuration from project code in git?

The context-methodology uses git worktrees to maintain two independent branches: a `context` branch for CLAUDE.md and .claude/ directory, and a `main`/`master` branch for project code. This separation keeps AI prompts isolated from application code history while both live in the same repository.

What is the context branch methodology and when should I use it?

The context branch methodology separates AI assistant configuration from source code using git worktrees and dual branch histories. Use it when you store AI instructions in CLAUDE.md, need isolated AI contexts for experiments, and want to manage feature development and AI configuration updates independently.

How do I create feature worktrees with the context branch workflow?

Create feature branches from the default branch, then use git worktrees to establish isolated working directories. The context methodology guides you through hooking up AI config and managing pull requests while maintaining strict separation between code and AI configuration histories.

Can I use the context branch methodology with .claude/ directory configurations?

Yes. The context branch stores both CLAUDE.md and the .claude/ directory on a dedicated `context` branch, keeping all AI configuration separate from your main codebase while supporting automated detection of the default branch and PR creation workflows.

Why should I separate AI prompts from code using worktrees?

Separating AI configuration keeps your codebase clean, prevents AI instruction changes from polluting code history, enables independent experimentation on AI contexts, and maintains dual independent commit histories optimized for their respective concerns.

What workflow do I follow to manage PRs with context and code branches?

The context methodology provides a guided workflow: maintain the context branch for CLAUDE.md and .claude/ updates, create feature branches from the default branch for code work, use worktrees for isolation, and manage pull requests without mixing AI and code histories.