mirror of
https://github.com/wesammustafa/opencode-primer.git
synced 2026-11-18 18:04:22 +00:00
This repo doubles as a fully-configured OpenCode project so readers can see real files instead of abstract format docs. Agents (.opencode/agents/, OpenCode YAML + markdown body): - code-reviewer.md — read-only subagent, glob-gated bash perms, Severity/Where/Why/Fix output format. Rewrites the pre-refactor file which used incorrect frontmatter shape (no YAML, claude-sonnet-4.6 as bare ID, made-up tool keys). - security-auditor.md — OWASP-focused review subagent, deny edit, ask bash, CWE-aware output template. Commands (.opencode/commands/): - review.md, pr.md, test.md, optimize.md — uses real placeholders ($ARGUMENTS, @file, !shell), points the right agent at each task. Plugins (.opencode/plugins/): - protect-secrets.js — blocks tool calls touching .env*, secrets/, credentials*, SSH keys, .npmrc, .pypirc. Pure JS, no deps. - audit-log.js — appends one JSON line per successful tool call to .opencode/audit.jsonl (also added to .gitignore). - README.md — how to install/disable, sample audit-log line, link to docs/plugins.md. Skills (.opencode/skills/git-release/SKILL.md): - Proper folder-with-SKILL.md format. Trigger-shaped description so the model actually loads it when the conversation touches release prep.
1.0 KiB
1.0 KiB
description, agent
| description | agent |
|---|---|
| Open a pull request from the current branch with a generated title and summary | build |
Create a pull request from the current branch:
- Read the current state:
!git status --short !git log main..HEAD --oneline !git diff main...HEAD --stat
-
Decide on a PR title:
- Match the repo's conventional-commits style (
feat:,fix:,refactor:,docs:, …) - One short sentence, under ~70 chars
- Imperative voice ("Add X" not "Added X")
- Match the repo's conventional-commits style (
-
Write the PR body using this template:
## Summary
<1–3 bullets — what changed and why, not how>
## Test plan
- [ ] <verifiable step>
- [ ] <verifiable step>
- Push the branch if it's not yet on the remote, then create the PR:
git push -u origin HEAD # only if needed
gh pr create --title "<title>" --body "<body>"
- Print the resulting PR URL when done.
Extra context (optional, from the user): $ARGUMENTS
Don't force-push, amend pushed commits, or rebase main into the branch unless explicitly asked.