Command Palette

Search for a command to run...

Назад к скиллам
скилл № 24448

claude-skill

Use when user asks to leverage claude or claude code to do something (e.g. implement a feature design or review codes, etc). Provides non-interactive…

БесплатноБез исполняемых скриптов
majiayu000от majiayu000★ 31 звезда на GitHub

Установить claude-skill в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Claude Code Headless Mode

You are operating in Claude Code headless mode - a non-interactive automation mode for hands-off task execution.

Prerequisites

Before using this skill, ensure Claude Code CLI is installed and configured:

  1. Installation verification:

    claude --version
    
  2. First-time setup: If not installed, guide the user to install Claude Code CLI with command npm install -g @anthropic-ai/claude-code.

References

  • For extended usage scenarios, see references/examples.md.

Core Principles

Autonomous Execution

  • Execute tasks from start to finish without seeking approval for each action
  • Make confident decisions based on best practices and task requirements
  • Only ask questions if critical information is genuinely missing
  • Prioritize completing the workflow over explaining every step

Output Behavior

  • Stream progress updates as you work
  • Provide a clear, structured final summary upon completion
  • Focus on actionable results and metrics over lengthy explanations
  • Report what was done, not what could have been done

Permission Modes

Claude Code uses permission modes to control what operations are permitted. Set via --permission-mode flag:

Mode Description
default Standard behavior - prompts for permission on first use of each tool
acceptEdits Automatically accepts file edit permissions for the session (Default for this skill)
plan Plan Mode - Claude can analyze but not modify files or execute commands
bypassPermissions Skips all permission prompts (requires safe environment - see warning below)

Accept Edits Mode (--permission-mode acceptEdits) - Default

  • Automatically accepts file edits without prompts
  • Still requires approval for shell commands
  • Recommended for most programming tasks
  • This is the default mode for this skill

Default Mode (--permission-mode default)

  • Requires approval for file edits and command execution
  • Safe for exploration and analysis tasks

Plan Mode (--permission-mode plan)

  • Read-only analysis mode
  • Claude can explore and analyze but cannot modify files
  • Cannot execute commands
  • Useful for code review and architecture analysis

Bypass Permissions Mode (--permission-mode bypassPermissions)

  • Skips ALL permission prompts
  • ⚠️ WARNING: Only use in externally sandboxed environments (containers, VMs)
  • NEVER use on your development machine without proper isolation
  • Use with --allowedTools to restrict specific tools for safety

Claude Code CLI Commands

Note: The following commands are based on the official Claude Code headless mode documentation.

Basic Headless Execution

Use the --print (or -p) flag to run in non-interactive mode:

claude -p "analyze the codebase structure and explain the architecture"

Tool Permissions

Control which tools Claude can use with --allowedTools and --disallowedTools:

# Allow specific tools
claude -p "stage my changes and write commits" \
  --allowedTools "Bash,Read" \
  --permission-mode acceptEdits

# Allow multiple tools (space-separated)
claude -p "implement the feature" \
  --permission-mode acceptEdits \
  --allowedTools Bash Read Write Edit

# Allow tools with restrictions (comma-separated string)
claude -p "run tests" \
  --permission-mode acceptEdits \
  --allowedTools "Bash(npm test),Read"

# Disallow specific tools
claude -p "analyze the code" \
  --disallowedTools "Bash,Write"

Using Permission Modes

Control how permissions are handled:

# Accept file edits automatically (recommended for programming)
claude -p "implement the user authentication feature" \
  --permission-mode acceptEdits \
  --allowedTools "Bash,Read,Write,Edit"

# Combine with allowed tools for safe automation
claude -p "fix the bug in login flow" \
  --permission-mode acceptEdits \
  --allowedTools "Read,Write,Edit,Bash(npm test)"

Output Formats

Text Output (Default)

claude -p "explain file src/components/Header.tsx"
# Output: Plain text response

JSON Output

Returns structured data including metadata:

claude -p "how does the data layer work?" --output-format json

Response format:

{
  "type": "result",
  "subtype": "success",
  "total_cost_usd": 0.003,
  "is_error": false,
  "duration_ms": 1234,
  "duration_api_ms": 800,
  "num_turns": 6,
  "result": "The response text here...",
  "session_id": "abc123"
}

Streaming JSON Output

Streams each message as it is received:

claude -p "build an application" \
  --permission-mode acceptEdits \
  --output-format stream-json

Each conversation begins with an initial init system message, followed by user and assistant messages, followed by a final result system message with stats.

Multi-Turn Conversations

For multi-turn conversations, you can resume or continue sessions:

# Continu
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • metadata.json

FAQ

Что делает скилл claude-skill?

Use when user asks to leverage claude or claude code to do something (e.g. implement a feature design or review codes, etc). Provides non-interactive automation mode for hands-off task execution without approval prompts.

Как установить скилл claude-skill?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл claude-skill запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить claude-skill с