← 返回 Skills 市场
orbisz

paper-matlab-reproduction

作者 orbisz · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
38
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install paper-matlab-reproduction
功能描述
Use this skill when the user wants to reproduce an academic paper in MATLAB from a paper file path, URL, DOI, or PDF. It extracts algorithm figures/tables in...
使用说明 (SKILL.md)

Paper MATLAB Reproduction

This skill turns a paper into a traceable MATLAB reproduction package. The goal is not only to write code, but to preserve the evidence chain from paper text, algorithm figures/tables, cited operations, parameter sources, and simulation-result comparisons.

Required input

Ask for missing essentials before implementation:

  • Paper source: local file path, URL, DOI, arXiv link, or uploaded PDF.
  • Output directory rule: by default, place generated MATLAB code and Chinese documentation in the same folder as the user-provided paper file. If the paper location is not a resolvable local file path, or the folder cannot be found or written to, ask the user to provide an output folder before generating files.
  • MATLAB execution availability. If MATLAB is unavailable, generate code and provide a dry-run checklist; if Octave compatibility is requested, keep syntax conservative.

Optional but useful:

  • Which figures/tables/results the user most cares about.
  • Whether to reproduce all algorithms or only selected ones.
  • Whether approximate visual similarity is acceptable when the paper omits exact data.

Optimized workflow

Follow this sequence. Keep a brief reproduction_log.md so later changes are explainable.

  1. Ingest and map the paper

    • Read the paper source and extract title, authors, year, venue, abstract, keywords, system model, algorithm figures/tables, simulation setup, result figures/tables, and references.
    • Determine the output directory from the paper file's parent folder. If that folder is unavailable, ambiguous, or not writable, ask the user for an output directory instead of silently writing elsewhere.
    • Build an artifact map: Algorithm Fig/Table -> Section -> Variables -> Related Results -> MATLAB file.
    • If the PDF text extraction is weak, use OCR or visual inspection for the affected pages and note the limitation.
  2. Generate pseudocode from algorithm figures/tables

    • For every algorithm figure or algorithm-like table, create one pseudocode block.
    • Preserve the paper's algorithm numbering when available, e.g. Algorithm 1, Fig. 3 flowchart, Table II procedure.
    • Normalize symbols, dimensions, input/output variables, loops, stopping criteria, constraints, and objective functions.
    • Save each pseudocode block in the log before writing MATLAB.
  3. Resolve cited operations

    • When an algorithm step says or implies "using [n]", "as in [n]", "following Method X", or depends on an undefined operation from another paper, search Google Scholar for the cited work.
    • Read the cited paper or an accessible authoritative source for the specific operation only.
    • Add a compact operation note: citation, source link, operation definition, assumptions, and how it maps into MATLAB.
    • If Google Scholar is inaccessible, state that and use publisher pages, arXiv, Semantic Scholar, Crossref, or the cited PDF as fallback sources.
  4. Extract parameters with a strict priority order

    • First look in the simulation/results section.
    • If incomplete, look in captions, algorithm descriptions, tables, appendices, and experiment text.
    • If still missing, infer a reasonable value from the system model, field norms, or dimensional consistency.
    • Mark every parameter as one of: paper-explicit, caption-or-table, cited-source, or inferred.
    • Tell the user about all inferred parameters before or alongside the final result; do not hide guesses inside code.
  5. Design the MATLAB reproduction structure

    • Put system model construction, shared configuration, simulation loop, baselines, metrics, plotting, and result export in main.m.
    • If the paper has multiple materially different simulation environments, create multiple main scripts named by the differing environment, such as main_snr_sweep.m, main_user_density.m, or main_channel_model_rayleigh.m.
    • Create one MATLAB function file per pseudocode block, e.g. alg1_resource_allocation.m.
    • Put helper functions in separate files only when shared by multiple algorithms or needed for clarity.
    • Use deterministic seeds and vectorized MATLAB where practical.
  6. Define comparison targets before running

    • For every reproduced result, identify the paper target: figure/table number, axes, units, legends, operating points, and expected trend.
    • If exact paper data is unavailable, digitize curves from figures when possible or compare against textual/tabular values.
    • Use multiple similarity measures when appropriate: normalized RMSE, relative error at key points, Pearson correlation, rank/order agreement, and qualitative trend match.
  7. Run and repair

    • Run every main*.m script.
    • Compare generated outputs to the paper targets.
    • If results differ materially, inspect in this order:
      1. parameter source and units,
      2. system model equations,
      3. cited operations,
      4. algorithm translation,
      5. random seeds and Monte Carlo count,
      6. metric definitions and plotting scale.
    • Optimize the MATLAB code up to 3 repair rounds. After each round, record what changed and why.
  8. Deliver final package

    • Provide MATLAB source files, generated plots/results, reproduction_log.md, and a concise final report.
    • Write all descriptive documents in Chinese, including pseudocode explanations, parameter notes, citation-operation notes, reproduction logs, run instructions, and the final report. MATLAB code comments may be Chinese or concise English when needed for compatibility, but user-facing documentation should be Chinese.
    • Report similarity per figure/table and overall similarity.
    • Clearly list unreproduced parts, inferred parameters, unavailable cited papers, and residual gaps.

File layout

Use this default layout unless the repository already has a suitable structure:

paper-title-reproduction/
├── main.m
├── main_\x3Cenvironment_suffix>.m
├── alg1_\x3Cshort_name>.m
├── alg2_\x3Cshort_name>.m
├── helpers/
├── data/
├── results/
│   ├── figures/
│   └── metrics/
├── paper_artifacts/
│   ├── pseudocode.md
│   ├── parameter_table.csv
│   ├── citation_operations.md
│   └── target_results.md
└── reproduction_log.md

Pseudocode format

For each algorithm figure/table, use this template:

## Algorithm [paper label]: [short name]

Source: [figure/table/section/page]
Purpose: [one sentence]

Inputs:
- [name, dimension, meaning, source]

Outputs:
- [name, dimension, meaning]

Parameters:
- [symbol] = [value or unknown], source=[paper-explicit/caption-or-table/cited-source/inferred]

Steps:
1. ...
2. ...

Stopping criteria:
- ...

MATLAB function:
- `algN_\x3Cshort_name>.m`

Parameter table format

Track parameters before coding:

symbol,name,value,unit,source_priority,source_location,notes
N,number of users,20,,paper-explicit,Simulation section p.8,
alpha,path loss exponent,3.5,,inferred,System model typical range,User must be told this was inferred

MATLAB coding rules

  • Keep main*.m readable: configuration, system model, algorithm calls, metrics, plots, exports.
  • Pass parameters through a cfg struct instead of scattering constants across files.
  • Match the paper's notation in comments when useful, but use MATLAB-safe variable names.
  • Save numerical outputs to results/metrics/*.mat or .csv and plots to results/figures/.
  • Add short comments for non-obvious equation translations and cited operations.
  • Avoid silent magic numbers. Every constant should come from the parameter table or be explained.

Similarity report

Use this final structure:

# MATLAB Reproduction Report

## Paper
- Title:
- Source:

## Reproduced artifacts
- Algorithm figures/tables:
- Result figures/tables:
- Main scripts:

## Parameter audit
- Explicit parameters:
- Caption/table parameters:
- Cited-source parameters:
- Inferred parameters disclosed to user:

## Similarity
| Paper result | Script | Metric | Similarity | Notes |
|---|---|---:|---:|---|

## Repair rounds
| Round | Issue found | Change made | Similarity after change |
|---:|---|---|---:|

## Residual gaps
- ...

Important behavior

  • Be transparent about uncertainty. A reproducible approximation with clearly marked assumptions is better than pretending the paper contains missing values.
  • Use Chinese for all user-facing description documents and reports unless the user explicitly asks for another language.
  • Save generated code and description documents beside the user's paper file by default. If the paper folder cannot be identified or used, ask the user for the target folder before writing outputs.
  • Do not overfit a plot by changing algorithms arbitrarily. Repairs should be tied to evidence: parameters, equations, cited methods, or metrics.
  • If a paper's results cannot be fairly compared because data is missing or the model is underspecified, say so and provide the closest defensible reproduction.
  • When using web sources, cite links in the report.

Self-Evolution Mechanism

After each execution of this Skill:

  1. Evaluate whether the output achieved the intended goal: pass / fail.
  2. If it fails, reflect on the cause of failure and append a “failure case + improvement suggestion” to diary/YYYY-MM-DD.md.
  3. If a certain improvement suggestion is repeatedly mentioned in the most recent three executions, refine it into a formal rule and submit a PR to modify this SKILL.md.
安全使用建议
Install only if you are comfortable with a skill that can create files next to your papers, run generated MATLAB scripts, and revise those scripts during validation. Review generated code before execution, use a dedicated output folder, and remove or disable the self-evolution diary/PR section unless you explicitly want the skill to propose changes to itself.
能力评估
Purpose & Capability
Reading papers, generating MATLAB files, searching cited sources, and comparing results fit the stated purpose, but automatically running generated main scripts and modifying them in repair loops is high-impact execution authority without a clear per-run approval gate.
Instruction Scope
Most workflow instructions are scoped to paper reproduction, but the self-evolution section adds diary writes and PRs to modify SKILL.md after repeated failures, which is outside the immediate user task and changes future agent behavior.
Install Mechanism
Installation is by copying the skill folder into AI tool skill directories; no installer script, package dependency, or hidden install command is present. The README includes a hard-coded Windows Codex path example, but it is visible documentation.
Credentials
The skill may read local PDFs, use web search for cited papers, write outputs beside the source paper by default, run MATLAB scripts, and iterate code changes. These are plausible for reproduction work but need stronger containment and explicit user control.
Persistence & Privilege
The requested reproduction artifacts are expected persistent outputs, but the diary and SKILL.md PR workflow creates persistent governance or instruction changes unrelated to a single reproduction request.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install paper-matlab-reproduction
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /paper-matlab-reproduction 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
feat: add self-evolution mechanism, remove evals.json
元数据
Slug paper-matlab-reproduction
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

paper-matlab-reproduction 是什么?

Use this skill when the user wants to reproduce an academic paper in MATLAB from a paper file path, URL, DOI, or PDF. It extracts algorithm figures/tables in... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 38 次。

如何安装 paper-matlab-reproduction?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install paper-matlab-reproduction」即可一键安装,无需额外配置。

paper-matlab-reproduction 是免费的吗?

是的,paper-matlab-reproduction 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

paper-matlab-reproduction 支持哪些平台?

paper-matlab-reproduction 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 paper-matlab-reproduction?

由 orbisz(@orbisz)开发并维护,当前版本 v1.0.0。

💬 留言讨论