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.
npx skills add yaniv-golan/affinity-sdk --skill xaffinity-cli-usagegit clone --depth 1 https://github.com/yaniv-golan/affinity-sdkWrote 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.
[](https://agentmods.dev/skills/yaniv-golan/affinity-sdk/xaffinity-cli-usage)<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.
<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>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.
| Model | Per session | Once 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 |
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" 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 withexport 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 thepatternfield 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. Readreferences/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-filewith 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[] |
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.
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.
- 26d ago Changed · +1 lines 467a013dbc3a
- 1mo ago Changed · +4 lines 20a8428e8991
- 1mo ago Changed · +23 lines · +37 tokens per session 3bf1f9751eb6
- 1mo ago Changed · +6 lines 9908e4dbfa0f
- 1mo ago Changed · -206 lines · +111 tokens per session b84f678a15dd
- 3mo ago First seen · 498 lines · 30 tokens per session scan B 7a53b221be0f
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.
xaffinity-cli-usage compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| xaffinity-cli-usageyaniv-golan/affinity-sdk | Skill | 1 | 18d ago | MIT | B | 178 | Claude Code |
| merit-lhvElnora-AI/elnora-merit-aktiva | Skill | 10 | yesterday | Apache-2.0 | A | 227 | Claude Code |
| merit-payments-bankElnora-AI/elnora-merit-aktiva | Skill | 10 | yesterday | Apache-2.0 | A | 215 | Claude Code |
| merit-tsdElnora-AI/elnora-merit-aktiva | Skill | 10 | yesterday | Apache-2.0 | A | 298 | Claude Code |
| merit-palk-employeesElnora-AI/elnora-merit-aktiva | Skill | 10 | yesterday | Apache-2.0 | A | 159 | Claude Code |
| merit-purchase-invoicesElnora-AI/elnora-merit-aktiva | Skill | 10 | yesterday | Apache-2.0 | A | 199 | Claude Code |
| merit-stripeElnora-AI/elnora-merit-aktiva | Skill | 10 | yesterday | Apache-2.0 | A | 201 | Claude Code |