Agent skill
ask-claude
Asks Claude CLI for coding assistance. Use for getting a second opinion, code generation, debugging, or delegating coding tasks.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/ask-claude
SKILL.md
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
| Option | Description |
|---|---|
-p |
Non-interactive print mode (required for scripting) |
--model MODEL |
Specify model (e.g., sonnet, opus, haiku) |
--output-format FORMAT |
Output format: text, json, stream-json |
-c, --continue |
Continue 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
-pflag runs Claude non-interactively and outputs result to stdout - If
--modelis not specified, the default model is used stream-jsonoutputs responses incrementally as they are generated- Warning: The
-pflag skips the workspace trust dialog. Only use in directories you trust. - The command inherits the current working directory
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?