ask-claude
Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).
About this skill
The `ask-claude` skill allows an AI agent to leverage the powerful capabilities of the Claude Code CLI for a wide range of coding and development tasks. It's designed for synchronous execution, ensuring the agent waits for Claude's comprehensive output before proceeding. This skill is particularly valuable for its ability to maintain persistent sessions; Claude can recall previous interactions, file edits, and contextual information within a designated `workdir`, making it highly effective for multi-turn problem-solving or iterative development workflows. The primary use cases include delegating complex coding problems, performing in-depth code analysis, executing file editing operations, and running bash commands within Claude's secure and confined environment. The skill emphasizes safety, explicitly stating 'no data exfiltration, no external calls, file operations confined to workspace,' which provides a secure sandbox for code execution. Developers and technical users interacting with AI agents will find this skill indispensable for scenarios requiring a context-aware coding assistant. It streamlines the development process by allowing seamless continuation of tasks without losing crucial context, significantly enhancing productivity for debugging, refactoring, and general code management.
Best use case
The primary use case for this skill is to empower an AI agent to offload intricate coding challenges, code refactoring, analysis, or debugging tasks to the specialized capabilities of the Claude Code CLI. This is most beneficial for developers, software engineers, and technical users who need an intelligent assistant capable of maintaining context across multiple interactions, enabling a more fluid and efficient iterative development workflow.
Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).
Users should expect a detailed, immediate report from the Claude Code CLI, providing the results of the delegated task, which may include code snippets, analysis findings, command outputs, or confirmations of file modifications.
Practical example
Example input
Hey Claude, can you help me refactor the `calculate_total` function in `src/utils.py` for better error handling and efficiency? Focus on reducing redundant calculations.
Example output
Claude Code CLI Output:
I have analyzed `src/utils.py` and refactored `calculate_total` to include a `try-except` block for `ValueError` and use memoization to improve efficiency for repeated inputs.
```python
# Example of refactored code
from functools import lru_cache
@lru_cache(maxsize=None)
def calculate_total(items):
try:
# ... optimized logic ...
return total
except ValueError as e:
print(f"Error processing items: {e}")
return None
```
The changes have been applied to `src/utils.py`. What's next?When to use this skill
- When the user explicitly asks to run Claude or delegate a coding task.
- To continue a previous Claude session or follow up on an ongoing coding task in the same directory.
- For tasks benefiting from Claude Code's tools, such as file editing, code analysis, or bash execution.
- When the user references prior Claude activity or asks to 'continue' a previous line of work.
When not to use this skill
- For completely new or unrelated tasks that do not require any previous context from Claude.
- When the user explicitly requests to start fresh, forget the previous context, or 'begin from scratch.'
- When working in a different project directory where the previous session's context is irrelevant.
- When a simple, quick command execution is needed that does not necessitate Claude's advanced reasoning or code generation capabilities.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ask-claude/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ask-claude Compares
| Feature / Agent | ask-claude | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | medium | N/A |
Frequently Asked Questions
What does this skill do?
Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).
How difficult is it to install?
The installation complexity is rated as medium. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Ask Claude — Execute & Report (with persistent sessions) ## How to Run **ALWAYS use the synchronous shell tool — NEVER the process/background tool.** The command takes 30–120 seconds. Wait for it. Do NOT launch it as a background process. ## The Two Modes ### New session (default) Use when starting a fresh task or new topic. ```bash OUTPUT=$(/home/xmanel/.openclaw/workspace/run-claude.sh "prompt" "/workdir") echo "$OUTPUT" ``` ### Continue session (--continue) Use when the user is following up on a previous Claude task in the same workdir. Claude Code will have full memory of what was done before — files read, edits made, context gathered. ```bash OUTPUT=$(/home/xmanel/.openclaw/workspace/run-claude.sh --continue "prompt" "/workdir") echo "$OUTPUT" ``` ## When to use --continue Use `--continue` when the user says things like: - "agora corrige o que encontraste" - "continua" - "e o ficheiro X?" - "faz o mesmo para..." - "e agora?" - "ok, e o erro de..." - Anything that clearly references what Claude just did Use a **new session** when: - New unrelated task - User says "começa do zero" / "new task" / "esquece o anterior" - Different workdir/project ## Session storage Claude Code stores sessions per-directory in `~/.claude/projects/`. As long as you use the same `workdir`, `--continue` picks up exactly where it left off — same file context, same conversation history, same edits. ## Direct command (alternative to wrapper) ```bash # New session OUTPUT=$(cd /workdir && env -u CLAUDECODE claude --permission-mode bypassPermissions --print "task" 2>&1) # Continue session OUTPUT=$(cd /workdir && env -u CLAUDECODE claude --permission-mode bypassPermissions --print --continue "task" 2>&1) ``` ## Security & Privacy **Workspace-Only Access (User-Controlled):** The skill operates exclusively on files inside the WORKDIR you specify. You have full control over what gets exposed: - `/home/xmanel/.openclaw/workspace` - General scripts - `/home/xmanel/.openclaw/workspace/hyperliquid` - Trading data - Any other directory of your choosing **What it DOES NOT do:** The skill works exclusively on files inside the specified WORKDIR. You control what workdir to use: - `/home/xmanel/.openclaw/workspace` - General scripts - `/home/xmanel/.openclaw/workspace/hyperliquid` - Trading - Any other directory you specify **What it DOES NOT do:** - ❌ Never access ~/.ssh, ~/.aws, ~/.config without explicit workdir - ❌ Never send data to external servers - ❌ Never store credentials or API keys **What it DOES:** - 🔄 Runs `claude` CLI on files YOU choose - 📁 Indexes files only within YOUR workdir - 🎯 Returns output via chat (not stored remotely) **Technical Note:** Uses `--permission-mode bypassPermissions` for technical reasons but does NOT require sudo/root access. --- ## Common workdirs | Context | Workdir | | --------------- | ------------------------------------------------------ | | General/scripts | `/home/xmanel/.openclaw/workspace` | | Trading | `/home/xmanel/.openclaw/workspace/hyperliquid` | ## After receiving output - Summarize in 1-3 lines what Claude did/found - Mention files created or edited - If error: analyze and suggest fix - If output is long: summarize, offer full output on request | Context | Workdir | | --------------- | ------------------------------------------------------ | | General/scripts | `/home/xmanel/.openclaw/workspace` | | Trading | `/home/xmanel/.openclaw/workspace/hyperliquid` | ## After receiving output - Summarize in 1-3 lines what Claude did/found - Mention files created or edited - If error: analyze and suggest fix - If output is long: summarize, offer full output on request
Related Skills
Go Production Engineering
You are a Go production engineering expert. Follow this system for every Go project — from architecture decisions through production deployment. Apply phases sequentially for new projects; use individual phases as needed for existing codebases.
Database Engineering Mastery
> Complete database design, optimization, migration, and operations system. From schema design to production monitoring — covers PostgreSQL, MySQL, SQLite, and general SQL patterns.
afrexai-code-reviewer
Enterprise-grade code review agent. Reviews PRs, diffs, or code files for security vulnerabilities, performance issues, error handling gaps, architecture smells, and test coverage. Works with any language, any repo, no dependencies required.
API Documentation Generator
Generate production-ready API documentation from endpoint descriptions. Outputs OpenAPI 3.0, markdown reference docs, and SDK quickstart guides.
bili-rs
Development skill for bili-rs, a Rust CLI tool for Bilibili (B站). Use when implementing features, fixing bugs, or extending the bilibili-cli-rust codebase. Provides architecture conventions, API endpoints, coding patterns, and project-specific constraints. Triggers on tasks involving adding CLI commands, calling Bilibili APIs, handling authentication, implementing output formatting, or working with the layered cli/commands/client/payloads architecture.
Puppeteer
Automate Chrome and Chromium with Puppeteer for scraping, testing, screenshots, and browser workflows.
pharaoh
Codebase knowledge graph with 23 development workflow skills. Query architecture, dependencies, blast radius, dead code, and test coverage via MCP. Requires GitHub App installation (read-only repo access) and OAuth authentication. Connects to external MCP server at mcp.pharaoh.so.
git-commit-helper
Generate standardized git commit messages following Conventional Commits format. Use this skill when the user asks to commit code, write a commit message, or create a git commit. Enforces team conventions for type prefixes, scope naming, message length, and breaking change documentation.
bnbchain-mcp
Interact with the BNB Chain Model Context Protocol (MCP) server. Blocks, contracts, tokens, NFTs, wallet, Greenfield, and ERC-8004 agent tools. Use npx @bnb-chain/mcp@latest or read the official skill page.
helius-phantom
Build frontend Solana applications with Phantom Connect SDK and Helius infrastructure. Covers React, React Native, and browser SDK integration, transaction signing via Helius Sender, API key proxying, token gating, NFT minting, crypto payments, real-time updates, and secure frontend architecture.
micropython-skills/sensor
MicroPython sensor reading — DHT11/22, BME280, MPU6050, ADC, ultrasonic HC-SR04, photoresistor, generic I2C sensors.
micropython-skills/network
MicroPython networking — WiFi STA/AP, HTTP requests, MQTT pub/sub, BLE, NTP time sync, WebSocket.