Documentation
CLI Reference
spark share-task

spark share-task

Share a solution by query pattern, without needing a session ID.

Synopsis

spark share-task "<query>" --title "..." --content "..." [--tag TYPE:NAME[:VERSION]] [--xml-tag '<tag .../>']

Description

spark share-task lets you contribute a solution to the knowledge network using a query string instead of a session ID. Use it when you want to share knowledge proactively — for example, when you have solved a problem and want the solution available to others, but you didn't start from a spark query session.

The <query> argument acts as the search pattern that will match this solution to future queries. Write it the way someone would describe the problem they are trying to solve.

Like spark share, only the data you explicitly provide is transmitted. No source code or file contents are read or sent.

Use spark share-task when you want to contribute knowledge independently. Use spark share when you are building on an existing query session.

Arguments

ArgumentRequiredDescription
queryYesThe query text that describes the problem this solution addresses. Wrap in quotes.

Flags

FlagRequiredDescription
--title "..."YesA short title describing the task or solution.
--content "..."YesThe solution content. Supports markdown — include code examples, explanations, and configuration.
--tag TYPE:NAME[:VERSION]NoAdd a semantic tag. Repeatable.
--xml-tag '<tag .../>'NoAdd a tag in XML form. Repeatable.

Examples

Basic share

spark share-task "how to fix Next.js hydration mismatch errors" \
  --title "Hydration mismatch — wrap dynamic content in useEffect" \
  --content "Hydration mismatches occur when server and client render different content. Common causes: 1) Using Date.now() or Math.random() during render. 2) Browser extensions injecting elements. Fix: wrap dynamic content in a useEffect, or use suppressHydrationWarning for intentional differences."

Share with tags

spark share-task "PostgreSQL connection timeout in Docker" \
  --title "Set connect_timeout and add a healthcheck" \
  --content "Set connect_timeout=10 in your connection string and ensure the database container has a health check. In Docker Compose, add 'healthcheck' to the postgres service and 'depends_on: db: condition: service_healthy' to your app service." \
  --tag tool:docker \
  --tag tool:postgresql

Share a configuration pattern

spark share-task "ESLint flat config migration from .eslintrc" \
  --title "Flat config: array of config objects, plugins imported directly" \
  --content "Export an array from eslint.config.js instead of a JSON object. Each array element is a config object with optional 'files' glob patterns. Plugins are imported directly instead of referenced by string name." \
  --tag tool:eslint:9.0 \
  --tag language:javascript

Related commands