Skip to content

fix(skill): restructure the skill root and let the agent install the CLI on a yes - #112

Merged
yeouchien-wego merged 5 commits into
mainfrom
skill-root-structure
Nov 17, 2026
Merged

yeouchien-wego merged 5 commits into
mainfrom
skill-root-structure

Conversation

@yeouchien-wego

@yeouchien-wego yeouchien-wego commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to PET-454 and wego/cli#111, which split the skill into a root file and two references.

Why

The split kept the shape of the old single file. The root listed items 1, 2, 6, 7, 8, 11 and 12, said that items 3, 4, 5, 9 and 10 live elsewhere, and pointed at the references three times. An agent on the MCP path also read CLI-only text in the shared rules. This change makes the root read in the order an agent decides: which path, then the rules for both paths.

What changed

  • Path choice first: SKILL.md opens with ## Pick the path, the three MCP cases, and one pointer block to the two references.
  • Named rules: the shared rules are six named sections under ## Rules on both paths. The five CLI rules in references/cli.md are named sections too. No rule is cited by number.
  • Shared rules are path-neutral: the CLI-only parts of the old items 1 and 12 moved to references/cli.md.
  • The agent installs a missing CLI: it asks once, and on a yes it opens the install page, runs the command given there and checks wego version. Before, it linked the instructions and waited for the user to install. The same ask-then-act rule now covers the reinstall case in Update the CLI. plugin/README.md says the same.
  • references/mcp.md: has a title and no longer repeats the shared rules.

Verification

Check Result
Agent on the CLI path opens only its reference ✅ 1 run on the first commit, opened references/cli.md only, 6 wego calls, answer with 3 flights
Agent with the shell blocked opens only its reference ✅ 1 run on the first commit, opened references/mcp.md only, 4 flights_search calls, same cheapest flight
No number reference remains in skills/ ✅ 0 matches for Operating contract, item N, items N
Agent asks before it installs a missing CLI not verified: 1 run found the installed wego under ~/.local/bin and used it, so the missing-CLI case did not occur
Answer quality against the previous release ⏳ cli-next-evals on the release that carries this

Before and After

Before After
SKILL.md 37 lines, 850 words 50 lines, 783 words
SKILL.md sections Operating contract with items 1, 2, 6, 7, 8, 11, 12 Pick the path, Rules on both paths with 6 named rules
Pointers to the references in the root 3 1
references/cli.md 652 lines, items 3, 4, 5, 9, 10 666 lines, 7 named sections under CLI contract
references/mcp.md 7 lines, no title 5 lines, titled

QA plan

Check Expected How to verify
edge-cli on main after merge success Actions → latest edge-cli run on main
Edge install carries the new root SKILL.md has ## Pick the path Install with ?ring=edge in a scratch HOME, then grep -c "## Pick the path" ~/.claude/skills/wego/SKILL.md prints 1
Skill evals on the next release cli-next-evals is Ready or Skipped with a reason Check runs on the release tag commit

Notes for reviewers

  • Two rules changed wording, not only place. "This CLI searches and generates checkout links only" is now "The CLI and the MCP tools search and generate checkout links only; the user completes any booking on the checkout page". The search-limits rule is split: the metering and planning part is in the root for both paths; the two cost sentences (reads against a searchId are cheaper, hotels rooms mints a search) are CLI facts and live only in references/cli.md under Spend the search limits well.
  • Two phrases are removed from the path rule, by the author's decision: the list of MCP tool names with the prefix note, and "Never download or run an installer yourself."
  • No install command is in a published file. The skill names the install page only, so the no published file pipes a download into a shell test still passes.
  • Section references are links, for example [Pick the path](../SKILL.md#pick-the-path).
  • Commit type is fix so that release-please cuts a release with this skill text before a promote publishes the skill.
  • What's kept: the frontmatter (name, description, compatibility) is byte-equal, and the file set is the same three files, so the installer, the owner marker and the publish plan do not change.

Details for AI and humans who like to read everything

Files

File Change
skills/wego/SKILL.md New title # Wego travel search. ## Pick the path holds the old item 2 and the path pointers. ## Rules on both paths holds old items 1 (live results part), 6, 7, 8, 11 and 12 (path-neutral part) as ### sections.
skills/wego/references/cli.md Intro carries "Every command here is wego <sub>" from old item 1. Old items 3, 4, 5, 9, 10 are ### sections. New ### Spend the search limits well carries the command names from old item 12 and the link to Finish the answer. New ### Check flags with --help heading. Cross references use section names. The code block under the pricing rule lost its 3-space list indent.
skills/wego/references/mcp.md Title # Wego MCP tools; the "Still applies" bullet is replaced by one sentence that points at the root rules.
src/skill-embed.test.ts Two tests assert the new title and section names.
src/commands.ts, scripts/plugin-conformance.test.ts One comment each no longer cites an item number.

Environment: base faff229 (v1.5.0). Agent runs used a copy of skills/wego named wego-a in a scratch project, claude -p with model claude-opus-5-5, installed wego 1.5.0 from the next ring. CLI run tools: Read, Skill, Bash(wego:*). MCP run tools: Read, Skill, with Bash disallowed.

Evidence

  • Prompt for both runs: "cheapest nonstop flight Singapore to Bangkok on 2026-12-15, one way, 1 adult. Price in USD, market SG. Give me the top 3."
  • CLI run: Read calls on skill files = references/cli.md (2 reads). 9 turns. Cheapest: Thai AirAsia FD356, USD 142.
  • MCP run: Read calls on skill files = references/mcp.md (1 read). 7 turns. Cheapest: Thai AirAsia FD356, USD 142.
  • bun run check: 1461 pass, 0 fail. bun run test:integration: 535 pass, 0 fail.

Not yet verified: answer quality against the previous release. wego-ai runs cli-next-evals when the release tag reaches cli/next; the result is a check run on the tag commit.

🤖 Generated with Claude Code

The root file kept the item numbers of the old single file, so it listed
items 1, 2, 6, 7, 8, 11 and 12 and pointed three times at the references.
The path choice is now the first section, the shared rules have names, and
the CLI-only parts of the old items 1 and 12 live in references/cli.md.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The skill documentation now places CLI/MCP selection and shared rules in SKILL.md, expands named CLI guidance in references/cli.md, and makes the MCP page defer to the shared rules. Related test expectations and comments now refer to the updated document structure. No executable behavior changes are reported.

Changes: Wego skill guidance

Layer / File(s) Summary
Path selection and shared rules
skills/wego/SKILL.md, skills/wego/references/mcp.md, src/skill-embed.test.ts, scripts/plugin-conformance.test.ts
The root skill defines when to use the CLI or MCP and sets shared rules. The MCP reference defers to the root skill. Related test expectations and a comment now refer to the updated guidance.
Named CLI guidance
skills/wego/references/cli.md, src/commands.ts, src/skill-embed.test.ts
The CLI reference organizes login, output handling, quoting, preferences, market consistency, and search limits into named sections. It also updates guidance on installed flags and cross-references. A source comment and test expectations use the revised wording.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • wego/cli#111: This PR builds on the root skill and CLI/MCP reference structure introduced in #111.
  • wego/cli#110: This PR updates the same CLI/MCP routing guidance and reference text.

Suggested reviewers: sunny-wego, chuyeowego

Merge Risk: Minimal · up to 9e5a5

This PR reorganizes the skill documentation so that path selection comes first and the shared rules are named. It has no runtime effect, and the risk of merging is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the fix(skill) Conventional Commits form, and the scope skill is on the approved list. The changeset restructures the skill root SKILL.md to put path selection first and moves CLI-speci…
Full details: Title check

Explanation

The title uses the fix(skill) Conventional Commits form, and the scope skill is on the approved list. The changeset restructures the skill root SKILL.md to put path selection first and moves CLI-specific guidance to references/cli.md, which the title describes. However, the title's second clause, 'let the agent install the CLI on a yes', is not clearly reflected in the summaries, which describe no install behavior change. The MCP and CLI fallback path mentions only that MCP is used when the CLI is missing and the user cannot install it. The subject is also not lowercase-imperative in a strict sense, since 'restructure' is imperative and lowercase, so casing is fine. The title is mostly related but partially overstates the change, so it passes as partially related.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between faff229 and 9e5a5ca.

Files selected for processing: 6

  • scripts/plugin-conformance.test.ts
  • skills/wego/SKILL.md
  • skills/wego/references/cli.md
  • skills/wego/references/mcp.md
  • src/commands.ts
  • src/skill-embed.test.ts

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

yeouchien-wego and others added 4 commits November 17, 2026 10:10
The booking rule named Wego as a whole; it now names the CLI and the MCP
tools. The two search-cost sentences are CLI facts, so they stay in
references/cli.md only. Section references are links.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…om the path rule

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The skill told the agent to link the install instructions and wait for the
user to install. It now asks once, opens the install page and runs the
command there on a yes. No install command is in a published file.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@yeouchien-wego yeouchien-wego changed the title fix(skill): put the path choice first and name the skill's rules fix(skill): restructure the skill root and let the agent install the CLI on a yes Nov 17, 2026
@yeouchien-wego
yeouchien-wego merged commit abdf73f into main Nov 17, 2026
2 checks passed
@yeouchien-wego
yeouchien-wego deleted the skill-root-structure branch November 17, 2026 02:36
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