autocontext is a self-improving harness for AI agents that runs a goal through evaluation, preserves useful lessons, and records artifacts for later runs. Developers use it to help agents and future versions of those agents perform better on recurring tasks. The catalogue add-ons support its agent-improvement workflow.
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 skills add greyhaven-ai/autocontext --skill autocontext-creatorgit clone --depth 1 https://github.com/greyhaven-ai/autocontextWrote 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/skills/greyhaven-ai/autocontext/autocontext-creator)<a href="https://agentmods.dev/skills/greyhaven-ai/autocontext/autocontext-creator"><img src="https://agentmods.dev/badge/skills/greyhaven-ai/autocontext/autocontext-creator.svg" alt="Measured on agentmods" 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.00057 | $0.00932 |
| Opus 5 | $0.00028 | $0.00466 |
| Sonnet 5 | $0.00011 | $0.00186 |
| Haiku 4.5 | $0.00006 | $0.00093 |
Grade A, and why
autocontext-creator 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 7d 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 — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Autocontext: Creating Knowledge
Overview
Autocontext runs an improvement loop over a task and writes what it learned to
disk. This skill covers producing that knowledge. To read knowledge that
already exists, use autocontext-consumer instead.
Nothing here assumes a particular agent host. The only requirement is that you
can run autoctx and read its output.
When to Use
- You have a task and want Autocontext to improve an approach to it over several generations.
- You have one output and one rubric, and want it scored or improved without a full loop.
- You want to see what a finished run produced.
Do not use this skill to look up existing knowledge. That is autocontext-consumer.
Always Pass --json When Parsing
Every command below accepts --json. Use it whenever you intend to read the
result programmatically; the human-readable form is not a stable interface.
Running a Scenario
autoctx run grid_ctf --iterations 3 --json
--iterations is the number of generations. Each one produces a candidate, scores it,
and folds what it learned into the knowledge for that scenario.
Give the run an id you choose when you need to refer back to it:
RUN_ID="my_run_$(date +%s)"
autoctx run grid_ctf --iterations 3 --run-id "$RUN_ID" --json
autoctx status "$RUN_ID" --json
Starting From a Plain-Language Task
When there is no scenario, describe the task:
autoctx solve "Improve the support-triage response policy." --iterations 3 --json
Scoring or Improving a Single Output
For one-shot work, without a loop:
autoctx judge --task-prompt "..." --output "..." --rubric "..." --json
autoctx improve --task-prompt "..." --rubric "..." --rounds 3 --json
judge scores an output you already have. improve iterates on it.
Seeing What a Run Produced
autoctx list --json
autoctx status "$RUN_ID" --json
autoctx show "$RUN_ID"
autoctx replay "$RUN_ID" --generation 1
show renders the run's artifacts. replay prints the JSON for one generation,
which is the level to inspect when a score looks wrong.
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.
- 7d ago First seen · 125 lines · 57 tokens per session scan A 8d1c551d72c1
autocontext-creator is a skill published in the GitHub repository greyhaven-ai/autocontext (1,291 stars, last pushed 4d ago), licensed Apache-2.0. It adds 57 tokens to every session and 932 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-30.
Other skills, from other repositories
project-graveyard
Scans the developer's machine for dead side projects, autopsies each one from its git history (died at the payments wall, killed by a newer project, finished but never shipped), surfaces their personal death patterns, and picks the corpse most worth resurrecting — then helps ship it. Use when the user mentions…
thinking-out-loud
A contract for what the agent does when a long, messy, stream-of-consciousness ramble arrives (usually voice dictation): act on nothing until the echo brief is approved. The echo audits the entire transfer, mission, locked decisions and constraints, open questions, flips and parked tangents, with the model's…
hugging-face-model-trainer
This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes guidance on the TRL Jobs package, UV…
hugging-face-datasets
Create and manage datasets on Hugging Face Hub. Supports initializing repos, defining configs/system prompts, streaming row updates, and SQL-based dataset querying/transformation. Designed to work alongside HF MCP server for comprehensive dataset workflows.
hugging-face-paper-publisher
Publish and manage research papers on Hugging Face Hub. Supports creating paper pages, linking papers to models/datasets, claiming authorship, and generating professional markdown-based research articles.
fastmcp-client-cli
Query and invoke tools on MCP servers using fastmcp list and fastmcp call. Use when you need to discover what tools a server offers, call tools, or integrate MCP servers into workflows.