Initial commit with translated description
This commit is contained in:
77
SKILL.md
Normal file
77
SKILL.md
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
name: opencode-controller
|
||||||
|
description: "通过斜杠命令控制和操作Opencode。"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Opencode Controller
|
||||||
|
|
||||||
|
## Core rule
|
||||||
|
|
||||||
|
Clawdbot does not write code.
|
||||||
|
All planning and coding happens inside Opencode.
|
||||||
|
|
||||||
|
## Pre-flight
|
||||||
|
|
||||||
|
- Ask the user which AI provider to use.
|
||||||
|
- Ask how the provider should be authenticated.
|
||||||
|
- Do not proceed without confirmation.
|
||||||
|
|
||||||
|
## Session management
|
||||||
|
|
||||||
|
- Start Opencode.
|
||||||
|
- Open session selector using:
|
||||||
|
/sessions
|
||||||
|
- If the current project already exists:
|
||||||
|
- Select the existing session.
|
||||||
|
- Never create a new session without user approval.
|
||||||
|
|
||||||
|
## Agent (mode) control
|
||||||
|
|
||||||
|
- Open agent selector using:
|
||||||
|
/agents
|
||||||
|
- Available agents:
|
||||||
|
- Plan
|
||||||
|
- Build
|
||||||
|
- Always select Plan first.
|
||||||
|
- Switch agents whenever required using `/agents`.
|
||||||
|
|
||||||
|
## Model selection
|
||||||
|
|
||||||
|
- Open model selector using:
|
||||||
|
/models
|
||||||
|
- Select the user-requested provider.
|
||||||
|
- If authentication is required:
|
||||||
|
- Copy the login link provided by Opencode.
|
||||||
|
- Send it to the user.
|
||||||
|
- Wait for confirmation before continuing.
|
||||||
|
|
||||||
|
## Plan agent behavior
|
||||||
|
|
||||||
|
- Ask Opencode to analyze the task.
|
||||||
|
- Request a clear step-by-step plan.
|
||||||
|
- Allow Opencode to ask clarification questions.
|
||||||
|
- Review the plan carefully.
|
||||||
|
- If the plan is incorrect or incomplete:
|
||||||
|
- Ask Opencode to revise it.
|
||||||
|
- Do not allow code generation in Plan.
|
||||||
|
|
||||||
|
## Build agent behavior
|
||||||
|
|
||||||
|
- Switch to Build using `/agents`.
|
||||||
|
- Ask Opencode to implement the approved plan.
|
||||||
|
- If Opencode asks any question:
|
||||||
|
- Immediately switch back to Plan.
|
||||||
|
- Answer and confirm the plan.
|
||||||
|
- Switch back to Build.
|
||||||
|
|
||||||
|
## Completion
|
||||||
|
|
||||||
|
- Repeat the Plan → Build loop until all user requirements are satisfied.
|
||||||
|
- Never skip Plan.
|
||||||
|
- Never answer questions in Build.
|
||||||
|
|
||||||
|
## Output format
|
||||||
|
|
||||||
|
- Show all slash commands explicitly.
|
||||||
|
- State which option is selected.
|
||||||
|
- Provide login links verbatim.
|
||||||
6
_meta.json
Normal file
6
_meta.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"ownerId": "kn76x9kj4xk50a8zzc3j64vx1180396s",
|
||||||
|
"slug": "opencode-controller",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"publishedAt": 1769633853391
|
||||||
|
}
|
||||||
14
assets/operator-prompts.md
Normal file
14
assets/operator-prompts.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
### Ask for provider
|
||||||
|
Which AI provider do you want to use in Opencode?
|
||||||
|
|
||||||
|
### Ask for auth
|
||||||
|
How should Opencode authenticate (auth, key, local)?
|
||||||
|
|
||||||
|
### Plan request
|
||||||
|
Analyze the task and propose a step-by-step plan. Ask clarification questions if needed.
|
||||||
|
|
||||||
|
### Plan revision
|
||||||
|
The plan has issues. Please revise it.
|
||||||
|
|
||||||
|
### Build request
|
||||||
|
Proceed with implementation based on the approved plan.
|
||||||
13
references/command-cheatsheet.md
Normal file
13
references/command-cheatsheet.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## Core Opencode commands
|
||||||
|
|
||||||
|
- Start Opencode:
|
||||||
|
opencode
|
||||||
|
|
||||||
|
- Session selection:
|
||||||
|
/sessions
|
||||||
|
|
||||||
|
- Agent (mode) selection:
|
||||||
|
/agents
|
||||||
|
|
||||||
|
- Model selection:
|
||||||
|
/models
|
||||||
13
references/failure-handling.md
Normal file
13
references/failure-handling.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## Common failures and responses
|
||||||
|
|
||||||
|
### Login link does not work
|
||||||
|
- Ask the user to retry
|
||||||
|
- Do not proceed without confirmation
|
||||||
|
|
||||||
|
### Model not available
|
||||||
|
- Inform the user
|
||||||
|
- Ask for an alternative provider
|
||||||
|
|
||||||
|
### Plan is unclear or contradictory
|
||||||
|
- Ask Opencode to rewrite the plan
|
||||||
|
- Do not switch to Build mode
|
||||||
15
references/model-selection.md
Normal file
15
references/model-selection.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
## Model selection procedure
|
||||||
|
|
||||||
|
- Open model selector with:
|
||||||
|
/models
|
||||||
|
|
||||||
|
- Select the provider requested by the user
|
||||||
|
|
||||||
|
### Auth-based providers (e.g. OpenAI)
|
||||||
|
|
||||||
|
- Opencode will generate a login URL
|
||||||
|
- Copy the URL exactly
|
||||||
|
- Send it to the user
|
||||||
|
- Wait for confirmation before continuing
|
||||||
|
|
||||||
|
Never assume authentication is complete.
|
||||||
17
references/plan-vs-build.md
Normal file
17
references/plan-vs-build.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
## Plan mode
|
||||||
|
|
||||||
|
- Thinking only
|
||||||
|
- Planning
|
||||||
|
- Asking questions
|
||||||
|
- Revising approach
|
||||||
|
- No code generation
|
||||||
|
|
||||||
|
## Build mode
|
||||||
|
|
||||||
|
- Code implementation
|
||||||
|
- Execution of approved plan
|
||||||
|
|
||||||
|
### Mode switching
|
||||||
|
|
||||||
|
- Use the Tab key to toggle modes
|
||||||
|
- Always start in Plan mode
|
||||||
8
references/question-handling.md
Normal file
8
references/question-handling.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
## Handling questions from Opencode
|
||||||
|
|
||||||
|
- If Opencode asks a question:
|
||||||
|
- Switch to Plan mode immediately
|
||||||
|
- Answer carefully
|
||||||
|
- Confirm or revise the plan
|
||||||
|
|
||||||
|
Never answer questions in Build mode.
|
||||||
10
references/session-management.md
Normal file
10
references/session-management.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
## Session rules
|
||||||
|
|
||||||
|
- Opencode keeps a history of projects
|
||||||
|
- The same project must always use the same session
|
||||||
|
- Reusing sessions preserves context and decisions
|
||||||
|
- Starting a new session is allowed only if the user explicitly asks
|
||||||
|
- Open session selector using:
|
||||||
|
/sessions
|
||||||
|
|
||||||
|
If unsure, ask the user before creating a new session.
|
||||||
12
references/workflow.md
Normal file
12
references/workflow.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
## Standard workflow
|
||||||
|
|
||||||
|
1. Confirm AI provider and auth method with the user
|
||||||
|
2. Start Opencode
|
||||||
|
3. Reuse existing project session if present
|
||||||
|
4. Select AI model using `/models`
|
||||||
|
5. Ensure Plan mode
|
||||||
|
6. Generate and validate plan
|
||||||
|
7. Switch to Build mode
|
||||||
|
8. Implement
|
||||||
|
9. Handle interruptions by returning to Plan mode
|
||||||
|
10. Repeat until finished
|
||||||
Reference in New Issue
Block a user