Register and share your invite link to earn from video plays and referrals.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture 投稿は個人の意見です。
Joined May 2026
279 Following    408 Followers
# OpenCode Features and Practical Usage 📜 Tired of re-explaining your project's conventions every single session? `AGENTS.md` fixes that: write it once, and the agent always operates with your rules in mind. 🏷️ Title: AGENTS.md 🔗 URL: 📘 Overview `AGENTS.md` is the file you use to give OpenCode custom instructions. Document your project's conventions, architecture, and build steps there, and that content is always included in the LLM's context so the agent behaves the way your team expects. ⚙️ How It Works Rules live at two levels: ・Project-level: an `AGENTS.md` at the repo root, applied only within that directory tree. ・Global-level: `~/.config/opencode/AGENTS.md`, shared across all sessions and best for personal preferences. At startup OpenCode searches in order: local `AGENTS.md` or `CLAUDE.md` (walking up from the current directory) → global `~/.config/opencode/AGENTS.md` → the Claude Code compatibility file `~/.claude/CLAUDE.md`. The first match in each category wins. The design is close to Cursor-style rules and makes migration easy. 🛠️ Practical Usage To pull in external docs as instructions, list them in the `instructions` field of `opencode.json`, e.g. `"instructions": ["CONTRIBUTING.md", "docs/guidelines.md", ".cursor/rules/*.md"]`. Globs are supported. If writing from scratch feels like a chore, run `/init`: it scans important files, may ask targeted questions, and generates or improves `AGENTS.md` for you. Commit the result to Git so the whole team shares it. 💡 Use Cases Capture tacit knowledge like "commit messages in Japanese," "tests use pytest," or "never import this layer directly" in `AGENTS.md`, and both new teammates and the agent share the same assumptions, cutting down on review churn. In monorepos, `instructions` globs let you bundle per-package conventions. ⚠️ Caveats File references hand-written inside `AGENTS.md` are not expanded automatically. When you need multiple files reliably loaded, the `instructions` field of `opencode.json` is the dependable choice. An existing `CLAUDE.md` is recognized for compatibility, but consolidating new content into `AGENTS.md` keeps things tidy. Remote URL references carry a 5-second timeout. #OpenCode# #AGENTSmd#
Show more