xaffinity-cli-usage

xaffinity-cli-usage is a skill for Claude Code from yaniv-golan/affinity-sdk. It costs 178 tokens per session (4,537 once invoked), scanned B, original, MIT.

A command-line tool for working with Affinity, a customer-relationship management system used to track contacts and business relationships.

In plain words
What is it for?
Use it to look up CRM data, narrow results, export records, and manage Affinity information from a terminal.
Why use it?
It gives an agent a defined way to search, filter, export, and manage Affinity records while checking that an API key is configured first.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the affinity-crm-cli-xaffinity-unofficial plugin — 1 skill, 2 hooks shipped together

Good fit Use it to look up CRM data, narrow results, export records, and manage Affinity information from a terminal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yaniv-golan/affinity-sdk/xaffinity-cli-usage
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yaniv-golan/affinity-sdk --skill xaffinity-cli-usage
Clone the repo
git clone --depth 1 https://github.com/yaniv-golan/affinity-sdk

Made for: Claude Code.

Or install affinity-crm-cli-xaffinity-unofficial, the plugin that ships this one along with the rest of its 1 skill, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xaffinity-cli-usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/yaniv-golan/affinity-sdk/xaffinity-cli-usage/github.svg)](https://agentmods.dev/skills/yaniv-golan/affinity-sdk/xaffinity-cli-usage)
Your own site
<a href="https://agentmods.dev/skills/yaniv-golan/affinity-sdk/xaffinity-cli-usage"><img src="https://agentmods.dev/badge/skills/yaniv-golan/affinity-sdk/xaffinity-cli-usage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xaffinity-cli-usage

Your own site · 80×15
<a href="https://agentmods.dev/skills/yaniv-golan/affinity-sdk/xaffinity-cli-usage"><img src="https://agentmods.dev/badge/skills/yaniv-golan/affinity-sdk/xaffinity-cli-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 178 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,537 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00178 $0.04537
Opus 5.5 $0.00071 $0.01815
Sonnet 5.5 $0.00036 $0.00907
Haiku 4.5 $0.00018 $0.00454

Measured 26d ago against content hash 467a013dbc3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

xaffinity-cli-usage scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 26d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Subtle steeringmediumPrompt injection

Instructions that bias recommendations or shape behaviour without the user noticing.

skipped and the flag that fetches it. Never tell the user a record "has no lists" or "empty fields"
plugins/xaffinity-cli/skills/xaffinity-cli-usage/SKILL.md · 326 lines

How it starts

The opening of the file, as written. The whole thing — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.

xaffinity CLI Usage

REQUIRED FIRST STEP: Verify API Key

Before anything else, run:

xaffinity config check-key --json
  • command not found (exit 127; e.g. a Claude Cowork VM) — install it once per task: pip install --user -q --no-warn-script-location "affinity-sdk[cli]==2.0.8" (about 10s), then start every later bash call with export PATH="$HOME/.local/bin:$PATH"; (each call is a fresh shell) and run check-key again. Details and the no-network case: references/setup.md (Claude Cowork).
  • "configured": true — use the pattern field from the output for ALL subsequent commands: copy its flags (--dotenv, and --env-file <path> when it names one) into every command.
  • "configured": false — stop and help the user set up. Read references/setup.md (key resolution order, xaffinity config setup-key — interactive, the user must run it — and the Cowork key-in-a-connected-folder setup, which needs --env-file with the folder's path).

Read JSON from the right key

--json emits one JSON object (not NDJSON): {"ok", "data", "warnings", "meta", ...}. The shape of data differs by command — reading the wrong key gives null, which looks like real "empty" data. Use this table:

Command Read
list export .data.rows[] — listEntryId, entityId, entityName, + field values by name
person ls / company ls .data.persons[] / .data.companies[]
person get / company get / opportunity get .data.person / .data.company / .data.opportunity
…with --expand list-entries / lists / persons .data.listEntries / .data.lists / .data.persons — next to the entity, not inside it
list entry field … --get .data.fields
interaction ls / note ls / <entity> files ls .data[] — a bare array
note create / interaction create .data.note / .data.interaction
field history / field changes / field history-bulk .data.fieldValueChanges[]
interaction feed / note feed / note replies .data.interactions[] / .data.notes[] / .data.replies[]
transcript ls / transcript get .data.transcripts[] / .data.transcript (.fragments[])
company|person relationships / field options ls .data.relationships[] / .data.options[]

Read the full file on GitHub · 326 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 26d ago Changed · +1 lines 467a013dbc3a
  2. 1mo ago Changed · +4 lines 20a8428e8991
  3. 1mo ago Changed · +23 lines · +37 tokens per session 3bf1f9751eb6
  4. 1mo ago Changed · +6 lines 9908e4dbfa0f
  5. 1mo ago Changed · -206 lines · +111 tokens per session b84f678a15dd
  6. 3mo ago First seen · 498 lines · 30 tokens per session scan B 7a53b221be0f

Subscribe to this mod's changes

xaffinity-cli-usage is a skill published in the GitHub repository yaniv-golan/affinity-sdk (1 stars, last pushed 18d ago), licensed MIT. It adds 178 tokens to every session and 4,537 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it B with 1 finding (subtle steering). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

xaffinity-cli-usage compared with skills from other repositories

xaffinity-cli-usage next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
xaffinity-cli-usageyaniv-golan/affinity-sdkSkill118d agoMITB178Claude Code
merit-lhvElnora-AI/elnora-merit-aktivaSkill10yesterdayApache-2.0A227Claude Code
merit-payments-bankElnora-AI/elnora-merit-aktivaSkill10yesterdayApache-2.0A215Claude Code
merit-tsdElnora-AI/elnora-merit-aktivaSkill10yesterdayApache-2.0A298Claude Code
merit-palk-employeesElnora-AI/elnora-merit-aktivaSkill10yesterdayApache-2.0A159Claude Code
merit-purchase-invoicesElnora-AI/elnora-merit-aktivaSkill10yesterdayApache-2.0A199Claude Code
merit-stripeElnora-AI/elnora-merit-aktivaSkill10yesterdayApache-2.0A201Claude Code