Command Palette

Search for a command to run...

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

claude-cli

Use claude CLI for interactive AI sessions, scripting with print mode, MCP server management, and plugin configuration. Master session management, tool…

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

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

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

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

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

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

Claude CLI

claude --help and claude mcp --help are authoritative for the full flag surface. This file covers the flags that matter for scripting and the configuration shapes that are easy to get wrong.

Print mode is the scripting entry point

claude -p "summarize errors in app.log"
claude -p "count TODO comments" --output-format json | jq -r '.result'
claude -p "long task" --output-format stream-json --verbose  # incremental
claude -p --fallback-model haiku "analyze this"        # print mode only

--fallback-model exists only in print mode — an interactive session has no silent downgrade.

Sessions

claude -c                      # continue most recent
claude -r <session-id>         # resume specific (bare -r for a picker)
claude -c --fork-session       # branch without mutating the original
claude --session-id <uuid>     # pin an ID, for scripted runs you need to find later

--fork-session is the safe way to try a different approach from a known-good point.

Model selection

Use aliases (--model sonnet|opus|haiku) rather than dated full IDs — pinned version strings go stale and silently fail or resolve to something unintended.

Tool and permission control

claude -p "show recent commits" --allowed-tools "Bash(git:*)"
claude -p "clean project" --disallowed-tools "Bash(rm:*)" "Bash(mv:*)"
claude --permission-mode acceptEdits|plan|bypassPermissions|default

--dangerously-skip-permissions skips every check — sandboxes only.

Put the prompt before variadic tool flags so it is not consumed as another tool name. --allowed-tools pre-approves matching calls; it is not a tool-availability sandbox. Output fields and streaming flags: https://code.claude.com/docs/en/headless.

MCP configuration

Project-scoped servers belong in .mcp.json at the project root, not in user settings:

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "package-name"],
      "env": { "API_KEY": "value" }
    }
  }
}

Management:

claude mcp list
claude mcp get <name>
claude mcp remove <name>
claude mcp add --transport stdio|sse|http <name> [--env K=V] -- <command...>
claude mcp add-json <name> '{"command":"node","args":["server.js"]}'
claude mcp add-from-claude-desktop [--name <server>]
claude mcp reset-project-choices        # clear approved/rejected project servers

For a run that must use only a given config, combine --mcp-config <file> with --strict-mcp-config — without the strict flag, the file is merged with existing sources rather than replacing them.

Settings precedence

claude --setting-sources user,project,local
claude --settings /path/to/settings.json
claude --add-dir /data/ /logs/          # grant access outside cwd

Maintenance

claude doctor (diagnose the auto-updater), claude update, claude install stable|latest|<ver>, claude setup-token (long-lived auth for CI), claude migrate-installer (global npm → local).

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

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

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

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

FAQ

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

Use claude CLI for interactive AI sessions, scripting with print mode, MCP server management, and plugin configuration. Master session management, tool control, and automation workflows.

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

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

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

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

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

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