Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Claude Code

agentpack claude launches Claude Code with your packages staged as a plugin directory. Claude’s --plugin-dir flag is additive, so this layers on top of your normal configuration rather than replacing it.

What the launcher does

sync builds a single merged plugin bundle, then the launcher runs:

claude --plugin-dir "<staging>/modes/<mode>/plugins/agentpack-bundle" \
       --settings "$AGENTPACK_HOME/claude-settings.json"
  • --plugin-dir points at the staged agentpack-bundle.
  • --settings loads agentpack’s attribution overlay (see below). It is omitted if you keep attribution on.

Extra arguments are forwarded to claude:

agentpack claude --model opus
agentpack --yolo claude          # adds --dangerously-skip-permissions

CLAUDE_CONFIG_DIR is intentionally never set. Claude derives its keychain credential namespace from that variable, so a per-project value would forget your login on every project switch. Your real ~/.claude.json, ~/.claude/settings.json, and keychain entry are reused as-is.

What the bundle contains

agentpack-bundle/
  .claude-plugin/plugin.json
  commands/   agents/   skills/    # converted markdown artifacts
  hooks/  matchers/  core/  ...     # raw Claude support directories
  mcp.json                          # merged MCP servers (see MCP Servers)

agentpack does not copy your user-scoped ~/.claude/commands, agents, or skills into the bundle. Claude already reads those from $HOME, and copying them would produce duplicate slash commands (e.g. both /code-tutor and /agentpack-bundle:code-tutor).

Artifact handling

ArtifactIn the bundle
Commandscommands/<name>.md, Claude command frontmatter
Agentsagents/<name>.md, Claude agent frontmatter
Skillsskills/<name>/, normalized skill
RulesBest-effort skill fallback (Claude has no first-class rule files)
HooksSupported — rendered into the bundle’s hooks/
MCPMerged into mcp.json at the bundle root

Plugin-provided guidance is surfaced through a SessionStart hook that emits it as Claude’s additionalContext, so the model sees it at the start of every session. See Cross-Harness Conversion for the full mapping.

Attribution

By default sync writes $AGENTPACK_HOME/claude-settings.json with AI attribution forced off (includeCoAuthoredBy = false, empty commit/PR attribution) and the launcher passes it via --settings, which loads at flagSettings scope — above your user, project, and local settings. Your real config files are never modified. Set AGENTPACK_KEEP_ATTRIBUTION=1 to keep your existing values. See Overrides and Attribution.

Environment

VariableEffect
CLAUDE_CODE_PATHPath to the claude binary
AGENTPACK_STAGING_ROOTOverride the staging root
AGENTPACK_HOMEOverride the cache/state root (also holds claude-settings.json)

See Environment Variables for the complete list.