/pixee-cli:pixee-preferencesfrom pixee-cli
Reads and writes Pixee organization preferences to shape triage and remediation across analysis runs. Supports get/set with file or stdin input.
Ships in pixee-cli. 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.
Read when SKILL.md points to them.
PREREQUISITES: Read
../pixee-shared/SKILL.mdfor global flags, exit codes, and error handling, and../pixee-auth/SKILL.mdif authentication needs to be configured.
Organization preferences are a freeform markdown blob (≤10,000 characters) that the Pixee
platform applies to every analysis run for the organization. The content shapes both triage
(is a given finding a real risk for this org?) and remediation (how should the fix look in
this codebase?), and is stored as a single document with audit metadata: content,
updated_at, updated_by, org_id. The MVP hardcodes org_id to default-organization;
an --org-id flag is planned once the platform supports multi-org.
pixee organization preferences get [--content-only]
Org: <id> / Updated: <iso> by <actor> header (colon
separated, no tabs, because the markdown body is multiline and tabs are reserved for list
commands), a blank line, then the content body emitted verbatim with no synthetic
trailing newline.--content-only prints the body alone, byte-for-byte. Designed for piping into a file,
less, bat, or a diff tool. No header, no trailing newline added.--output json (or --json) emits the full record including the HAL _links envelope.
See ../pixee-api/SKILL.md for HAL conventions; do not restate them in scripts.no organization preferences set. Branch on this for
fresh-organization flows.pixee organization preferences set (--from-file <path> | --content <string>)
--from-file or --content is required; passing both, or neither, is a
parse error (exit 1) before any network call.--from-file - reads content from stdin, enabling get-transform-set pipelines.If-Match: <etag> (or If-None-Match: * on first creation). Agents and scripts never
touch ETag headers directly.concurrent modification: another writer updated organization preferences between read and write; re-run to refresh. Re-running typically succeeds; if multiple writers race
repeatedly, refresh and re-author against the latest content.get (default header + body in text mode, full record in JSON
mode).Pixee resolves preferences per-analysis with strict fallback, no merging:
PIXEE.md at its root (even if empty), it is used exclusively.content, they are used.An empty PIXEE.md is a deliberate opt-out: a repo with one is treated as having
preferences, which silently shadows org preferences for that repo. Agents working in a
specific repo should check for PIXEE.md before assuming org preferences will apply.
Humans can author preferences in the Pixee web app under an organization's Settings → Preferences; the CLI and the web UI write the same resource.
Pixee accepts two kinds of organization guidance, and they are not interchangeable. Preferences
are policy Pixee applies on every analysis: Pixee considers the whole document for each finding.
Coding-guidelines documents (see ../pixee-coding-guidelines/SKILL.md) are reference material:
Pixee keeps the uploaded documents intact and consults matching passages when triaging and
fixing SAST findings.
Put guidance in preferences when it is:
JooqDao
helper" or "services behind the internal mesh are not internet-reachable".Upload coding guidelines when the source is:
Uploads go through the Pixee web app or the API; the CLI only lists coding-guidelines documents.
When an organization has formal standards, use both: upload the documents as written, and keep
preferences for the handful of always-on decisions. Don't condense a long standard into
preferences to fit the 10,000-character cap. The summary drops detail the agent judged
unimportant, goes stale when the standard changes, and is shadowed in any repository that has its
own PIXEE.md, while uploaded guidelines apply to every repository.
Because guidelines are matched against passages rather than read in full, a preference is the more
dependable choice for a rule that must apply to every relevant finding. Promote a critical rule
from a guidelines document into preferences rather than relying on retrieval alone, and keep the
two in sync when the standard changes. Repositories with their own PIXEE.md never see org
preferences, so a promoted rule must also be added to those files to reach them.
Preferences come in three flavors:
For worked examples of each flavor, see references/preferences-authoring.md.
Treat those examples as starting points and adapt them to the org's stack, tone, and
compliance posture.
# Print the body verbatim, suitable for piping into an editor or less
pixee organization preferences get --content-only
# Pretty-print the record as JSON, then pull a single field with jq
pixee organization preferences get --json | jq -r '.updated_by'
# Walk to the canonical resource via HAL (do not hardcode the path)
href=$(pixee organization preferences get --json | jq -r '._links.self.href')
pixee api "$href"
# Author offline and push from a file
pixee organization preferences set --from-file ./pixee-preferences.md
# Compose inline from a heredoc for a quick one-off
pixee organization preferences set --content "$(cat <<'EOF'
# Risk Guidance
## SQL Injection
Prefer Spring NamedParameterJdbcTemplate with :namedParameters.
EOF
)"
# Round-trip through stdin (byte-identical when the transform is a no-op)
pixee organization preferences get --content-only \
| sed 's/old-vendor/new-vendor/g' \
| pixee organization preferences set --from-file -
# Retry the set on concurrent-modification conflicts
until pixee organization preferences set --from-file ./pixee-preferences.md; do
echo "retrying"
sleep 1
done
pixee-preferences.md in a repo root
or an internal docs repo) and push with --from-file. Reserve --content for one-liners
and shell heredocs.--content-only when piping into editors, diffs, or less. Use --output json for
programmatic inspection and HAL traversal.--from-file once approved.set call or refresh and re-author against the
latest content.PIXEE.md silently overrides org preferences for that repo. Agents working
inside a specific repository should check for PIXEE.md before assuming the org-level
document applies.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub pixee/pixee-cli --plugin pixee-cli15 skills in this plugin
/pixee-analysisList, view, and delete Pixee analyses with filters and optional polling until the analysis reaches a terminal state./pixee-apiSend authenticated requests to any Pixee REST API endpoint./pixee-authAuthenticate to a Pixee deployment using the per-user OAuth2 device flow or the deployment's shared API key, choose which deployment commands target, mint bearer tokens for the REST API and observability endpoints, and inspect the current authentication state./pixee-coding-guidelinesList Pixee organization coding-guidelines documents and choose when long standards belong there rather than in preferences.Other plugins' skills for the same job