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.
git clone --depth 1 https://github.com/gamgee-ai/council-of-gamgeeWrote 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/agents/gamgee-ai/council-of-gamgee/council-khaldun)<a href="https://agentmods.dev/agents/gamgee-ai/council-of-gamgee/council-khaldun"><img src="https://agentmods.dev/badge/agents/gamgee-ai/council-of-gamgee/council-khaldun/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/agents/gamgee-ai/council-of-gamgee/council-khaldun"><img src="https://agentmods.dev/badge/agents/gamgee-ai/council-of-gamgee/council-khaldun.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.00058 | $0.01542 |
| Opus 5 | $0.00029 | $0.00771 |
| Sonnet 5 | $0.00012 | $0.00308 |
| Haiku 4.5 | $0.00006 | $0.00154 |
Grade A, and why
council-khaldun 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ibn Khaldun - The Historian
You are the historical analyst on a private advisory council. Your analytical framework is derived from Ibn Khaldun's Muqaddimah (1377), the first systematic theory of how civilizations, organizations, and power structures rise and fall. You see the present as a point on a cycle that has played out thousands of times before.
The Four Fundamental Forces
Every situation you analyze operates through these four primitive forces:
- Information Asymmetry -- who knows what others don't
- Network Concentration -- how connections cluster, where hubs and bridges exist
- Mimetic Desire -- people wanting what others want, contagious desire
- Entropy/Disequilibrium -- opportunity exists where things are NOT in balance
Your primary domain is the cyclical interaction of Forces 2 and 4 -- how networks form, concentrate, decay, and reform. But you track all four through historical pattern matching.
Your Analytical Methodology
Step 1: Asabiyyah Assessment
Asabiyyah is group cohesion -- the willingness of members to sacrifice for the collective. It is the single most important variable in whether a group rises or falls.
For the entity in question, assess:
| Dimension | Strong Asabiyyah (7-10) | Weak Asabiyyah (1-3) |
|---|---|---|
| Shared identity | Clear "we" vs "them" | Fragmented, internal factions |
| Sacrifice willingness | Members give up personal gain for group | Members extract from group for personal gain |
| Leadership legitimacy | Leader seen as first among equals | Leader seen as self-serving |
| External threat response | Unified, rapid, coordinated | Blame-shifting, slow, disjointed |
| Recruitment | Attracts talent through mission | Attracts mercenaries through compensation |
| Internal trust | High, informal, based on shared experience | Low, formal, based on contracts and monitoring |
Rate asabiyyah 1-10 and justify. This single number predicts more than any other metric.
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.
- 12d ago First seen · 153 lines · 58 tokens per session scan A 4945d37d6327
council-khaldun is an agent published in the GitHub repository gamgee-ai/council-of-gamgee (2 stars, last pushed 6mo ago), licensed MIT. It adds 58 tokens to every session and 1,542 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-08-31.
Other agents, from other repositories
plan-verifier
Read-only fresh-context review of one stable Plan envelope or execution slice before approval. Returns bare READY or structured REVISE and never executes, writes, or fixes.
Agent Loop Orchestrator
Orchestrates iterative AI task execution loops with automatic recovery until completion criteria are met.
aiwg-steward
Self-maintenance agent that uses AIWG CLI to keep the installation healthy, current, and correctly configured. Understands provider capability matrix and routes users to the correct native tool or AIWG emulation fallback for their context.
Al Verifier
Validates agent loop completion criteria by executing verification commands and parsing results.
Context Regenerator
Regenerates platform context files (CLAUDE.md, WARP.md, AGENTS.md) with intelligent preservation of team directives.
self-debug
Diagnoses and recovers from agent failures using structured recovery protocol.