Логотип Tool Primitive Selector

Tool Primitive Selector

Спільнота
AnthonyAlcaraz
tool-primitive-selector

Choose how to expose an agent capability — a command-line interface (CLI) vs a Model Context Protocol server (MCP) vs a Skill — by profiling the capability along the chapter's dimensions and scoring three primitives across six feature axes, per Ch6 "Choosing the Right Primitive: CLIs, MCPs, and Skills". The chapter's frame: three primitives, three audiences on a personal-to-enterprise gradient, and CONVERGENCE not competition — a single capability is often exposed as more than one, so the selector returns a primary recommendation AND an also_expose_as list. Use when deciding how to wrap a capability, or justifying a CLI-vs-MCP-vs-Skill choice in a design doc. NOT for RETRIEVING which tools to load at runtime (that is rag-mcp-tool-selection), NOT for picking a specific vendor product, NOT when the platform already mandates a primitive (just adopt it).

Огляд

ВидавецьAnthonyAlcaraz
Репозиторійagentic-graph-rag-skills
Назва навичкиtool-primitive-selector
Зірки
29
Форки
9
Файли в пакеті
2
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 2

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: AnthonyAlcaraz. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Tool Primitive Selector у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/tool-orchestration/tool-primitive-selector
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills.git /tmp/agentic-graph-rag-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-graph-rag-skills/skills/tool-orchestration/tool-primitive-selector .claude/skills/tool-primitive-selector
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Tool Primitive Selector в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Tool Primitive Selector, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Tool Primitive Selector не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Tool Primitive Selector

Overview

You have three distinct ways to give an agent a capability, and Ch6 is explicit that they are converging, not competing. The Google Workspace CLI is one tool with three interfaces: a CLI surface, a built-in MCP server mode, and 100+ prebuilt skills. So the question is rarely "which one?" but "which PRIMARY primitive, and what else should this ALSO be exposed as?"

Each primitive answers a different question for a different audience:

  • CLI answers "how does the agent PERFORM this operation?" Deterministic command surface, Unix-pipe composable (curl|jq|grep beats four MCP calls), self-describing via --help, invokable with no model in the loop. Models have internalized CLI grammar from millions of Stack Overflow answers and man pages. Costs ~400 tokens after dynamic discovery. Audience: the individual developer in build mode / CI, on a machine they trust.
  • MCP answers "how does the agent CONNECT to this service securely?" Model-callable server with schemas, runtime-discoverable, OAuth + scoped per-agent access control through gateways. Static schemas cost 23K-50K tokens before any reasoning, which is why runtime retrieval is mandatory at scale. Audience: enterprise teams, non-developer users, and unsupervised background agents that cannot be granted broad access.
  • SKILL answers "WHAT should the agent do, and in what order?" Encoded judgment / procedure the model reads. Natural language, no install, ~100 tokens, works for everyone. It is the meta-layer that makes the other two effective. Author it first regardless.

The selector profiles a capability along the chapter's four dimensions — who runs it, when, where, what access — plus a composability need, then scores the three primitives across six feature axes (deterministic surface, runtime-discoverable, access control, encodes judgment, personal fit, enterprise fit). It returns a primary recommendation AND an also_expose_as list, and places the audience on the personal-to-enterprise gradient with its governance implication.

When to Use

  • Deciding whether to wrap a new capability as a CLI, an MCP server, or a Skill
  • Justifying a CLI-vs-MCP-vs-Skill choice in an architecture / design doc
  • Locating a capability on the personal-to-enterprise gradient and naming the governance it implies (OS-level trust vs per-agent access control)
  • Capturing convergence: which secondary interfaces a capability should ALSO ship

Phrases: "CLI vs MCP vs skill", "how should I expose this tool", "which primitive", "should this be an MCP server or a CLI", "personal-to-enterprise gradient", "per-agent access control", "convergence not competition".

When NOT to Use

  • Retrieving which tools to load at runtime. That is the other Ch6 skill, rag-mcp-tool-selection — it filters a large registry of already-existing tools for a query. This skill decides how to WRAP a capability in the first place. Different question; no overlap.
  • Picking a specific product. This selects the primitive class, not Neo4j-vs-Neptune or one MCP vendor over another.
  • A platform-mandated primitive. If the org standardizes on MCP gateways or the deployment is CLI-only, adopt it; the scoring is moot.
  • A capability whose value is purely procedural knowledge with no callable surface. It is a Skill by definition — you do not need to score it, though running the selector will confirm it.

Process

StepInputActionOutputVerification
1Capability profile (audience, invocation, access-control, needs-model, composability)lib.score_primitives(cap)[(primitive, score), ...] sorted descweighted dot-product of capability weights and per-primitive axis scores
2Samelib.recommend_primitive(cap){recommended, also_expose_as, scores, rationale}deterministic_command → cli; runtime discovery + access control → mcp; judgment → skill
3An audiencelib.gradient_position(audience){position, tool_mix, governance, primitive_bias}individual = personal/cli-biased; enterprise = mcp-biased + per-agent access control
4A governed enterprise deterministic capabilitylib.recommend_primitive(cap)also_expose_as contains the convergent second interfaceenterprise deterministic surfaces BOTH mcp (primary) and cli

Rationalizations

Agent rationalizationDocumented rebuttal
"MCP is the modern standard — wrap everything as an MCP server."MCP schemas cost 23K-50K tokens before the agent reasons, and CLI-based composition is the path of least resistance for build-mode work (models trained on far more CLI examples than MCP). MCP is decisive for governed, unsupervised, enterprise access — not a universal default. Profile the audience first.
"It's just a CLI vs MCP choice, pick one and move on."That is the competition frame the chapter rejects. The Google Workspace CLI is one tool with three interfaces. The selector returns also_expose_as precisely because a deterministic capability can ALSO be a governed MCP endpoint, and a governed capability can ALSO ship a CLI. Convergence, not either/or.
"Skills are just docs — skip them and give the agent the tool."Skills encode the judgment for using the other two effectively; the chapter's tip says author them first regardless. Without the Skill, the agent has the CLI/MCP but not the when-and-in-what-order. That is why skills stay constant across the whole personal-to-enterprise gradient.
"This capability is deterministic, so it must be a CLI — access control is someone else's problem."Access control is exactly what tips a deterministic capability from CLI to MCP up the gradient. A CLI runs through the OS permission model, a blunt instrument for agent-level scoping. When an enterprise needs per-agent least-privilege (allowed_tools), the same deterministic capability becomes an MCP endpoint — with the CLI kept as the developer-facing surface.
"The gradient is preference — a good dev can run CLIs at any scale."The chapter calls the CLI-to-MCP shift structural, not preference. A solo developer can trust a CLI pipeline on their own machine; an enterprise running agents on cron schedules cannot grant those agents the same broad access. The governance requirement, not taste, moves the capability.

Red Flags

  • Everything recommends skill. You have set every capability's invocation to judgment_guidance. Re-profile: does the capability have a callable surface (CLI/MCP) or is it genuinely pure procedure? If everything is judgment, nothing is being executed.
  • Enterprise capability recommends cli with no also_expose_as. An enterprise / background-agent capability with real access-control needs should surface an MCP endpoint. If it did not, the needs_per_agent_access_control flag is probably unset — re-check the governance requirement.
  • A deterministic, composable capability recommends mcp for a solo dev. Mismatch: for the individual / build-mode end of the gradient, a CLI is the path of least resistance. Re-check the audience.
  • also_expose_as is empty for a capability everyone agrees is "one tool, three interfaces." The convergence is not being captured. Confirm the invocation and audience flags reflect the real deployment.

Non-Negotiable Verification

  1. Run the benchmark battery. python cli.py benchmark must report 10/10:
    • individual + deterministic_command → cli
    • enterprise + runtime discovery + access control → mcp
    • judgment_guidance → skill for every audience
    • convergence: enterprise governed deterministic surfaces both mcp (primary) and cli (in also_expose_as)
    • high Unix-pipe composability tips an individual to cli
    • gradient: individual = personal/cli-biased, enterprise = mcp-biased with per-agent access-control governance
    • also_expose_as never duplicates the recommended primitive
  2. Run both scenarios. python cli.py scenario enterprise-deploy-tool recommends mcp with cli also-exposed; python cli.py scenario code-review-procedure recommends skill.
  3. Verify CLI help. python cli.py --help exits 0 and prints this SKILL.md description (so any harness can discover the skill from --help).

Security Posture

  • Prompt injection. The capability profile is data-only flags scored against fixed axis tables - nothing is executed. The adversarial shape is a profile that understates its governance needs (e.g. leaving needs_per_agent_access_control unset) to steer a sensitive capability toward an ungoverned CLI wrap; profile from the real deployment, not from the capability owner's optimism.
  • Data exfiltration. No network calls, no file writes. Profiles describe internal capabilities and their access models; they stay in-process and appear only in the stdout recommendation the caller owns.
  • Privilege escalation. No shell invocation, no eval. The recommendation shapes the future governance surface: choosing CLI where MCP per-agent scoping was required skips the gateway entirely. The output is advisory - the deployment review, not this selector, owns the final exposure decision.

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly, by Anthony Alcaraz and Sam Julien) Ch6 — Tool Orchestration, section "Choosing the Right Primitive: CLIs, MCPs, and Skills" and its subsections (the wrap-everything argument, three-primitives-three- audiences, the personal-to-enterprise gradient, per-agent access control, convergence-not-competition). Key voices named in the chapter: Jiquan Ngiam (the three-audience taxonomy + self-reported personal-vs-work setups), Dharmesh Shah (CLI training-data density), CLI-Anything from the HK University of Data Science (structured I/O + self-description + determinism), and Armand Ruiz / Addy Osmani (the Google Workspace CLI + ADK McpToolset convergence — one tool, three interfaces). This is the Decision-Table primitive at the Meta layer: it selects how to expose a capability; it does not implement the capability.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Tool Primitive Selector?

Choose how to expose an agent capability — a command-line interface (CLI) vs a Model Context Protocol server (MCP) vs a Skill — by profiling the capability along the chapter's dimensions and scoring three primitives across six feature axes, per Ch6 "Choosing the Right Primitive: CLIs, MCPs, and Skills". The chapter's frame: three primitives, three audiences on a personal-to-enterprise gradient, and CONVERGENCE not competition — a single capability is often exposed as more than one, so the selector returns a primary recommendation AND an also_expose_as list. Use when deciding how to wrap a c...

Навіщо використовувати Tool Primitive Selector у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Tool Primitive Selector — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Tool Primitive Selector у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/tool-orchestration/tool-primitive-selector. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Tool Primitive Selector?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Tool Primitive Selector?

Зі скількома забажаєте. У TypingMind ви можете використовувати Tool Primitive Selector із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Tool Primitive Selector?

Так. На GitHub цю навичку публікує AnthonyAlcaraz за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇