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/agentweave/cortex/leavenpx skills add agentweave/cortex --skill leavegit clone --depth 1 https://github.com/agentweave/cortexWhat 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 | $0.00030 | $0.00628 |
| Opus 5 | $0.00015 | $0.00314 |
| Sonnet 5 | $0.00006 | $0.00126 |
| Haiku 4.5 | $0.00003 | $0.00063 |
Grade A, and why
leave 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 2d 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 — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/leave — Leave the Cortex Agent Team
Remove this agent from Cortex by cleaning up local protocol files and updating the team directory.
Arguments
<agent-name> — the agent's name (e.g., "Billing Dev"). If not provided, ask: "What is this agent's name in Cortex?"
Steps
1. Resolve name and slug
Use the provided <agent-name>.
Derive the slug: lowercase, replace spaces with hyphens, strip any characters that are not alphanumeric or hyphens.
2. Check current state
Check if .cortex.md exists in the current working directory.
Check if CLAUDE.local.md contains "## Cortex".
If neither exists, respond:
"This agent doesn't appear to be on the Cortex team. Nothing to clean up."
Stop.
3. Remove .cortex.md
If .cortex.md exists in the current working directory, delete it:
rm .cortex.md
4. Clean CLAUDE.local.md
If CLAUDE.local.md contains a ## Cortex section (the line ## Cortex through the next ## heading or end of file), remove that entire section using the Edit tool.
5. Cancel heartbeat and clean up hooks
5a. Use CronList to find any active cron whose prompt starts with Cortex (with trailing space). If found, cancel each with CronDelete. If no cron is found, skip — the agent may not have had a heartbeat running.
5b. If .claude/hooks/cortex-precheck.sh exists, delete it:
rm -f .claude/hooks/cortex-precheck.sh
5c. Read .claude/settings.json. If it contains a hook entry in the hooks.UserPromptSubmit array whose hooks array includes "command": ".claude/hooks/cortex-precheck.sh", remove that entry. Preserve all other hook entries. Write the updated JSON back.
6. Update agent note in team directory
Read ~/.cortex/config.yaml to get team_dir.
If config exists and <team_dir>/agents/<slug>/<slug>.md exists, read the agent note and check the current status field:
- If
status: active, replace withstatus: inactiveusing the Edit tool. - If
status: inactive(already inactive), skip — no change needed.
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.
- 2d ago First seen · 74 lines · 30 tokens per session scan A 9db6894556a4
leave is a skill published in the GitHub repository agentweave/cortex (12 stars, last pushed 4mo ago), licensed MIT. It adds 30 tokens to every session and 628 once invoked, about $0.0002 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-30.
Other skills, from other repositories
markstream-react
Integrate the beta markstream-react package into a React 18+ or Next app. Use when Codex needs to add the React renderer, choose the root, next, or server entrypoint, import CSS correctly, choose between content and nodes, keep client boundaries safe, add renderer-local streamingComponents or htmlComponents, use…
web-scraping
Fetches web pages and extracts structured data using mq's toolchain (mq-crawl for fetching/crawling/JS rendering, mq for HTML-to-Markdown selector-based extraction, http() for in-query requests). Use when the user wants to scrape a URL, pull structured data out of a webpage, crawl a site, or turn HTML into…
markstream-vue2-cli
Integrate markstream-vue2 into a Vue 2 Vue CLI or Webpack 4 app. Use when Codex needs Webpack 4-friendly setup, CDN worker fallbacks for Mermaid or KaTeX, dist/index.css imports, Vue 2 composition-api shims, or code block choices limited to stream-diffs or plain .
markstream-svelte
Integrate the beta markstream-svelte package in Svelte 5 or SvelteKit apps. Use when Codex needs Svelte 5 runes, CSS and optional peers, smooth streaming, worker setup, renderer-local or scoped custom components, or SSR-safe boundaries. Svelte 4 is unsupported.
task-planning-arch
计算任务 gap 并产出下一步可执行子任务 List[TaskSpec];gap 已闭返回空数组。对齐 arch 场景(架构师名册/技术栈概览/双视角分析)确定式分解——按根目标交付物集合 + donechildren 查表(参照 task-planning storage 特例,非自由 LLM 分解)。.
task-search
在框架预查的候选 bot 集里决出执行者(who)与协作方式(how),返回 4 态 SearchResult(HITSINGLE/HITGROUP/HITMULTIBOTS/MISS)。对齐案例剧本确定式映射。.