Skip to content

fix: shadcn-ui-builder — add Bash tool and replace unresolvable MCP reference#11

Open
xiaolai wants to merge 1 commit intowebdevtodayjason:mainfrom
xiaolai:fix/nlpm-shadcn-agent-bugs
Open

fix: shadcn-ui-builder — add Bash tool and replace unresolvable MCP reference#11
xiaolai wants to merge 1 commit intowebdevtodayjason:mainfrom
xiaolai:fix/nlpm-shadcn-agent-bugs

Conversation

@xiaolai
Copy link
Copy Markdown

@xiaolai xiaolai commented Apr 25, 2026

Automated audit: This PR was generated by NLPM, a natural language programming linter, running via claude-code-action. Please evaluate the diff on its merits.

What and why

agents/shadcn-ui-builder/agent.md has two bugs that cause silent failures at runtime:

Bug 1 — Missing Bash tool

The agent body at line 32 says: "Install the required ShadCN components using the appropriate installation commands" and "always use the official ShadCN installation process". ShadCN installation (npx shadcn@latest add <component>) requires a shell. But Bash was absent from the tools: frontmatter field, making shell execution impossible. The agent would reach the installation step and have no way to proceed.

Fix: Added Bash to the tools list.

Bug 2 — Unresolvable MCP server reference

Line 20 (Planning Phase) instructed the agent to "ALWAYS use the MCP server during planning to access ShadCN resources". However:

  • No .mcp.json configuration file exists anywhere in the repository
  • No MCP tool appears in the agent's declared tools list

Every time this agent entered its planning phase, it would silently skip the MCP step because the described resource is simply not configured. This creates a documentation-to-reality gap.

Fix: Replaced the MCP instruction with an equivalent using WebFetch (already declared in the tools list) pointed at the ShadCN documentation URL. The planning intent is preserved without requiring external infrastructure.

Two bugs in agents/shadcn-ui-builder/agent.md:

1. The agent body instructs the model to run ShadCN installation
   commands ("Install the required ShadCN components using the
   appropriate installation commands") but Bash was not declared in
   the tools list, making shell execution impossible. Added Bash to
   the tools frontmatter.

2. The planning phase instructed "ALWAYS use the MCP server" but no
   .mcp.json exists in the repository and no MCP tool is declared,
   causing silent failure on every planning invocation. Replaced the
   MCP instruction with an equivalent using WebFetch (already in the
   tools list) against the ShadCN docs URL.

Co-Authored-By: Claude Code <noreply@anthropic.com>
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.

1 participant