autoresearch-code-skill

autoresearch-code-skill is a skill for Claude Code, Codex from darellchua2/opencode-config-template. It costs 40 tokens per session (1,361 once invoked), scanned C, original, Apache-2.0.

A method for repeatedly improving code by making one small change, measuring it with a benchmark, and keeping or reverting it based on the result. It can use measures such as test coverage, bundle size, runtime, or error count; TDD means developing with tests as a guide.

In plain words
What is it for?
Iteratively increasing test coverage, reducing JavaScript bundle size or runtime, and lowering error counts. It is designed for code changes that can be measured and repeated toward a target.
Why use it?
It removes the need to decide by inspection whether an optimization helped. A program checks the result, while guard and consumer checks help catch broken downstream code before a change is kept.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions OpenCode.

Good fit Iteratively increasing test coverage, reducing JavaScript bundle size or runtime, and lowering error counts. It is designed for code changes that can be measured and repeated toward a target.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/autoresearch-code-skill
Install

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.

Any agent
npx skills add darellchua2/opencode-config-template --skill autoresearch-code-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for autoresearch-code-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/autoresearch-code-skill/github.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/autoresearch-code-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/autoresearch-code-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/autoresearch-code-skill/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.

agentmods 80×15 button for autoresearch-code-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/autoresearch-code-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/autoresearch-code-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.01361
Opus 5.5 $0.00016 $0.00544
Sonnet 5.5 $0.00008 $0.00272
Haiku 4.5 $0.00004 $0.00136

Measured 1mo ago against content hash 8839b708e664, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

autoresearch-code-skill scanned grade C with 1 finding 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (templates/guard.example.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `autoresearch-core-skill/references/iteration-safety.md` — Verify/Guard separation; never modify `.env`, `node_modules/`, or run `rm -rf`.
skills/autoresearch-code-skill/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What I do

I run an autonomous code-optimization loop. Each iteration: read the audit trail → hypothesize one atomic code change → apply → commit → run the benchmark evaluator → run the Guard command → run the Consumer Coverage check → keep the commit if {"pass":true,"score":N} shows improvement AND the guard stays green AND no downstream consumer is broken, else git reset --hard HEAD~1. I am Tier 1 (mechanical evaluator) — every keep/revert decision comes from a program, never from LLM self-judgment. I overlap with tdd-workflow-skill, but I am autonomous-loop-flavored (iterate to a target overnight) where TDD is single-cycle (write-one-test-then-implement).

Triggers

Load me (or route to autoresearch-code-subagent) when the user says any of:

  • "optimize code", "optimize until", "iteratively improve"
  • "test coverage", "increase coverage to N%"
  • "bundle size", "reduce bundle"
  • "performance", "reduce runtime", "speed up"
  • "fix errors", "reduce error count", "drive failures to zero"
  • "autoresearch code", "git-as-memory optimization"

Do not trigger for ML training (→ autoresearch-ml-skill) or literature review (→ autoresearch-research-skill).

Citations

  • autoresearch-core-skill/references/evaluator-contract.md — the {"pass":bool,"score":N} shape my benchmark evaluator emits.
  • autoresearch-core-skill/references/stuck-detection.md — 3-strike pivot (switch from micro-opt to algorithmic change; target a different hotspot).
  • autoresearch-core-skill/references/iteration-safety.md — Verify/Guard separation; never modify .env, node_modules/, or run rm -rf.
  • autoresearch-core-skill/references/audit-trail.md — the 8-column TSV I append to (<skill>-results.tsv).
  • autoresearch-core-skill/references/crash-recovery.md — syntax error → free fix; guard failure → revert.

Skill-specific overrides

  1. TDD mapping (the key override). When the metric is "test pass-count":
    • pass: true GREEN (all targeted tests pass)
    • pass: false RED (any targeted test fails)
    • score pass-count (number of tests passing)
    • This makes tdd-workflow-skill and this skill mechanically equivalent when the metric is test-pass; the difference is I iterate to a target autonomously rather than running one RED→GREEN cycle.
  2. Verify vs Guard vs Consumer Coverage. Verify emits {"pass":bool,"score":N} (e.g. pytest --cov → coverage %). Guard is a separate command that must stay green (e.g. npm test). Consumer Coverage is a third mandatory check that enumerates downstream callers of every changed symbol and forces revert on any broken reference. A failing Guard or a failing Consumer Coverage check forces revert regardless of Verify — you cannot trade test-green for a broken downstream consumer.
  3. Tier 1 (mechanical evaluator). No agent-as-evaluator fallback.
  4. Git-as-memory. Commit before Verify so revert is one command. Never edit the working tree without committing first — an uncommitted change cannot be cleanly reverted.
  5. Bounded-by-default. Iterations: 25 default. Lower for fast benchmarks (e.g. Iterations: 10 for npm run build cycles).
  6. Consumer Coverage sub-step (mandatory, between Guard and Keep/Revert). Guard is necessary but not sufficient — Guard validates a fixed suite (e.g. npm test), but it cannot detect downstream breakage in code paths the suite does not exercise. The Consumer Coverage sub-step traces the actual call graph of the symbols this iteration touched:
    • With .codegraph/: codegraph_callers on each changed symbol; revert if any caller is broken.
    • Without .codegraph/: grep -r/glob for importers and references of each changed symbol; revert if any grep hit references the old (now-renamed/removed) symbol.
    • Log discard with consumer-broken note in *-results.tsv when this gate forces a revert. Cross-references the agent's implementation in autoresearch-code-subagent.md §Consumer Coverage Gate.

Read the full file on GitHub · 70 lines

Files

What ships with it

3 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.

Changes

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.

  1. 1mo ago First seen · 70 lines · 40 tokens per session scan C 8839b708e664

Subscribe to this mod's changes

autoresearch-code-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 28d ago), licensed Apache-2.0. It adds 40 tokens to every session and 1,361 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

creating-a-coral-task

Author a new CORAL task — the three pieces that must line up (task.yaml, seed/, a packaged grader/), the coral init → coral validate → smoke-test loop, and how to pick a grader pattern (stdout float, test pass-rate, ratio-vs-baseline, multi-metric, or an LLM rubric judge). Use whenever the user wants to create a CORAL…

Human-Agent-Society/CORAL · 168 tokens

codex-autoresearch

Triage improvement work and run or resume accepted measured loops in a local project. Architecture, documentation, UX, product study, open research, taste, and one-shot fixes stay direct unless the user explicitly requests repeated measurement with a complete experiment contract.

TheGreenCedar/codex-autoresearch · 55 tokens

write-tests

Write tests that pin real behavior instead of implementation details, config values, or lucky samples. Use when adding tests for new behavior, writing a regression test, fixing a brittle or flaky test, reviewing a test diff, or when a test breaks after a refactor or config change that didn't change behavior.

dzhng/skills · 63 tokens

audit-tests

Audit whether tests earn their maintenance cost and which suite owns each contract. Use when pruning redundant tests, investigating implementation coupling or test-only production hooks, reviewing the value of proposed coverage, or auditing an entire subsystem. Use write-tests to implement the resulting test changes.

dzhng/skills · 55 tokens

eval-skills

Eval and improve a skill against golden cases — run the target skill blind in a fresh, context-free subagent on each example input, grade the artifact against the expected outcome, and let the gaps drive the edits. Use when the user wants to test/eval/improve/harden a skill, says "this skill keeps producing X / keeps…

dzhng/skills · 114 tokens

arbor-agent-merge-eval

Merge and evaluation discipline for Arbor. Use for TreeSetMeta metadata, Bdev/Btest separation, eval command templates, score parsing, GitMergeBranch behavior, protected paths, required outputs, metricdirection, trunk/test score updates, medal detection, and final evaluation before stopping.

RUC-NLPIR/Arbor · 63 tokens