create-paper-module-skill
Convert one paper module document into a production-quality English Agent Skill with scripts, tests, validation logs, and clear input/output contracts.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- create-paper-module-skill
- metadata
- { "disco-role": "meta" }
- description
- Convert one paper module document into a production-quality English Agent Skill with scripts, tests, validation logs, and clear input/output contracts.
02 资源文件 2
- 脚本scripts/create_skill_skeleton.py2.2 KB
- 脚本scripts/validate_skill_tree.py6.4 KB
03 SKILL.md 正文
Create Paper Module Skill
Use this skill for each module produced by plan-paper-skill-modules. The goal is to create one reusable skill directory for that module, not a paper-specific transcript.
All skill files and scripts must be in English.
Inputs
- Paper or extracted paper text.
paper_profile.md.- The module's markdown document.
- Optional local repository, allowed only at this stage.
- Output skill root, usually
<workspace_root>/<paper_slug>/skills/<skill_name>/.
Required Output
Every generated module skill must contain:
<skill_name>/
SKILL.md
scripts/ # when deterministic behavior is needed
tests/ # recommended for non-trivial scripts
Its SKILL.md frontmatter must declare metadata.disco-role: operating so the
module is available in Researcher mode and excluded from Creator mode.
The <skill_name> directory basename and frontmatter name must match and use a
canonical lowercase-hyphen skill id of at most 64 characters so the verified
module can be installed by DisCo's operating-graph importer.
Avoid extra README files. Put operational guidance in SKILL.md and deterministic logic in scripts/.
Workflow
- Read the module document and identify the exact reusable capability.
- Use the paper for method semantics. Use the repo only to confirm implementation details, argument names, data formats, or edge cases.
- Write
SKILL.mdwith:- frontmatter
nameanddescription - frontmatter
metadata.disco-role: operating - when to use the skill
- inputs and outputs
- workflow
- validation or test commands
- limitations
- frontmatter
- Add scripts only for behavior that benefits from deterministic execution.
- Add tests or smoke checks that exercise the module in isolation.
- Run tests and save a validation JSON under the distillation directory's
generated_skills_validation/. - Validate the tree with
scripts/validate_skill_tree.py.
Quality Rules
- Keep the skill self-contained: a future agent run should not need the original repo to understand the module.
- Do not paste long paper excerpts.
- Prefer small Python scripts with pure functions and CLI entry points.
- Tests should use tiny fixtures, fake retrievers, or deterministic policies when real models are unavailable.
- Every non-empty generated module skill needs a real assertion-backed test or
smoke check. This applies in both
hardandsoftrecovery modes; soft mode may lower the recovery target, but it does not waive single-skill validation. - Tests must pass under
validate_skill_tree.py --run-testseven whenpytestis not installed. Use plainasserttest functions with no fixtures, marks,tmp_path,pytest.raises, orimport pytestunless the skill explicitly declares and installs pytest as a runtime dependency. Prefer standard-library checks such astempfile,try/except, and direct function calls. - If a module requires an LLM or web search at runtime, provide an injectable interface and a fake implementation for tests.
- If a module output is consumed by another module, test that it does not emit downstream control markers outside its contract. For example, a document-refinement module should not emit
Final Answer:if its output is only meant to be injected as evidence. - For prompt-separation skills, test for leakage of privileged-only markers, skill field names, hidden answers, and training-only sections. Do not treat ordinary task words, environment objects, or user-visible observations as leakage merely because the same words also appear in a skill.
- For trajectory-to-skill skills, distinguish
mistake_analysisfromgolden_workflow: the golden or ideal workflow should omit actions that directly caused error/invalid feedback unless the paper explicitly wants failed attempts retained. Add a regression test with a failed action followed by a corrective action. - For QA evaluation modules, include tests for sentence-form answers, short-span extraction, aliases, and yes/no answers.
- Preserve the paper's insight, not its incidental code layout.
Validation
Run:
python <skills_root>/create-paper-module-skill/scripts/validate_skill_tree.py <skill_dir> --run-tests
Save the JSON output to:
<attempt_dir>/generated_skills_validation/<module_id>.json
Before considering the skill valid, inspect the saved JSON and confirm ok: true, tests.attempted: true, and tests.runner is acceptable. If the runner is simple, failures caused by pytest-only test syntax are skill authoring errors, not environment blockers. A validation JSON with tests.attempted: false blocks the paper workflow even if ok is true.
Scripts
scripts/create_skill_skeleton.py: create a minimal skill tree for a module.scripts/validate_skill_tree.py: validate frontmatter, required files, scripts, and optional tests.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).