Overview
Magic Commands are AI-powered workflows that automate common development tasks. They use specialized prompts and models to generate commits, PRs, reviews, and more. Key concepts:- Magic commands are accessed via
Cmd+M(Magic Modal) - Each command uses a customizable prompt (editable in Preferences)
- Commands can use different models/providers than your main session
- Results appear as toasts with action buttons (e.g., “Open PR” link)
Opening the Magic Modal
PressCmd+M to open the Magic Commands modal. You’ll see categories:
- Git: Commit, Push, Pull, Resolve Conflicts
- GitHub: Open PR, Update PR, Create Release Notes
- AI: Review Code, Save Context, Load Context, Generate Recap
- Investigation: Investigate Issue, Investigate PR, Investigate Workflow Run
Creating Pull Requests
Jean can generate PR titles and descriptions by analyzing your commits and changes.Make Sure You Have Commits
Before creating a PR, make at least one commit in your worktree. The PR content is generated from:
- Commit messages
- Git diff (all changes vs. base branch)
- Any loaded context (issue descriptions, previous conversations)
Wait for Generation
Jean will:
- Collect commits and diff from your worktree
- Send to a model (Haiku by default) with a specialized prompt
- Generate a PR title and markdown body
- Create the PR on GitHub via
ghCLI - Link the PR to your worktree
Customizing PR Generation
You can customize the prompt used to generate PR content:- Open Preferences (
Cmd+,) → Magic Prompts tab - Find PR Content in the list
- Click Edit and modify the prompt
- Variables available:
{current_branch}: Your worktree branch name{target_branch}: Base branch (e.g.,main){commit_count}: Number of commits{commits}: Formatted list of commit messages{diff}: Full git diff{context}: Loaded context (issue descriptions, etc.)
Generating Commit Messages
Jean can write commit messages by analyzing staged changes.Stage Your Changes
Use
git add to stage the files you want to commit, or stage all changes with git add ..You can also use Jean’s built-in git diff viewer (Cmd+G) to review and stage changes.Generate Message
Click Generate with AI in the commit dialog.Jean will:
- Run
git statusandgit diff --staged - Collect recent commit messages (to match your style)
- Send to a model (Haiku by default)
- Generate a concise commit message
Commit Message Style
By default, Jean analyzes your recent commits to match your style. Common styles:- Conventional Commits:
feat: add user login,fix: resolve crash on startup - Imperative mood:
Add user authentication,Fix login validation bug - Present tense:
Adds user authentication,Fixes login bug
Code Review
Jean can review your changes and provide structured feedback.Wait for Review
Jean will:
- Collect all commits and diff in the worktree
- Send to a model (Haiku by default) with a review prompt
- Analyze changes for:
- Security vulnerabilities (hardcoded secrets, injection flaws, etc.)
- Performance issues
- Code quality and maintainability
- Potential bugs
- Best practices violations
- Generate a review with:
- Summary: Brief overview of changes
- Findings: List of issues (critical, warning, suggestion, praise)
- Approval Status: Approved, Changes Requested, or Needs Discussion
Review Results
The review results appear in the Review panel on the right side of the chat window.Each finding shows:
- Severity badge (Critical, Warning, Suggestion, Praise)
- File and line number
- Title and description
- Optional code suggestion
Fix Issues
For each finding, you can:
- Click the file path to open it in your editor
- Copy the suggested fix
- Ask Claude to implement the fix in the chat
- Mark the finding as “Fixed” once resolved
Customizing Review Prompts
You can customize what the review focuses on:- Open Preferences → Magic Prompts → Code Review
- Edit the prompt to add or remove focus areas
- Variables available:
{branch_info}: Current branch and base branch{commits}: Formatted commit history{diff}: Full git diff{uncommitted_section}: Uncommitted changes (if any)
Investigating Issues
Jean can load GitHub issues and help you investigate bugs or plan features.Browse Issues
The Issues tab shows all open issues from your repository. You can:
- Filter by labels, milestone, or assignee
- Search by title or number
- Sort by created date, updated date, or comments
Select Issue
Click an issue to view details:
- Title and number
- Description
- All comments (chronological order)
- Labels and metadata
Investigate
Click Investigate Issue. Jean will:
- Save issue context to
.github/issues/<number>.json - Create a new chat session (or use the current one)
- Send a specialized prompt asking Claude to:
- Analyze the issue description
- Explore the codebase to find relevant code
- Identify root cause
- Check for regressions (if it’s a bug)
- Propose a solution with specific file changes
Investigation Prompt
The default investigation prompt (Preferences → Magic Prompts → Investigate Issue) instructs Claude to:- Read the issue context file
- Analyze expected vs. actual behavior
- Explore the codebase to find relevant code
- Identify root cause and constraints
- Check git history for regressions
- Propose a solution with specific files and test cases
Investigating Pull Requests
Similar to issue investigation, but for PRs.Browse PRs
The Pull Requests tab shows:
- Open PRs from your repository
- Draft status
- Review state (approved, changes requested, pending)
- CI check status
Select PR
Click a PR to view:
- Title and description
- Branch information (head → base)
- All comments and reviews
- CI check results
Investigate
Click Investigate PR. Jean will:
- Save PR context to
.github/pulls/<number>.json - Check out the PR branch (if not already)
- Send a specialized prompt asking Claude to:
- Understand what the PR is trying to accomplish
- Review the code changes
- Analyze reviewer feedback
- Perform a security review
- Identify action items to get the PR merged
Security Review in PR Investigation
The default PR investigation prompt includes a security checklist:- Malicious or obfuscated code
- Suspicious dependency changes
- Hardcoded secrets or tokens
- Backdoors or unauthorized access
- Injection vulnerabilities (SQL, command, XSS)
- Weakened authentication or permissions
- Suspicious file system or environment access
Investigating Failed Workflows
Jean can help debug GitHub Actions failures.Open Magic Modal
Press
Cmd+M and select Investigate Workflow Run (or use the GitHub Dashboard via Cmd+Shift+D).Select Failed Run
Browse recent workflow runs and select a failed one. Jean will show:
- Workflow name
- Branch and commit
- Failed jobs
- Error output
Investigate
Click Investigate Run. Jean will:
- Fetch the workflow run logs via
gh run view --log-failed - Send a prompt asking Claude to:
- Identify the failure cause
- Determine if it’s a code issue, config issue, or flaky test
- Propose a fix with specific changes
Saving and Loading Context
As sessions grow, you can save context to summaries and load them later.Save Context
Wait for Summary
Jean will:
- Send the full conversation history to Opus (by default)
- Generate a structured summary with:
- Main goal and key decisions
- Trade-offs considered
- Problems solved
- Current state and next steps
- Important file paths and code patterns
- Save to
.ai/summaries/<slug>.md
Load Context
Select Summaries
The Contexts tab shows all saved summaries in
.ai/summaries/. You can select multiple summaries to load.Resolving Git Conflicts
When merges or rebases produce conflicts, Jean can help resolve them.AI-Assisted Resolution
Jean will:
- Run
git diffto get conflict markers - Send the diff to Opus (by default)
- Ask Claude to:
- Explain what’s conflicting in each file
- Recommend resolutions
- Provide git commands to stage resolved files
Apply Fixes
Claude can directly edit conflicted files to remove markers and merge changes. After each file:
Common Pitfalls
Best Practices
Next Steps
- GitHub Workflows - Deep dive into issue and PR workflows
- Customization - Customize magic prompt templates
- Keyboard Shortcuts - Faster access to magic commands