autocontext

GitHub

基于LLM的迭代式Agent输出评估与优化系统。支持通过规范打分、自动改进循环、后台任务队列及运行时快照检查,实现Agent输出的质量监控与持续优化。

pi/skills/autocontext/SKILL.md greyhaven-ai/autocontext

触发场景

需要评估Agent输出质量 希望自动迭代优化Agent生成内容 查询后台评估任务状态或运行产物

安装

npx skills add greyhaven-ai/autocontext --skill autocontext -g -y
更多选项

非标准路径

npx skills add https://github.com/greyhaven-ai/autocontext/tree/main/pi/skills/autocontext -g -y

不安装直接使用

npx skills use greyhaven-ai/autocontext@autocontext

指定 Agent (Claude Code)

npx skills add greyhaven-ai/autocontext --skill autocontext -a claude-code -g -y

安装 repo 全部 skill

npx skills add greyhaven-ai/autocontext --all -g -y

预览 repo 内 skill

npx skills add greyhaven-ai/autocontext --list

SKILL.md

Frontmatter
{
    "name": "autocontext",
    "description": "Iterative strategy generation and evaluation system. Use when the user wants to evaluate agent output quality, run improvement loops, queue tasks for background evaluation, check run status, inspect runtime artifacts and session branch lineage, or discover available scenarios. Provides LLM-based judging with rubric-driven scoring.\n",
    "allowed-tools": "autocontext_judge autocontext_improve autocontext_status autocontext_scenarios autocontext_queue autocontext_runtime_snapshot"
}

autocontext

autocontext is an iterative strategy generation and evaluation system that uses LLM-based judging to score and improve agent outputs.

Available Tools

  • autocontext_judge — Evaluate agent output against a rubric. Returns a 0–1 score with reasoning and per-dimension breakdowns.
  • autocontext_improve — Run a multi-round improvement loop. The agent output is judged, revised based on feedback, and re-evaluated until the quality threshold is met or max rounds are exhausted.
  • autocontext_queue — Enqueue a task for background evaluation by the task runner daemon.
  • autocontext_status — Check the status of runs and queued tasks.
  • autocontext_scenarios — List available evaluation scenarios and their families.
  • autocontext_runtime_snapshot — Inspect run artifacts, package provenance, branchable session lineage, and recent event-stream entries.

Quick Start

1. Evaluate output quality

Use autocontext_judge with a task prompt, the agent's output, and a rubric:

autocontext_judge(
  task_prompt="Write a Python function to parse CSV files",
  agent_output="def parse_csv(path): ...",
  rubric="Correctness, error handling, edge cases, documentation"
)

2. Improve output iteratively

Use autocontext_improve to automatically revise output through judge-guided feedback loops:

autocontext_improve(
  task_prompt="Write a Python function to parse CSV files",
  initial_output="def parse_csv(path): ...",
  rubric="Correctness, error handling, edge cases, documentation",
  max_rounds=5,
  quality_threshold=0.85
)

3. Queue background tasks

Use autocontext_queue with a scenario name to enqueue evaluation tasks for asynchronous processing:

autocontext_queue(spec_name="my_scenario")

Check results later with autocontext_status.

For deeper context, use autocontext_runtime_snapshot with the run ID. Add session_id when you need the active branch path before continuing work:

autocontext_runtime_snapshot(run_id="run_123", session_id="sess_123")

4. Discover scenarios

Use autocontext_scenarios to see what evaluation scenarios are available:

autocontext_scenarios()
autocontext_scenarios(family="agent_task")

Configuration

The extension auto-detects configuration from these sources:

  1. Project config.autoctx.json in the working directory (created via autoctx init)
  2. Environment variables:
    • AUTOCONTEXT_AGENT_PROVIDER or AUTOCONTEXT_PROVIDER — Provider type
    • AUTOCONTEXT_AGENT_API_KEY or AUTOCONTEXT_API_KEY — Provider API key
    • AUTOCONTEXT_AGENT_DEFAULT_MODEL or AUTOCONTEXT_MODEL — Model override
    • AUTOCONTEXT_DB_PATH — SQLite database path override
  3. Pi provider — Falls back to Pi's configured LLM provider

CLI Companion

For standalone usage outside Pi, install the autoctx CLI:

npm install -g autoctx
autoctx init
autoctx solve "your problem" --iterations 5
autoctx simulate --description "your simulation" --runs 3

版本历史

  • c258b44 当前 2026-08-19 21:39
  • 28cd1fb 2026-07-24 21:09

同 Skill 集合

autocontext/skills/grid-ctf-ops/SKILL.md
skills/autocontext-consumer/SKILL.md
skills/autocontext-creator/SKILL.md
skills/autocontext/SKILL.md

元信息

文件数
0
版本
ffc34a9
Hash
1dfc53e1
收录时间
2026-07-24 21:09

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-31 10:36
浙ICP备14020137号-1 $访客地图$