Loading...
Loading...
Compare original and translation side by side
agentmodelopencode.jsonmodelagent:buildplan---
description: Brief description
agent: build # or: plan
---model:opencode.jsonagentmodelopencode.jsonmodelagent:buildplan---
description: 简短描述
agent: build # 或: plan
---model:opencode.json/command-name/command-namemkdir -p .opencode/commands
touch .opencode/commands/test.mdtest.md---
description: Run tests with coverage
agent: build
model: anthropic/claude-3-5-sonnet-20241022
---
Run the full test suite with coverage report and show any failures.
Focus on the failing tests and suggest fixes./testmkdir -p .opencode/commands
touch .opencode/commands/test.mdtest.md---
description: 带覆盖率的测试运行
agent: build
model: anthropic/claude-3-5-sonnet-20241022
---
运行完整测试套件并生成覆盖率报告,展示所有失败用例。
重点关注失败测试并提出修复建议。/test.opencode/commands/command-name.md~/.config/opencode/commands/command-name.md.opencode/commands/command-name.md~/.config/opencode/commands/command-name.mdcommands/.opencode/commands/
├── test.md # /test command
├── review.md # /review command
└── component.md # /component command.opencode/commands/review.md
---
description: Review code changes
agent: plan
---
Review recent git commits:
!`git log --oneline -10`
Review these changes and suggest any improvements.descriptionagentsubtaskmodelopencode.jsoncommands/.opencode/commands/
├── test.md # /test 命令
├── review.md # /review 命令
└── component.md # /component 命令.opencode/commands/review.md
---
description: 评审代码变更
agent: plan
---
评审最近的Git提交:
!`git log --oneline -10`
评审这些变更并提出改进建议。descriptionagentsubtaskmodelopencode.jsonopencode.jsonccommand{
"$schema": "https://opencode.ai/config.json",
"command": {
"test": {
"template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.",
"description": "Run tests with coverage",
"agent": "build",
"model": "anthropic/claude-3-5-sonnet-20241022"
}
}
}opencode.jsonccommand{
"$schema": "https://opencode.ai/config.json",
"command": {
"test": {
"template": "运行测试并报告失败用例。\n重点关注失败测试并提出修复建议。",
"description": "带覆盖率的测试运行",
"agent": "build",
"model": "anthropic/claude-3-5-sonnet-20241022"
}
}
}$ARGUMENTS.opencode/commands/component.md
---
description: Create a new component
---
Create a new React component named $ARGUMENTS with TypeScript support.
Include proper typing and basic structure./component Button$ARGUMENTSButton$ARGUMENTS.opencode/commands/component.md
---
description: 创建新组件
---
创建一个名为$ARGUMENTS的React组件,支持TypeScript。
包含正确的类型定义和基础结构。/component Button$ARGUMENTSButton.opencode/commands/create-file.md
---
description: Create a new file with content
---
Create a file named $1 in the directory $2
with the following content: $3/create-file config.json src "{ \"key\": \"value\" }"$1config.json$2src$3{ "key": "value" }.opencode/commands/create-file.md
---
description: 创建带内容的新文件
---
在目录$2中创建名为$1的文件
内容如下:$3/create-file config.json src "{ \"key\": \"value\" }"$1config.json$2src$3{ "key": "value" }commandcommandcommand.opencode/commands/analyze-coverage.md
---
description: Analyze test coverage
---
Here are the current test results:
!`npm test`
Based on these results, suggest improvements to increase coverage.
Recent commits:
!`git log --oneline -10`
Current branch status:
!`git status`
Package versions:
!`npm list --depth=0`!.opencode/commands/analyze-coverage.md
---
description: 分析测试覆盖率
---
当前测试结果如下:
!`npm test`
基于这些结果,提出提升覆盖率的改进建议。
最近的提交:
!`git log --oneline -10`
当前分支状态:
!`git status`
包版本:
!`npm list --depth=0`@.opencode/commands/review-component.md
---
description: Review component
---
Review the component in @src/components/Button.tsx.
Check for performance issues and suggest improvements.
Compare @src/old-api.ts and @src/new-api.ts.
Identify breaking changes and migration steps.@.opencode/commands/review-component.md
---
description: 评审组件
---
评审@src/components/Button.tsx中的组件。
检查性能问题并提出改进建议。
对比@src/old-api.ts和@src/new-api.ts。
识别破坏性变更和迁移步骤。{
"command": {
"test": {
"template": "Run tests and report failures."
}
}
}{
"command": {
"test": {
"template": "运行测试并报告失败用例。"
}
}
}{
"command": {
"test": {
"description": "Run tests with coverage"
}
}
}---
description: Run tests with coverage
---{
"command": {
"test": {
"description": "带覆盖率的测试运行"
}
}
}---
description: 带覆盖率的测试运行
---buildplanbuildplan{
"command": {
"review": {
"agent": "plan"
}
}
}---
agent: plan
---subtask: falsebuildplanbuildplan{
"command": {
"review": {
"agent": "plan"
}
}
}---
agent: plan
---subtask: false{
"command": {
"analyze": {
"subtask": true
}
}
}---
subtask: true
---modeprimary{
"command": {
"analyze": {
"subtask": true
}
}
}---
subtask: true
---modeprimary{
"command": {
"analyze": {
"model": "anthropic/claude-3-5-sonnet-20241022"
}
}
}---
model: anthropic/claude-3-5-sonnet-20241022
---{
"command": {
"analyze": {
"model": "anthropic/claude-3-5-sonnet-20241022"
}
}
}---
model: anthropic/claude-3-5-sonnet-20241022
---.opencode/commands/test.md
---
description: Run tests with coverage
agent: build
---
Run the full test suite with coverage report:
!`npm test -- --coverage`
Analyze failures and suggest fixes..opencode/commands/test.md
---
description: 带覆盖率的测试运行
agent: build
---
运行完整测试套件并生成覆盖率报告:
!`npm test -- --coverage`
分析失败用例并提出修复建议。.opencode/commands/review.md
---
description: Review recent changes
---
Recent commits:
!`git log --oneline -10`
Changed files:
!`git diff --name-only HEAD~5`
Review these changes for:
- Code quality issues
- Performance concerns
- Security vulnerabilities.opencode/commands/review.md
---
description: 评审最近的变更
---
最近的提交:
!`git log --oneline -10`
变更的文件:
!`git diff --name-only HEAD~5`
从以下方面评审这些变更:
- 代码质量问题
- 性能隐患
- 安全漏洞.opencode/commands/component.md
---
description: Create React component
---
Create a new React component named $1:
- Location: src/components/$1.tsx
- Include TypeScript types
- Add basic props interface
- Follow project conventions from @src/components/Example.tsx/component Button.opencode/commands/component.md
---
description: 创建React组件
---
创建一个名为$1的React组件:
- 位置:src/components/$1.tsx
- 包含TypeScript类型定义
- 添加基础Props接口
- 遵循@src/components/Example.tsx中的项目规范/component Button.opencode/commands/deploy.md
---
description: Deploy to environment
agent: build
subtask: true
---
Deploy to $1 environment:
!`git status`
Steps:
1. Run pre-deployment checks
2. Build production bundle
3. Deploy to $1
4. Verify deployment/deploy staging.opencode/commands/deploy.md
---
description: 部署到环境
agent: build
subtask: true
---
部署到$1环境:
!`git status`
步骤:
1. 运行预部署检查
2. 构建生产包
3. 部署到$1
4. 验证部署结果/deploy staging.opencode/commands/doc.md
---
description: Generate documentation
---
Generate documentation for $ARGUMENTS:
Code to document:
@$ARGUMENTS
Create comprehensive documentation including:
- Function/class description
- Parameters and return values
- Usage examples
- Edge cases/doc src/utils/parser.ts.opencode/commands/doc.md
---
description: 生成文档
---
为$ARGUMENTS生成文档:
待文档化的代码:
@$ARGUMENTS
创建包含以下内容的完整文档:
- 函数/类描述
- 参数和返回值
- 使用示例
- 边界情况/doc src/utils/parser.ts/init/undo/redo/share/help/init/undo/redo/share/helpmodel:agent:opencode.jsonmodel:agent:opencode.jsonexamples/test-command.mdcomponent-command.mdreview-command.mddeploy-command.mdexamples/test-command.mdcomponent-command.mdreview-command.mddeploy-command.md.opencode/commands/~/.config/opencode/commands/.md$ARGUMENTS$1$2/command arg1 arg2bash -c "your command"ls path/to/file.opencode/commands/~/.config/opencode/commands/.md$ARGUMENTS$1$2/command arg1 arg2bash -c "your command"ls path/to/filereferences/template-syntax.mdreferences/configuration-options.mdreferences/common-patterns.mdreferences/template-syntax.mdreferences/configuration-options.mdreferences/common-patterns.mdexamples/test-command.mdcomponent-command.mdreview-command.mddeploy-command.mdexamples/test-command.mdcomponent-command.mdreview-command.mddeploy-command.md
---
description: Brief description
agent: agent-name
subtask: true
---
Template content with $ARGUMENTS or $1, $2
Include shell output: !`command`
Include files: @path/to/file{
"command": {
"name": {
"template": "Prompt text",
"description": "Brief description",
"agent": "agent-name",
"model": "model-name",
"subtask": true
}
}
}$ARGUMENTS$1$2$3command@path/to/file
---
description: 简短描述
agent: agent-name
subtask: true
---
包含$ARGUMENTS或$1、$2的模板内容
包含Shell输出:!`command`
包含文件:@path/to/file{
"command": {
"name": {
"template": "提示词文本",
"description": "简短描述",
"agent": "agent-name",
"model": "model-name",
"subtask": true
}
}
}$ARGUMENTS$1$2$3!@path/to/file