agentleFS
tumftumf/skills/autoresearch-agent/SKILL.md

autoresearch-agent

Skill4 starsChanged 7 months agoMITView on GitHub

Delegate autoresearch tasks to a headless Claude Code sub-agent process. Use when the current agent needs to run any autoresearch command (autoresearch, ship, plan, security, debug, fix, scenario, predict, learn) as an autonomous background or foreground subprocess via `claude --dangerously-skip-permissions -p`. Ideal for long-running autonomous loops, overnight improvement runs, CI/CD pipeline integration, and fire-and-forget shipping workflows. Triggers on: "run autoresearch in background", "headless autoresearch", "delegate autoresearch", "spawn autoresearch", "autoresearch sub-agent", "autoresearch agent", or any request to run autoresearch non-interactively.

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run directly when the result is needed immediately:

    line 41
  2. Very specific:

    If agent-exec is available, prefer it for any run that may exceed 5 minutes.

    line 50
  3. Very specific:

    Add --notify-file results.ndjson to get a completion event written when done.

    line 68
  4. Very specific:

    If claude is not found, the script exits with a clear error message.

    line 113
  5. Distinctive:

    If the autoresearch skill is not installed, claude will report an unknown command.

    line 114
  6. Distinctive:

    If agent-exec is unavailable, fall back to direct foreground execution and warn the user that long runs will block.

    line 116

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

autoresearch-agent

Spawn autoresearch as a headless Claude Code subprocess. The wrapper script scripts/autoresearch translates CLI subcommands into claude --dangerously-skip-permissions -p "/autoresearch:<sub> <flags>".

Prerequisites

  • claude CLI in PATH (or set CLAUDE_BIN)
  • The autoresearch skill installed in the target project or globally (~/.claude/skills/autoresearch/)

Quick reference

# Foreground (blocks until done)
scripts/autoresearch ship --auto

# Background via agent-exec (preferred for long runs)
agent-exec run --timeout 3600000 -- scripts/autoresearch fix --guard "npm test"

Execution modes

1. Foreground — short tasks (<5 min)

Run directly when the result is needed immediately:

scripts/autoresearch ship --checklist-only
scripts/autoresearch plan "Reduce bundle size"

2. Background via agent-exec — long tasks (>5 min)

If agent-exec is available, prefer it for any run that may exceed 5 minutes. This keeps the calling agent responsive.

# Launch
agent-exec run \
  --cwd "$(pwd)" \
  --timeout 7200000 \
  -- scripts/autoresearch security --fail-on critical

# Check progress
agent-exec status <JOB_ID>
agent-exec tail --tail-lines 50 <JOB_ID>

# Wait for completion
agent-exec wait <JOB_ID>

Add --notify-file results.ndjson to get a completion event written when done.

3. Dry-run — verify command before launch

scripts/autoresearch -n ship --auto
# prints: + claude --dangerously-skip-permissions -p '/autoresearch:ship --auto'

Workflow

  1. Determine subcommand and flags from the user request
  2. Check estimated duration — short (<5 min) → foreground; long → agent-exec
  3. Verify prerequisites — which claude, skill installed
  4. Launch — foreground exec or agent-exec run
  5. Monitor (background only) — agent-exec tail / status
  6. Report results back to the user

Subcommands

See references/subcommands.md for the full subcommand table with flags.

SubcommandTypical durationRecommended mode
ship --auto2-10 minforeground
ship --checklist-only<1 minforeground
plan1-3 minforeground
security10-60 minagent-exec
debug10-60 minagent-exec
fix5-30 minagent-exec
scenario5-30 minagent-exec
predict3-10 minforeground or agent-exec
learn5-30 minagent-exec
(base loop)unboundedagent-exec with --timeout

Environment variables

VariablePurposeDefault
CLAUDE_BINPath to claude binaryclaude
CLAUDE_EXTRA_ARGSExtra flags for claude (e.g. --model sonnet)(empty)
AUTORESEARCH_DRY_RUNSet 1 to print command without executing0

Error handling

  • If claude is not found, the script exits with a clear error message.
  • If the autoresearch skill is not installed, claude will report an unknown command. Fix: install the skill per the autoresearch README.
  • If agent-exec is unavailable, fall back to direct foreground execution and warn the user that long runs will block.

Examples

# Ship a PR headlessly
scripts/autoresearch ship --auto

# Run 25 iterations of test coverage improvement in background
agent-exec run --timeout 3600000 \
  -- scripts/autoresearch "Goal: coverage to 90%" --iterations 25

# Security audit with CI gate
agent-exec run --timeout 7200000 \
  -- scripts/autoresearch security --fail-on critical --iterations 15

# Debug then fix pipeline
agent-exec run --timeout 1800000 \
  -- scripts/autoresearch debug --scope "src/**/*.ts" --iterations 10
# ... after completion:
agent-exec run --timeout 1800000 \
  -- scripts/autoresearch fix --from-debug --iterations 20

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.