<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>HanLHo. - Fractional Architect &amp; Software Product Engineer - jujutsu</title>
    <link rel="self" type="application/atom+xml" href="https://hanlho.com/tags/jujutsu/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://hanlho.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-01-13T00:00:00+00:00</updated>
    <id>https://hanlho.com/tags/jujutsu/atom.xml</id>
    <entry xml:lang="en">
        <title>Agent Chisels: My LLM Agent Skills and Workflows</title>
        <published>2026-01-13T00:00:00+00:00</published>
        <updated>2026-01-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://hanlho.com/p/agent-chisels-my-llm-agent-skills-and-workflows/"/>
        <id>https://hanlho.com/p/agent-chisels-my-llm-agent-skills-and-workflows/</id>
        
        <content type="html" xml:base="https://hanlho.com/p/agent-chisels-my-llm-agent-skills-and-workflows/">&lt;p&gt;I have been meaning to share more about my LLM workflows and tooling for a while, partly to have a reference for conversations, but mostly to learn in public.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;lhohan&#x2F;agent-chisels&quot;&gt;Agent Chisels&lt;&#x2F;a&gt; is where I will be sharing the custom artefacts (primarily &lt;code&gt;skills&lt;&#x2F;code&gt;, with &lt;code&gt;commands&lt;&#x2F;code&gt; and &lt;code&gt;agents&lt;&#x2F;code&gt; to follow) that I find most useful and actively use in my daily workflow.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;skills&quot;&gt;Skills&lt;&#x2F;h2&gt;
&lt;p&gt;I have shared two &lt;a href=&quot;https:&#x2F;&#x2F;agentskills.io&#x2F;home&quot;&gt;skills&lt;&#x2F;a&gt; I use almost daily. In addition, I&#x27;ve also included a third skill, more of a meta-skill for evaluating other skills, which I used when reviewing these for release. I actively use this skill to iterate and improve my skills so it fits the goal of this project.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;documenting-architectural-decisions&lt;&#x2F;code&gt;: Document and manage architectural decisions using ADRs. Supports Y-statement and traditional ADR formats. Used for creating, reviewing, or searching decision records. This repository contains several examples of decision logs created with this skill, for example, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;lhohan&#x2F;agent-chisels&#x2F;blob&#x2F;main&#x2F;plugins&#x2F;jj&#x2F;decision-log.md&quot;&gt;here&lt;&#x2F;a&gt; is the one for the &lt;code&gt;jj&lt;&#x2F;code&gt; plugin.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I use &lt;a href=&quot;https:&#x2F;&#x2F;www.jj-vcs.dev&#x2F;latest&#x2F;&quot;&gt;&lt;code&gt;jj&lt;&#x2F;code&gt; or &lt;code&gt;Jujutsu&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, an alternative version control system, in all my projects. Getting LLMs to work reliably with it is quite a challenge, so I have a skill to detect and remind an LLM to use &lt;code&gt;jj&lt;&#x2F;code&gt; and one to add the capability of using &lt;code&gt;jj&lt;&#x2F;code&gt;. The &lt;a href=&quot;https:&#x2F;&#x2F;code.claude.com&#x2F;docs&#x2F;en&#x2F;plugins&quot;&gt;Claude Code plugin&lt;&#x2F;a&gt; also adds a &lt;code&gt;use-jj&lt;&#x2F;code&gt; command and a hook to remind an LLM of using &lt;code&gt;jj&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;detecting-jujutsu&lt;&#x2F;code&gt; — Verify if the current repository uses Jujutsu (jj) instead of git. Used when confirming VCS state before operations.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;using-jujutsu&lt;&#x2F;code&gt; — Detailed guidance on Jujutsu (jj) VCS operations including committing, pushing, searching history, and working with revisions&#x2F;revsets.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;And finally, there is the meta-skill to evaluate skills. &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;lhohan&#x2F;agent-chisels&#x2F;blob&#x2F;main&#x2F;skills&#x2F;evaluate-skills&#x2F;examples&#x2F;EXAMPLE.md&quot;&gt;Here is an example&lt;&#x2F;a&gt; of a report generated by this skill.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;evaluating-skills&lt;&#x2F;code&gt; — A skill to evaluate skills against best practices for size, structure, examples, and prompt engineering. Use when reviewing skills for deployment, optimisation, or standards compliance.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;To use these, you can use the Claude Code plugin system or install them manually; take a look at the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;lhohan&#x2F;agent-chisels#user-content-installation&quot;&gt;installation section&lt;&#x2F;a&gt; for more details.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;a-little-on-the-setup-of-the-repository&quot;&gt;A little on the setup of the repository&lt;&#x2F;h2&gt;
&lt;p&gt;I use symbolic links liberally to avoid duplication. For example, symbolic links allow me to share the independent skills with the Claude Code plugin while also using them in this project itself.&lt;&#x2F;p&gt;
&lt;p&gt;All skills I share in this repo are dynamically linked to my &lt;code&gt;~&#x2F;.claude&#x2F;skills&lt;&#x2F;code&gt; directory. Note that this is also the easiest way to make these skills &lt;a href=&quot;https:&#x2F;&#x2F;agentskills.io&#x2F;home#adoption&quot;&gt;available to other LLM CLI agents&lt;&#x2F;a&gt; like Opencode, Codex, and Mistral Vibe. In this repo, I have mostly worked with &lt;a href=&quot;https:&#x2F;&#x2F;opencode.ai&quot;&gt;Opencode&lt;&#x2F;a&gt; and the skills in the &lt;code&gt;.claude&lt;&#x2F;code&gt; location just work with it.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#eff1f5;color:#4f5b66;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;❯&lt;&#x2F;span&gt;&lt;span&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -l&lt;&#x2F;span&gt;&lt;span&gt; .claude&#x2F;skills
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;l...&lt;&#x2F;span&gt;&lt;span&gt; detecting-jujutsu -&amp;gt; ..&#x2F;..&#x2F;skills&#x2F;detecting-jujutsu
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;l...&lt;&#x2F;span&gt;&lt;span&gt; documenting-architectural-decisions -&amp;gt; ..&#x2F;..&#x2F;skills&#x2F;documenting-architectural-decisions
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;l...&lt;&#x2F;span&gt;&lt;span&gt; evaluating-skills -&amp;gt; ..&#x2F;..&#x2F;skills&#x2F;evaluating-skills
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;l...&lt;&#x2F;span&gt;&lt;span&gt; using-jujutsu -&amp;gt; ..&#x2F;..&#x2F;skills&#x2F;using-jujutsu
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;d...&lt;&#x2F;span&gt;&lt;span&gt; verify-release-readiness
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;l&lt;&#x2F;code&gt; at the beginning of each line stands for symbolic link. You&#x27;ll notice one real directory in there, that is a skill only relevant to this repository.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;future-plans&quot;&gt;Future plans&lt;&#x2F;h2&gt;
&lt;p&gt;I&#x27;ll be adding LLM artefacts as I move my own setup more and more to this repository. Since I&#x27;m trying to reuse as much as possible (within reason) between different LLM agents, I need a central location anyway, preferably vendor neutral yet pragmatic (e.g. using the &lt;code&gt;.claude&#x2F;skills&lt;&#x2F;code&gt; location to share skills). Also, my hope is to make this repository a more live and automatically up-to-date version of the artefacts I use day to day.&lt;&#x2F;p&gt;
&lt;p&gt;Related to this, I am thinking of creating a setup similar to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;webpro&#x2F;awesome-dotfiles&quot;&gt;dotfiles&lt;&#x2F;a&gt; (where developers share configuration files) but for LLM agent configurations: &#x27;agentfiles&#x27;. I intend to share my LLM agent configurations and how I integrate them. Let me know if you would be interested in this or are already sharing.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>How to Use Jujutsu (jj) with Claude Code</title>
        <published>2025-08-22T00:00:00+00:00</published>
        <updated>2025-08-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://hanlho.com/p/how-to-use-jujutsu-jj-with-claude-code/"/>
        <id>https://hanlho.com/p/how-to-use-jujutsu-jj-with-claude-code/</id>
        
        <content type="html" xml:base="https://hanlho.com/p/how-to-use-jujutsu-jj-with-claude-code/">&lt;p&gt;I prefer &lt;a href=&quot;https:&#x2F;&#x2F;jj-vcs.github.io&#x2F;jj&#x2F;latest&#x2F;&quot;&gt;Jujutsu&lt;&#x2F;a&gt; (&lt;code&gt;jj&lt;&#x2F;code&gt;) over Git for version control, but getting Claude Code to work with &lt;code&gt;jj&lt;&#x2F;code&gt; proved tricky since Claude Code defaults to &lt;code&gt;git&lt;&#x2F;code&gt;. This post explains how to configure Claude Code to use &lt;code&gt;jj&lt;&#x2F;code&gt; instead of Git for version control operations and file change detection.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ll show you three possible approaches to get Claude Code working properly with Jujutsu repositories, from simple configuration changes to advanced system prompt modifications.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;quick-solution-claude-md-configuration&quot;&gt;Quick Solution: &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;CLAUDE.md&lt;&#x2F;a&gt; Configuration&lt;&#x2F;h2&gt;
&lt;p&gt;For most users, this addition to your project&#x27;s &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;CLAUDE.md&lt;&#x2F;a&gt; file should configure Claude Code to start using Jujutsu:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;markdown&quot; style=&quot;background-color:#eff1f5;color:#4f5b66;&quot; class=&quot;language-markdown &quot;&gt;&lt;code class=&quot;language-markdown&quot; data-lang=&quot;markdown&quot;&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;## Version Control
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;font-weight:bold;color:#d08770;&quot;&gt;**CRITICAL: This repository uses Jujutsu (jj), not git.**&lt;&#x2F;span&gt;&lt;span&gt; Always use &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`jj`&lt;&#x2F;span&gt;&lt;span&gt; commands for version control operations.
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- Use &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`jj st --no-pager`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; to check status (like &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`git status`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- Use &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`jj log --no-pager`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; to view history (like &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`git log`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- Use &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`jj commit -m &amp;quot;message&amp;quot;`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; to create commits (like &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`git commit`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- Use &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`jj split -m &amp;quot;message&amp;quot; file1 file2`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; to commit specific files only
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- Use &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`jj bookmark set main -r @- &amp;amp;&amp;amp; jj git push`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; to push to remote repository
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- ALWAYS check for any sensitive information that shouldn&amp;#39;t be committed
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;CLAUDE.md&lt;&#x2F;a&gt; file contains instructions that Claude Code reads for each project.&lt;&#x2F;p&gt;
&lt;p&gt;Before I came up with this configuration I tried quite a number of different instructions. I suspect this one works because of the combination of:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The &#x27;CRITICAL&#x27; keyword&lt;&#x2F;strong&gt;: Signals high priority to Claude Code&#x27;s instruction processing&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Explicit repository type declaration&lt;&#x2F;strong&gt;: Removes ambiguity about which version control system to use&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Specific&lt;&#x2F;strong&gt; &lt;code&gt;jj&lt;&#x2F;code&gt; &lt;strong&gt;command mapping&lt;&#x2F;strong&gt;: Provides concrete alternatives to built-in Git commands&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;You can expand the command list to match your workflow, but these core commands worked for me and should get you started.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-claude-code-uses-git&quot;&gt;Why Claude Code uses Git&lt;&#x2F;h2&gt;
&lt;p&gt;Claude Code has Git instructions hardcoded into its system promp, the internal directions that override user preferences. Here is &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;lhohan&#x2F;references&#x2F;blob&#x2F;c5501c775496b2e8500eb307a632a0abae48e2f1&#x2F;claude&#x2F;default-system-prompt-1.0.85.md&quot;&gt;part of the Git configuration in the system prompt&lt;&#x2F;a&gt; from Claude Code 1.0.85:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;markdown&quot; style=&quot;background-color:#eff1f5;color:#4f5b66;&quot; class=&quot;language-markdown &quot;&gt;&lt;code class=&quot;language-markdown&quot; data-lang=&quot;markdown&quot;&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;# Committing changes with git
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;When the user asks you to create a new git commit, follow these steps carefully:
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;1. You have the capability to call multiple tools in a single response. When multiple independent pieces of information are requested, batch your tool calls together for optimal performance. ALWAYS run the following bash commands in parallel, each using the Bash tool:
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;   - Run a git status command to see all untracked files.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;   - Run a git diff command to see both staged and unstaged changes that will be committed.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;   - Run a git log command to see recent commit messages, so that you can follow this repository&amp;#39;s commit message style.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;2. Analyze all staged changes (both previously staged and newly added) and draft a commit message:
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;   - Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.). Ensure the message accurately reflects the changes and their purpose (i.e. &amp;quot;add&amp;quot; means a wholly new feature, &amp;quot;update&amp;quot; means an enhancement to an existing feature, &amp;quot;fix&amp;quot; means a bug fix, etc.).
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;   - Check for any sensitive information that shouldn&amp;#39;t be committed
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;   - Draft a concise (1-2 sentences) commit message that focuses on the &amp;quot;why&amp;quot; rather than the &amp;quot;what&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As you can see, Claude Code&#x27;s system prompt contains hardcoded Git configuration to commit changes. Since system instructions override user prompts when you mention committing or version control, it defaults to Git commands even in Jujutsu repositories. Or at least this i how I interpret Claude Code&#x27;s behaviour.&lt;&#x2F;p&gt;
&lt;p&gt;If the &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;CLAUDE.md&lt;&#x2F;a&gt; approach above doesn&#x27;t work consistently, here are more advanced alternatives:&lt;&#x2F;p&gt;
&lt;h2 id=&quot;advanced-solution-custom-output-style&quot;&gt;Advanced Solution: Custom Output Style&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;docs.anthropic.com&#x2F;en&#x2F;docs&#x2F;claude-code&#x2F;output-styles&quot;&gt;Output styles&lt;&#x2F;a&gt; let you override Claude Code&#x27;s system prompt entirely, giving you complete control over its behaviour. &lt;a href=&quot;&#x2F;p&#x2F;claude-code-output-styles&#x2F;&quot;&gt;Here is my own summary&lt;&#x2F;a&gt; of Claude Code output styles if you want to know more about this feature.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;&#x2F;p&#x2F;claude-code-output-styles&#x2F;&quot;&gt;&lt;strong&gt;Setup step&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt;&lt;strong&gt;s:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Start &lt;code&gt;claude&lt;&#x2F;code&gt; and run &lt;code&gt;&#x2F;output-style:new&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Name your style (e.g., &lt;code&gt;jj-support&lt;&#x2F;code&gt;) and complete the wizard&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;The initial content you enter doesn&#x27;t matter since we&#x27;ll replace it entirely in the next step&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;
&lt;p&gt;Find the created &lt;code&gt;.md&lt;&#x2F;code&gt; file in &lt;code&gt;.claude&#x2F;output-styles&#x2F;&lt;&#x2F;code&gt; (project or home) directory&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Replace its contents with a modified system prompt that includes Jujutsu support&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;You can use &lt;a href=&quot;https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;lhohan&#x2F;references&#x2F;refs&#x2F;heads&#x2F;main&#x2F;claude-config-example&#x2F;.claude&#x2F;output-styles&#x2F;jj-support.md&quot;&gt;my pre-built version&lt;&#x2F;a&gt; based on Claude Code 1.0.85&#x27;s system prompt. &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;lhohan&#x2F;references&#x2F;blob&#x2F;87e6cf7bbabf3e07bd6a99aa367d1695d40ceb6f&#x2F;claude-config-example&#x2F;.claude&#x2F;output-styles&#x2F;jj-support.md&quot;&gt;These are the directives I added to add &#x27;jj&#x27; support&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The critical addition is automatic repository type detection:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;markdown&quot; style=&quot;background-color:#eff1f5;color:#4f5b66;&quot; class=&quot;language-markdown &quot;&gt;&lt;code class=&quot;language-markdown&quot; data-lang=&quot;markdown&quot;&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;### MANDATORY FIRST STEP FOR ALL COMMITS
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;Before ANY commit-related commands, you MUST:
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;1. Run &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;`bash: if jj root &amp;gt;&#x2F;dev&#x2F;null 2&amp;gt;&amp;amp;1; then echo &amp;quot;jj&amp;quot;; elif git rev-parse --git-dir &amp;gt;&#x2F;dev&#x2F;null 2&amp;gt;&amp;amp;1; then echo &amp;quot;git&amp;quot;; else echo &amp;quot;none&amp;quot;; fi`
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;2. If output is &amp;quot;jj&amp;quot; → use jj commands
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;3. If output is &amp;quot;git&amp;quot; → use git commands
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;4. If output is &amp;quot;none&amp;quot; → not a repository, inform user
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;
&lt;&#x2F;span&gt;&lt;span&gt;NEVER use git commands if .jj directory exists, regardless of environment info.
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;NOTE: Environment &amp;quot;git repo&amp;quot; status may be misleading when both .jj and .git exist. Always use directory detection as the authoritative source.
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;(Turns out you can add logic inside a system prompt.)&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Trade-offs&lt;&#x2F;strong&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;✅ Most reliable solution&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;✅ Works even when &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;CLAUDE.md&lt;&#x2F;a&gt; is ignored or &#x27;forgotten&#x27;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;❌ Requires maintenance when Claude Code updates, that is if you want to keep in sync with the latest default system prompt&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;❌ Claude Code will request permission to run the detection command&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Select your custom output style with &lt;code&gt;&#x2F;output-style&lt;&#x2F;code&gt; and test by asking Claude to &quot;commit the changes&quot;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;experimental-solution-command-line-flag&quot;&gt;Experimental Solution: Command-Line Flag&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;--append-system-prompt&lt;&#x2F;code&gt; flag adds system instructions directly after Claude Code&#x27;s system prompt at startup.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#eff1f5;color:#4f5b66;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;claude-code --append-system-prompt &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;In jj repositories, use jj commands instead of git commands.&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;&#x2F;strong&gt;: Simple instructions like the example above don&#x27;t work. You&#x27;d need to pass the same comprehensive instructions used in the output style approach. I did not try this myself yet as for now I am done &lt;a href=&quot;https:&#x2F;&#x2F;www.hanselman.com&#x2F;blog&#x2F;yak-shaving-defined-ill-get-that-done-as-soon-as-i-shave-this-yak&quot;&gt;shaving this yak&lt;&#x2F;a&gt; for now. I am sure you can pass the inputs from a file to the prompt making it more manageable as well.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Trade-offs&lt;&#x2F;strong&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;✅ No file modifications needed&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;✅ Easy to test different configurations&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;✅ Works at system level like hardcoded instructions&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;❌ Must be added each time you start Claude Code (needs helper command)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;choosing-the-right-approach&quot;&gt;Choosing the Right Approach&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;Start with&lt;&#x2F;strong&gt; &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;&lt;strong&gt;CLAUDE.md&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;strong&gt;configuration&lt;&#x2F;strong&gt;. It&#x27;s simple, requires no system modifications, and should work for most users.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Upgrade to custom output style&lt;&#x2F;strong&gt; if:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Claude Code frequently ignores your &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;CLAUDE.md&lt;&#x2F;a&gt; instructions&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;You work with multiple Jujutsu repositories&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;You want the most reliable solution&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;You are willing to update the output style to the latest system prompts when it changes (significantly), or accept running with an outdated configuration version.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Consider the command-line flag&lt;&#x2F;strong&gt; for:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When you want to stay up to date with the latest system context versions without having to update the output style each time.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Testing different configurations quickly&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;important-considerations&quot;&gt;Important Considerations&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;missing-git-features&quot;&gt;Missing Git Features&lt;&#x2F;h3&gt;
&lt;p&gt;When you override Claude Code&#x27;s Git behaviour, you lose may some built-in safety features:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Automatic sensitive information checking&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Commit message formatting guidelines&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Built-in branching workflow guidance&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Consider adding these to your &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;CLAUDE.md&lt;&#x2F;a&gt; configuration if they&#x27;re important to your workflow.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;bonus-no-more-claude-branding-in-commit-messages&quot;&gt;Bonus: No More Claude Branding in commit messages&lt;&#x2F;h3&gt;
&lt;p&gt;A pleasant side effect is that Claude Code stops adding its promotional footer to commit messages:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;markdown&quot; style=&quot;background-color:#eff1f5;color:#4f5b66;&quot; class=&quot;language-markdown &quot;&gt;&lt;code class=&quot;language-markdown&quot; data-lang=&quot;markdown&quot;&gt;&lt;span&gt;🤖 Generated with &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;[Claude Code](https:&#x2F;&#x2F;claude.ai&#x2F;code)
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;Co-Authored-By: Claude &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;&amp;lt;noreply@anthropic.com&amp;gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;&#x2F;h2&gt;
&lt;p&gt;To integrate Jujutsu workflows in Claude Code, but these three solutions exist:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;&lt;strong&gt;CLAUDE.md&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;strong&gt;configuration&lt;&#x2F;strong&gt;: Simple and effective for most users&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Custom output styles&lt;&#x2F;strong&gt;: Most reliable but requires maintenance&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Command-line flags&lt;&#x2F;strong&gt;: Less maintenance and best for testing&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Start with the &lt;a href=&quot;http:&#x2F;&#x2F;CLAUDE.md&quot;&gt;CLAUDE.md&lt;&#x2F;a&gt; approach. If Claude Code continues defaulting to Git commands despite your configuration, escalate to a custom output style for complete system-level control.&lt;&#x2F;p&gt;
&lt;p&gt;Thank you for reading, Hans&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
