Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

SKILL.md triggers skill in infinite loop #52

@imqqmi

Description

@imqqmi

I have the following skill:


name: magick
description: With this tool you can manipulate images, including cropping it.
allowed-tools: # Optional (parsed but not enforced)

  • read
  • write
  • bash
    metadata: # Optional key-value pairs
    version: "1.0"

magick skill

Magick is a cli tool to manipulate images. In the .opencode/skills/magick/bin folder you'll find the magick.exe file that you can run. Here is the help of magick.exe:

Instructions

  • Make sure you use platform independent paths with forward slashes. ie .opencode/skills/magick/bin/magick.exe
  • The location of the magick tool is from the project root:
    .opencode/skills/magick/bin/magick.exe
  • Do not use the magick.exe convert option as it is deprecated, use the normal magick.exe instead.
  • When asked to crop a section from the image, first get the image dimensions, then approximate the boundingbox of the subject the user wants to crop and run the command with the boundingbox.
  • Only invoke the skill once.

Examples
.opencode/skills/magick/bin/magick.exe identify ./GrabFromPDF.png

Crop with -crop x+offset_x+offset_y for example 430x120+50+50
.opencode/skills/magick/bin/magick ./input_file.png -crop 330x550+10+50 +repage ./output_file.png

If you need the command line switches and help run this command:
magick.exe --help


With this skill, when it's invoked the skill gets triggered by the contents of SKILL.md itself in an infinite loop due to the heading # magick skill and the next line mentioning the skill. When I remove magick from both lines it doesn't do an infinite loop.

I think it would be an improvement when you check that you don't trigger on the SKILL.md content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions