Skip to content

fix: install claude-usage-report via relative-path source + conventional skills layout#7

Draft
goneflyin wants to merge 3 commits into
mainfrom
fix/marketplace-source-format
Draft

fix: install claude-usage-report via relative-path source + conventional skills layout#7
goneflyin wants to merge 3 commits into
mainfrom
fix/marketplace-source-format

Conversation

@goneflyin

@goneflyin goneflyin commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the claude-usage-report plugin so it installs from the 7factor marketplace.

Background

The plugin failed to install with "This plugin uses a source type your Claude Code version does not support" — even on the latest Claude Code (2.1.212). That message is a misleading catch-all: the plugin resolver emits it whenever it hits its default: throw and can't process an entry, not only when a source type is genuinely too new.

Two things were feeding that throw:

  1. the git-subdir object source (an earlier attempt at this fix), and
  2. skills: ["."], which trips the "Path escapes plugin directory" loader bug — the same issue nicobailon/visual-explainer hit.

skills: ["."] only existed because SKILL.md sat at the plugin root, so the default skills/ scan found nothing.

Fix

Match the conventional plugin layout so there's nothing for the resolver to choke on:

  • Move the skill (SKILL.md, usage_report.py, update_pricing.py, prices.json) into skills/claude-usage-report/skills/claude-usage-report/ so the default skills/ scan finds it, and drop the skills field entirely.
  • Set the source to the plain relative path "./skills/claude-usage-report" — the original, universally-supported form; it resolves against the cloned marketplace repo (no git-subdir dependency).

record_account.sh/.py, hooks/hooks.json, and .claude-plugin/plugin.json stay at the plugin root, so ${CLAUDE_PLUGIN_ROOT}/record_account.sh and the existing settings.json hook path keep working.

Testing

After merge (or from this branch): /plugin marketplace update 7factor (or remove + re-add), then /plugin install claude-usage-report@7factor. The local marketplace copy is a cache, so a stale copy must be refreshed.

🤖 Generated with Claude Code

A plugin entry that combined a bare relative-string source
("./skills/claude-usage-report") with a skills array ([".") tripped
Claude Code's plugin resolver into its default: throw, surfaced as a
misleading "update Claude Code" error. Switch to the git-subdir object
form used by other skill-bearing marketplaces.

After merge, re-pull with `/plugin marketplace update 7factor` (the
local marketplaces copy is a cache).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
goneflyin added a commit that referenced this pull request Jul 17, 2026
The git-subdir source fix is being handled in its own PR (#7) so it can
merge without waiting on this AGENTS.md review. This branch now carries
only the AGENTS.md/CLAUDE.md docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@goneflyin
goneflyin force-pushed the fix/marketplace-source-format branch from 127f4bb to 930d07d Compare July 17, 2026 01:28
@goneflyin
goneflyin marked this pull request as draft July 17, 2026 01:54
@goneflyin

Copy link
Copy Markdown
Contributor Author

Found out how to test this directly in claude code, and the change didn't fix the issue sufficiently -- still working...

…yout

The git-subdir source from the prior attempt made the plugin resolver
throw its generic "source type your Claude Code version does not support"
error, even on the latest Claude Code (2.1.212). That message is a
misleading catch-all the resolver emits when it can't process an entry.

Two coupled problems were feeding the throw:
1. the `git-subdir` object source, and
2. `skills: ["."]`, which trips the "Path escapes plugin directory"
   loader bug (same issue nicobailon/visual-explainer hit).

`skills: ["."]` existed because SKILL.md sat at the plugin root, so the
default `skills/` scan found nothing. Fix both by matching the
conventional layout:

- move the skill (SKILL.md + usage_report.py + update_pricing.py +
  prices.json) into skills/claude-usage-report/skills/claude-usage-report/
  so the default scan finds it; drop the `skills` field entirely.
- set the plugin source to the plain relative path
  "./skills/claude-usage-report" (the original, universally-supported
  form; resolves against the cloned marketplace repo).

record_account.sh/.py, hooks/hooks.json, and .claude-plugin/plugin.json
stay at the plugin root, so ${CLAUDE_PLUGIN_ROOT}/record_account.sh and
the existing settings.json hook path keep working.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@goneflyin goneflyin changed the title fix: use git-subdir source for claude-usage-report plugin fix: install claude-usage-report via relative-path source + conventional skills layout Jul 17, 2026

@dumptruckman dumptruckman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about why you nested the skill files again? Was that intentional?

The skills/ subdirectory scan approach doubled the plugin-name path
segment (skills/claude-usage-report/skills/claude-usage-report/). The
plugin resolver also supports a single SKILL.md directly at plugin
root with no skills field declared at all, matching how other
single-skill plugins (e.g. nicobailon/visual-explainer) are laid out
in practice.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@goneflyin

Copy link
Copy Markdown
Contributor Author

I'm confused about why you nested the skill files again? Was that intentional?

Nope. I took the AGENTS.md out and had run a fix for the way it structured the marketplace.json. I didn't see the goofy reorg of the files, and in the PR my eyes just slid over them. Doing too many things at once last week.

Just the file change now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants