Problem
When the OpenCode (OC) agent runs in GitHub Actions, it does not automatically load the .opencode/skills/ files before executing tasks. This means critical conventions — git commit format, PR title rules, pipeline architecture — are ignored unless the agent happens to trigger the skill tool during its session.
Observed in PR #224: the agent made commits with non-conventional messages (missing feat:/fix: prefixes, wrong casing) despite the maintenance skill containing explicit rules for Conventional Commits and PR title formatting.
Root Cause
Skills are loaded on-demand via the skill tool, not automatically at session start. The agent must explicitly call skill({ name: "maintenance" }) to load conventions, but:
- The skill description doesn't always match the task request closely enough to trigger loading
- No configuration forces specific skills to load before work begins
AGENTS.md references conventions but the agent doesn't always parse it thoroughly before acting
Impact
- Commits violate Conventional Commits format (
lint-pr-title.yml rejects PR titles)
- PR descriptions miss required structure
- Agent re-litigates design decisions already settled in skills (e.g., deprecation policy, API surface)
- Each PR requires manual review for convention compliance
Proposed Solutions
Option 1: opencode.json instructions (Recommended — immediate)
Add a project-level config that forces skill content into every session:
{
"$schema": "https://opencode.ai/config.json",
"instructions": [
".opencode/skills/maintenance/SKILL.md",
".opencode/skills/pytrendy/SKILL.md"
]
}
Pros: Zero agent changes needed, conventions always in context.
Cons: Increases context size for simple tasks.
Option 2: Enhance AGENTS.md with explicit skill-loading instructions
Add a mandatory section:
## Critical: Skill Loading Requirements
Before making ANY code changes, commits, or PRs:
1. Load the `maintenance` skill — Contains Conventional Commits and PR title rules
2. Load the `pytrendy` skill — Contains pipeline architecture
3. Follow all conventions from loaded skills
Pros: Works within existing framework, no new config files.
Cons: Relies on agent compliance; may still be skipped.
Option 3: Custom agent with forced skill loading
Create .opencode/agents/conventional-commit.md that mandates loading maintenance and pytrendy skills before any code changes.
Option 4: Upstream feature request
Request OpenCode support for preloadSkills or loadSkills configuration in opencode.json.
Recommended Plan
- Immediate: Implement Option 1 (opencode.json) + Option 2 (AGENTS.md)
- Track: Option 4 as a follow-up feature request on OpenCode GitHub
Commit type note
This is a CI/tooling improvement. Commits for this issue must use chore: or ci: prefix — not fix: or feat: — to avoid triggering an auto-release via semantic-release on main. The conventionalcommits preset maps fix: → patch bump and feat: → minor bump; only chore:/ci:/docs:/refactor: produce no version bump.
Acceptance Criteria
Problem
When the OpenCode (OC) agent runs in GitHub Actions, it does not automatically load the
.opencode/skills/files before executing tasks. This means critical conventions — git commit format, PR title rules, pipeline architecture — are ignored unless the agent happens to trigger theskilltool during its session.Observed in PR #224: the agent made commits with non-conventional messages (missing
feat:/fix:prefixes, wrong casing) despite themaintenanceskill containing explicit rules for Conventional Commits and PR title formatting.Root Cause
Skills are loaded on-demand via the
skilltool, not automatically at session start. The agent must explicitly callskill({ name: "maintenance" })to load conventions, but:AGENTS.mdreferences conventions but the agent doesn't always parse it thoroughly before actingImpact
lint-pr-title.ymlrejects PR titles)Proposed Solutions
Option 1:
opencode.jsoninstructions (Recommended — immediate)Add a project-level config that forces skill content into every session:
{ "$schema": "https://opencode.ai/config.json", "instructions": [ ".opencode/skills/maintenance/SKILL.md", ".opencode/skills/pytrendy/SKILL.md" ] }Pros: Zero agent changes needed, conventions always in context.
Cons: Increases context size for simple tasks.
Option 2: Enhance
AGENTS.mdwith explicit skill-loading instructionsAdd a mandatory section:
Pros: Works within existing framework, no new config files.
Cons: Relies on agent compliance; may still be skipped.
Option 3: Custom agent with forced skill loading
Create
.opencode/agents/conventional-commit.mdthat mandates loadingmaintenanceandpytrendyskills before any code changes.Option 4: Upstream feature request
Request OpenCode support for
preloadSkillsorloadSkillsconfiguration inopencode.json.Recommended Plan
Commit type note
This is a CI/tooling improvement. Commits for this issue must use
chore:orci:prefix — notfix:orfeat:— to avoid triggering an auto-release via semantic-release onmain. Theconventionalcommitspreset mapsfix:→ patch bump andfeat:→ minor bump; onlychore:/ci:/docs:/refactor:produce no version bump.Acceptance Criteria
maintenanceskill before making commitslint-pr-title.ymlvalidation