Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/ethanolivertroy/my-agent-stuffnpx agentmods add skills/ethanolivertroy/my-agent-stuff/autoresearch-hooksWrote 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/ethanolivertroy/my-agent-stuff/autoresearch-hooks)<a href="https://agentmods.dev/skills/ethanolivertroy/my-agent-stuff/autoresearch-hooks"><img src="https://agentmods.dev/badge/skills/ethanolivertroy/my-agent-stuff/autoresearch-hooks/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/skills/ethanolivertroy/my-agent-stuff/autoresearch-hooks"><img src="https://agentmods.dev/badge/skills/ethanolivertroy/my-agent-stuff/autoresearch-hooks.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.00054 | $0.01568 |
| Opus 5.5 | $0.00022 | $0.00627 |
| Sonnet 5.5 | $0.00011 | $0.00314 |
| Haiku 4.5 | $0.00005 | $0.00157 |
Grade A, and why
autoresearch-hooks 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 — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
autoresearch-hooks
Optional scripts that run at iteration boundaries in an autoresearch session. Two hooks, both transparent to the loop-running agent — their effect is a file on disk or a steer message.
autoresearch.hooks/
before.sh # fires before each iteration (prospective)
after.sh # fires after each log_experiment (retrospective)
Both files are optional. Files without the executable bit are silently ignored.
Contract
Stdin — before.sh
One JSON line. Parse with jq. Realistic example:
{
"event": "before",
"cwd": "/path/to/workdir",
"next_run": 6,
"last_run": {
"run": 5,
"status": "discard",
"metric": 42.1,
"description": "Simplified to sorted(arr) — copy cost dominates",
"asi": {
"hypothesis": "Built-in sort avoids Python overhead",
"next_focus": "list copy avoidance"
}
},
"session": {
"metric_name": "total_ms",
"metric_unit": "ms",
"direction": "lower",
"baseline_metric": 40.7,
"best_metric": 33.5,
"run_count": 5,
"goal": "optimize sort speed"
}
}
| Field | Notes |
|---|---|
last_run |
The most recent run entry. null on a fresh session. |
session.direction |
"lower" or "higher" — which end of the scale wins. |
session.baseline_metric |
First run of the current segment. null until one run exists. |
session.best_metric |
Optimal metric across kept runs only. null until one is kept. |
session.goal |
The session name set by init_experiment. |
session.run_count |
Total runs logged so far (any status). |
Stdin — after.sh
{
"event": "after",
"cwd": "/path/to/workdir",
"run_entry": {
"run": 6,
"status": "discard",
"metric": 38.9,
"description": "Timsort hybrid slower on random",
"asi": {
"hypothesis": "Partial-sort heuristic on input distribution",
"learned": "Overhead dominates on random arrays"
}
},
"session": {
"metric_name": "total_ms",
"metric_unit": "ms",
"direction": "lower",
"baseline_metric": 40.7,
"best_metric": 33.5,
"run_count": 6,
"goal": "optimize sort speed"
}
}
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/after/auto-tag-winners.sh 870 B runs code
- examples/after/learnings-journal.sh 862 B runs code
- examples/after/macos-notify.sh 944 B runs code
- examples/before/anti-thrash.sh 934 B runs code
- examples/before/context-rotation.sh 706 B runs code
- examples/before/external-search.sh 849 B runs code
- examples/before/hypothesis-reflection.sh 848 B runs code
- examples/before/idea-rotator.sh 545 B runs code
- examples/before/qmd-search.sh 1.0 KB runs code
- examples/README.md 2.7 KB
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 · 174 lines · 54 tokens per session scan A 061bcc8bea7b
autoresearch-hooks is a skill published in the GitHub repository ethanolivertroy/my-agent-stuff (11 stars, last pushed 3mo ago), licensed MIT. It adds 54 tokens to every session and 1,568 once invoked, about $0.0002 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-30.
Other skills, from other repositories
subagent-driven-development
Execute plans via delegatetask subagents (2-stage review).
mcporter
List, auth, and call MCP servers/tools from the terminal.
article-writing
Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.
mem0-oss-to-platform
Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…
safe-refactor
Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.
create-tech-design
Only use when the user explicitly invokes this skill by name.