apply-ally-far-attack-near

apply-ally-far-attack-near is a skill for Claude Code from jeffreytse/grimoire-core. It costs 51 tokens per session (3,796 once invoked), scanned A, original, MIT.

A sequential expansion strategy: build alliances with distant actors that could help nearby competitors, then address the closest targets first.

In plain words
What is it for?
Use it to plan expansion across several markets, partnerships, territories, or competing organisations.
Why use it?
It reduces the risk of a nearby competitor receiving outside support while you are focused elsewhere.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the grimoire-business plugin — 145 skills shipped together

Good fit Use it to plan expansion across several markets, partnerships, territories, or competing organisations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jeffreytse/grimoire-core/apply-ally-far-attack-near
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 jeffreytse/grimoire-core --skill apply-ally-far-attack-near
Clone the repo
git clone --depth 1 https://github.com/jeffreytse/grimoire-core

Made for: Claude Code.

Or install grimoire-business, the plugin that ships this one along with the rest of its 145 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 apply-ally-far-attack-near

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-ally-far-attack-near/github.svg)](https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-ally-far-attack-near)
Your own site
<a href="https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-ally-far-attack-near"><img src="https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-ally-far-attack-near/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 apply-ally-far-attack-near

Your own site · 80×15
<a href="https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-ally-far-attack-near"><img src="https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-ally-far-attack-near.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,796 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00051 $0.03796
Opus 5 $0.00026 $0.01898
Sonnet 5 $0.00010 $0.00759
Haiku 4.5 $0.00005 $0.00380

Measured 9d ago against content hash a5d4284f23ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

apply-ally-far-attack-near scanned grade A with 0 findings 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 9d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/business/strategy/skills/apply-ally-far-attack-near/SKILL.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Apply Ally Far, Attack Near

When expanding against multiple competitors sequentially, first identify which distant actors could intervene to rescue your immediate targets; form alliances with those distant actors to neutralise the rescue option; then attack near targets in sequence, closest first — because attacking without neutralising the rescue option allows any target to hold out until reinforced, and attacking distant targets while near threats remain creates a two-front vulnerability that your opponents can exploit.

Why This Is Best Practice

Origin: In approximately 266 BC, Fan Sui (范雎) was appointed as a minister to King Zhaoxiang of Qin (秦昭王). Qin had been pursuing an expansionist strategy but with limited systematic doctrine: attacking sometimes near, sometimes far, creating tactical victories without strategic accumulation. Fan Sui submitted a memorial to the king that identified the critical error: Qin had been attacking states far away (Qi, for example) while leaving the near states of Han and Wei intact. Any distant conquest was impossible to hold because Han and Wei were still strong enough to threaten Qin's flanks and disrupt supply lines to distant occupied territory. Fan Sui's doctrine: 远交近攻 — form distant alliances, attack near targets. His specific proposal: ally with Qi (distant, no direct territorial conflict with Qin) and attack Han and Wei (near, directly threatening Qin's expansion corridor). The logic was geometric: near states threaten your flanks and can interdict supply to distant occupied territory; distant states cannot be threatened by you (no direct territorial pressure) but can rescue near states if those near states are under attack. Eliminate the near threats first, with the distant alliance in place to prevent rescue. Then renegotiate the distant alliance from a position of increased strength.

Qin adopted this doctrine and executed it systematically over the following decades. By 221 BC — approximately 45 years after Fan Sui's memorial — Qin had unified all of China, eliminating each near state in sequence while managing alliances with more distant ones. The doctrine was not the only factor, but the systematic near-to-far sequencing was a consistent feature of Qin's conquest strategy.

Read the full file on GitHub · 116 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. 9d ago First seen · 116 lines · 51 tokens per session scan A a5d4284f23ef

Subscribe to this mod's changes

apply-ally-far-attack-near is a skill published in the GitHub repository jeffreytse/grimoire-core (4 stars, last pushed 24d ago), licensed MIT. It adds 51 tokens to every session and 3,796 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.