ledidi

A Python-based method for editing DNA, RNA, or protein sequences so a fixed prediction model produces a chosen result. It changes the input sequence instead of training the model.

In plain words
What is it for?
Use it to design or remove sequence motifs, test binding-site edits, and optimize biological sequences against a differentiable PyTorch model.
Why use it?
It helps find small sequence changes that move a model's prediction toward a target, while keeping edits limited.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jmschrei/ledidi/data
Any agent
npx skills add jmschrei/ledidi --skill data
Clone the repo
git clone --depth 1 https://github.com/jmschrei/ledidi

Made for: Claude Code, Codex.

Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,894 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00126 $0.01894
Opus 5 $0.00063 $0.00947
Sonnet 5 $0.00025 $0.00379
Haiku 4.5 $0.00013 $0.00189

Measured 2d ago against content hash c16420107429, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ledidi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ledidi/_skills/data/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ledidi

ledidi inverts the usual training loop: the oracle model is frozen and the data is optimized. It learns a continuous weight matrix, samples one-hot edits to a template sequence from a Gumbel-softmax, and pushes those edits until the oracle predicts what you asked for — while an input loss keeps the number of edits small. Any differentiable PyTorch model that maps a one-hot sequence to a prediction becomes a sequence editor.

This skill is a router. Each topic below has a reference file with exact signatures and footguns. Read the relevant reference file before writing code — do not rely on memory of the API. Several of ledidi's failure modes are silent: a plausible-looking argument can broadcast against the wrong shape, protect the region you meant to edit, or prune against the wrong objective, with no exception raised.

tangermeme is a hard dependency of ledidi (it supplies the input validation), and it owns everything that happens around a design — one-hot encoding, FASTA and loci I/O, attributions, motif scanning, logo plotting. Install its skill too (tangermeme-install-skills) and consult it for those steps rather than reinventing them here.

Is ledidi even the right tool? ledidi is gradient-based and finds small, targeted edits to an existing template. For discrete design — implanting motifs from a library, screening random candidates, greedy or beam substitution — use tangermeme.design instead (screen, greedy_substitution, beam_substitution, greedy_marginalize); its skill's references/design.md covers them. Note that tangermeme.design requires a per-candidate loss (reduction='none') to rank edits, which is the opposite of ledidi's requirement that the output loss return a scalar — do not carry that habit across.

Read these first

  • The objective — every design is output_loss(y_hat, y_bar) + l * input_loss, where the input loss is the mean number of edits per sequence. l is the exchange rate between "hit the target" and "make few edits", and it is the knob you will actually tune. Also covers what the verbose log lines mean and why the returned design is the best-scoring iterate rather than the last one.

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 117 lines · 126 tokens per session scan A c16420107429

Subscribe to this mod's changes

ledidi is a skill published in the GitHub repository jmschrei/ledidi (112 stars, last pushed 4d ago), licensed Apache-2.0. It adds 126 tokens to every session and 1,894 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…

K-Dense-AI/scientific-agent-skills · 76 tokens

exploratory-data-analysis

Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…

K-Dense-AI/scientific-agent-skills · 83 tokens

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…

K-Dense-AI/scientific-agent-skills · 66 tokens

nature-statistics

Audit, revise, or draft manuscript statistical reporting for Nature / high-impact journal submissions. Use when the user asks to check statistical analysis sections, p values, confidence intervals, sample size, biological versus technical replicates, randomization, blinding, multiple-comparison correction, model…

Yuan1z0825/nature-skills · 139 tokens

paper-illustration

Generate publication-quality AI illustrations for academic papers using Gemini image generation. Creates architecture diagrams, method illustrations with Claude-supervised iterative refinement loop. Use when user says "生成图表", "画架构图", "AI绘图", "paper illustration", "generate diagram", or needs visual figures for papers.

wanshuiyin/Auto-claude-code-research-in-sleep · 67 tokens