name: spellcheck
about: Check and fix spelling in text or files
clipboard: true
notify: true
args:
- name: text
short: 't'
expect: string
help: Text to check
default: '{system_clipboard}'
- name: file
short: 'f'
expect: string
help: File to check
default: ''
actions:
- tag: tag_content
run: cmd
expect: string
check: .+
action:
- when: '{file|empty}'
then: echo "{text}"
- when: '{file|empty:not}'
then: cat "{file|resolve}"
- tag: tag_check_errors
run: llm_small
expect: string
action: |
[Task]
Analyze the text below for typos, spelling mistakes, and grammar errors.
If errors exist, reply strictly with "DIRTY". If no errors exist, reply strictly with "CLEAR"
[Text]
{tag_content}
- tag: tag_check_errors_filter
run: cmd
expect: string
action:
- when: '{tag_check_errors|contains:DIRTY}'
then: echo "{tag_content}"
- when: '{tag_check_errors|contains:CLEAR}'
then: echo "No errors found."
- tag: tag_checked
run: llm_small
expect: string
action: |
[Task]
Fix all spelling mistakes, typos, and grammar errors in the text below.
Strict rules: Preserve all code syntax, markdown tags, and formatting exactly as-is.
[Text]
{tag_check_errors_filter}