From f9c2176b6c7a521658ff5b54195939a5a83d97ba Mon Sep 17 00:00:00 2001 From: Alex Blank Date: Fri, 8 May 2026 10:44:11 +0200 Subject: [PATCH] added opencode config --- .config/i3/config##class.arch_laptop | 1 - .config/opencode/AGENTS.md | 18 ++++++++++ .config/opencode/command/tokenscope.md | 7 ++++ .config/opencode/dcp.jsonc | 3 ++ .config/opencode/opencode.json | 31 ++++++++++++++++ .config/opencode/skills/auto-commit/SKILL.md | 38 ++++++++++++++++++++ 6 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .config/opencode/AGENTS.md create mode 100644 .config/opencode/command/tokenscope.md create mode 100644 .config/opencode/dcp.jsonc create mode 100644 .config/opencode/opencode.json create mode 100644 .config/opencode/skills/auto-commit/SKILL.md diff --git a/.config/i3/config##class.arch_laptop b/.config/i3/config##class.arch_laptop index e86a210..3774ae0 100644 --- a/.config/i3/config##class.arch_laptop +++ b/.config/i3/config##class.arch_laptop @@ -365,7 +365,6 @@ exec --no-startup-id mullvad-vpn exec --no-startup-id redshift ~/.config/redshift/redshift.conf exec --no-startup-id blueman-applet exec --no-startup-id picom -b -exec --no-startup-id flameshot # locking specific startup applications #exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork diff --git a/.config/opencode/AGENTS.md b/.config/opencode/AGENTS.md new file mode 100644 index 0000000..5eca78a --- /dev/null +++ b/.config/opencode/AGENTS.md @@ -0,0 +1,18 @@ +# Agent instructions + +## Always do + +- Before editing, briefly explain the intended change. +- Prefer small, focused diffs. +- Reuse existing patterns, think reusable and modular. +- Try to use functional approaches, if practical. +- Run tests or type checks after code changes when practical. +- Do not introduce new dependencies without asking. +- Update docs when behavior changes. + +## Documentation Guidelines + +- Use the with-context MCP server for all project documentation additionally +- Create changelogs in CHANGELOG.md using append mode +- Store API docs in docs/api/ folder +- Always set project context before writing notes diff --git a/.config/opencode/command/tokenscope.md b/.config/opencode/command/tokenscope.md new file mode 100644 index 0000000..5fe6bd4 --- /dev/null +++ b/.config/opencode/command/tokenscope.md @@ -0,0 +1,7 @@ +--- +description: Analyze token usage across the current session with detailed breakdowns by category +--- + +Call the tokenscope tool directly without delegating to other agents. +Leave sessionID unset unless the user explicitly asked to analyze a different session. +Then cat the token-usage-output.txt. DONT DO ANYTHING ELSE WITH THE OUTPUT. diff --git a/.config/opencode/dcp.jsonc b/.config/opencode/dcp.jsonc new file mode 100644 index 0000000..6e5c686 --- /dev/null +++ b/.config/opencode/dcp.jsonc @@ -0,0 +1,3 @@ +{ + "$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/master/dcp.schema.json" +} diff --git a/.config/opencode/opencode.json b/.config/opencode/opencode.json new file mode 100644 index 0000000..6b7c506 --- /dev/null +++ b/.config/opencode/opencode.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://opencode.ai/config.json", + "plugin": [ + "superpowers@git+https://github.com/obra/superpowers.git", + "opencode-snip@latest", + "@tarquinen/opencode-dcp@latest", + "@ramtinj95/opencode-tokenscope", + "@slkiser/opencode-quota", + "envsitter-guard@latest", + "opencode-mystatus" + ], + "command": { + "mystatus": { + "description": "Query quota usage for all AI accounts", + "template": "Use the mystatus tool to query quota usage. Return the result as-is without modification." + } + }, + "mcp": { + "with-context": { + "type": "local", + "command": ["npx", "-y", "with-context-mcp"], + "environment": { + "OBSIDIAN_API_KEY": "{env:OBSIDIAN_API_KEY}", + "OBSIDIAN_API_URL": "{env:OBSIDIAN_API_URL}", + "OBSIDIAN_VAULT": "{env:OBSIDIAN_VAULT}", + "PROJECT_BASE_PATH": "{env:PROJECT_BASE_PATH}" + }, + "enabled": true + } + } +} diff --git a/.config/opencode/skills/auto-commit/SKILL.md b/.config/opencode/skills/auto-commit/SKILL.md new file mode 100644 index 0000000..7be2440 --- /dev/null +++ b/.config/opencode/skills/auto-commit/SKILL.md @@ -0,0 +1,38 @@ +--- +name: auto-commit +description: Use when you are making multiple edits or completing significant work in a git repository to automatically create commits +--- + +# Auto-Commit + +## Overview + +Create a git commit for each logical chunk of work completed. This keeps the commit history meaningful and gives you a safety net to undo if something goes wrong later. + +## When to Use + +- After completing a significant change (new feature, bug fix, refactor) +- After each logical step in a multi-step implementation +- Before switching context or getting interrupted +- When the diff is coherent and focused on one thing + +## Do NOT commit for + +- Trivial single-line fixes +- Changes that are still in progress / incomplete +- When the user explicitly says not to + +## How + +1. When you finish a piece of work, run `git status` and `git diff` to understand the changes +2. Use `git add` to stage relevant files +3. Create a commit with a message that explains WHAT changed and WHY (inspired by conventional commits but adapted to the project's style) +4. Run `git status` after to verify + +## Commit Message Style + +- First line: concise summary (max 72 chars) + - Format: `type: short description` + - Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `style` +- Body (optional): additional context if needed +- Reference issues or related commits if applicable