Skip to content

feat: add Glob tool to agent-creator for detecting existing agents#130

Merged
sjnims merged 1 commit intomainfrom
feat/128-add-glob-tool-to-agent-creator
Dec 11, 2025
Merged

feat: add Glob tool to agent-creator for detecting existing agents#130
sjnims merged 1 commit intomainfrom
feat/128-add-glob-tool-to-agent-creator

Conversation

@sjnims
Copy link
Copy Markdown
Owner

@sjnims sjnims commented Dec 11, 2025

Summary

Add Glob to the agent-creator's tools list, enabling proactive detection of existing agent files to prevent naming conflicts.

Problem

Fixes #128

The agent-creator agent's edge cases mention "Conflicts with existing agents: Note conflict, suggest different scope/name" but without Glob tool access, the agent cannot proactively scan the agents/ directory to detect naming conflicts before writing.

Solution

Added Glob to the tools list:

tools: Write, Read, Glob

This enables the agent to:

  • Check if agents/ directory exists before attempting to create it
  • List existing agent files to detect naming conflicts proactively
  • Provide better conflict warnings with specific existing agent names

Alternatives Considered

  1. Leave as-is - Agent works but can't proactively detect conflicts
  2. Add Bash instead - Could use ls but Glob is more appropriate and follows least-privilege better
  3. Rely on loaded skill - Skills provide knowledge, not tool access

Changes

  • plugins/plugin-dev/agents/agent-creator.md: Added Glob to tools list (line 44)

Testing

  • Agent validation passes
  • Markdown linting passes

🤖 Generated with Claude Code

Add Glob to the tools list enabling the agent to proactively scan for
existing agent files and detect naming conflicts before writing. This
aligns with the edge case documentation that mentions conflict handling.

Fixes #128

🤖 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 17s —— View job


PR Review: Add Glob Tool to agent-creator

Summary

Looks good - This is a targeted, well-justified change that enables the agent-creator to fulfill its documented edge case handling.


What's Good

  1. Perfectly Aligned with Edge Case Documentation: The agent's instructions mention "Conflicts with existing agents: Note conflict, suggest different scope/name" (line 186), and adding Glob directly enables this functionality.

  2. Follows Least-Privilege Pattern: The tool addition is minimal and appropriate. Comparing to other agents:

    • plugin-validator: Read, Grep, Glob, Bash (validation needs more tools)
    • skill-reviewer: Read, Grep, Glob (similar read-only analysis)
    • agent-creator: Write, Read, Glob (creation needs write + detection)
  3. Enables Proactive Behavior: The agent can now:

    • Check if agents/ directory exists before creating it
    • List existing agent files to detect naming conflicts
    • Provide specific conflict warnings with existing agent names
  4. Clean Implementation: Single line change in the right location (frontmatter tools list at line 44)

  5. Quality Standards Met:


Checklist Verification

  • ✅ Agent frontmatter complete (name, description, model, color, tools, skills)
  • ✅ Tool restrictions appropriate for agent's purpose
  • ✅ Example blocks present for triggering (4 examples)
  • ✅ Markdown style compliant
  • ✅ No documentation updates needed (change is internal to agent behavior)
  • ✅ Commit properly references issue ([Feature]: Add Glob tool to agent-creator for detecting existing agents #128)

Technical Note

The addition of Glob is superior to alternatives like:

  • Bash with ls: Would require broader shell access and violate least-privilege
  • Reading loaded skills: Skills provide knowledge, not runtime file system access
  • Leave as-is: Would leave the agent unable to fulfill documented edge case handling

This change enables the agent-creator to properly implement the workflow described in its own instructions, particularly around conflict detection and directory validation.

Recommendation: Approve and merge.


@claude claude Bot added enhancement New feature or request component:agent Agents layer effort:small < 1 hour labels Dec 11, 2025
@sjnims sjnims merged commit 65c8654 into main Dec 11, 2025
8 checks passed
@sjnims sjnims deleted the feat/128-add-glob-tool-to-agent-creator branch December 11, 2025 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:agent Agents layer effort:small < 1 hour enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Glob tool to agent-creator for detecting existing agents

1 participant