Skip to content

fix: expand create-plugin allowed-tools and clarify validation approach#104

Merged
sjnims merged 1 commit intomainfrom
fix/103-create-plugin-allowed-tools
Dec 11, 2025
Merged

fix: expand create-plugin allowed-tools and clarify validation approach#104
sjnims merged 1 commit intomainfrom
fix/103-create-plugin-allowed-tools

Conversation

@sjnims
Copy link
Copy Markdown
Owner

@sjnims sjnims commented Dec 11, 2025

Summary

Fixes the create-plugin command's tool restrictions that prevented git initialization and clarifies that validation runs through agents rather than direct script execution.

Problem

Fixes #103

The command's allowed-tools only permitted Bash(mkdir:*), but the instructions told Claude to:

  1. Run git init (Phase 4, line 147)
  2. Execute validation scripts directly (Phases 5-6)

This created a mismatch between what the command instructed and what tools were available.

Solution

Approach taken: Minimal Bash expansion + clarify agent-based validation

  1. Added Bash(git init:*) - Enables git initialization as instructed in Phase 4
  2. Converted to comma-separated format - Matches official documentation style
  3. Updated validation references - Clarified that the plugin-validator agent handles validation (it has full Bash access and uses the scripts internally)

Alternatives Considered

  1. Add Bash(bash:*) - Rejected as too permissive; would allow arbitrary script execution
  2. Remove all script references - Rejected as it loses useful context about what agents do
  3. Add specific script patterns - Rejected as overly complex; agents already have proper permissions

Changes

  • plugins/plugin-dev/commands/create-plugin.md:
    • Line 4: Added Bash(git init:*), converted to comma-separated format
    • Line 202: Changed "Validate with validate-agent.sh script" → "Validate using plugin-validator agent"
    • Line 212: Changed direct script reference → agent-based validation
    • Lines 261, 264-265: Updated Phase 6 validation to reference agents

Testing

  • Linting passes (markdownlint)
  • Verified plugin-validator agent has Bash access and references scripts internally
  • Changes follow principle of least privilege

🤖 Generated with Claude Code

- Add Bash(git init:*) permission to allow git initialization in Phase 4
- Convert allowed-tools from JSON array to comma-separated string format
  for consistency with official documentation
- Replace direct script execution references with agent-based validation:
  - plugin-validator agent handles validation (it has Bash access to run
    scripts internally)
  - Clearer separation of concerns between command and agents

Fixes #103

🤖 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 11, 2025

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


PR Review Complete ✅

Summary

Looks good - This PR correctly addresses issue #103 by fixing the tool restriction mismatch and clarifying the validation approach.


What's Good

  1. Correct problem identification: The PR accurately identifies the mismatch between what the command instructed (git init) and what tools were available.

  2. Minimal, focused fix: Rather than being overly permissive (like adding Bash(bash:*)), the solution adds only the specific tool needed: Bash(git init:*).

  3. Format consistency: Converting to comma-separated format matches the official documentation style shown in other commands.

  4. Clarifies agent-based validation: The updates correctly clarify that validation happens via the plugin-validator agent (which has full Bash access) rather than direct script execution. This is accurate - the command's allowed-tools restricts what Claude can do directly, but agents can have different permissions.

  5. Markdown quality: No markdown linting issues found.


Changes Verified

Line 4 (frontmatter):

  • ✅ Added Bash(git init:*) to enable git initialization (Phase 4, line 147)
  • ✅ Converted from JSON array to comma-separated format (matches best practices)

Lines 202, 212, 261, 264-265 (validation references):

  • ✅ Changed direct script references → agent-based validation
  • ✅ Accurate description of how validation actually works
  • ✅ Maintains useful context about what the agent does internally

Checklist Verification

  • Command frontmatter: Has required fields (name via description, allowed-tools)
  • Tool restrictions: Follows principle of least privilege
  • Markdown linting: Passes (no issues found)
  • Documentation accuracy: Correctly describes agent-based validation
  • Consistency: Instructions now match available tools

Additional Notes

The PR description demonstrates good decision-making by documenting the alternatives considered:

  • Rejecting Bash(bash:*) (too permissive)
  • Rejecting removing script references (loses context)
  • Rejecting specific script patterns (overly complex)

This shows thoughtful consideration of the trade-offs.

Recommendation: Merge when ready.


@claude claude Bot added bug Something isn't working component:command Commands layer effort:small < 1 hour labels Dec 11, 2025
@sjnims sjnims self-assigned this Dec 11, 2025
@sjnims sjnims merged commit c19b767 into main Dec 11, 2025
8 checks passed
@sjnims sjnims deleted the fix/103-create-plugin-allowed-tools branch December 11, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working component:command Commands layer effort:small < 1 hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: create-plugin command's allowed-tools prevents git init and validation script execution

1 participant