Skip to content

fix(skill-loader): include agentsFromOpenCodeConfig in discoverSkills#4581

Open
Hungdoan565 wants to merge 3 commits into
code-yeongyu:devfrom
Hungdoan565:fix/discover-skills-missing-agents-opencode-config-4533
Open

fix(skill-loader): include agentsFromOpenCodeConfig in discoverSkills#4581
Hungdoan565 wants to merge 3 commits into
code-yeongyu:devfrom
Hungdoan565:fix/discover-skills-missing-agents-opencode-config-4533

Conversation

@Hungdoan565
Copy link
Copy Markdown

@Hungdoan565 Hungdoan565 commented May 28, 2026

Fixes #4533

Skills from ~/.config/opencode/.agents/skills/ were not discoverable via the skill tool because discoverSkills() was missing the call to discoverGlobalAgentsSkillsFromOpenCodeConfig().

The fix adds this function to the Promise.all array and includes its results in the deduplication step, matching the priority order already used in discoverAllSkills().


Summary by cubic

Fixes missing agent skills by discovering OpenCode-configured agents. Adds a default .gitignore to team-mode worktree folders to keep temp directories clean.

  • Bug Fixes

    • Included agents from OpenCode config in discoverSkills() and discoverAllSkills(), at lowest priority with de-duplication.
    • Implemented and exported getAgentsSkillDirs to resolve TS2305/TS7006 errors and correctly load .agents/skills dirs.
  • New Features

    • Write a .gitignore in each team-mode worktree with common ignores.

Written for commit 78d74f8. Summary will update on new commits.

Review in cubic

PR code-yeongyu#4581 introduced calls to getAgentsSkillDirs from opencode-command-dirs but never implemented it, causing TS2305 + TS7006 typecheck failures that cascaded into test compile errors.

Mirror the getOpenCodeSkillDirs pattern to resolve .agents/skills dirs under each OpenCode config dir (plus profiles parent).
@Hungdoan565 Hungdoan565 force-pushed the fix/discover-skills-missing-agents-opencode-config-4533 branch from 9129078 to 78d74f8 Compare May 29, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: security-research skill not discoverable - files exist but discovery mechanism doesn't scan .agents/skills/

1 participant