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 agentmods add skills/yaniv-golan/affinity-sdk/affinity-mcp-workflowsnpx 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.svg" alt="Measured on agentmods" 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.03321 |
| Opus 5 | $0.00026 | $0.01661 |
| Sonnet 5 | $0.00010 | $0.00664 |
| Haiku 4.5 | $0.00005 | $0.00332 |
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 5d 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 — 293 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:
- Command syntax may have changed since this skill was written
- New flags (like
--with-interaction-dates) may exist that you don't know about - You may use deprecated syntax that returns incomplete data
- 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 enforces pagination limits to prevent unbounded data scans:
| Limit | Value | Description |
|---|---|---|
| Default | 1000 records | Applied when no --max-results specified |
| Maximum | 10000 records | Higher values are capped with a warning |
--all flag |
BLOCKED | Use --max-results or cursor pagination instead |
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.
- 5d 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 (0 stars, last pushed 1mo ago), licensed MIT. It adds 52 tokens to every session and 3,321 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
merit-lhv
How to pull an LHV bank statement straight into Merit Aktiva without touching a file export — LHV's own MCP server returns camt.053 XML, which is exactly what Merit's bank-statement import accepts. Covers connecting LHV (OAuth2 + Smart-ID, read-only), the 31-day window, the multi-currency trap, and where the statement…
merit-payments-bank
How to record payments and reconcile the bank statement correctly in Merit Aktiva (maksed / pank) via the elnora-merit CLI. The core skill is choosing the right transaction type for each line — customer receipt, vendor/tax payment, other income, or other expenditure — plus bank-statement import, settlements…
merit-stripe
How Stripe payments must be set up and recorded in Merit Aktiva — the canonical clearing-account method. Stripe is a payment intermediary, not your bank: never book the bank deposit as revenue (it arrives NET of fees). Each Stripe payout is booked as ONE summary GL batch — gross card sales as revenue + output VAT…
merit-tsd
The Estonian TSD (tulu- ja sotsiaalmaksu deklaratsioon) annexes that are NOT payroll: lisa 5 (gifts, donations, entertainment/vastuvõtukulud) and lisa 6 (expenses unrelated to business — fines, sunniraha, tax-authority interest). Covers what makes a TSD mandatory for a month, the 22/78 gross-up, the exact e-MTA form…
merit-vat-kmd
How VAT and the Estonian VAT return (käibedeklaratsioon / KMD) work in Merit Aktiva, and how to get them right from the elnora-merit CLI. Covers the tax-code model, paying the VAT, what feeds each KMD line, time-of-supply, and pulling supporting VAT figures. The KMD itself is generated and filed in the Merit UI — the…
merit-palk-employees
How to onboard employees and maintain contracts, contacts, and base salary agreements in Merit Palk via elnora-merit palk. Covers the sendemployees-vs-sendpayterms distinction, required import codes, and reading the employee / agreement lists. Use when: adding a new employee, creating a first contract, setting or…