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
- Commit messages
- Git diff (all changes vs. base branch)
- Any loaded context (issue descriptions, previous conversations)
Open Magic Modal
Cmd+M and select Open PR.Wait for Generation
- 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
Review and Edit PR
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
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.Open Commit Modal
Cmd+Shift+C to open the commit dialog.Generate Message
- 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 and Push
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.Open Magic Modal
Cmd+M and select Review Code.Wait for Review
- 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
- Severity badge (Critical, Warning, Suggestion, Praise)
- File and line number
- Title and description
- Optional code suggestion
Fix Issues
- 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
Re-run Review
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.Open Magic Modal
Cmd+M and select Investigate Issue.Browse Issues
- Filter by labels, milestone, or assignee
- Search by title or number
- Sort by created date, updated date, or comments
Select Issue
- Title and number
- Description
- All comments (chronological order)
- Labels and metadata
Investigate
- 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
Iterate
- Ask follow-up questions
- Request alternative approaches
- Have Claude implement the fix immediately
- Create a worktree from the issue (if you didn’t already)
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.Open Magic Modal
Cmd+M and select Investigate PR.Browse PRs
- Open PRs from your repository
- Draft status
- Review state (approved, changes requested, pending)
- CI check status
Select PR
- Title and description
- Branch information (head → base)
- All comments and reviews
- CI check results
Investigate
- 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
Address Feedback
- Ask Claude to implement requested changes
- Respond to review comments
- Run tests and fix CI failures
- Update the PR description
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
Cmd+M and select Investigate Workflow Run (or use the GitHub Dashboard via Cmd+Shift+D).Select Failed Run
- Workflow name
- Branch and commit
- Failed jobs
- Error output
Investigate
- 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
Fix and Re-run
- Commit and push the changes
- Re-run the workflow via
gh run rerun - Or re-run from the GitHub UI
Saving and Loading Context
As sessions grow, you can save context to summaries and load them later.Save Context
Open Magic Modal
Cmd+M and select Save Context.Wait for Summary
- 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
Open Summary
Load Context
Open Magic Modal
Cmd+M and select Load Context.Select Summaries
.ai/summaries/. You can select multiple summaries to load.Load into Session
- Read the selected summary files
- Send them as context in your next message
- Claude will have access to the summarized context
Resolving Git Conflicts
When merges or rebases produce conflicts, Jean can help resolve them.Detect Conflicts
Open Magic Modal
Cmd+M and select Resolve Conflicts.AI-Assisted Resolution
- 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
Complete Operation
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