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/knowledgestack/ks-cookbookWrote 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/rules/knowledgestack/ks-cookbook/flagship_author)<a href="https://agentmods.dev/rules/knowledgestack/ks-cookbook/flagship_author"><img src="https://agentmods.dev/badge/rules/knowledgestack/ks-cookbook/flagship_author/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/rules/knowledgestack/ks-cookbook/flagship_author"><img src="https://agentmods.dev/badge/rules/knowledgestack/ks-cookbook/flagship_author.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.00010 | $0.01118 |
| Opus 5.5 | $0.00004 | $0.00447 |
| Sonnet 5.5 | $0.00002 | $0.00224 |
| Haiku 4.5 | $0.00001 | $0.00112 |
Grade A, and why
flagship_author 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 2mo 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 — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Flagship author rule
Applies when you're adding or editing anything under flagships/<name>/.
File layout (enforced)
flagships/<name>/
├── pyproject.toml # [project.scripts] entrypoint ks-cookbook-<slug>
├── README.md # title, tags, seed-data block, walkthrough
├── src/<module>/
│ ├── __main__.py # argparse → agent.draft_*()
│ ├── agent.py # pydantic-ai Agent + system prompt + MCP wiring
│ └── schema.py # pydantic output model with Citation field(s)
└── sample_inputs/ # at least one concrete example input
Don't create additional top-level files inside the flagship unless there's a specific reason.
README template (required sections, in this order)
# <Vertical>: <Flagship Name>
**Tags:** `vertical` `subdomain` `framework`
<one-paragraph what-and-why>
## Seed data required
This demo reads from a folder in your Knowledge Stack tenant. You need to create
that folder and upload the expected documents **before** running.
**Expected corpus:** <one-line description>
Set-up steps:
1. Sign up at [app.knowledgestack.ai](https://app.knowledgestack.ai).
2. Create a folder in the dashboard and copy its folder ID.
3. Upload the documents described above.
4. Issue an API key from the dashboard and put it in `.env` as `KS_API_KEY`.
5. Run: `<CORPUS_FOLDER_ID=<id> make demo-<slug>>`
Full corpus matrix: [`https://github.com/knowledgestack/ks-cookbook/wiki/seed-data`](https://github.com/knowledgestack/ks-cookbook/wiki/seed-data).
## Run
<make command + override examples>
## Framework
<pydantic-ai | LangGraph | raw-OpenAI | raw-Anthropic | CrewAI | …>
## Bring your own data
<short note on pointing the demo at a different folder>
Agent wiring (copy this shape)
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStdio
from .schema import Memo
SYSTEM_TEMPLATE = """...""" # include the four prompt invariants
async def draft(*, corpus_folder_id: str, model: str, ...) -> Memo:
mcp = MCPServerStdio(
command=os.environ.get("KS_MCP_COMMAND", "uvx"),
args=(os.environ.get("KS_MCP_ARGS", "knowledgestack-mcp") or "").split(),
env={"KS_API_KEY": os.environ["KS_API_KEY"],
"KS_BASE_URL": os.environ.get("KS_BASE_URL", "")},
)
agent = Agent(
model=f"openai:{model}",
mcp_servers=[mcp],
system_prompt=SYSTEM_TEMPLATE.replace("__CORPUS_FOLDER_ID__", corpus_folder_id),
output_type=Memo,
)
async with agent.run_mcp_servers():
result = await agent.run(user_prompt)
return result.output
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.
- 2mo ago First seen · 119 lines · 10 tokens per session scan A 1afcd6bb8be3
flagship_author is a cursor rule published in the GitHub repository knowledgestack/ks-cookbook (9 stars, last pushed 3mo ago), licensed MIT. It adds 10 tokens to every session and 1,118 once invoked, about $0.0000 per session on Opus 5.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 cursor rules, from other repositories
chart-encoding-standard
Chart Encoding Standard. Governs the DATA-MARK layer of every chart OrchestKit emits (playground, dashboard, infographic, MCP visual, multi-surface). ork does not own chart color science — it rents it from CC's /dataviz. The difference between an accessible, validated chart and an eyeballed rainb...
long-run-protocol
Long-Run Protocol. Long multi-agent runs finish at a named line, stop only where a human is needed, and never pass an unchecked claim as fact.
vk-org-resolution
VirtualKey org resolution has TWO join chains (Project for application VKs, Owner for personal VKs); vkSelectSQL must COALESCE both or personal VKs silently return NULL org.
design-tokens
Visual values via CSS variables; no hex / rgb literals in style.
i18n-mandatory
All user-visible UI text uses t('namespace:section.key') from react-i18next.
schema
Rules for working on the idunagentschema package.