Prepare Paper Recovery Env logo

Prepare Paper Recovery Env

Organization
VectorSpaceLab
prepare-paper-recovery-env

Inspect, prepare, and document an isolated runtime environment for Paper2Skills recovery experiments, including package probes, model/cache checks, GPU status, bounded benchmark acquisition, and a runtime handoff for recover-paper-result.

Overview

PublisherVectorSpaceLab
RepositoryAREX-Skill
Skill nameprepare-paper-recovery-env
Stars
341
Forks
26
Bundled files
2
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by VectorSpaceLab on GitHub. Read the source before you install it.

Installation

Install the Prepare Paper Recovery Env AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/VectorSpaceLab/AREX-Skill/tree/main/cli/packages/coding-agent/src/disco/skills/prepare-paper-recovery-env
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/VectorSpaceLab/AREX-Skill.git /tmp/AREX-Skill
mkdir -p .claude/skills
cp -r /tmp/AREX-Skill/cli/packages/coding-agent/src/disco/skills/prepare-paper-recovery-env .claude/skills/prepare-paper-recovery-env
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Prepare Paper Recovery Env in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Prepare Paper Recovery Env on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Prepare Paper Recovery Env is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Prepare Paper Recovery Env

Use this skill after create-paper-module-skill validation and before recover-paper-result whenever recovery needs models, packages, datasets, GPUs, API keys, benchmark code, or any nontrivial runtime setup. It adapts the environment-inspection discipline from repo-skill creation to Paper2Skills recovery, where the goal is an auditable recovery runtime rather than a public repo skill.

All artifacts must be in English.

Purpose

Create a current-attempt runtime handoff that tells recover-paper-result exactly what is usable, what was prepared, what failed, and what fallback is allowed. This is an active environment-preparation stage, not a passive inventory. Missing packages, datasets, model caches, or benchmark files are setup tasks to attempt within the user's constraints before they become blockers. Do not spend recovery time guessing package state, performing broad filesystem scans, or mutating shared environments without permission.

Inputs

  • attempt_dir containing run_manifest.json.
  • module_plan.json and generated skills root.
  • Runtime constraints from the user or run prompt:
    • preferred model id/path and fallback model id/path
    • GPU ids or CPU-only permission
    • network permissions and setup commands
    • package mutation rules
    • isolated environment prefix, if the user wants one
    • benchmark/dataset URLs or local paths
    • whether reduced training is allowed

Outputs

Write these files under the attempt directory:

text
environment/
  runtime_handoff.json
  logs/
    package_probe.json
    gpu_probe.json
    model_cache_probe.json
    benchmark_probe.json
    command_log.json

Also update run_manifest.json.stages.prepare_environment to complete or blocked. Recovery validation treats a missing or still-pending prepare stage as a contract failure.

Workflow

  1. Read run_manifest.json and runtime constraints. If constraints are missing, infer only low-risk defaults and record them.
  2. Run bounded probes before any installation or download:
    • Python executable and version.
    • Import availability for packages required by the recovery target.
    • GPU visibility with nvidia-smi if available.
    • Model cache roots from user-supplied paths, $HF_HOME, $TRANSFORMERS_CACHE, ~/.cache/huggingface, and the workspace only.
    • Benchmark or dataset source availability.
  3. Do not scan broad roots such as /share/project recursively. Search only explicit allowlists, known cache roots, and the workspace with timeouts.
  4. If packages are missing:
    • Prefer an existing compatible environment supplied by the user.
    • If mutation is allowed, create or use an isolated environment. Prefer conda when available and fall back to venv, mirroring prepare-repo-skill-env.
    • Use the same default location policy as prepare-repo-skill-env: when the user does not provide a prefix, put recovery environments under $DISCO_CODING_AGENT_DIR/envs/; if that variable is unset, use ~/.disco/agent/envs/. Name the environment paper-recovery-<run_name>. Do not install into conda base, a shared conda env, or the active environment unless the user explicitly authorized that exact mutation. If runtime constraints say isolated env only, use this private environment even when the active Python already has the requested imports.
    • Install the smallest missing package set needed by the selected recovery target. For import/package name mismatches, pass explicit specs such as --pip-package sklearn=scikit-learn.
    • Put timeouts around installs. Record command, elapsed time, stdout/stderr tail, exit code, and whether environment was modified.
    • If installs stall or fail, try the user-provided network/VPN setup, a safe pip index/mirror, or a narrower package set when appropriate. Only then record a blocker, with the failed command and the next concrete fix.
  5. If benchmark/data acquisition is needed:
    • Try the requested fresh source with a timeout.
    • Treat a timed-out or partial checkout as unusable until it validates as a real worktree and the requested resource files exist. A directory containing only .git is not a usable benchmark source.
    • If fresh acquisition fails, reuse a local immutable checkout only when allowed or when the run prompt permits it. Record the fresh-fetch blocker, reused path, commit/version, exact files used, and copy/snapshot concrete resource files into the current attempt.
    • Prefer resource files that can ground an actual example: task JSON/PDDL/TWL2/problem files, environment config, split manifests, prompts, expert plans, or benchmark metadata. For ALFWorld-style reduced recovery, prefer concrete task/game/config resources when available; if only README/API files are available, record why and require the generated data item to identify which fields came from those files.
    • If the paper needs a public dataset such as AIME2024 and no local path is supplied, attempt bounded acquisition from the user-supplied URL or a direct public source when source acquisition permits network access. A missing local dataset is not a blocker until bounded download or an explicit user question has been attempted and logged.
  6. If model loading is requested:
    • First verify required packages and local/cache files.
    • If no local/cache hit exists, ask for or use explicit permission before downloading multi-GB models. Use a time budget and download into the attempt-scoped or DisCo-private cache, not a shared mutable cache unless the user requested it.
    • If loading is blocked, keep required-model success booleans false and write the exact blocker plus what was tried. A missing QwQ/Qwen cache is not a blocker until local cache probing and permitted bounded download or user clarification have happened.
  7. If web search or API credentials are needed:
    • Check configured env vars or user-provided credential paths first.
    • Try an allowed keyless/public alternative when the method permits it.
    • If credentials are truly required and absent, ask the user for them or record the credential request as a pending user input. Do not present missing credentials as if the agent had exhausted setup work.
  8. Write environment/runtime_handoff.json with a concise decision:
    • runtime_ready: true only when the requested runtime is genuinely ready.
    • reduced_recovery_recommended: true only when full runtime is blocked and the user permits reduced recovery.
    • blockers: exact actionable blockers.
    • allowed_sources_for_recovery: paths/URLs recover-paper-result may use.
    • environment_modified: whether any environment was changed.
  9. Write environment/logs/command_log.json with every subprocess command executed by the environment probe, including GPU probes, benchmark clone attempts, version/commit checks, environment creation, installs, downloads, or killed commands. Commands that are only in terminal output are not auditable. If the probe is rerun, append to the existing command log instead of overwriting it.
  10. Pass the handoff path to recover-paper-result. Recovery must include it in recovery/source_manifest.json.

Runtime Handoff Schema

json
{
  "schema_version": 1,
  "attempt_dir": "...",
  "python": {"executable": "...", "version": "..."},
  "packages": {"torch": false, "transformers": false},
  "environment": {
    "manager": "venv",
    "prefix": "~/.disco/agent/envs/paper-recovery-search_o1",
    "python": ".../bin/python",
    "setup": {"actions": [], "blockers": []}
  },
  "gpu": {"nvidia_smi_available": true, "visible_devices": []},
  "models": {
    "preferred": "Qwen/Qwen3-4B-Instruct-2507",
    "preferred_ready": false,
    "cache_hits": [],
    "blockers": []
  },
  "benchmarks": {
    "alfworld": {
      "fresh_attempted": true,
      "fresh_ok": false,
      "reused_local_source": "",
      "snapshot_dir": "",
      "resource_files": []
    }
  },
  "datasets": {},
  "runtime_ready": false,
  "reduced_recovery_recommended": true,
  "environment_modified": false,
  "allowed_sources_for_recovery": [],
  "blockers": []
}

Acceptance Criteria

  • environment/runtime_handoff.json exists and is valid JSON.
  • environment/logs/command_log.json exists, is valid JSON, and contains a commands list.
  • run_manifest.json.stages.prepare_environment is complete when the requested runtime is ready, or blocked when exact blockers are recorded.
  • If packages were missing and environment mutation was allowed, the command log shows an isolated environment creation/reuse and install attempts before the stage is marked blocked.
  • If runtime constraints require isolated environments, the handoff's python.executable points to the private recovery environment Python, not the host/shared conda Python, unless private environment creation failed and the failure is logged as a blocker.
  • Probes are bounded and logged.
  • Shared environments are not mutated unless explicitly permitted.
  • Any reused benchmark source has a current-attempt snapshot of concrete resource files.
  • Partial clone directories are rejected unless they validate as complete worktrees containing the requested resource files.
  • Repeated environment probes preserve earlier command-log entries.
  • Full runtime booleans remain false unless the requested model/package stack is actually importable and ready.
  • The handoff gives recover-paper-result enough information to choose between full recovery and an honest reduced fallback without repeating expensive discovery.

Script

Use scripts/probe_runtime.py for deterministic probes, bounded repair, and handoff generation. It can create/reuse an isolated conda env or venv at the DisCo-private default prefix, install explicitly requested missing packages, try bounded dataset/model downloads when flags permit them, inspect GPU/model cache hints, and validate benchmark source state. It must not perform unbounded downloads or broad scans.

Example for a Paper2Skills recovery that may need torch/transformers/vLLM/nltk, a QwQ/Qwen model, and a public benchmark:

bash
python <skills_root>/prepare-paper-recovery-env/scripts/probe_runtime.py \
  --attempt-dir <attempt_dir> \
  --preferred-model Qwen/QwQ-32B \
  --package torch --package transformers --package vllm --package nltk \
  --env-manager auto \
  --pip-package torch \
  --pip-package transformers \
  --pip-package vllm \
  --pip-package nltk \
  --allow-env-mutation \
  --use-isolated-env \
  --attempt-model-download \
  --dataset-name AIME2024 \
  --dataset-url <direct-public-or-user-supplied-url> \
  --attempt-dataset-download \
  --network-timeout 300 \
  --install-timeout 900

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Prepare Paper Recovery Env AI skill do?

Inspect, prepare, and document an isolated runtime environment for Paper2Skills recovery experiments, including package probes, model/cache checks, GPU status, bounded benchmark acquisition, and a runtime handoff for recover-paper-result.

Why use Prepare Paper Recovery Env on TypingMind?

Because you install it once and use it with any model. Prepare Paper Recovery Env is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Prepare Paper Recovery Env in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/VectorSpaceLab/AREX-Skill/tree/main/cli/packages/coding-agent/src/disco/skills/prepare-paper-recovery-env. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Prepare Paper Recovery Env?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Prepare Paper Recovery Env?

As many as you like. As long as a model supports skills, you can use Prepare Paper Recovery Env with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Prepare Paper Recovery Env AI skill free?

Yes. It is published on GitHub by VectorSpaceLab under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇