/apiiro:guardian-queryfrom apiiro
Use for freeform security questions about code ("is this code secure?", attack surface, auth flows) or org-wide posture ("top risks across the org", --global), answered by the Apiiro Guardian AI agent. One repo's risks: guardian-risks.
Ships in apiiro. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Ask security questions and get AI-powered analysis about your repository.
Auto-detects the current git repository for context (like risks does). No need to specify a repo explicitly — Guardian picks it up from the git remote (origin, or the first remote if there's no origin). If the repo has several remotes pointing at different providers, target one with --remote <name>. If it still shows [✗ Not Monitored by Apiiro], pass the repository key directly with --repository-key <key>.
Important: Before running a query, consider whether the question is repo-specific or org-wide:
--global): questions about the org's policies, top risks across all repos, general security posture, or anything not tied to a specific codebase.If the question is clearly about the org as a whole (e.g. "top risks last week", "what are our policies"), use --global. If it's unclear, ask the user: "Should I scope this to the current repo, or across your whole org?"
apiiro ask # Interactive chat; empty line or EOF exits
apiiro ask "what risks exist in this repo"
apiiro ask "deep analysis of auth flow" --model normal
apiiro ask "what is STRIDE?" --global # General security question
apiiro ask "top risks across the org last week" --global
apiiro ask "what are our org security policies?" --global
apiiro ask "detailed analysis" --timeout 120 # wait longer between responses
apiiro ask "what risks exist here" --remote gh # use the 'gh' remote, not origin
apiiro ask "risk analysis" -f analysis.md
Chat keeps the conversation id between questions.
On unknown command 'ask' (older CLI), use apiiro guardian query with the same arguments.
Options: --model <fast|normal> (default: fast), -g, --global, --remote <name>, --repository-key <key>, --timeout <seconds> (default: 60, measured as max inactivity between responses), -f, --file <path>.
In TTY mode, a progress spinner shows the agent's status while it works, then the full answer is rendered once as markdown.
apiiro repositories --detect # Detect and verify repo in Apiiro
apiiro repositories --clear # Clear cached repo info
apiiro repositories --clear --global # Clear all cached repos
Detection results are cached for 24 hours.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub apiiro/marketplace --plugin apiiro9 skills in this plugin
/guardian-apiApiiro REST queries across repos or organizations, connectors, audit logs and exports. Policies, coverage, issues and reports have dedicated commands. Applications and application groups: guardian-inventory. Repo risks: guardian-risks./guardian-fixUse when the user wants to fix, remediate, or resolve a security risk or vulnerability ("how do I fix this risk", "remediate this finding"): Apiiro remediation prompts, Guardian AI fixes, and server-side AutoFix jobs. To list risks: guardian-risks./guardian-inventoryApiiro inventory: applications, application groups, teams, artifacts, APIs, dependencies, sensitive data, secrets, validity, technologies, modules, SBOMs, contributors, OSS, licenses, incidents, feed, advisories, repositories, SCM tags, monitoring./guardian-risksUse when the user asks about known security risks or findings in this repo ("what risks does this repo have"), filters Apiiro risks, or wants to accept, ignore, re-level, tag or triage one. Org-wide: guardian-query --global; fixing: guardian-fix./guardian-scanUse to scan code with the Apiiro CLI for secrets, leaked credentials, or vulnerable OSS dependencies, set up pre-commit hooks, or diff-scan branches and PRs for CI gates ("check my code before I push", "scan this PR")./guardian-secure-promptUse when the user is about to implement a coding task and wants Apiiro security requirements added to it ("make this prompt more secure", "what security should I consider"). Full STRIDE report on a design: guardian-threat-model.