Skip to content
nghiaxhPublic

About

My custom OpenCode config

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

67 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opencode config

Global opencode configuration for commands and settings, see the official docs for more detail.

Install

cd ~/.config/opencode
git init
git remote add origin https://github.com/nghiaxh/opencode.git
git fetch origin
git reset --hard origin/main

Update

Edit config directly at ~/.config/opencode/, then run /lazy-commit to split the changes into conventional commits, and push:

cd $HOME\.config\opencode
git push

Structure

opencode.jsonc              # Server and project config
cli.json                    # Terminal client preferences, owned by the TUI
AGENTS.md                   # Always-on instructions, the only file auto-loaded
commands/lazy-search.md     # /lazy-search
commands/lazy-ask.md       # /lazy-ask
commands/lazy-prompt.md    # /lazy-prompt
commands/lazy-commit.md     # /lazy-commit
commands/lazy-audit.md      # /lazy-audit
commands/lazy-polish.md     # /lazy-polish
commands/lazy-test.md       # /lazy-test
skills/                     # Installed skills, gitignored
service.json                # Generated by the v2 service, gitignored

Commands

Seven /lazy-* commands in commands/, listed in flow order: search finds where a topic lives, ask turns a want into settled decisions, prompt turns the work into small independent branches a fresh agent can run cold, audit cuts deletable debt, polish polishes what survives, test proves it, commit splits it into conventional commits. They do not overlap.

/lazy-search commands/lazy-search.md

Locate the code a topic touches, file:line only. With an argument it searches and prints the sorted hit list, then stops. Without an argument it asks for the topic first, then searches. Read only.

/lazy-search <topic>

/lazy-ask commands/lazy-ask.md

Ask what you actually want in rounds before any code is written. The want is a hint, not the answer: the first round tests it rather than confirming it. Each round asks the whole frontier in one question call, two to four options per question with the recommended one first, then recomputes. It ends with the settled list and the go. Without an argument it asks for the want first. Read only.

/lazy-ask <want>

/lazy-prompt commands/lazy-prompt.md

Turn a task into per-branch implementation prompts a fresh agent can run without this conversation. It reads the code the task touches, splits it into small independently shippable branches, and prints one self-contained prompt per branch. Read only.

/lazy-prompt <task>

/lazy-audit commands/lazy-audit.md

Audit the whole repo for over-engineering, what can be deleted. One line per finding ranked biggest cut first, tagged delete, stdlib, native, yagni, or shrink. Read only, never deletes; the user triggers cuts. An argument narrows the scan to that path. Runs as a background subagent.

/lazy-audit [path]

/lazy-polish commands/lazy-polish.md

Polish the code that stays: names, flow, shape, boundary, scale, fit, depth, locality, reuse. Phase 1 lists moves ranked by blast radius without touching anything. Phase 2 applies approved moves one at a time and proves each with the existing check. An argument narrows scope to a path or a move class, or apply <n> applies the nth listed move.

/lazy-polish [path|name|flow|shape|boundary|scale|fit|depth|locality|reuse|apply <n>]

/lazy-test commands/lazy-test.md

Run the check that exists, report what it proved and what it did not cover. It finds the real check in README, package.json scripts, Makefile, justfile, or CI, runs the narrowest one covering the change, and judges whether the proof is weak. Read only; it writes no test code. An argument narrows the check to a path, package, or failing test.

/lazy-test [path|package|failing test]

/lazy-commit commands/lazy-commit.md

Split the working tree into one conventional commit per change type. It groups files by type, commits in order fix, feat, refactor, perf, test, docs, style, build, ci, chore, revert, and never pushes. An argument narrows the split to a path or a type.

/lazy-commit [path|type]

Skills

Not tracked here. npx skills add <repo> -s <name> -g -a opencode installs into ~/.config/opencode/skills, which this repo gitignores. OpenCode discovers that path plus .opencode/skills per project, so a fresh clone starts with no skill installed.

npx skills add vercel-labs/agent-skills -s vercel-react-best-practices -g -a opencode -y
npx skills add vercel-labs/agent-skills -s web-design-guidelines -g -a opencode -y
npx skills add vercel-labs/agent-skills -s vercel-composition-patterns -g -a opencode -y
npx skills add wshobson/agents -s nextjs-app-router-patterns -g -a opencode -y
npx skills add wshobson/agents -s react-state-management -g -a opencode -y
npx skills add wshobson/agents -s accessibility-compliance -g -a opencode -y
npx skills add wshobson/agents -s typescript-advanced-types -g -a opencode -y
npx skills add github/awesome-copilot -s javascript-typescript-jest -g -a opencode -y
npx skills add github/awesome-copilot -s java-springboot -g -a opencode -y
npx skills add github/awesome-copilot -s spring-boot-testing -g -a opencode -y
npx skills add github/awesome-copilot -s create-spring-boot-java-project -g -a opencode -y
npx skills add github/awesome-copilot -s javax-to-jakarta-migration -g -a opencode -y
npx skills add github/awesome-copilot -s sql-optimization -g -a opencode -y
npx skills add Leonxlnx/taste-skill -s design-taste-frontend -g -a opencode -y
npx skills add Leonxlnx/taste-skill -s minimalist-ui -g -a opencode -y

About

My custom OpenCode config

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Used by

Contributors