一键导入
apiiro-setup
Install Apiiro CLI, authenticate, verify version, check available features, and configure hooks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Install Apiiro CLI, authenticate, verify version, check available features, and configure hooks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Apiiro CLI command for comparing two git references for security risks — the primary CI/CD integration point. Use this skill whenever the user mentions diff scanning, comparing branches or commits for security issues, CI/CD security gates, blocking PRs on risk, or wants to wire Apiiro into a build pipeline. Even if the user doesn't say "apiiro", trigger when they say things like "scan this PR", "compare main to my branch for security", "block merges on critical risks", or want to set up security gating in CI. For local secrets/OSS scanning, use apiiro-fast-scan instead.
Apiiro CLI command for enhancing developer prompts with security considerations before coding begins. Takes a coding task description and returns the same task with security requirements injected — preserving the original business intent while adding security guardrails. Use this skill whenever the user wants to improve a coding task with security guidance, add security requirements to a task before starting implementation, or get a security-enhanced version of a prompt. Trigger on phrases like "make this prompt more secure", "add security to my task", "what security should I consider for this feature", or when the user is about to start a coding task and wants security baked in. This is different from threat-model (which produces a full STRIDE analysis report) — secure-prompt enhances a *task description* the user is about to implement.
Apiiro CLI command for quick local security scanning: fast-scan for secrets and OSS vulnerabilities, plus pre-commit hooks. Use this skill whenever the user mentions scanning code locally, secrets detection, OSS vulnerabilities, pre-commit hooks, or wants to check files for security issues before committing. Even if the user doesn't say "apiiro", trigger when they say things like "scan for secrets", "check my code before I push", "are there any leaked credentials", "check dependencies for vulnerabilities", or want to set up local security scanning. For comparing git references in CI/CD, use apiiro-diff-scan instead.
Apiiro CLI commands for remediating and fixing security risks: get remediation prompts and use Guardian AI to fix findings. Use this skill whenever the user wants to fix, remediate, patch, or resolve a security risk or vulnerability in their repository. Also trigger when they ask "how do I fix this risk", "remediate this finding", "resolve this vulnerability", or want actionable guidance on resolving a security issue. For listing or inspecting risks, use the apiiro-risks skill instead.
Apiiro CLI commands for querying the Guardian AI agent: ask security questions, get analysis and insights about a repository, and manage repository detection. Use this skill whenever the user wants AI-powered security analysis, security posture review, or wants to ask questions about their codebase's security. Also trigger when they need deep analysis of authentication flows, attack surfaces, or want an AI to explain security concepts. Even without mentioning "apiiro" or "guardian", trigger when the user asks things like "is this code secure?", "what's the attack surface here?", or "explain this vulnerability". For dedicated STRIDE threat modeling of a design or feature spec, use the apiiro-threat-model skill instead. For fixing a known risk, use apiiro-fix.
Apiiro CLI commands for viewing and inspecting risks in a repository: list, filter, and get details on known risks. Use this skill whenever the user asks about security risks, vulnerabilities, or findings in their repository. Also trigger when they want to list, filter, or investigate risks by category or severity. Even without mentioning "apiiro", trigger when the user asks things like "what risks does this repo have", "any vulnerabilities here?", "show me the security findings", or "what's the risk level of this project". For fixing or remediating risks, use the apiiro-fix skill instead.
| name | apiiro-setup |
| description | Install Apiiro CLI, authenticate, verify version, check available features, and configure hooks |
| user_invocable | true |
You are setting up Apiiro. Do the following in order and confirm each step:
which apiiromacOS (Homebrew):
brew tap apiiro/tap && brew install apiiro
Linux (Homebrew):
brew tap apiiro/tap && brew install apiiro
Linux (RPM/yum):
# Get the latest RPM URL (asset name includes the version number)
RPM_URL=$(curl -s https://api.github.com/repos/apiiro/marketplace/releases/latest | grep "browser_download_url.*\.rpm" | cut -d '"' -f 4)
sudo yum install -y "$RPM_URL"
Linux (direct download):
curl -fsSL https://github.com/apiiro/marketplace/releases/latest/download/apiiro-linux-x64 -o apiiro
chmod +x apiiro
sudo mv apiiro /usr/local/bin/apiiro
Windows:
Download apiiro-win.exe from https://github.com/apiiro/marketplace/releases
apiiro loginapiiro auth statusapiiro --version) with minimum required version 1.4.2Probe which features are enabled for the user's environment. Run these commands and collect results:
# Fast Scan — secrets
apiiro fast-scan secrets --file /dev/null 2>&1
# Fast Scan — OSS
apiiro fast-scan oss --file /dev/null 2>&1
# Guardian
apiiro guardian query "test" 2>&1
# Threat Modeling
apiiro threat-model "test" 2>&1
For each command, check the output:
Present a summary table to the user showing which features are enabled and which are not. For disabled features, note: "Contact your Apiiro administrator to enable this feature."
Apiiro can add a 🛡️ shield to the Claude Code status line that appears when Apiiro Guardian is active.
Do NOT modify ~/.claude/settings.json or any scripts directly. Instead, explain what the status line does and ask the user if they'd like to set it up. If they agree, use the statusline-setup agent to configure it.
Tell the user:
statusLine entry to ~/.claude/settings.jsonIf the user wants to proceed, delegate to the statusline-setup agent with these details:
Add to ~/.claude/settings.json. Use the script that matches the user's OS:
macOS / Linux:
{
"statusLine": {
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/statusline.sh"
}
}
Windows:
{
"statusLine": {
"type": "command",
"command": "powershell -ExecutionPolicy Bypass -File \"${CLAUDE_PLUGIN_ROOT}/scripts/statusline.ps1\""
}
}
First, back up the existing script by copying it to <script-path>.bak before making any changes.
Then find the script file referenced in the existing statusLine.command setting and append the Apiiro shield check to the end of that script. The check should use the same stdin JSON variable the script already captures (commonly $input):
# Apiiro shield
SESSION_ID=$(echo "$input" | jq -r '.session_id // empty')
SESSION_FILE="$HOME/.apiiro/sessions/$SESSION_ID"
MAX_AGE=600
if [ -n "$SESSION_ID" ] && [ -f "$SESSION_FILE" ]; then
MTIME=$(stat -f %m "$SESSION_FILE" 2>/dev/null || stat -c %Y "$SESSION_FILE" 2>/dev/null || echo 0)
[ $(($(date +%s) - MTIME)) -lt $MAX_AGE ] && echo "🛡️ Apiiro Guardian Activated"
fi
Important: Claude Code pipes a JSON object to the status line script via stdin. The script must read stdin once (e.g., input=$(cat)) and parse fields from that variable. Do not read stdin again for the Apiiro check — reuse the existing variable. Check the script to confirm the variable name before appending.
Tell the user they are all set! Summarize:
apiiro-* skills they can invoke from the agent (ask the agent to list available skills if they want a tour)