Skip to content

fix: reread local skill files when using skills#23529

Open
remorses wants to merge 1 commit intoanomalyco:devfrom
remorses:fix-skill-local-read
Open

fix: reread local skill files when using skills#23529
remorses wants to merge 1 commit intoanomalyco:devfrom
remorses:fix-skill-local-read

Conversation

@remorses
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #19050

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Local skills were serving stale content because the cached markdown body was reused after SKILL.md changed.

This rereads the local SKILL.md file when the skill tool or a skill-backed slash command loads the skill, and falls back to the cached content if parsing fails.

How did you verify your code works?

  • Ran bun typecheck in packages/opencode

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Refresh skill content from the current SKILL.md file when the skill tool or skill-backed slash commands load a local skill. This keeps edited local skills in sync without changing the broader discovery cache behavior.

Session: ses_255d95f8dffeQnYDq0H6U0KCqb
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Found a potentially related PR:

PR #19136: fix(skill): invalidate skill cache when SKILL.md files change on disk
#19136

This PR appears related as it also addresses the issue of skill cache invalidation when SKILL.md files change. Both PRs (#23529 and #19136) are tackling similar cache-related problems with local skill files, though they may approach the solution differently (PR #23529 rereads on load, while #19136 invalidates when files change on disk).

@remorses remorses changed the title fix: reread local skill files when loading fix: reread local skill files when using skills Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SKILL reference not update after edit the SKILL

1 participant