mirror of
https://github.com/cole-maxwell1/dotfiles.git
synced 2026-08-02 12:23:54 -04:00
Add opencode config
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Response Tone
|
||||
|
||||
1. **Accuracy over agreeableness:** Do not open with compliments, validation, or social pleasantries. Begin every response with the substance of the answer. Praise is noise; signal is the goal.
|
||||
2. **Default to skepticism:** Treat every user claim as potentially flawed until verified. If a statement is wrong, say so immediately and state the correction. Do not use hedging language like "You might want to consider...". Say "That is incorrect" and explain why.
|
||||
3. **Never apologize for correcting the user:** Corrections are the primary value. Phrases like "I'm sorry, but..." or "With all due respect..." are forbidden. State the correction directly.
|
||||
4. **Be blunt and argumentative when warranted:** If reasoning is unsound, challenge it. Name the flaw in the logic explicitly. You have standing permission to disagree and hold your position if reasoning is stronger.
|
||||
5. **Do not mirror the user's confidence:** Evaluate claims on merits alone. A confidently stated falsehood receives the same direct correction as a tentative one.
|
||||
6. **Distinguish certainty levels honestly:** When certain, be assertive. When genuinely ambiguous, say so plainly without manufacturing false uncertainty.
|
||||
|
||||
# Style & Formatting Constraints
|
||||
|
||||
1. **Code Comment Tone:** Keep all comments objective or imperative. It is strictly forbidden to use words like "we", "us", or any first-person plural personal pronouns in code comments or explanations.
|
||||
2. **No Emojis:** NEVER use emojis in code comments, `README.md` files, or any other Markdown documentation. Maintain a purely professional, text-only formatting style.
|
||||
|
||||
# Git
|
||||
When asked, write professional Git commit messages for requested changes. NEVER add an AI co-author tag to commit messages.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
description: Minimal executor for GLM quota tool
|
||||
mode: subagent
|
||||
hidden: true
|
||||
permission:
|
||||
edit: deny
|
||||
bash: deny
|
||||
---
|
||||
|
||||
CRITICAL INSTRUCTION: When the glm_quota tool returns output, you MUST return it EXACTLY as received, character-for-character, with NO modifications.
|
||||
|
||||
- Do NOT add introductory text
|
||||
- Do NOT summarize
|
||||
- Do NOT reformat
|
||||
- Do NOT explain anything
|
||||
- Do NOT add any commentary
|
||||
- Return ONLY the raw string from the tool
|
||||
|
||||
Example of WRONG behavior: 'Here is your usage: [summary]'
|
||||
Example of CORRECT behavior: [paste entire tool output verbatim]
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Execute GLM quota check
|
||||
agent: glm-quota-exec
|
||||
---
|
||||
Execute glm_quota tool and return its output EXACTLY as received without any modification or summarization.
|
||||
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git log *": "allow",
|
||||
"git commit *": "ask",
|
||||
"git status *": "allow",
|
||||
"git diff *": "allow",
|
||||
"git show *": "allow",
|
||||
"git push *": "ask",
|
||||
"sudo *": "deny",
|
||||
"curl *": "ask",
|
||||
"wget *": "ask",
|
||||
"diff *": "allow",
|
||||
"npm *": "allow",
|
||||
"rm -rf *": "deny",
|
||||
"rm *": "ask",
|
||||
"grep *": "allow",
|
||||
"sort *": "allow",
|
||||
"head *": "allow",
|
||||
"tail *": "allow",
|
||||
"ls *": "allow",
|
||||
"wc *": "allow",
|
||||
"go build *": "allow",
|
||||
"go test *": "allow",
|
||||
"go vet *": "allow",
|
||||
"go mod tidy": "allow",
|
||||
"go mod download": "allow",
|
||||
"dotnet *": "allow",
|
||||
"docker ps *": "allow",
|
||||
"docker logs *": "allow",
|
||||
"docker compose logs *": "allow",
|
||||
},
|
||||
"read": {
|
||||
".env": "deny",
|
||||
".secrets": "deny",
|
||||
"*.key": "deny",
|
||||
"*.pem": "deny",
|
||||
"id_rsa": "deny",
|
||||
"id_ed25519": "deny",
|
||||
".aws/credentials": "deny",
|
||||
"opencode.jsonc": "deny",
|
||||
"~/.ssh/known_hosts": "allow",
|
||||
},
|
||||
"grep": "allow",
|
||||
"glob": "allow",
|
||||
"question": "allow",
|
||||
"lsp": "allow",
|
||||
"websearch": "allow",
|
||||
},
|
||||
"mcp": {
|
||||
"zai-mcp-server": {
|
||||
"type": "local",
|
||||
"command": ["npx", "-y", "@z_ai/mcp-server"],
|
||||
"environment": {
|
||||
"Z_AI_API_KEY": "{env:ZAI_API_KEY}",
|
||||
"Z_AI_MODE": "ZAI",
|
||||
},
|
||||
},
|
||||
"web-search-prime": {
|
||||
"type": "remote",
|
||||
"url": "https://api.z.ai/api/mcp/web_search_prime/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {env:ZAI_API_KEY}",
|
||||
},
|
||||
},
|
||||
"web-reader": {
|
||||
"type": "remote",
|
||||
"url": "https://api.z.ai/api/mcp/web_reader/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {env:ZAI_API_KEY}",
|
||||
},
|
||||
},
|
||||
"zread": {
|
||||
"type": "remote",
|
||||
"url": "https://api.z.ai/api/mcp/zread/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {env:ZAI_API_KEY}",
|
||||
},
|
||||
},
|
||||
"ibmi-server": {
|
||||
"type": "local",
|
||||
"command": [
|
||||
"npx",
|
||||
"-y",
|
||||
"@ibm/ibmi-mcp-server@latest",
|
||||
"--tools",
|
||||
"/home/colem/mcp/ibmi-mcp-server/tools/custom-tools.yaml",
|
||||
],
|
||||
"enabled": true,
|
||||
"environment": {
|
||||
"DB2i_HOST": "{env:DB2i_HOST}",
|
||||
"DB2i_USER": "{env:DB2i_USER}",
|
||||
"DB2i_PASS": "{env:DB2i_PASS}",
|
||||
"DB2i_PORT": "8076",
|
||||
"DB2i_IGNORE_UNAUTHORIZED": "true",
|
||||
},
|
||||
},
|
||||
},
|
||||
"lsp": true,
|
||||
"formatter": true,
|
||||
"model": "zai-coding-plan/glm-5.2",
|
||||
"small_model": "zai-coding-plan/glm-4.5-air",
|
||||
"agent": {
|
||||
"explore": {
|
||||
"model": "zai-coding-plan/glm-4.5-air",
|
||||
},
|
||||
"scout": {
|
||||
"model": "zai-coding-plan/glm-4.5-air",
|
||||
},
|
||||
},
|
||||
"share": "disabled",
|
||||
"snapshot": true,
|
||||
"plugin": ["opencode-glm-quota"],
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: glm-quota
|
||||
description: Query Z.ai GLM Coding Plan usage statistics including quota limits, model usage, and MCP tool usage
|
||||
parameters:
|
||||
- name: detailed
|
||||
type: boolean
|
||||
optional: true
|
||||
description: Show detailed usage breakdown
|
||||
---
|
||||
Query GLM quota usage including token limits and MCP tool usage.
|
||||
Reference in New Issue
Block a user