mcpField
A
ask-claude

ask-claude

github.com/hiroro-workAgent workflows4735 installsUpdated 1d ago
Repository

About ask-claude

A skill that runs the local `claude` CLI in non-interactive mode to answer questions and assist with coding. It supports model selection, multiple output formats, and continuing the latest conversation.

Key features

  1. 01Run queries with `claude -p`
  2. 02Select a model
  3. 03Choose text, JSON, or stream-JSON output
  4. 04Continue the latest conversation
  5. 05Use the current working directory

Use cases

  1. 01Ask a coding question
  2. 02Request a code review
  3. 03Get structured JSON results
  4. 04Continue a previous query

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/hiroro-work/claude-plugins --skill ask-claude

After installing, type/ask-claudein Claude Code to confirm it loaded.

Details

From the project README

Ask Claude

Executes the local claude CLI to get coding assistance.

Note: This skill requires the claude CLI to be installed and available in your system's PATH.

Quick start

Run a single query with -p (print mode):

claude -p "Your question or task here"

Common options

OptionDescription
-pNon-interactive print mode (required for scripting)
--model MODELSpecify model (e.g., sonnet, opus, haiku)
--output-format FORMATOutput format: text, json, stream-json
-c, --continueContinue the most recent conversation

For all available options, run claude --help

Examples

Ask a coding question:

claude -p "How do I implement a binary search in Python?"

Use a specific model:

claude -p --model opus "Review this code for potential issues"

Get JSON output:

claude -p --output-format json "List the main functions in this file"

Continue a previous conversation:

claude -p -c "Now add error handling to that function"

Notes

  • The -p flag runs Claude non-interactively and outputs result to stdout
  • If --model is not specified, the default model is used
  • stream-json outputs responses incrementally as they are generated
  • Warning: The -p flag skips the workspace trust dialog. Only use in directories you trust.
  • The command inherits the current working directory

Comments

Markdown supported