<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Skills on KnightLi Blog</title>
        <link>https://www.knightli.com/en/tags/skills/</link>
        <description>Recent content in Skills on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Wed, 29 Apr 2026 11:18:00 +0800</lastBuildDate><atom:link href="https://www.knightli.com/en/tags/skills/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Why Does a Codex Skill Exist in the Directory but Still Not Show Up?</title>
        <link>https://www.knightli.com/en/2026/04/29/codex-skill-not-loaded-because-of-utf-8-bom/</link>
        <pubDate>Wed, 29 Apr 2026 11:18:00 +0800</pubDate>
        
        <guid>https://www.knightli.com/en/2026/04/29/codex-skill-not-loaded-because-of-utf-8-bom/</guid>
        <description>&lt;p&gt;This problem was easy to miss: several skills were already placed under &lt;code&gt;~/.codex/skills&lt;/code&gt;, but after opening a new Codex thread, the sidebar still showed only a small subset of them.&lt;/p&gt;
&lt;p&gt;At first, it looked like a cache or indexing issue. The real cause was more specific: several &lt;code&gt;SKILL.md&lt;/code&gt; files started with a UTF-8 BOM. Codex 0.111.0&amp;rsquo;s skill loader did not skip that byte sequence, so it misjudged the files as having no valid YAML front matter.&lt;/p&gt;
&lt;h2 id=&#34;symptom&#34;&gt;Symptom
&lt;/h2&gt;&lt;p&gt;The local directory contained these skills:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;~/.codex/skills/git-commit-push/SKILL.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;~/.codex/skills/hugo-rsync-deploy/SKILL.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;~/.codex/skills/bilibili-speech-transcriber/SKILL.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;~/.codex/skills/product-cutout-normalize/SKILL.md
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;But after opening a new thread, the actually exposed skills were only:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bilibili-speech-transcriber
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;product-cutout-normalize
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In other words, a file existing on disk does not mean the current session can load it successfully. Codex parses the front matter of each &lt;code&gt;SKILL.md&lt;/code&gt; first. If parsing fails, that skill is excluded directly.&lt;/p&gt;
&lt;h2 id=&#34;investigation&#34;&gt;Investigation
&lt;/h2&gt;&lt;p&gt;Starting a fresh session with &lt;code&gt;codex exec&lt;/code&gt; showed a more direct error. In VS Code or other IDEs, these logs may not be visible:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;failed to load skill C:\Users\knightli\.codex\skills\git-commit-push\SKILL.md: missing YAML frontmatter delimited by ---
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;failed to load skill C:\Users\knightli\.codex\skills\hugo-rsync-deploy\SKILL.md: missing YAML frontmatter delimited by ---
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Visually, these files seemed to have a normal header:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;name: post-rewrite
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;description: ...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The real problem was at the byte level.&lt;/p&gt;
&lt;p&gt;The beginning of a failing file was:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;EF-BB-BF-2D-2D-2D
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The beginning of a file that loaded correctly was:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;2D-2D-2D
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;code&gt;2D-2D-2D&lt;/code&gt; is &lt;code&gt;---&lt;/code&gt;. The preceding &lt;code&gt;EF-BB-BF&lt;/code&gt; is the UTF-8 BOM.&lt;/p&gt;
&lt;h2 id=&#34;cause&#34;&gt;Cause
&lt;/h2&gt;&lt;p&gt;In Codex 0.111.0, the skill loader expects the first byte of &lt;code&gt;SKILL.md&lt;/code&gt; to be the first &lt;code&gt;-&lt;/code&gt; in &lt;code&gt;---&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the file starts with a UTF-8 BOM, the actual beginning becomes:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;BOM + ---
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;So the loader thinks the file does not start with the front matter delimiter and reports:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;missing YAML frontmatter delimited by ---
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The skill content was not wrong, and the directory was not wrong either. A small encoding detail prevented the parser from recognizing the file.&lt;/p&gt;
&lt;h2 id=&#34;fix&#34;&gt;Fix
&lt;/h2&gt;&lt;p&gt;Convert the affected &lt;code&gt;SKILL.md&lt;/code&gt; files to UTF-8 without BOM.&lt;/p&gt;
&lt;p&gt;In PowerShell, this can be done like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$paths&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;vm&#34;&gt;@&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s1&#34;&gt;&amp;#39;C:\Users\knightli\.codex\skills\git-commit-push\SKILL.md&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s1&#34;&gt;&amp;#39;C:\Users\knightli\.codex\skills\hugo-rsync-deploy\SKILL.md&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$utf8NoBom&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;New-Object&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;Text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;UTF8Encoding&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;vm&#34;&gt;$false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;foreach&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$p&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$paths&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;$text&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;IO.File&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ReadAllText&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;Text.Encoding&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;UTF8&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;IO.File&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteAllText&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$utf8NoBom&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After processing, the file header should change from:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;EF-BB-BF-2D-2D-2D
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;to:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;2D-2D-2D
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;verification&#34;&gt;Verification
&lt;/h2&gt;&lt;p&gt;After restarting a Codex session, the visible skills were restored to:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git-commit-push-zh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;hugo-rsync-deploy
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bilibili-speech-transcriber
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;product-cutout-normalize
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If the sidebar still shows the old list, close the current Codex sidebar or window and reopen the project. The skill list is usually loaded when the session starts, so changes made in the middle of a session may not refresh immediately.&lt;/p&gt;
&lt;h2 id=&#34;one-last-line&#34;&gt;One Last Line
&lt;/h2&gt;&lt;p&gt;This kind of issue is easy to mistake for &amp;ldquo;Codex did not re-index&amp;rdquo; or &amp;ldquo;the skill was not installed correctly.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;When troubleshooting, check these three things first:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;whether &lt;code&gt;SKILL.md&lt;/code&gt; is really in the correct directory&lt;/li&gt;
&lt;li&gt;whether the file has valid &lt;code&gt;---&lt;/code&gt; front matter at the top&lt;/li&gt;
&lt;li&gt;whether the file is UTF-8 without BOM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key in this case was the third point: the file looked fine, but its first byte was not &lt;code&gt;-&lt;/code&gt;, so Codex did not treat it as a valid skill.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>What Is the Difference Between ~/.codex/skills and Project .codex/skills in Codex</title>
        <link>https://www.knightli.com/en/2026/04/29/difference-between-global-and-project-codex-skills/</link>
        <pubDate>Wed, 29 Apr 2026 11:08:00 +0800</pubDate>
        
        <guid>https://www.knightli.com/en/2026/04/29/difference-between-global-and-project-codex-skills/</guid>
        <description>&lt;p&gt;When organizing Codex skills, people most often get stuck on two questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is the difference between &lt;code&gt;~/.codex/skills&lt;/code&gt; and &lt;code&gt;project/.codex/skills&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Why does a skill exist in the directory but not appear in the current session?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is the short version.&lt;/p&gt;
&lt;h2 id=&#34;the-difference&#34;&gt;The Difference
&lt;/h2&gt;&lt;p&gt;The simplest way to remember it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;~/.codex/skills&lt;/code&gt; is your global skill library&lt;/li&gt;
&lt;li&gt;&lt;code&gt;project/.codex/skills&lt;/code&gt; is the local skill library for that repository&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;codexskills&#34;&gt;&lt;code&gt;~/.codex/skills&lt;/code&gt;
&lt;/h3&gt;&lt;p&gt;Use it for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;skills you personally reuse across projects&lt;/li&gt;
&lt;li&gt;general workflows that are not tied to a specific repository&lt;/li&gt;
&lt;li&gt;workflows that clearly belong to your own habits&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;post-rewrite&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;post-translate&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git-commit-push&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hugo-rsync-deploy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bilibili-speech-transcriber&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key trait of this kind of skill is: &lt;strong&gt;it still makes sense outside the current project.&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&#34;projectcodexskills&#34;&gt;&lt;code&gt;project/.codex/skills&lt;/code&gt;
&lt;/h3&gt;&lt;p&gt;Use it for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;workflows that only apply to this repository&lt;/li&gt;
&lt;li&gt;rules tightly coupled to the current project structure, scripts, or templates&lt;/li&gt;
&lt;li&gt;skills that should be shared by the team&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a publishing workflow specific to this repository&lt;/li&gt;
&lt;li&gt;a generation template that only works in this project&lt;/li&gt;
&lt;li&gt;automation steps tightly bound to private project scripts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key trait of this kind of skill is: &lt;strong&gt;it stops being meaningful once it leaves this repository.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;when-to-use-global-and-when-to-use-project-skills&#34;&gt;When to Use Global and When to Use Project Skills
&lt;/h2&gt;&lt;p&gt;This rule of thumb is enough:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If it is about your personal habits, put it in &lt;code&gt;~/.codex/skills&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If it is about repository rules, put it in &lt;code&gt;project/.codex/skills&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If it can be reused across projects, prefer global&lt;/li&gt;
&lt;li&gt;If it should be shared by multiple people and evolve with the repository, prefer project-level&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;the-current-repository&#34;&gt;The Current Repository
&lt;/h2&gt;&lt;p&gt;Based on the current state:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;your machine has &lt;code&gt;~/.codex/skills&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;this repository does not have &lt;code&gt;.codex/skills&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So right now, you mainly rely on global skills.&lt;/p&gt;
&lt;p&gt;That means workflows such as &lt;code&gt;post-rewrite&lt;/code&gt;, &lt;code&gt;post-translate&lt;/code&gt;, and &lt;code&gt;git-commit-push&lt;/code&gt; are currently more like part of your personal workflow, not something explicitly bundled with this repository.&lt;/p&gt;
&lt;h2 id=&#34;why-a-skill-exists-on-disk-but-may-not-appear-in-the-current-session&#34;&gt;Why a Skill Exists on Disk but May Not Appear in the Current Session
&lt;/h2&gt;&lt;p&gt;There are two different things here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Existing on disk&lt;/strong&gt;: the skill file exists in a local directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exposed to the session&lt;/strong&gt;: the current session registered it into the available skill list&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are not the same thing.&lt;/p&gt;
&lt;p&gt;So this can happen:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a skill already exists under &lt;code&gt;~/.codex/skills&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;but it does not appear in the list after &lt;code&gt;/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This usually does not mean the skill is broken. More often, it means: &lt;strong&gt;the current session has not re-indexed it.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;how-to-make-a-skill-available-in-the-current-session&#34;&gt;How to Make a Skill Available in the Current Session
&lt;/h2&gt;&lt;p&gt;The practical checklist is short.&lt;/p&gt;
&lt;h3 id=&#34;1-put-it-in-the-right-directory&#34;&gt;1. Put It in the Right Directory
&lt;/h3&gt;&lt;p&gt;Global:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;~/.codex/skills/&amp;lt;skill-name&amp;gt;/SKILL.md
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Project-level:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;project/.codex/skills/&amp;lt;skill-name&amp;gt;/SKILL.md
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;2-make-the-skillmd-header-recognizable&#34;&gt;2. Make the &lt;code&gt;SKILL.md&lt;/code&gt; Header Recognizable
&lt;/h3&gt;&lt;p&gt;At minimum, it needs:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;name: your-skill-name
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;description: What this skill does
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;3-open-a-new-session-after-creating-or-editing-it&#34;&gt;3. Open a New Session After Creating or Editing It
&lt;/h3&gt;&lt;p&gt;In many cases, a skill does not appear because the current session already fixed its available skill list when it started.&lt;/p&gt;
&lt;p&gt;So if you create a skill in the middle of a session, it may already exist on disk, but this session may not recognize it.&lt;/p&gt;
&lt;p&gt;The most reliable workflow is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Put the skill in place&lt;/li&gt;
&lt;li&gt;End the current session&lt;/li&gt;
&lt;li&gt;Re-enter the project&lt;/li&gt;
&lt;li&gt;Open a new session&lt;/li&gt;
&lt;li&gt;Check whether it appears under &lt;code&gt;/&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;4-put-project-skills-in-place-before-starting&#34;&gt;4. Put Project Skills in Place Before Starting
&lt;/h3&gt;&lt;p&gt;If you want &lt;code&gt;project/.codex/skills&lt;/code&gt; to be recognized more reliably, put those skills into the project before entering the repository and starting the session.&lt;/p&gt;
&lt;h2 id=&#34;one-last-line&#34;&gt;One Last Line
&lt;/h2&gt;&lt;p&gt;The shortest conclusion is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;~/.codex/skills&lt;/code&gt; is your personal skill library&lt;/li&gt;
&lt;li&gt;&lt;code&gt;project/.codex/skills&lt;/code&gt; is the repository&amp;rsquo;s local rule library&lt;/li&gt;
&lt;li&gt;a skill existing in the directory does not mean the current session will always show it&lt;/li&gt;
&lt;li&gt;the most common fix is to put it in the right directory, write a valid &lt;code&gt;SKILL.md&lt;/code&gt;, and then start a new session&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
