version: 0.0.1
name: spellcheck
about: Check and fix spelling in text or files
notify: true
api:
output: replace
input: query
actions:
- tag: tag_content
run: cmd
expect: string
check: .+
action:
- when: '{query|file_path|empty:not}'
then: cat "{query|file_path|load}"
- when: '{query|empty:not}'
then: echo "{query}"
- when: 'true'
then: echo "ERROR - No input provided"
- tag: tag_check_errors
run: 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: 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}
- tag: tag_clipboard
run: value
expect: string
action: '{tag_checked|clipboard}'