Paper skills distiller

From VectorSpaceLab/AREX-Skill · View interactive version

Paper skills distiller is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Orchestrate a paper-to-skills distillation loop for AI research papers supplied as local files, URLs, arXiv ids, or titles, optionally with a local or remote repository, by resolving sources, modularizing the paper, creating module skills, preparing recovery runtime, recovering a paper result withou

How to use this skill

Skill file

Paper Skills Distiller

Use this skill as the top-level controller when a user provides a research paper source, with or without an implementation repository source, and wants the paper converted into reusable Agent Skills. The paper source may already be local, or it may be a direct PDF URL, arXiv URL/id, or paper title that must be resolved before the run starts.

All generated skill content must be written in English. Keep user-facing status in the user's language if appropriate, but artifact names, schemas, SKILL.md files, scripts, and validation reports should be English.

The default refinement budget is 10 refine cycles after the first recovery. Use the user's supplied iteration_budget when present; otherwise record iteration_budget: 10 in run_manifest.json. The user may set any non-negative integer. Stop before starting a refine cycle that would exceed this budget, and summarize the remaining feedback instead of continuing silently.

The default recovery mode is hard. In hard mode, the run must not accept reduced, proxy, toy, smaller-model, or fallback recovery as success; if the full requested standard cannot run, record a concrete blocker or return refine. In soft mode, a reduced or proxy recovery may be accepted only when it is explicitly declared, justified, executable, and passes the recovery experiment gate.

Prefer a TOML run config when the user provides one. Use

../create-paper-skills/assets/distiller-run-config-template.toml as the

fill-in template and validate it with scripts/read_run_config.py before

resolving sources or initializing runs. A config may contain one or more

[[runs]] entries for batch distillation.

Default outputs use one run directory with two main children:

<workspace_root>/<paper_slug>/distillation/ for process artifacts and

<workspace_root>/<paper_slug>/skills/ for generated reusable skills. Do not

create numbered attempt directories unless the user explicitly supplies a

custom attempt_dir for that purpose.

Distillation Model

Use the paper or tutorial source as anchor z for task-agnostic distillation

unless the user supplies a concrete downstream replication task. For a concrete

task, record the task anchor as tau = (q, D, E, g) and use task-oriented

distillation; do not create a synthetic task tuple for a paper-only run.

The run follows four stages:

  1. Scope the required capabilities Q, module boundaries, non-goals, and

verification targets.

  1. Ground Q in paper and permitted source evidence X, recording

provenance, revisions, exclusions, conflicts, and assumptions.

  1. Construct candidate graph G_tilde from module skills, references,

scripts, and links.

  1. Verify candidate G_tilde into accepted graph G and construction record

R through executable recovery, validation, refinement, deployment review,

and Researcher handoff. Task-agnostic runs use representative operating

checks when no downstream task-level outcome is defined.

Source Rules

Required Loop

  1. If a run config path is supplied, validate and normalize it with scripts/read_run_config.py; otherwise collect the same fields from the user's prompt. For batch configs, process each normalized run independently and keep separate source-resolution, attempt, and summary artifacts. Use read_run_config.py --slug <paper_slug> --run-only to write the selected normalized run JSON passed to init_run.py --run-config.
  2. Resolve paper and optional repo sources when needed with scripts/resolve_sources.py or an equivalent bounded, logged procedure. The resolver covers local paths, direct URLs, arXiv URLs/ids, arXiv title search, Git repo URLs, and repo_discovery_mode=auto GitHub repo discovery. If a title is not found there, use web search for official or scholarly sources and record the chosen URL. If title or repo discovery is ambiguous, ask the user to choose before proceeding.
  3. Initialize the distillation directory with scripts/init_run.py using the resolved local paper path, optional resolved repo path, configured iteration_budget, configured recovery_mode, configured generated_skills_root, optional exact attempt_dir, and --run-config when a normalized config JSON exists.
  4. Load plan-paper-skill-modules and create:
  1. Validate the module plan with plan-paper-skill-modules/scripts/validate_module_plan.py.
  2. For each module, load create-paper-module-skill and create the module skill under the configured output skill root.
  3. Validate every generated module skill with create-paper-module-skill/scripts/validate_skill_tree.py and run its tests or smoke checks.
  4. Load prepare-paper-recovery-env and create environment/runtime_handoff.json from bounded package, model, GPU, benchmark, and dataset preparation. If required packages, datasets, or model caches are missing, run the active preparation path first: create/reuse an isolated recovery environment under $DISCO_CODING_AGENT_DIR/envs/ or ~/.disco/agent/envs/, install the smallest missing package set, and attempt permitted bounded model/data acquisition before treating the item as blocked.
  5. Load recover-paper-result and reproduce one fast, meaningful paper result without reading the original repo, using the runtime handoff as recovery input.
  6. Load analyze-paper-recovery and compare the recovery result with the paper target or an explicitly declared proxy target.
  7. If analysis says refine, update the relevant workflow guidance, module documents, module skills, environment handoff usage, and recovery harness, then rerun steps 7-10. Stop when status is accept or the configured refinement budget is exhausted.
  8. After an accepted run passes final and reported validation, classify the complete generated module graph for deployment. Default task-, project-, private-data-, evaluator-, benchmark-, or environment-bound output and all uncertain cases to project scope at <project-dir>/.agents/skills/. Use managed scope at ~/.disco/agent/skills/ only with evidence that the graph is self-contained, provenance-backed, independent of transient run state, representative-use verified, and reusable across projects or research tasks. Keep every module in the same scope.
  9. Present the classification evidence, exact targets, entry point, verification, unresolved limits, collisions, and shadowing impact. After approval, use the visible distill-ml-knowledge/scripts/import_operating_skill_graph.mjs once with every top-level module root and the selected scope. Overwrite requires separate approval. Write researcher-handoff.md with the selected scope and exact imported paths, then suggest /researcher; if import is declined, record that the graph remains staged.

Ordering and Runtime Discipline

not by themselves sufficient to end the run as blocked. First attempt the

allowed setup path: isolated environment creation, targeted package

installation, bounded dataset/model acquisition, configured VPN/proxy or

mirror use, and keyless/public alternatives where valid. Only mark blocked

after those actions are logged or after asking the user for required

credentials/permissions that cannot be inferred.

Distillation Directory Contract

Each distillation directory should contain:

run_manifest.json
run_config.normalized.json   # optional but preferred when a config was used
source_resolution.json       # optional, when paper/repo source acquisition was needed
paper_profile.md
module_plan.json
modules/
  <module_id>.md
generated_skills_validation/
  <module_id>.json
environment/
  runtime_handoff.json
  logs/
    command_log.json
recovery/
  experiment_plan.md
  experiment_validation.json
  source_manifest.json
  recovery_result.json
  logs/
    experiment_command_log.json
    generated_skill_invocations.json
analysis/
  analysis_report.json
  feedback.md
final_validation.json
reports/
  generated-skills/
  verification/
  final/
    final_report.json
    final_report.md

Use additional files when useful, but do not omit the core contract. Record failures as artifacts instead of relying on terminal output.

Quality Bar

A generated module skill is acceptable only if it has:

true. Prose-only inspection is not enough for either hard or soft mode.

The whole paper distillation is acceptable only if:

reports/final/final_report.json, and the reported validation stage passes.

deployment uses one approved scope, excludes process/review artifacts, and is

recorded with exact paths in researcher-handoff.md.

Refinement Rules From Real Runs

Practical Guidance

Favor small, composable module skills over one monolithic "paper skill". A good split usually separates protocol/data formatting, retrieval/tool adapters, core algorithm loop, scoring/evaluation, and experiment recovery. Keep the number of modules below five by merging thin utility modules into the nearest substantive module.

If the full paper result requires heavy training or unavailable models, check recovery_mode before lowering the target. In hard mode, record the blocker and do not accept a proxy as success. In soft mode, recover a declared proxy result that preserves the paper's mechanism. The proxy must identify the dataset, sample size, metric, paper target, and why the proxy is the fastest faithful test.

Scripts

reports/final/final_report.md from the distillation artifacts.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.