Skip to content

feat(cli): replace --skill flag with skill command#618

Merged
sarahxsanders merged 2 commits into
mainfrom
posthog-code/wizard-skill-command
Jun 9, 2026
Merged

feat(cli): replace --skill flag with skill command#618
sarahxsanders merged 2 commits into
mainfrom
posthog-code/wizard-skill-command

Conversation

@sarahxsanders

Copy link
Copy Markdown
Collaborator

instead of running a single skill using --skill=<id> flag, promote it to a wizard skill <skill-name> subcommand

changes

BREAKING CHANGEEEEEEE 🛑 wizard --skill=foo no longer works. Use wizard skill foo instead
(headless: wizard skill foo --ci)

  • New wizard skill <skill-name> command: a thin wrapper over the existing
    runSkillMode engine, so behavior is unchanged
  • Removed the --skill flag from the default command, along with its check
    rules and handler branches
  • Swapped the CLI parsing tests: dropped the old --skill flag tests, added
    coverage for the new command'

testing

  • pnpm build && pnpm test && pnpm lint all green. Manually confirmed
  • wizard skill <name> registers in --help

… flag

Promote running a single context-mill skill from a hidden-ish `--skill=<id>`
flag on the default command to a first-class `wizard skill <skill-name>`
subcommand. The skill id is still fetched from context-mill's release at
runtime (same `runSkillMode` engine), so no context-mill change is required.
`--ci` still runs it headlessly: `wizard skill <name> --ci`.

Removes the `--skill` flag, its `check` rules, and its handler branches from
the default command; updates the CLI parsing tests accordingly.

Generated-By: PostHog Code
Task-Id: 4debb1ba-a98a-494f-ba44-29df9fd1d87b
@sarahxsanders sarahxsanders requested a review from edwinyjlim June 9, 2026 21:33
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

Test an individual app:

Results will be posted here when complete.

@edwinyjlim edwinyjlim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lfg

… bridge

Addresses two review gaps on the `wizard skill` command:
- Re-add the empty-id guard the old `--skill` flag had: `wizard skill ""` now
  fails with a friendly "skill needs a skill name" instead of running a skill
  with no id.
- Add handler-level coverage that the `<skill-name>` positional is bridged onto
  runSkillMode's skill id (the parse tests stubbed the handler, so this logic
  was untested), plus the whitespace-trim behavior.

Generated-By: PostHog Code
Task-Id: 4debb1ba-a98a-494f-ba44-29df9fd1d87b
@sarahxsanders sarahxsanders enabled auto-merge (squash) June 9, 2026 21:40
@sarahxsanders sarahxsanders merged commit 424bd51 into main Jun 9, 2026
17 checks passed
@sarahxsanders sarahxsanders deleted the posthog-code/wizard-skill-command branch June 9, 2026 21:42
sarahxsanders added a commit that referenced this pull request Jun 12, 2026
Resolves seven conflicts from main, which shipped #618 (`wizard skill`
command) and #630 (source-maps → upload-source-maps rename) while this
branch reworked the audit family and retired audit-3000.

Resolutions:

- skill.ts: hybrid. Keeps main's `wizard skill <skill-name>` contract
  (positional + runSkillMode) and adds `wizard skill list` as a child
  command that fetches the live skill-menu.json so users have an
  in-CLI way to discover skill ids. Drops the search subcommand from
  our pre-merge version — easy to add later if needed.
- bin.ts, basic-integration/index.ts: take main's side. The `--skill`
  flag is gone for good (it's a real command now).
- upload-sourcemaps.ts + error-tracking-upload-source-maps/index.ts:
  take main's renamed file and the matching `command: 'upload-source-maps'`
  config update. Drops our orphan `src/commands/source-maps.ts`.
- audit-3000 modified files: kept deleted. We retired the program.
- programs-cli.test.ts: combined imports from both sides. All tests
  from both sides pass after the merge.
- wizard.test.ts: chased the rename through to its sourceMapsCommand
  import.

Verification: pnpm typecheck green; pnpm jest 837/837 passing across
54 suites.
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.

2 participants