Skills-dir details omits the root skill plugin init writes

John Burns

Two inventories of one plugin directory disagreed about a file that was sitting at the plugin root. claude plugin details on the skills-directory id printed Skills (0) and an always-on estimate of about 0 tokens. The same directory, passed to claude --plugin-dir, printed Skills (1) and an always-on estimate of about 55 tokens. Both commands exited 0. The skill name in the second report was the name in the root SKILL.md frontmatter. The first report did not name it.

That split is the check before a job treats the auto-load id as proof the scaffold is empty, or treats the session-only flag as proof the auto-load path will carry the same cost. plugin init says the new plugin loads as <name>@skills-dir. The measure page says plugin details is how you see what that plugin adds to every session. On this binary those two sentences do not describe one inventory.

The binary and the homes

The binary was Claude Code 2.1.308, commit 320f66eb8f83, on Linux x86_64, on 27 November 2026. claude --version printed 2.1.308 (Claude Code). claude doctor, pointed at a new config directory, printed npm-global (2.1.308) and the same commit. The executable was 292232560 bytes. Its SHA-256 was 356733f185fa988e6bf3aa9a555269fdd167982a2e2a80d3c8a78037bb92ad58. This run did not take an update. The changelog page fetched the same night opened at 2.1.332, dated 25 November 2026. That heading is not this binary.

Each skills-directory case used a new CLAUDE_CONFIG_DIR. The account Claude directory was not the directory under test. Its modification time did not change. No claude auth login was run. No API key was set for these commands. No prompt was sent, and no interactive session was started. plugin details and plugin list do not need a model turn. A zero in this note is the inventory those commands printed. It is not a transcript of a slash menu inside a session.

plugin init wrote under the config directory’s skills/ folder, which is the path the help names as ~/.claude/skills/<name>/ when that variable is unset. The success line said the plugin would auto-load as <name>@skills-dir. plugin list --json then showed that id, scope user, enabled true, and version 0.1.0. The install path in that JSON was the directory just written. It is not printed here.

What the scaffold puts at the root

claude plugin init <name> --description probe exited 0. It warned that no author was set. The tree it wrote had .claude-plugin/plugin.json and a SKILL.md beside that directory. It did not have a skills/ subdirectory. The manifest set version to 0.1.0 and skills to an array whose only entry was ./. The root SKILL.md had YAML frontmatter. Its name was the plugin name. Its description was the scaffold’s TODO text, the paragraph that tells you to say when Claude should use the skill and to include trigger phrases. The body under the heading was another TODO line.

The skills-directory details for that unmodified tree exited 0 and printed this shape, with the disposable name removed:

Skills (0)
Always-on:   ~0 tok   added to every session

There was no per-component table. Standard error was empty.

claude --plugin-dir <that-directory> plugin details <name> also exited 0. The source line was <name>@inline instead of <name>@skills-dir. The inventory was:

Skills (1)  <name>
Always-on:   ~59 tok   added to every session

The per-component row for <name> showed about 60 tokens always-on and about 20 on invoke. The footer said token counts are estimates and may differ from actual usage. The same footer is in the measure page. The disagreement here is not a one-token rounding gap. One report has a row. The other has no row and a zero.

The measure page says the always-on figure counts each component’s name plus its description and when_to_use frontmatter, and that this is the number every enabled session carries whether or not the skill runs. The root file had a name and a long description. The skills-directory report’s zero means that text was not in the inventory that command built. It does not mean the description field was blank.

claude plugin validate on the same tree exited 0 and printed Validation passed with warnings. The warning was the missing author. The human report also listed a missing README, a missing license, and a missing icon, then said those directory checks do not change the result unless the command is run with --profile directory. It did not mention the skill count. The JSON form’s contents array was empty. A later plugin whose only skill lived at skills/hello/SKILL.md, and whose --plugin-dir details counted hello, also had an empty contents array. That array is not the inventory plugin details prints. A pass from validate does not tell you which load path will name the root file.

A nested skill is counted on both paths

claude plugin init <name> --description "probe with skills" --with skills still wrote the root SKILL.md and still set skills to ["./"]. It also wrote skills/example/SKILL.md. The example file used the same TODO description. Its frontmatter name was example.

Skills-directory details for that plugin exited 0 and printed:

Skills (1)  example
Always-on:   ~55 tok   added to every session

The only per-component row was example, about 60 tokens always-on and under 20 on invoke. The root name was not in the list.

--plugin-dir on that same directory exited 0 and printed:

Skills (2)  example, <name>
Always-on:   ~113 tok   added to every session

example was still about 60 and under 20. The root name was a second row, about 60 always-on and about 20 on invoke. The always-on totals differ by about 58 tokens. The unmodified init tree, whose only skill file was the root SKILL.md, had produced about 59 tokens on the --plugin-dir path and about 0 on the skills-directory path. The gap in the two-skill plugin is the size of that root row, not a change in how example was priced.

So --with skills does add a skill the auto-load inventory can see. The file it adds is skills/example/SKILL.md. The root SKILL.md, which init writes even when you do not pass --with, stays out of the skills-directory count. Editing the root file and then reading plugin details <name> will not show the edit. The command is looking at a different file, or at no file, for that id.

A separate plugin, built in the layout the create page shows rather than the layout init writes, put one skill at skills/hello/SKILL.md and did not set a skills key. Its description was the short line Greet the user with a friendly message. --plugin-dir details counted hello at about 14 tokens always-on, with both columns under 20. That run was not repeated as a skills-directory plugin. It is only a check that a short description produces a small estimate on the inline path, so the 55 to 60 token rows above are the long TODO text plus the name, not a fixed fee the command adds to every skill.

The skills key is not the switch

The manifest reference says a skills entry is a directory of <name>/SKILL.md folders, or one folder holding SKILL.md directly. It says "." names the plugin root, and that the key adds to the default skills/ scan. The standard-layout table says a plugin with SKILL.md at its root, no skills/ directory, and no skills key loads as a single skill. The init scaffold does not match that no-key sentence. It writes the key, and the value is ./, not ..

Two copies were made so those sentences could be tested without changing the init tree.

One copy deleted the skills key and left the root SKILL.md. The manifest name and the frontmatter name were both set to probe-nokey. It was placed under a new config directory’s skills/ folder, which is the auto-load location. claude plugin details probe-nokey exited 0. Source was probe-nokey@skills-dir. Skills were 0. Always-on was about 0 tokens. There was no per-component table.

claude --plugin-dir <probe-nokey> plugin details probe-nokey

That command exited 0. Source was probe-nokey@inline. Skills were 1, and the name was probe-nokey. Always-on was about 55 tokens. The row was about 60 always-on and about 20 on invoke. Removing the key, which is what the layout table describes for a root skill, did not make the skills-directory inventory name the file. The inline inventory still did.

A second copy kept a skills array and changed the only entry from ./ to ., the spelling the reference uses for the plugin root. The name was probe-dot. Skills-directory details again printed Skills (0) and about 0 tokens. --plugin-dir printed Skills (1), the name probe-dot, and about 54 tokens always-on, with the row at about 50 and about 20. The dot spelling is not the switch either. Both spellings count on the inline path. Neither spelling counts on the skills-directory path, on this binary, for a root SKILL.md.

The small movement from about 59 tokens, to about 55, to about 54, followed the frontmatter name. The long disposable name produced the 59. probe-nokey produced 55. probe-dot produced 54. That is consistent with the measure page’s rule that the name is part of the always-on text. It is not a second bug. It is why the article quotes the estimate next to the name that was actually in the file.

A file path drops the skill on both paths

Pointing the skills key at the file, ./SKILL.md, is the edit a reader might make after seeing SKILL.md at the root and deciding the array should name that file. claude plugin validate exited 1. The error was:

skills[0]: Path is a file; skills entries must be directories containing SKILL.md — point to the plugin root '.' instead: ./SKILL.md

--plugin-dir details on that tree exited 0 and printed Skills (0) and about 0 tokens. The inline path, which had counted the root file when the key was ./, ., or absent, did not count it once the key named the file. The validator’s advice to use . is the right fix for this error. It is not a fix for the skills-directory omission. The probe-dot copy already used ., and skills-directory details still printed zero.

An untrusted project copy is a different failure

The loading page says a plugin directory under the project’s .claude/skills/ loads as <name>@skills-dir after the workspace trust check. A copy of the no-key root skill was placed at .claude/skills/probe-proj/ in a new directory. CLAUDE_CONFIG_DIR was a different empty home, so the user skills folder could not satisfy the lookup. The working directory was that project. claude plugin details probe-proj exited 1 and printed:

Plugin "probe-proj" not found. Run `claude plugin list` to see installed plugins, or pass --plugin-dir <path> to load one from disk.

plugin list --json exited 0 and included a row whose id was (suppressed)@skills-dir, whose enabled value was false, and whose note said:

1 project-scope directory under ./.claude/skills/ that may load as a plugin was skipped because this workspace was not trusted when plugins were scanned. After accepting the trust dialog, run /reload-plugins (or relaunch) to load what qualifies.

--plugin-dir on that project directory still counted probe-proj at about 54 tokens. The not-found result is not the zero-count result. A zero count means the plugin was found, the id was @skills-dir, and the root skill was absent from the inventory. A not-found, with that list note, means the project copy was not loaded. This run did not accept a trust dialog and did not relaunch a session, so it does not say what the project inventory would print after trust. It says you have to read the list note before you treat “not found” as a missing file.

What to verify before the count is trusted

Run details on the id init named, then run details with --plugin-dir on the directory plugin list --json recorded. Use a disposable CLAUDE_CONFIG_DIR. Do not point either command at the account home if the plugin under test is disposable.

claude plugin details <name>
claude --plugin-dir <plugin-dir> plugin details <name>

Require the skill names to match before either always-on figure is copied into a budget or a disable decision. On this binary, the skills-directory figure for an init scaffold with only a root SKILL.md was about 0 tokens and no names. The inline figure for the same directory was one name and about 59 tokens, or about 55 after the frontmatter name was shortened to probe-nokey. A job that disables the plugin because details said it adds nothing has not shown that the inline load adds nothing. A job that sizes a session from the --plugin-dir figure has not shown that the auto-load id carries that figure.

If the skill has to appear in the inventory of the id init will auto-load, put it at skills/<skill-name>/SKILL.md and require that name in the skills-directory report. example was present in both reports. The root file was present in one. The create page’s first plugin uses skills/hello/SKILL.md and does not set a skills key. That is the layout the nested count followed. The root SKILL.md init writes is a second file. Do not edit it and expect plugin details <name> to move.

Do not point skills at SKILL.md. Validate will exit 1, and the inline inventory will drop the skill the directory form had counted. Do not read validate --json field contents as the skill list. It was empty for a plugin whose inline details counted hello. Do not treat a missing README warning as a statement about skills. Those directory findings are outside the exit code unless --profile directory is set.

If details says the plugin is not found, run plugin list --json in the same working directory and the same CLAUDE_CONFIG_DIR. A suppressed project row, with the untrusted-workspace note, is a trust gate. It is not evidence that the root SKILL.md is absent from disk, and it is not the zero-count bug. --plugin-dir can still count the file while that note is present. That does not mean a later trusted session will. This run did not open one.

Repeat both details commands on the binary the job will run. This note is 2.1.308, commit 320f66eb8f83. A later build can start counting the root file on the skills-directory path, or stop counting it on the inline path. The changelog heading for 2.1.332 does not decide that. The two commands do.

The manifest reference’s load sentence, that a root SKILL.md with no skills/ directory and no skills key loads as a single skill, was not confirmed or denied inside a session. probe-nokey was that layout. Skills-directory details omitted it. Inline details counted it. Until a session on the same binary prints the slash name, the safe reading is the narrower one: the inventory command does not agree with itself across the two load paths init and --plugin-dir produce, and the file init writes at the root is the file the skills-directory report leaves out.

Sources

  • Claude Code 2.1.308, commit 320f66eb8f83, npm-global executable, 292232560 bytes, SHA-256 356733f185fa988e6bf3aa9a555269fdd167982a2e2a80d3c8a78037bb92ad58, Linux x86_64, 27 November 2026. claude plugin init, claude plugin details, claude --plugin-dir, claude plugin validate, and claude plugin list --json produced the exits and inventories above. Each skills-directory case used a new CLAUDE_CONFIG_DIR. No login, no API key, and no prompt were used.
  • Plugin commands reference, read 27 November 2026. plugin init scaffolds under ~/.claude/skills/<name>/ and loads it as <name>@skills-dir. plugin details prints the component inventory and the projected token cost for a plugin that is installed, found in a skills directory, or passed with --plugin-dir.
  • Measure plugin cost and usage, read 27 November 2026. The always-on figure is the names and descriptions added to every session where the plugin is enabled. The page says the counts are estimates.
  • Plugin manifest reference, read 27 November 2026. A skills path may be a directory of skill folders or a folder holding SKILL.md directly. "." names the plugin root. The layout table says a root SKILL.md with no skills/ directory and no skills key loads as a single skill.
  • Create a plugin, read 27 November 2026. The first-plugin walkthrough puts the skill at skills/hello/SKILL.md and does not set a skills key.
  • Plugin loading reference, read 27 November 2026. An id ending in @skills-dir is a plugin directory under ~/.claude/skills/ or the project’s .claude/skills/. A project copy loads after the workspace trust check.
  • Claude Code changelog, read 27 November 2026. The newest heading on that page was 2.1.332, dated 25 November 2026. This run stayed on 2.1.308.