/apiiro:guardian-apifrom apiiro
Apiiro 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.
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.
Send an authenticated request to any Apiiro REST API endpoint. The CLI adds the base URL and credentials; everything else passes through like curl. Endpoint reference: https://docs.apiiro.com/api
Use apiiro explorer "<ApiiroQL>" --type <QueriedType> for org-wide ApiiroQL queries. The server validates the query and type; examples of types are RepositoryProfile, RiskTriggerSummary, ApiElement, and DependencyDeclaration. This read-only command needs no confirmation.
--validate requires the query and --type, sends a read-only validation request and returns server JSON. --recent returns recent queries as JSON without a query or type. These modes are mutually exclusive and reject paging, column and wait flags.
The default mode submits the query, polls until completion, and fetches rows. --limit caps matching rows processed (default 1000, maximum 100000). --columns key1,key2 filters columns locally; empty keys are rejected before submission, and unknown keys list valid keys. --page-size defaults to 100 (maximum 1000); --max-pages defaults to 5, and -1 fetches all pages within the query's limit. --wait caps the completion wait (default 300 seconds); a timeout includes the query ID.
Use -o json for {queryId, columns, rows, truncated}; the default text format prints one block per row. truncated: true means to raise --max-pages for more rows. -f <path> saves output. A concurrency error shows the retry delay when supplied; do not resubmit until that delay passes. Do not guess ApiiroQL syntax or column keys.
Start with apiiro api list before guessing a path. It reads the OpenAPI document the connected server publishes at /rest-api/v1/openapi.json, so it reflects that server's version, and shows each endpoint's method, path, summary, and the access-token permission it requires (any token when none).
apiiro api list # every published endpoint
apiiro api list risks # filter on path, summary, operation id, or tag
apiiro api list applications -o json # machine-readable: data.endpoints[] with method, path, operationId, summary, tags, permission, queryParameters
apiiro api get /rest-api/v1/openapi.json # the full document, for parameters and schemas
If the server answers 404, it predates the discovery endpoint; fall back to https://docs.apiiro.com/api.
Prefer these dedicated commands for connector management, audit logs and export:
apiiro connectors # List, up to 5 pages
apiiro connectors <id> # Read one
apiiro connectors create --type github --url https://github.com/my-org --yes
apiiro connectors update <id> --token-expiration-date 2027-01-01 --yes
apiiro audit-logs --status Failure --since 2026-11-01 --until 2026-11-08 -o json
apiiro export # List routes on this server
apiiro export repositories --file repositories.json
apiiro export repositories/<key>/apis
apiiro export --repo <key> sbom # Also apis, dependencies
apiiro export --openapi <app> --file openapi.json
Before a connector write, show its type, URL or ID and expiration date, ask the user to approve the change in chat, then use --yes. Never ask for, read or place a token in a command argument or chat. For a write that sets a token, give the user the command with --token-stdin --yes to run in their own terminal, piping the token from their secret store; its trailing newline is removed. Missing tokens fail before any request. Tokens are excluded from prompts and output.
Create types: github, gitlab, bitbucket, azureDevops; --url is required. --username is required for bitbucket and azureDevops; --description and ISO --token-expiration-date are optional. Older servers may lack creation routes. Update changes only the token and optional expiration date. With -o json, update returns {id, tokenUpdated: true}.
Connector and audit-log lists support --page-size (1..1000), --max-pages (default 5, -1 for all), -o json and --file. Text output shows one line per item; connector reads show the ID, provider, URL and token expiration. Audit-log lines show time, event type, status, user and event description. JSON lists include {items, truncated}; raise --max-pages when truncated. audit-logs exposes indexed filters only: --event-type, --status Success|Failure, --user, --user-type User|Token|System, paired --since and --until dates (yyyy-MM-dd, yyyy-MM-ddTHH:mm:ssZ or yyyy-MM-ddTHH:mm:ss.fffZ). Date-only --until covers the whole day.
Choose one export mode: --repo <key> <sbom|apis|dependencies>, --openapi <app>, or a route. For other exports, first list routes, then pass the part after /rest-api/v1/export/, replacing placeholders with real keys. Routes vary by server version. Put query parameters after ? and quote the argument, for example apiiro export 'applications/<key>/sbom?format=CycloneDx'. Downloads preserve response bytes and stream to stdout or --file; a file is replaced after completion. The default download timeout is 10 minutes; explicit --timeout <seconds> overrides it. -o json applies to the routes list. These commands require Full control permission.
apiiro api get "/rest-api/v1/risks?filters[RiskLevel]=Critical" # GET with filters
apiiro api get /rest-api/v1/applications # GET
apiiro api get /rest-api/v1/risks -i # include status + headers
apiiro api get /rest-api/v1/risks -H "Accept: application/json" # extra header (repeatable)
On The path must start with "/" (got "get") (older CLI), use apiiro api <path> for reads; for writes, ask the user to update the CLI.
Before a write, show the exact command and get the user's approval in chat, then run with --yes:
apiiro api call /rest-api/v1/applications -d '{"name": "my-app"}' --yes
apiiro api call /rest-api/v1/applications/<key> -X PATCH -d @patch.json --yes
Non-GET requests ask before sending: POST, PUT and PATCH ask for y/n; DELETE requires typing the exact DELETE <path> in a terminal. --yes skips confirmation for all these methods, including DELETE. Always hand every delete command to the user to run; agents must never pass --yes on a delete. Without confirmation, nothing is sent (exit 130). -d @- is unsupported; use inline JSON or -d @file.
Options: api get supports -H, --header "Name: value" (repeatable) and -i, --include. api call also supports -X, --method <POST|PUT|PATCH|DELETE>, -d, --data <json|@file> and --yes (default POST when --data is given). Both support --api-url <url> and --timeout <seconds>.
Output: the response body goes to stdout, pretty-printed on a terminal and raw when piped, so it composes with jq. Exit code 0 for 2xx, 1 otherwise; on failure the error body is printed.
Use these dedicated read commands before constructing a raw request. They need no confirmation. All support -o json|text (default text), --json, and -f <file>.
apiiro policies --repo my-repo -o json
apiiro policies --guardian -o json
apiiro coverage --repo my-repo --max-pages -1
apiiro coverage --projects
apiiro coverage --providers
apiiro issues --repo my-repo --page-size 100 --max-pages -1
apiiro issues --closed --issue-id ISSUE-123
apiiro reports list --search risk --type card --collection Security --limit 25
apiiro reports details --card 123
apiiro reports run --card 123 --param '{"id":"repository","value":["my-repo"]}'
apiiro reports run --card 123 --dashboard 10 --dashcard 20
apiiro reports compliance --framework soc2 --query repo_violations --repo my-repo --limit 20
--repo <name> or --repository-key <key>, and read across the organization when omitted. Policies and coverage select the default monitored branch by name or a specific branch profile by key. Issues span all branches of the selected repository. They do not auto-detect the repository. Ambiguous names require a key.policies --guardian reads guidelines and skills as {guidelines, skills} and rejects repository scope.--projects has no repository filter; passing one is an error. --providers returns all provider names and rejects repository and paging flags.--page-size <1..1000> (default 100), --max-pages <count> (default 5, -1 for all). JSON is {items, truncated}. Fetch more before claiming the list is complete. Empty project pages can precede later results.--closed selects closed issues. --issue-id filters by ID. Repository filtering follows pull request links. Text shows ID, title, status, type and external URL. These are the only indexed filters exposed. Updated issues can be skipped during paging.list takes --search, --type card|model|dashboard|all, --collection, --limit <1..100> (server default 25). details requires exactly one of positive --card or --dashboard IDs. Use details to inspect parameter IDs and dashboard card IDs before running a report.run requires a positive --card ID; optionally pass both positive --dashboard and --dashcard IDs. Repeat --param with one JSON object each. It returns up to 100 rows, with truncated marking the cap.compliance accepts --framework soc2|pcidss|nist800-53|iso27001 (Guardian requires it except for cross_framework), takes --query control_summary|app_violations|cross_framework|repo_violations (default control_summary), and --limit <1..100> (server default 20). Only repo_violations requires and accepts --repo <name>.unknown command for these commands; ask the user to update it.Use apiiro roles [key], apiiro role-groups [key] and apiiro users [id] for reads. Lists accept --page-size (1..1000, default 100), --max-pages (default 5; -1 for all) and -o json ({items, truncated}). Detail reads print JSON. Users lists contain {userId}; details contain {userId, groups:[{groupKey, userRole}]}. Only users in role groups are included.
Roles and role groups have create --data <json|@file> and delete <key>. Creates return a key, or {key} with -o json. Role-group updates use update <key> --data <json|@file>: name is required; omitted or null description/adminIds/memberIds keep stored values, and [] clears lists.
role-groups update <key> also accepts --add-user <id> (assigns Member; existing admins must use --data) or --remove-user <id>. Choose exactly one of these or --data. users --scim-groups lists with --page-size (1..1000, default 100) and --max-pages (default 5, -1 for all), returning {items, truncated}. With a key it returns server JSON and rejects paging flags. It accepts no user id.
Role updates use update <key> with repeatable --permission Name=Read|Write, --assign-group type:groupKey, --unassign-group type:groupKey; type is Idp, Apiiro or Scim. SCIM needs server support and must be enabled. Name, description and scope cannot change after create. Updates run permissions, assignments, then removals; failure stops remaining requests and reports what was applied.
Before create or update, show every change and get the user's approval in chat, then run with --yes. Deletes require the exact key typed in a terminal; ask the user to run them. Deleting a role group also unassigns it from every role. Users have no write commands. Roles need the Roles permission, groups OrganizationalTeams, users Users; Read for reads, Write for writes. For role create and update, the token must also hold every permission and scope the role grants; a token can only grant what it holds.
Use apiiro findings for manual-assessment findings (--repository-id <id>, --application-id <id>, --risk-level <level>), apiiro findings upload <file> for streamed JSON reports, and apiiro engagements [key] for engagements. The findings list rejects --repository-key and --remote. Both lists accept --page-size (1–1000) and --max-pages (default 5, -1 for all); -o json returns {items, truncated}.
findings --repo <key> --commit <sha> reads uploaded reports for that commit as server JSON. findings --matches <provider> --page-size 100 --skip 0 reads one page of manual foreign-entity matches as the server dictionary. Both reject manual-assessment filters and --max-pages; --repo rejects paging options too. --repo and --commit go together; --skip applies only to --matches. Choose one read mode per call.
findings upload keeps the generic report mode by default; --generic selects it explicitly. Choose one mode per run: --format sast|sca sends a legacy report with scanType set to Sast or Sca; --foreign sends a foreign report; --general --system <s> sends general findings with that systemId, the file's findings, and replace (default false); --match sends foreign-entity matches. Use the selected API's JSON schema. Other modes return server JSON, or success for an empty response. All modes ask before sending and accept --yes.
Engagement lists accept --type Pentest|General, --status Active|Scheduled|InReview|Closed and --lead <key>. Use engagements create --data <json|@file> and engagements update <key> --data <json|@file> for writes. Update replaces the whole object with PUT; read it first and keep every field the user wants preserved. Required fields are name, type, startDate and status.
Before upload, create or update, show the user the exact change and ask for confirmation in chat; after they agree, run the command with --yes. Upload confirmation includes the file path and size; uploads use ten minutes unless --timeout <seconds> is explicit and print server warnings.
For apiiro findings delete --system <id> [--finding-id <id>...] and apiiro engagements delete <key>, show the exact command for the user to run in their terminal. The system id or key must be typed. findings delete deletes findings sent through the legacy general-findings API for that system id. Without a finding id, it targets all legacy findings for that id. Findings sent by the default generic findings upload mode or listed by findings are stored separately. findings upload --general writes to the legacy store. Success means the request was accepted; the server returns no deletion count, even for an unknown system id. Deleting an engagement also permanently deletes its findings and reports. Keep findings triage for SAST triage.
risks and the inventory list are scoped to one repository or application).filters[...] fields, sorting).apiiro scans <id> [--type diff|pr|build]; pull requests use apiiro pull-requests.Quote paths containing [, ], ?, or & so the shell does not expand them. Do not guess endpoint paths or filter names; run apiiro api list <term> (or fetch /rest-api/v1/openapi.json for parameters), fall back to https://docs.apiiro.com/api, and say when a path is unverified.
--api-url <url>, --timeout <seconds>, --no-color.
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-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-queryUse 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./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.