Agent skill

Ledidi

by jmschrei in jmschrei/ledidi

A skill your agent uses for any task involving the ledidi library — gradient-based design of minimal edits to categorical sequences (DNA/RNA/protein) so that a frozen oracle model predicts a desired…

Apache-2.0Auto-check passed

Install Ledidi

skills CLI
$ npx skills add jmschrei/ledidi --skill ledidi -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jmschrei/ledidi ledidi --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jmschrei/ledidi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ledidi/_skills/data .claude/skills/ledidi && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ledidi
GitHub stars
116
Token cost
~1.8k tokens
SKILL.md length
825 words
Files
20 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses for any task involving the ledidi library — gradient-based design of minimal edits to categorical sequences (DNA/RNA/protein) so that a frozen oracle model predicts a desired…

  • Editing a sequence
  • SKILL.md covers Read these first, Getting the oracle side right, Task → reference file and The rest of the package, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Knocking out a motif

What it does

Ledidi is an agent skill from jmschrei/ledidi. Use for any task involving the ledidi library — gradient-based design of minimal edits to categorical sequences (DNA/RNA/protein) so that a frozen oracle model predicts a desired output. Triggers on designing or editing a sequence, inserting or knocking out a motif or binding site, hitting a target model output, cell type-specific or output-specific element design, affinity catalogs, in-painting, constraining where edits may be made, pruning edits, or balancing several oracle models in one design. This is a…

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 20 other files, including reference files (for example `references/catalogs-and-repeats.md`, `references/custom-losses.md` and `references/designer-object.md`).

The repository describes itself as: Ledidi turns any machine learning model into a biological sequence editor, allowing you to design sequences with desired properties. The licence is Apache-2.0.

When your agent uses it

  • Editing a sequence
  • Knocking out a motif
  • Hitting a target model output
  • Cell type-specific

Example prompts

  • “/ledidi”

What it can do on your machine

Read from SKILL.md and the folder at commit 673efe4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ledidi loads about 1.8k tokens when it runs, and up to ~29k if it reads all its reference files. Until then it costs about 157 tokens; SKILL.md has 825 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~157
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~29k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jmschrei/ledidi at commit 673efe4, republished under its Apache-2.0 licence (© jmschrei). 825 words, ~1,807 tokens.

Download SKILL.mdSave it as .claude/skills/ledidi/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
ledidi
description
Use for any task involving the ledidi library — gradient-based design of minimal edits to categorical sequences (DNA/RNA/protein) so that a frozen oracle model predicts a desired output. Triggers on designing or editing a sequence, inserting or knocking out a motif or binding site, hitting a target model output, cell type-specific or output-specific element design, affinity catalogs, in-painting, constraining where edits may be made, pruning edits, or balancing several oracle models in one design. This is a router skill — read the relevant file under references/ for details and footguns before writing ledidi code.

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, references/objective.md — 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.

  • The oracle contract, references/oracle-contract.md — what your model must satisfy before any of this works: differentiable, model(X) sliceable as [:, target], frozen and .eval()ed for you. Read it before wrapping anything.

Getting the oracle side right

Most real designs fail here, not in the optimizer. Three distinct situations, each with its own file:

SituationRead
one multi-task model, you want some of its outputsreferences/multi-task-models.md
several independent models balanced in one designreferences/multiple-models.md
the model's input window ≠ the sequence you want to designreferences/receptive-field.md

Task → reference file

If the task is…Read
starting from scratch — a real oracle, end to end: design → prune → validate → plotreferences/pipeline.md
a first design / learning the mechanics with no downloadsreferences/first-design.md
tensor shapes, dtypes, or a ValueError/TypeError you do not understandreferences/io-and-validation.md
forbidding edits at certain positionsreferences/masks.md
forbidding or forcing specific characters, or setting soft priorsreferences/initial-weights.md
letting ledidi fill in a blanked region (in-painting)references/inpainting.md
a non-MSE objective: MinGap, GapLoss, rewards, one-sided or ballpark losses, profilesreferences/custom-losses.md
designing against a range of target strengths (affinity catalog), or repeatsreferences/catalogs-and-repeats.md
sampling many designs cheaply, or reusing a fitted designerreferences/designer-object.md
trimming unnecessary edits after designreferences/pruning.md
checking a design is real and not oracle exploitationreferences/validating-designs.md
plotting losses, edit maps, or edits on attribution tracksreferences/plotting.md
a CUDA out-of-memory errorreferences/memory-and-oom.md
reproducibility, seeding, CPU vs GPUreferences/reproducibility.md
Show full SKILL.md (274 more words)Show less

The rest of the package

  • ledidi.ledidi — the function you almost always call. Handles device placement, repeats, affinity catalogs, and post-fit sampling.
  • ledidi.Ledidi — the underlying torch.nn.Module optimizer (fit_transform, forward). Reach for it only to fit once and sample repeatedly → references/designer-object.md.
  • ledidi.losses.MinGap — output-specific design without target values.
  • ledidi.wrappers.DesignWrapper — concatenate several oracles into one.
  • ledidi.pruning.greedy_pruning — post-hoc edit trimming.
  • ledidi.plot — plot_loss, plot_history, plot_edits.

Conventions

  • Tensor layout (batch, n_channels, length), torch.float32, one-hot along the channel axis (DNA: 4 channels ordered A, C, G, T). The template X you pass in has a batch dimension of exactly 1; the returned designs have a batch dimension of batch_size.
  • Naming X template, X_bar designed sequences, y_bar desired output, y_hat predictions, X_attr attributions.
  • device defaults to 'cuda', not to "CUDA if available". On a CPU-only machine you must pass device='cpu' explicitly or the call raises.
  • ledidi() moves the model in place, but not your template. Designs come back on the device while your X stays where it was, so .to(device) your X yourself — otherwise pruning, edit diffs, and designer(X) all raise RuntimeError: Expected all tensors to be on the same device. This is the most common first error.
  • Substitutions only. ledidi changes characters in place; it never inserts or deletes, so the length is fixed for the whole design.
  • ledidi's keywords are not tangermeme's. ledidi() forwards **kwargs to Ledidi.__init__, which takes no **kwargs, so a tangermeme habit like output_mask=, args=, or func= raises TypeError rather than being silently ignored. Output selection is target → references/multi-task-models.md.
  • Designs from the default return path carry an autograd graph (n_samples draws are detached). .detach() before holding many, or before handing them to code that assumes plain tensors → references/memory-and-oom.md.

© jmschrei, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 19 other files (references) in ledidi/_skills/data of jmschrei/ledidi.

  • SKILL.md
  • references/catalogs-and-repeats.md
  • references/custom-losses.md
  • references/designer-object.md
  • references/first-design.md
  • references/initial-weights.md
  • references/inpainting.md
  • references/io-and-validation.md
  • references/masks.md
  • references/memory-and-oom.md
  • references/multi-task-models.md
  • references/multiple-models.md
  • references/objective.md
  • references/oracle-contract.md
  • references/pipeline.md
  • references/plotting.md
  • references/pruning.md
  • references/receptive-field.md
  • references/reproducibility.md
  • references/validating-designs.md

Open the folder on GitHubat commit 673efe4

Compare with similar skills

Ledidi next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ledidi compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ledidi this skilljmschrei/ledidi116—~1.8kAutomated safety check: PassApache-2.0
Gradientbergside/awesome-design-skills3.1k1 repos~868Automated safety check: PassMIT
Gradient Designsickn33/agentic-awesome-skills47k1 repos~3kAutomated safety check: PassMIT
Gradient Methodsparcadei/Continuous-Claude-v33.9k2 repos~1kAutomated safety check: NotesMIT
HTML Ppt Obsidian Claude Gradientnexu-io/open-design100k—~1.4kAutomated safety check: PassApache-2.0
Warp Debug GradientsNVIDIA/skills3.6k—~4.8kAutomated safety check: PassApache-2.0

Similar skills

  • Gradient

    bergside/awesome-design-skills

    Smooth color transitions and gradient-rich surfaces for modern, playful interfaces with visual depth.

    3.1k GitHub starsUsed in 1 repo~868 tokens
    Frontend & DesignAuto-check passed
  • Gradient Design

    sickn33/agentic-awesome-skills

    Web and App implementation guide for Gradient Design. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~3k tokens
    MobileAuto-check passed
  • Gradient Methods

    parcadei/Continuous-Claude-v3

    Problem-solving strategies for gradient methods in optimization

    3.9k GitHub starsUsed in 2 repos~1k tokens
    Research & ScienceAuto-check: notes
  • OpenDesign's enterprise AI-adoption brief: local-first agents at work, the risk controls, the ROI, and the rollout plan.

    100k GitHub stars~1.4k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Official

    A skill your agent uses to diagnose and fix incorrect gradients in differentiable Warp programs.

    3.6k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Gradient Clipping Helper

    jeremylongshore/tons-of-skills-marketplace

    Configure with gradient clipping helper operations. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~581 tokensUpdated today
    Data & AnalyticsAuto-check passed

Questions about Ledidi

What does Ledidi do?

A skill your agent uses for any task involving the ledidi library — gradient-based design of minimal edits to categorical sequences (DNA/RNA/protein) so that a frozen oracle model predicts a desired…. Ledidi is an agent skill from jmschrei/ledidi. Use for any task involving the ledidi library — gradient-based design of minimal edits to categorical sequences (DNA/RNA/protein) so that a frozen oracle model predicts a desired output.

When should I use Ledidi?

Ledidi fits situations like: editing a sequence; knocking out a motif; hitting a target model output; cell type-specific.

How do I install Ledidi in Claude Code?

Run `npx skills add jmschrei/ledidi --skill ledidi -a claude-code`. Or copy the skill folder (ledidi/_skills/data in jmschrei/ledidi) into .claude/skills/ledidi in your project. Claude Code loads it when a task matches its description.

How do I install Ledidi in Codex?

Run `npx skills add jmschrei/ledidi --skill ledidi -a codex`. Or copy the skill folder (ledidi/_skills/data in jmschrei/ledidi) into .agents/skills/ledidi in your project. Codex loads it when a task matches its description.

Can I use Ledidi in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jmschrei/ledidi --skill ledidi -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ledidi, .gemini/skills/ledidi, .github/skills/ledidi and .opencode/skills/ledidi in your project.

What does Ledidi need to run?

SKILL.md names no scripts, command-line tools or credentials: Ledidi is instructions for the agent only.

Does Ledidi access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ledidi safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ledidi use?

Ledidi is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ledidi use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 27k tokens, read only when the agent opens those files.

What are the alternatives to Ledidi?

Skills that share tags, products or a category with Ledidi: Gradient (bergside/awesome-design-skills, 3.1k stars), Gradient Design (sickn33/agentic-awesome-skills, 47k stars), Gradient Methods (parcadei/Continuous-Claude-v3, 3.9k stars) and HTML Ppt Obsidian Claude Gradient (nexu-io/open-design, 100k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ledidi?

jmschrei (a GitHub user) maintains it in jmschrei/ledidi, which has 116 GitHub stars. The repository was last updated on September 16, 2026.

Source: jmschrei/ledidi on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.