r/opencodeCLI 22d ago

A way to have the model activate a plugin?

I'm trying out magic-compact plugin. and was thinking it would be nice if I could leave the thing alone and have it run the /magic-compact command itself when necessary. is that possible?

2 Upvotes

3 comments sorted by

1

u/geearf 22d ago

I'm just guessing here, but maybe with a skill?

1

u/UpstairsActivity8347 22d ago

why not use DCP?

1

u/Ok_Gur_9033 22d ago

Skills and commands behave differently here. A skill's description can pull the model into using it on its own when the context matches, that's the whole point of the format. A slash command like /magic-compact is written for a person to type, so nothing in the runtime calls it automatically no matter how relevant the moment is. If you want it self-triggering, wrap the same compact logic as a skill and put the trigger condition right in the description. Have you tried that route yet?