Skip to content

docs: add ${CLAUDE_PLUGIN_ROOT} explanation to marketplace-structure skill#97

Merged
sjnims merged 1 commit intomainfrom
docs/95-add-claude-plugin-root-explanation
Dec 10, 2025
Merged

docs: add ${CLAUDE_PLUGIN_ROOT} explanation to marketplace-structure skill#97
sjnims merged 1 commit intomainfrom
docs/95-add-claude-plugin-root-explanation

Conversation

@sjnims
Copy link
Copy Markdown
Owner

@sjnims sjnims commented Dec 10, 2025

Summary

Add explanatory note for the ${CLAUDE_PLUGIN_ROOT} environment variable in the marketplace-structure skill's schema reference documentation.

Problem

Fixes #95

The ${CLAUDE_PLUGIN_ROOT} environment variable is used in the hooks and mcpServers examples within the Complete Plugin Entry Example, but wasn't explicitly explained. Users unfamiliar with plugin development may not understand what this variable represents.

Solution

Added a brief note directly before the Complete Plugin Entry Example that explains:

  • What ${CLAUDE_PLUGIN_ROOT} resolves to (plugin's absolute installation path)
  • When to use it (hooks and MCP server configurations)
  • Why it matters (portable paths regardless of installation location)

This approach was chosen over adding a new subsection because:

  1. It's contextual - explains the variable right where it's used
  2. Simpler and less intrusive to the document structure
  3. Provides just-in-time information for users reading the example

Alternatives Considered

  • New "### Environment Variables" subsection after Component Configuration Fields - More prominent but disrupts document flow and may be overkill for a single variable note
  • Inline code comment in the JSON example - Would require multiple comments and break JSON syntax highlighting

Changes

  • plugins/plugin-dev/skills/marketplace-structure/references/schema-reference.md: Added note before Complete Plugin Entry Example explaining ${CLAUDE_PLUGIN_ROOT}

Testing

  • markdownlint passes
  • No other files affected

🤖 Generated with Claude Code

…skill

Add explanatory note before the Complete Plugin Entry Example in
schema-reference.md to explain that ${CLAUDE_PLUGIN_ROOT} resolves to
the plugin's installation directory and should be used for portable paths.

Fixes #95

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Dec 10, 2025

Claude finished @sjnims's task in 1m 3s —— View job


PR Review Complete ✅

Reviewing PR #97: docs: add ${CLAUDE_PLUGIN_ROOT} explanation to marketplace-structure skill


Summary

Looks good! This is a valuable documentation improvement that addresses a real gap in the marketplace-structure skill.

What's Good

  1. Contextual Placement: The note is placed immediately before the Complete Plugin Entry Example, exactly where users encounter ${CLAUDE_PLUGIN_ROOT} in the code. This is "just-in-time" documentation at its best.

  2. Clear and Concise: The explanation covers all three essential points:

    • What it is: "plugin's absolute installation path"
    • When to use it: "hooks and MCP server configurations"
    • Why it matters: "portable paths regardless of where the plugin is installed"
  3. Writing Quality: The note uses clear, technical language appropriate for the plugin-dev audience.

  4. Markdown Linting: ✅ All markdown style rules pass (markdownlint reports no issues).

  5. Scope Discipline: The PR correctly resists over-engineering. Adding a dedicated subsection would be overkill for a single environment variable that's only used in specific contexts.

  6. Alignment with CLAUDE.md: This change aligns perfectly with the repository's convention stated in CLAUDE.md line 70: "Always use ${CLAUDE_PLUGIN_ROOT} for portable paths in hooks, MCP configs, and scripts."

Suggestions

None - this PR is ready to merge as-is.

Checklist Verification


Recommendation: Approve and merge. This is a focused, helpful documentation improvement that addresses user confusion without introducing unnecessary complexity.


@sjnims sjnims self-assigned this Dec 10, 2025
@claude claude Bot added documentation Improvements or additions to documentation component:skill Skills layer effort:small < 1 hour labels Dec 10, 2025
@sjnims sjnims merged commit 2f2d191 into main Dec 10, 2025
8 checks passed
@sjnims sjnims deleted the docs/95-add-claude-plugin-root-explanation branch December 10, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:skill Skills layer documentation Improvements or additions to documentation effort:small < 1 hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Add explanation for ${CLAUDE_PLUGIN_ROOT} in marketplace-structure skill

1 participant