Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation

opencode-distill

An OpenCode V2 plugin that finds repeated multi-step workflows in session history and proposes reusable artifacts: a skill, a command, or a subagent.

Install

mkdir -p ~/.config/opencode/plugins
curl -fsSL \
  https://raw.githubusercontent.com/jadmadi/opencode-distill/main/distill.ts \
  -o ~/.config/opencode/plugins/distill.ts

For one project, put it in .opencode/plugins/. Tested against OpenCode 0.0.0-beta-19425.

Use

Command Effect
/distill Analyze the current session
/distill <sessionID> ... Analyze named sessions
/distill list Show the last proposal
/distill apply <n> Write the candidate numbered n

The command prints the candidates and their confidence. Nothing is written until apply. A candidate whose target file already exists is reported as a duplicate.

Where files go

Approved artifacts are written under DISTILL_ROOT, or ~/.config/opencode/ by default:

skills/<name>/SKILL.md
commands/<name>.md
agents/<name>.md

Model

The analysis uses the session's model. Some providers do not support transient generation: OpenCode Go returned Request is missing x-opencode-session in testing. Set DISTILL_MODEL to a working model, for example DISTILL_MODEL=deepseek/deepseek-flash.

Tests

bun test

Attribution

Inspired by MiMoCode's /distill. See NOTICE.

License

MIT

About

OpenCode V2 plugin that distills repeated workflows into reusable artifacts

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages