Conversation
also added support for copilot as that tool
|
Oops, I don't know how to edit the PR and add the |
|
@claude please review |
There was a problem hiding this comment.
Pull request overview
This PR adds support for using different CLI tools (not just Claude) to generate and review webhook skills. The implementation introduces a pluggable adapter system where each CLI tool can have its own configuration and command structure. The default remains claude for backward compatibility, but users can now specify alternative tools like copilot via the --cli flag.
Changes:
- Added a CLI adapter system with interfaces and factory pattern for supporting multiple AI CLI tools
- Renamed
claude.tstocli.tsand refactored it to be CLI-agnostic - Added adapters for Claude CLI and Copilot CLI
- Threaded
cliTooloption through all relevant functions and types - Updated documentation with examples and instructions for using different CLI tools and adding new adapters
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/skill-generator/lib/types.ts | Added cliTool field to BaseOptions interface |
| scripts/skill-generator/lib/reviewer.ts | Updated imports and threaded cliTool option through review functions |
| scripts/skill-generator/lib/generator.ts | Updated imports and threaded cliTool option through generation functions |
| scripts/skill-generator/lib/cli.ts | Refactored from claude.ts to support multiple CLI tools via adapters |
| scripts/skill-generator/lib/cli-adapters/types.ts | Defined interfaces for CLI adapter system |
| scripts/skill-generator/lib/cli-adapters/index.ts | Implemented adapter registry and factory function |
| scripts/skill-generator/lib/cli-adapters/copilot.ts | Added Copilot CLI adapter implementation |
| scripts/skill-generator/lib/cli-adapters/claude.ts | Added Claude CLI adapter implementation |
| scripts/skill-generator/index.ts | Added CLI tool options to commands and updated imports |
| CONTRIBUTING.md | Updated prerequisites, added CLI tool usage examples, and documented how to add new CLI adapters |
Comments suppressed due to low confidence (1)
scripts/skill-generator/lib/cli.ts:10
- Unused import DEFAULT_MODEL.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CONTRIBUTING.md
Outdated
| - **[Claude CLI](https://docs.anthropic.com/en/docs/claude-cli)** — Install and authenticate with `claude login` | ||
| - **AI CLI Tool** — One of the following: | ||
| - [Claude CLI](https://docs.anthropic.com/en/docs/claude-cli) — Install and authenticate with `claude login` (default) | ||
| - [Copilot CLI](https://githubnext.com/projects/copilot-cli) — GitHub Copilot command-line tool |
There was a problem hiding this comment.
The URL for the Copilot CLI points to githubnext.com which was GitHub's experimental playground. Please verify this is the correct and current URL for the GitHub Copilot CLI tool. The CLI may have moved to a different location or the project may have been deprecated or renamed. Consider checking the official GitHub Copilot documentation for the correct installation instructions.
| - [Copilot CLI](https://githubnext.com/projects/copilot-cli) — GitHub Copilot command-line tool | |
| - [Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli/github-copilot-in-the-cli) — GitHub Copilot command-line tool |
|
|
||
| import type { CliAdapter, CliAdapterOptions, CliCommandConfig } from './types'; | ||
|
|
||
| const DEFAULT_MODEL = 'claude-opus-4-20250514'; |
There was a problem hiding this comment.
DEFAULT_MODEL needs to be exported from this file since it's imported by cli-adapters/index.ts. Change const DEFAULT_MODEL to export const DEFAULT_MODEL to fix the import error.
| const DEFAULT_MODEL = 'claude-opus-4-20250514'; | |
| export const DEFAULT_MODEL = 'claude-opus-4-20250514'; |
There was a problem hiding this comment.
not applicable any more.
scripts/skill-generator/index.ts
Outdated
| .option('--config <file>', 'Load provider configs from YAML file') | ||
| .option('--model <model>', 'Claude model to use', DEFAULT_MODEL) | ||
| .option('--cli <tool>', `CLI tool to use (${AVAILABLE_CLI_TOOLS.join(', ')})`, DEFAULT_CLI_TOOL) | ||
| .option('--model <model>', 'Model to use', DEFAULT_MODEL) |
There was a problem hiding this comment.
The default model is hardcoded to Claude's default ('claude-opus-4-20250514') regardless of which CLI tool is selected. When a user specifies --cli copilot without --model, they will get Claude's default model instead of Copilot's default model. Consider removing the default value from the --model option and passing undefined to the adapter when no model is specified, allowing each adapter to use its own appropriate default model.
scripts/skill-generator/index.ts
Outdated
| .option('--config <file>', 'Load provider configs from YAML file') | ||
| .option('--model <model>', 'Claude model to use', DEFAULT_MODEL) | ||
| .option('--cli <tool>', `CLI tool to use (${AVAILABLE_CLI_TOOLS.join(', ')})`, DEFAULT_CLI_TOOL) | ||
| .option('--model <model>', 'Model to use', DEFAULT_MODEL) |
There was a problem hiding this comment.
The default model is hardcoded to Claude's default ('claude-opus-4-20250514') regardless of which CLI tool is selected. When a user specifies --cli copilot without --model, they will get Claude's default model instead of Copilot's default model. Consider removing the default value from the --model option and passing undefined to the adapter when no model is specified, allowing each adapter to use its own appropriate default model.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scripts/skill-generator/lib/cli.ts
Outdated
| // Re-export DEFAULT_MODEL from cli-adapters for backwards compatibility | ||
| export { DEFAULT_MODEL } from './cli-adapters'; |
There was a problem hiding this comment.
This re-export creates a circular dependency concern since DEFAULT_MODEL is originally defined in cli-adapters/claude.ts but exported through cli-adapters/index.ts, then re-exported here. Consider removing this re-export and updating imports to use the canonical source from './cli-adapters' directly.
| import { claudeAdapter, DEFAULT_MODEL } from './claude'; | ||
| import { copilotAdapter } from './copilot'; | ||
|
|
||
| // Re-export types and default model | ||
| export type { CliAdapter, CliAdapterOptions, CliCommandConfig } from './types'; | ||
| export { DEFAULT_MODEL }; | ||
|
|
There was a problem hiding this comment.
DEFAULT_MODEL is being exported from the index but is specific to the Claude adapter. This creates an implicit assumption that Claude's default model is the global default. Consider either defining DEFAULT_MODEL at the index level or having each adapter export its own default and letting the consumer choose which to use based on the selected CLI tool.
| import { claudeAdapter, DEFAULT_MODEL } from './claude'; | |
| import { copilotAdapter } from './copilot'; | |
| // Re-export types and default model | |
| export type { CliAdapter, CliAdapterOptions, CliCommandConfig } from './types'; | |
| export { DEFAULT_MODEL }; | |
| import { claudeAdapter } from './claude'; | |
| import { copilotAdapter } from './copilot'; | |
| // Re-export types | |
| export type { CliAdapter, CliAdapterOptions, CliCommandConfig } from './types'; |
scripts/skill-generator/index.ts
Outdated
| .option('--config <file>', 'Load provider configs from YAML file') | ||
| .option('--model <model>', 'Claude model to use', DEFAULT_MODEL) | ||
| .option('--cli <tool>', `CLI tool to use (${AVAILABLE_CLI_TOOLS.join(', ')})`, DEFAULT_CLI_TOOL) | ||
| .option('--model <model>', 'Model to use', undefined) |
There was a problem hiding this comment.
The help text 'Model to use' is vague and doesn't indicate what happens when undefined (uses CLI tool's default). Consider changing to 'Model to use (defaults to CLI tool's default model)' for clarity.
scripts/skill-generator/index.ts
Outdated
| .option('--config <file>', 'Load provider configs from YAML file') | ||
| .option('--model <model>', 'Claude model to use', DEFAULT_MODEL) | ||
| .option('--cli <tool>', `CLI tool to use (${AVAILABLE_CLI_TOOLS.join(', ')})`, DEFAULT_CLI_TOOL) | ||
| .option('--model <model>', 'Model to use', undefined) |
There was a problem hiding this comment.
The help text 'Model to use' is vague and doesn't indicate what happens when undefined (uses CLI tool's default). Consider changing to 'Model to use (defaults to CLI tool's default model)' for clarity.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scripts/skill-generator/lib/cli.ts
Outdated
| // Re-export DEFAULT_MODEL from cli-adapters for backwards compatibility | ||
| export { DEFAULT_MODEL } from './cli-adapters'; | ||
|
|
There was a problem hiding this comment.
The DEFAULT_MODEL is being re-exported for backwards compatibility after being removed from this file, but this creates a duplicate export. Lines 115-116 re-export DEFAULT_MODEL from cli-adapters, while the original export on line 117 in the diff context was supposed to be removed. Remove the duplicate export statement.
| // Re-export DEFAULT_MODEL from cli-adapters for backwards compatibility | |
| export { DEFAULT_MODEL } from './cli-adapters'; |
| .option('--config <file>', 'Load provider configs from YAML file') | ||
| .option('--model <model>', 'Claude model to use', DEFAULT_MODEL) | ||
| .option('--cli <tool>', `CLI tool to use (${AVAILABLE_CLI_TOOLS.join(', ')})`, DEFAULT_CLI_TOOL) | ||
| .option('--model <model>', "Model to use (defaults to CLI tool's default model)", undefined) |
There was a problem hiding this comment.
The help text states 'defaults to CLI tool's default model', but doesn't indicate what those defaults are. Consider mentioning that Claude defaults to 'claude-opus-4-20250514' and Copilot to 'gpt-4o', or link to documentation where users can find this information.
There was a problem hiding this comment.
I think we can assume folks know how to find the model for their given CLI.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@leggetter I think this is ready for human eyes or whatever the next step is :) |
|
Hi @mooreds! 👋 Thank you for this excellent foundation for the CLI adapter system! We've tested it extensively and found a few fixes needed for Copilot CLI compatibility:
We've created PR #29 which builds on your work with these fixes. It includes We successfully generated two skills using both adapters:
Thanks again for the great work on the adapter architecture! 🙏 |
|
Excellent, glad it helped! |
This PR adds the option for using a different CLI than
claude. The default remainsclaude, but now you can pass in another cli tool if that's what you prefer.Needed abstraction and support for the
copilotCLI was added.It also updates the documentation with information about using the new option.