replace-me-skill
Load when copying this directory to bootstrap a new OmicsClaw skill. Skip when an existing skill already covers the request.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 161
- Forks
- 27
01 前言 Front Matter
- name
- replace-me-skill
- tags
- [ "template", "scaffold" ]
- trigger
- scaffold skill, new skill, skill template
- description
- Load when copying this directory to bootstrap a new OmicsClaw skill. Skip when an existing skill already covers the request.
02 资源文件 10
- 脚本_api.py1.2 KB
- 脚本examples/example_step.py697 B
- 参考文档README.md10.6 KB
- 参考文档references/methodology.md4.0 KB
- 参考文档references/output_contract.md2.4 KB
- 参考文档references/parameters.md108 B
- 参考文档references/r_visualization.md1.1 KB
- 脚本replace_me.py6.2 KB
- 脚本tests/__init__.py—
- 脚本tests/test_replace_me.py1.6 KB
03 SKILL.md 正文
<!-- Authoring checklist (delete this comment block before committing):
-
Copy:
cp -r templates/skill skills/<domain>/<my-new-skill>, thenmv replace_me.py <my_new_skill>.pyand rename the tests/ file. The folder name must equal the frontmattername:load_skillfinds skills by folder name. -
Write the frontmatter above by hand. It is the ONLY metadata the agent sees, and
omicsclaw/skills/reads exactly four keys:name required, unique across all skills. A duplicate is skipped, not merged. This is what
use_skillandload_skillare called with. description required. The one line the model routes on, and the only thing about this skill in the system prompt. Say when to LOAD it and when to SKIP it, naming the skill to use instead — the skip half is what prevents a wrong choice. trigger optional, comma-separated. Discovery keywords for/skills <query>. It does NOT auto-fire the skill. tags optional. Also only/skills <query>.Anything else is inert: it is neither read nor validated.
-
Put the computations in
_api.py(rules intemplates/skill/README.md), then regenerate the## APIsection: python skills/_sdk/notebook/run.py api skills/<domain>/<my-new-skill> --write A test compares it with_api.pyon every run. -
Write the other sections and the
references/*.mdstubs by hand. -
Make
examples/example_step.pyload a registered demo dataset withload_demo, call the library and assert on the result. -
Verify it is indexed, then refresh the domain index: python -c "from omicsclaw.skills import load_skills;
i = load_skills('skills'); print(len(i), i.skipped)" OMICSCLAW_WRITE_SKILL_INDEX=1 pytest
tests/skills/test_domain_index_is_current.py pytest tests/sdk/notebook/test_skill_api_sections.py
Full usage notes and soft conventions live in templates/skill/README.md.
-->
REPLACE_SKILL_NAME
When to use
<!-- One short paragraph (3-6 lines). Mirror the frontmatter description's load/skip split and explicitly call out the closest adjacent skill so the agent knows when to redirect. -->
The user has <input shape> and wants <output shape>. Pick this skill
when <distinguishing condition>. For <adjacent capability> use
<sibling-skill> instead.
Use from a step
library = load_skill("REPLACE_SKILL_NAME")
frame = read_input("data/<input>.csv")
write_output(library.run_method(frame, method="default"), "tables/replace_me.csv")
A complete step that runs on demo data: examples/example_step.py.
API
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
run_method(frame: pd.DataFrame, *, method: str='default') -> pd.DataFrame
Placeholder computation: return a copy of the table with a method column.
:param frame: The input table.
:param method: The backend to run. Default "default", the only one so far;
say here where each default comes from and when to change it.
:returns: A new DataFrame: frame plus a method column.
:raises ValueError: method is not one of METHODS.
<!-- api:end -->
Methods and parameters
<!-- Which method when. For every default: its value and where it comes from (the method's paper, the library's default, a lab convention). Which values the user should decide, and how to ask. -->
method="default": the only backend so far.
Gotchas
<!-- The failure modes an agent hits, each with the fix. Anchor each to something grep-able: a function name, a quoted error message, a column or key. -->
- None yet — append as failure modes are reported.
Inputs and outputs
<!-- What each function reads (columns, obs/obsm/layers keys) and what it writes or returns. -->
run_methodreads a table and returns a new one with amethodcolumn.
CLI
replace_me.py runs the same functions outside a project and writes
tables/replace_me.csv, report.md and result.json:
python <skill directory>/replace_me.py --help. --demo synthesises its input.
Dependencies
Python packages this skill's script needs. They are not installed for you — check before a long run.
<package-a>, <package-b>
See also
references/parameters.md— every CLI flag, per-method tunablesreferences/methodology.md— the WHY behind the algorithmreferences/output_contract.md—tables/X.csv+result.jsonschema- Adjacent skills:
<sibling-1>(upstream),<sibling-2>(parallel),<sibling-3>(downstream)
04 同仓库更多 Skills
demo-skill
A fixture skill for the skill environment tests. Use it for nothing else.
fake-domains
Test fixture for the golden deployment in tests/entry. Load never; it has no script.
spatial-velocity
Load when estimating RNA velocity on a spatial AnnData with `layers["spliced"]` + `layers["unspliced"]` via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative). Skip when input lacks the spliced/unspliced layers (must be quantified upstream by velocyto / kb-python / STARsolo); non-spatial scRNA velocity (use sc-velocity).
spatial-trajectory
Load when inferring pseudotime / lineage trajectories on a preprocessed spatial AnnData via DPT (default — diffusion pseudotime), CellRank (terminal-state + fate-probability), or Palantir (waypoint branch probabilities). Skip when the data has spliced/unspliced layers and you want velocity-driven dynamics (use spatial-velocity); non-spatial scRNA pseudotime (use sc-pseudotime).
spatial-statistics
Load when running spatial autocorrelation / hotspot / co-occurrence / neighbourhood-enrichment / Ripley K stats on a clustered spatial AnnData via squidpy. Skip when ranking spatially variable genes (use spatial-genes); tissue domain detection (use spatial-domains).
spatial-register
Load when aligning multiple spatial slices into a common coordinate frame with PASTE or STalign. Skip single-slice data; for expression-space batch correction use spatial-integrate.