affinity-mcp-workflows

affinity-mcp-workflows is a skill for Claude Code from yaniv-golan/affinity-sdk. It costs 52 tokens per session (4,233 once invoked), scanned B, original, MIT.

A primary workflow for accessing Affinity CRM data through its MCP tools, which let an agent discover and use the CRM's available commands.

In plain words
What is it for?
Discovering CRM commands, reading or writing records, running queries, and assembling detailed information about people, companies, or interactions.
Why use it?
It checks the current data model and command syntax before querying or changing data, reducing errors caused by outdated assumptions or commands.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Part of the affinity-crm-mcp-unofficial plugin — 3 skills shipped together , and of affinity-crm-mcp-unofficial

Good fit Discovering CRM commands, reading or writing records, running queries, and assembling detailed information about people, companies, or interactions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yaniv-golan/affinity-sdk/affinity-mcp-workflows
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 affinity-mcp-workflows
Clone the repo
git clone --depth 1 https://github.com/yaniv-golan/affinity-sdk

Made for: Claude Code.

Or install affinity-crm-mcp-unofficial, the plugin that ships this one along with the rest of its 3 skills.

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 affinity-mcp-workflows

README.md
[![agentmods](https://agentmods.dev/badge/skills/yaniv-golan/affinity-sdk/affinity-mcp-workflows/github.svg)](https://agentmods.dev/skills/yaniv-golan/affinity-sdk/affinity-mcp-workflows)
Your own site
<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.

agentmods 80×15 button for affinity-mcp-workflows

Your own site · 80×15
<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>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,233 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.00052 $0.04233
Opus 5.5 $0.00021 $0.01693
Sonnet 5.5 $0.00010 $0.00847
Haiku 4.5 $0.00005 $0.00423

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

Security

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:**
mcp/.claude-plugin/skills/affinity-mcp-workflows/SKILL.md · 334 lines

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-commands has 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 export vs company ls) that you'll miss

Mandatory Pre-Flight Checklist

Before proceeding to execute any commands:

  1. ✅ Read xaffinity://data-model using read-xaffinity-resource
  2. ✅ Run discover-commands for your specific task
  3. ✅ 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-results a list command returns its first page and a nextCursor. Pass the number you need, up to the command's max (discover-commands → limitConfig, e.g. note feed 200); above the max is refused.
  • --all is refused, except field history-bulk --all --strategy field (dry run first). To get more, pass --cursor with the previous nextCursor.
  • 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.

Read the full file on GitHub · 334 lines

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. 24d ago Changed 9b05063a9f50
  2. 27d ago Changed · +27 lines 447e01a5d4e2
  3. 29d ago Changed · +14 lines 3be2b4258fba
  4. 2mo ago First seen · 293 lines · 52 tokens per session scan B da407c2bc387

Subscribe to this mod's changes

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.

Related

affinity-mcp-workflows compared with skills from other repositories

affinity-mcp-workflows next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
affinity-mcp-workflowsyaniv-golan/affinity-sdkSkill23d agoMITB52Claude Code
merit-lhvElnora-AI/elnora-merit-aktivaSkill105d agoApache-2.0A227Claude Code
merit-payments-bankElnora-AI/elnora-merit-aktivaSkill105d agoApache-2.0A215Claude Code
merit-tsdElnora-AI/elnora-merit-aktivaSkill105d agoApache-2.0A298Claude Code
merit-purchase-invoicesElnora-AI/elnora-merit-aktivaSkill105d agoApache-2.0A199Claude Code
merit-stripeElnora-AI/elnora-merit-aktivaSkill105d agoApache-2.0A201Claude Code
merit-vat-kmdElnora-AI/elnora-merit-aktivaSkill105d agoApache-2.0A213Claude Code