deployhq-cli: Instructions file for Claude Code

CLAUDE.md

deployhq-cli CLAUDE.md is an instructions file for Claude Code from deployhq/deployhq-cli. It costs 2,036 tokens per session, scanned A, original, MIT.

Claude Code instructions for the DeployHQ command-line tool, including its documentation, development guidance, architecture, and important design decisions. DeployHQ is a service for deploying code to servers.

In plain words
What is it for?
Use them when Claude Code is developing, reviewing, or documenting the DeployHQ CLI.
Why use it?
They give Claude Code the context needed to understand and modify the DeployHQ CLI repository correctly.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is deployhq/deployhq-cli's own configuration. It tells Claude Code how to work on deployhq-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything deployhq-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to deployhq/deployhq-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/deployhq/deployhq-cli/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/deployhq/deployhq-cli

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deployhq-cli CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/deployhq/deployhq-cli/claude-md/github.svg)](https://agentmods.dev/instructions/deployhq/deployhq-cli/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/deployhq/deployhq-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/deployhq/deployhq-cli/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deployhq-cli CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/deployhq/deployhq-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/deployhq/deployhq-cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,036 This file is loaded in full into every session.
When invoked 2,036 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02036 $0.02036
Opus 5.5 $0.00814 $0.00814
Sonnet 5.5 $0.00407 $0.00407
Haiku 4.5 $0.00204 $0.00204

Measured 2d ago against content hash e1ea907d8528, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deployhq-cli CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

What is this?

deployhq-cli is the official DeployHQ command-line interface — a Go binary that wraps the DeployHQ REST API. Designed for both humans and AI agents.

Development

go build ./cmd/dhq/        # binary outputs as dhq       # Build binary
go test ./... -v               # Run all tests (96 tests)
go vet ./...                   # Static analysis

Architecture

pkg/sdk/           Public Go SDK (97 methods, zero internal/ imports)
                    Clean boundary — extractable to standalone module later.

internal/output/    Wrangler-pattern output engine
                    stderr=human messages, stdout=data (table or JSON)
                    --json <fields> for field selection
                    DEPLOYHQ_OUTPUT_FILE for JSONL capture

internal/config/    4-layer Viper config
                    flags > env vars > .deployhq.toml > ~/.deployhq/config.toml

internal/auth/      Keyring + file fallback credential storage

internal/harness/   Agent detection (DEPLOYHQ_AGENT, CLAUDE_CODE, CI)

internal/cli/       Command execution pipeline, lazy SDK client

internal/commands/  All CLI commands (42 top-level, 155+ total)

internal/version/   Update checker (GitHub releases API)

internal/skillinstaller/  Detects installed AI agents (12 supported) and
                    installs the DeployHQ skill into each one's native format.
                    user-scope targets write to $HOME; project-scope targets
                    write into the repo (opt-in via --agent). Powers
                    `dhq skills` and the `dhq hello` onboarding step.

skills/deployhq/    Agent skill guide + per-domain reference docs (9 files)
                    SKILL.md is the entry point for any AI agent.

skill-evals/deployhq/  Eval suite (69 cases) testing LLM → CLI translation
                        run-evals.sh drives Claude API, checks command accuracy.

Key Design Decisions

  • Output contract: stdout is ALWAYS data (table or JSON), stderr is ALWAYS human text. Never mixed.
  • --json <fields>: Field selection on any command. Piped output auto-switches to JSON.
  • FlexString type: The DeployHQ API inconsistently returns some fields as strings or numbers. FlexString handles both.
  • dhq api: Escape hatch covering all 144+ endpoints not in the command tree.
  • Breadcrumbs: JSON responses include suggested next commands with resource type and id.
  • --non-interactive: Strict mode that never prompts. Auto-enabled for detected agents and piped output. Ambiguous inputs fail with structured errors listing available options.
  • Agent metadata: dhq commands --json includes per-command agent object with interactive, destructive, idempotent, safe_for_automation, resource_types. Defined in internal/commands/agent_metadata.go.
  • Structured errors: Error responses include exit_code, retryable, and recovery actions.
  • No login in CI: DEPLOYHQ_ACCOUNT + DEPLOYHQ_EMAIL + DEPLOYHQ_API_KEY env vars.
  • Pagination: --page and --per-page on paginated list commands (deployments, servers, server-groups). JSON output includes pagination metadata when available. Non-paginated endpoints don't have these flags.
  • Dry-run: dhq deploy --dry-run creates a preview deployment without executing. Returns preview_pending status. Mutually exclusive with --wait.
  • API spec: https://api.deployhq.com/docs (OpenAPI 3.1.0, machine-readable JSON at /docs.json)

Read the full file on GitHub · 166 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +25 lines · +266 tokens per session e1ea907d8528
  2. 2mo ago First seen · 141 lines · 1,770 tokens per session scan A e0c14f204604

Subscribe to this mod's changes

deployhq-cli CLAUDE.md is an instructions file published in the GitHub repository deployhq/deployhq-cli (1 stars, last pushed 2d ago), licensed MIT. It adds 2,036 tokens to every session, about $0.0081 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

deployhq-cli CLAUDE.md compared with instructions from other repositories

deployhq-cli CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
deployhq-cli CLAUDE.mddeployhq/deployhq-cliInstructions file12d agoMITA2,036Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode