Skip to content

fix: rewrite share.md as a proper command template with YAML frontmatter#47

Open
xiaolai wants to merge 1 commit intonicobailon:mainfrom
xiaolai:fix/nlpm-share-command-template
Open

fix: rewrite share.md as a proper command template with YAML frontmatter#47
xiaolai wants to merge 1 commit intonicobailon:mainfrom
xiaolai:fix/nlpm-share-command-template

Conversation

@xiaolai
Copy link
Copy Markdown

@xiaolai xiaolai commented Apr 26, 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

commands/share.md is the only command in the plugin that lacks YAML frontmatter entirely. Instead of the frontmatter + prompt-body format that every other command uses, it is written as a README-style markdown document with headings, code fences, and prose sections.

Without a frontmatter block, the command has no name or description fields — it will not register correctly as a slash command and diverges from the plugin's own conventions.

Fix

Rewrote the file as a minimal command template matching the format of the other 7 commands:

---
name: share
description: Share a visual explainer HTML page via Vercel and return a live URL
---
<prompt body>

The prompt body preserves all functional information from the original:

  • The script invocation path (bash {{skill_dir}}/scripts/share.sh $1)
  • The argument ($1 = HTML file path)
  • A fallback when no argument is provided (list files in ~/.agent/diagrams/ and ask the user to select)
  • The expected output description (live URL + claim URL)

The README-style documentation content (usage examples, requirements section, JSON output format) was removed from the command template, as that kind of reference material belongs in SKILL.md or a separate README rather than in the executable command body.

share.md was formatted as README documentation (markdown headers,
code fences, section prose) rather than as a command template. It
had no YAML frontmatter at all — missing both the required name and
description fields — so the command would not register correctly.

Rewrote as a minimal command template matching the convention used
by every other command in the plugin: YAML frontmatter block followed
by a prompt body. Preserves all functional information (script path,
argument handling, fallback behaviour).

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