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 affinity-mcp-workflowsgit 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/affinity-mcp-workflows)<a href="https://agentmods.dev/skills/yaniv-golan/affinity-sdk/affinity-mcp-workflows"><img src="https://agentmods.dev/badge/skills/yaniv-golan/affinity-sdk/affinity-mcp-workflows/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/affinity-mcp-workflows"><img src="https://agentmods.dev/badge/skills/yaniv-golan/affinity-sdk/affinity-mcp-workflows.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.00052 | $0.04233 |
| Opus 5.5 | $0.00021 | $0.01693 |
| Sonnet 5.5 | $0.00010 | $0.00847 |
| Haiku 4.5 | $0.00005 | $0.00423 |
Grade B, and why
affinity-mcp-workflows 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 24d 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.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
**Before proceeding to execute any commands:** How it starts
The opening of the file, as written. The whole thing — 334 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Affinity MCP Workflows
Prerequisites
The MCP server requires the xaffinity CLI to be installed:
pip install "affinity-sdk[cli]"
The CLI must be configured with an API key before the MCP server will work.
⚠️ REQUIRED WORKFLOW - Do Not Skip Steps
You MUST complete steps 1-2 before running ANY queries or commands.
Skipping these steps leads to incorrect or inefficient queries because:
discover-commandshas each command's exact flags, limits and examples; this skill shows the shape of a call, not every flag- The data model has nuances (e.g.,
list exportvscompany ls) that you'll miss
Mandatory Pre-Flight Checklist
Before proceeding to execute any commands:
- ✅ Read
xaffinity://data-modelusingread-xaffinity-resource - ✅ Run
discover-commandsfor your specific task - ✅ State what you learned from each step before continuing
Example:
"I read the data-model resource and learned that list entries have custom fields
accessed via fields.<Name>. I ran discover-commands for 'interaction' and found
that interaction ls supports --type all to fetch all types in one call, and
--days to limit the time range. Now I'll proceed with..."
IMPORTANT: Write Operations Only After Explicit User Request
Only use tools or prompts that modify CRM data when the user explicitly asks to do so.
Write operations include:
- Tools:
execute-write-command - Prompts:
log-interaction-and-update-workflow,change-status,log-call,log-message
Read-only operations (search, lookup, briefings) can be used proactively to help the user. But never create, update, or delete CRM records unless the user specifically requests it.
Full Scan Protection
The MCP gateway caps how much a command may fetch:
- Without
--max-resultsa list command returns its first page and anextCursor. Pass the number you need, up to the command's max (discover-commands→limitConfig, e.g.note feed200); above the max is refused. --allis refused, exceptfield history-bulk --all --strategy field(dry run first). To get more, pass--cursorwith the previousnextCursor.- Large results are trimmed to fit; the result says how many rows were kept, and drops
nextCursor(it would skip the trimmed rows): re-run with a smaller--max-results.
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.
- 24d ago Changed 9b05063a9f50
- 27d ago Changed · +27 lines 447e01a5d4e2
- 29d ago Changed · +14 lines 3be2b4258fba
- 2mo ago First seen · 293 lines · 52 tokens per session scan B da407c2bc387
affinity-mcp-workflows is a skill published in the GitHub repository yaniv-golan/affinity-sdk (2 stars, last pushed 3d ago), licensed MIT. It adds 52 tokens to every session and 4,233 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
affinity-mcp-workflows compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| affinity-mcp-workflowsyaniv-golan/affinity-sdk | Skill | 2 | 3d ago | MIT | B | 52 | Claude Code |
| merit-lhvElnora-AI/elnora-merit-aktiva | Skill | 10 | 5d ago | Apache-2.0 | A | 227 | Claude Code |
| merit-payments-bankElnora-AI/elnora-merit-aktiva | Skill | 10 | 5d ago | Apache-2.0 | A | 215 | Claude Code |
| merit-tsdElnora-AI/elnora-merit-aktiva | Skill | 10 | 5d ago | Apache-2.0 | A | 298 | Claude Code |
| merit-purchase-invoicesElnora-AI/elnora-merit-aktiva | Skill | 10 | 5d ago | Apache-2.0 | A | 199 | Claude Code |
| merit-stripeElnora-AI/elnora-merit-aktiva | Skill | 10 | 5d ago | Apache-2.0 | A | 201 | Claude Code |
| merit-vat-kmdElnora-AI/elnora-merit-aktiva | Skill | 10 | 5d ago | Apache-2.0 | A | 213 | Claude Code |