Skip to content

fix: correct phase count and add Edit tool to create-plugin command#100

Merged
sjnims merged 1 commit intomainfrom
fix/98-create-plugin-phase-count-and-edit-tool
Dec 11, 2025
Merged

fix: correct phase count and add Edit tool to create-plugin command#100
sjnims merged 1 commit intomainfrom
fix/98-create-plugin-phase-count-and-edit-tool

Conversation

@sjnims
Copy link
Copy Markdown
Owner

@sjnims sjnims commented Dec 10, 2025

Summary

Fixes two bugs in the /plugin-dev:create-plugin command:

  • Corrected phase count reference from "7 phases" to "8 phases" on line 29
  • Added Edit tool to allowed-tools frontmatter for marketplace.json updates in Phase 8

Problem

Fixes #98

The create-plugin command had inconsistencies:

  1. Line 29 instructed Claude to "Create todo list with all 7 phases" but the command defines 8 phases (Discovery through Documentation)
  2. Phase 8 allows updating marketplace.json but the Edit tool was missing from allowed-tools, preventing file modification

Solution

  • Changed "7 phases" to "8 phases" on line 29
  • Added Edit to the allowed-tools array in frontmatter

Alternatives Considered

None - this is a straightforward bug fix with clear expected behavior.

Changes

  • plugins/plugin-dev/commands/create-plugin.md: Fixed phase count and added Edit tool

Testing

  • Linting passes
  • Changes verified via git diff

🤖 Generated with Claude Code

@claude
Copy link
Copy Markdown

claude Bot commented Dec 10, 2025

Claude finished @sjnims's task in 57s —— View job


PR Review: fix: correct phase count and add Edit tool to create-plugin command

Tasks

  • Get PR diff to understand changes
  • Read modified file for context
  • Run markdownlint on changed file
  • Review against plugin component criteria
  • Post comprehensive review findings

Summary

Looks good - This PR correctly fixes two bugs in the create-plugin command. Both changes are necessary and well-justified.


What's Good

  1. Accurate bug identification: Both issues are real bugs that would cause problems:

    • The phase count discrepancy (7 vs 8) would confuse users and Claude
    • Missing Edit tool would cause failures when updating marketplace.json in Phase 8
  2. Minimal, focused changes: The PR changes exactly what's needed - nothing more, nothing less

  3. Well-documented: The PR description clearly explains the problem, solution, and why each change is necessary

  4. Correct implementation:

    • Phase count updated from "7 phases" to "8 phases" on line 29 ✅
    • Edit tool added to allowed-tools array in frontmatter ✅
  5. Markdown quality: File passes markdownlint with no errors ✅


Plugin Component Verification

Command frontmatter (create-plugin.md):

  • ✅ Has description field
  • ✅ Has argument-hint field
  • ✅ Has allowed-tools array (now correctly includes Edit)
  • ✅ All frontmatter follows correct YAML format

Content quality:

  • ✅ Written FOR Claude (imperative instructions)
  • ✅ Clear phase structure with goals and actions
  • ✅ References relevant skills appropriately
  • ✅ Follows plugin-dev conventions

Checklist Verification

The PR correctly addresses:

  • Phase count inconsistency (line 29: 7→8)
  • Missing Edit tool in allowed-tools
  • No markdown linting errors introduced
  • Changes align with Phase 8 requirements (marketplace.json updates)
  • Frontmatter remains valid YAML

Recommendation

Approve and merge - Both fixes are correct and necessary. The PR is ready to merge.

@claude claude Bot added bug Something isn't working component:command Commands layer effort:small < 1 hour labels Dec 10, 2025
@sjnims sjnims self-assigned this Dec 10, 2025
sjnims added a commit that referenced this pull request Dec 10, 2025
The previous rule "MUST use Bash(gh:*) not unrestricted Bash" was too
restrictive for workflow/scaffolding commands like create-plugin and
create-marketplace that legitimately need filesystem operations (mkdir,
git init, directory creation).

Changes:
- Use correct official Bash pattern syntax (prefix matching with :*)
- Allow unrestricted Bash when command purpose justifies it
- Provide examples of proper Bash prefix patterns

This enables PR #100 to pass validation while maintaining security
guidance for simpler commands.

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

Co-Authored-By: Claude <noreply@anthropic.com>
sjnims added a commit that referenced this pull request Dec 10, 2025
…101)

## Summary

Updates the component validation workflow to use a contextual Bash tool
rule instead of a blanket restriction, and corrects the Bash pattern
syntax to match official documentation.

## Problem

The validation rule at line 99 was:
```
- MUST use `Bash(gh:*)` not unrestricted `Bash` (security requirement)
```

This caused PR #100 to fail validation because `create-plugin.md` uses
unrestricted `Bash` - but it **legitimately needs** broader access for:
- `mkdir -p` - creating plugin directory structures
- `git init` - initializing git repositories
- Other filesystem operations

Additionally, the syntax `Bash(gh:*)` doesn't match official
documentation, which specifies prefix matching with `:*` (e.g., `Bash(gh
pr:*)`).

## Solution

Updated the validation rule to be contextual:

1. **For simple commands**: Recommend Bash prefix patterns like `Bash(gh
pr:*)`, `Bash(npm run:*)`
2. **For workflow/scaffolding commands**: Allow unrestricted `Bash` when
the command's purpose justifies filesystem operations
3. **Fixed syntax**: Use correct `:*` wildcard notation per [official
docs](https://docs.anthropic.com/en/docs/claude-code/settings#tool-specific-permission-rules)

### Alternatives Considered

| Option | Why Not Chosen |
|--------|----------------|
| Keep blanket restriction | Breaks legitimate workflow commands |
| Allowlist specific commands | Doesn't scale, maintenance burden |
| Remove rule entirely | Loses security guidance for simple commands |

## Changes

- `.github/workflows/component-validation.yml`: Updated Bash validation
rule (lines 99-100)

## Testing

- [x] actionlint passes
- [x] Syntax matches official Claude Code documentation

## Related

- Unblocks PR #100 (fix: correct phase count and add Edit tool to
create-plugin command)

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

Co-authored-by: Claude <noreply@anthropic.com>
The create-plugin command had two issues:
- Line 29 referenced "7 phases" but the command defines 8 phases
- Phase 8 requires updating marketplace.json but Edit tool was missing
  from allowed-tools, preventing file modification

Fixes #98

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

Co-Authored-By: Claude <noreply@anthropic.com>
@sjnims sjnims force-pushed the fix/98-create-plugin-phase-count-and-edit-tool branch from fbe872c to d27eb24 Compare December 10, 2025 23:57
@claude
Copy link
Copy Markdown

claude Bot commented Dec 10, 2025

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


PR Review Tasks

  • Get PR diff to understand changes
  • Read modified file for full context
  • Run markdownlint on changed file
  • Review against plugin component criteria
  • Post comprehensive review findings

Summary

Looks good - Approve and merge - This PR correctly fixes two legitimate bugs in the create-plugin command. Both changes are necessary and well-justified.


What's Good

  1. Accurate bug identification: Both issues are real bugs that would cause problems:

    • The phase count discrepancy (7 vs 8) creates confusion since the workflow defines 8 distinct phases (Discovery → Documentation)
    • Missing Edit tool in allowed-tools would cause execution failures when Phase 8 attempts to update marketplace.json (lines 336-351)
  2. Minimal, focused changes: The PR changes exactly what's needed:

    • Line 4: Added "Edit" to the allowed-tools array in frontmatter
    • Line 29: Updated instruction from "7 phases" to "8 phases"
  3. Well-documented: The PR description clearly explains both bugs, their impact, and the fixes applied

  4. Correct implementation:

    • Phase count now accurately reflects the 8-phase structure ✅
    • Edit tool properly added to enable marketplace.json modifications in Phase 8 ✅
  5. Markdown quality: File passes markdownlint --config .markdownlint.json with no errors ✅


Plugin Component Verification

Command frontmatter (create-plugin.md):

  • ✅ Has description field: "Guided end-to-end plugin creation workflow..."
  • ✅ Has argument-hint field: "Optional plugin description"
  • ✅ Has allowed-tools array: Now correctly includes Edit along with Read, Write, Grep, Glob, Bash, TodoWrite, AskUserQuestion, Skill, Task
  • ✅ YAML frontmatter is valid and properly formatted

Content quality:

  • ✅ Written FOR Claude using imperative instructions ("Create todo list...", "Load plugin-structure skill...")
  • ✅ Clear 8-phase structure with distinct goals and actions
  • ✅ Properly references plugin-dev skills (plugin-structure, skill-development, etc.)
  • ✅ Follows plugin-dev conventions (TodoWrite usage, Skill tool loading, agent utilization)

Specific Change Analysis

Change 1: Line 4 - Added Edit to allowed-tools

-allowed-tools: ["Read", "Write", "Grep", "Glob", "Bash", "TodoWrite", "AskUserQuestion", "Skill", "Task"]
+allowed-tools: ["Read", "Write", "Edit", "Grep", "Glob", "Bash", "TodoWrite", "AskUserQuestion", "Skill", "Task"]

Necessary: Phase 8 (lines 336-351) includes marketplace integration where the command instructs Claude to "Update marketplace.json with new plugin entry". This requires the Edit tool for string replacement operations.

Change 2: Line 29 - Corrected phase count

-1. Create todo list with all 7 phases
+1. Create todo list with all 8 phases

Necessary: The workflow defines 8 phases:

  1. Discovery (lines 24-41)
  2. Component Planning (lines 44-76)
  3. Detailed Design & Clarifying Questions (lines 79-113)
  4. Plugin Structure Creation (lines 116-150)
  5. Component Implementation (lines 153-236)
  6. Validation & Quality Check (lines 239-276)
  7. Testing & Verification (lines 279-311)
  8. Documentation & Next Steps (lines 314-378)

Checklist Verification

  • Both bugs correctly identified and fixed
  • Changes align with actual workflow requirements
  • No markdown linting errors
  • YAML frontmatter remains valid
  • Command structure follows plugin-dev conventions
  • No unintended side effects or scope creep

Recommendation

✅ Approve and merge - Both fixes are correct, necessary, and properly implemented. The PR addresses real bugs that would cause issues during plugin creation workflow execution.


@sjnims sjnims merged commit b1b3d80 into main Dec 11, 2025
7 checks passed
@sjnims sjnims deleted the fix/98-create-plugin-phase-count-and-edit-tool branch December 11, 2025 00:02
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 has incorrect phase count and missing Edit tool

1 participant