Tested demoQuality 94/100

synthetic-sciences/openscience/backend/cli/skills/biology/synthetic-biology/SKILL.md

synthetic-biology

Synthetic biology design and simulation tools. Codon optimization, gene circuit ODE modeling with growth feedback, SBML model creation, bifurcation analysis, barcode sequencing fitness analysis, and therapeutic genome engineering. For metabolic modeling use cobrapy; for sequence tools use biopython.

Source repository stars
3,337
Declared platforms
0
Static risk flags
1
Last source update
2026-08-25
Source checked
2026-08-25

Decision brief

What it does: where it fits

Synthetic biology design and simulation tools. Codon optimization, gene circuit ODE modeling with growth feedback, SBML model creation, bifurcation analysis, barcode sequencing fitness analysis, and therapeutic genome engineering.

Best for

  • Optimizing gene sequences for heterologous expression (codon adaptation)
  • Simulating gene circuit dynamics (toggle switches, repressilators, inducible systems)
  • Creating standardized SBML models of biological networks

Not for

  • Problem: ODE solver fails with "excess work" Solution: Increase maxstep or switch to stiff solver (BDF, Radau). Check parameter values for unreasonably large rates.
  • Problem: python-libsbml not found after installation Solution: Use pip install python-libsbml (not libsbml). On some systems: pip install python-libsbml-experimental.
Controlled single-run demoChecked 2026-08-20

What changed when the Skill was used

In this controlled same-task single run, enabling synthetic-biology changed the output from 2772 non-whitespace characters and 13 headings to 2818 characters and 22 headings. Matches among 8 signals extracted from the pinned source changed from 2 to 2. Both actual outputs are shown; this is a structural observation, not a quality score or a universal performance claim.

Same test task

Create a design direction and implementation handoff for a developer tool that compares two API responses. Prioritize the repeated user workflow and responsive behavior. The deliverable must specifically reflect this user intent: Synthetic biology design and simulation tools. Codon optimization, gene circuit ODE modeling with growth feedback, SBML model creation, bifurcation analysis, barcode sequencing fitness analysis, and therapeutic genome engineering. For metabolic modeling use cobrapy; for sequence tools use biopython.

Without the Skill
Screenshot of the actual model output for synthetic-biology without the Skill

Baseline: 2772 non-whitespace characters, 13 headings, and 71 list items.

With the Skill
Screenshot of the actual model output for synthetic-biology with the Skill

With Skill: 2818 non-whitespace characters, 22 headings, and 57 list items.

ObservationWithout SkillWith Skill
Source-signal coverage2/8: synthetic, biology2/8: synthetic, biology
Output structure2772 chars · 13 headings · 71 list items · 1 code blocks2818 chars · 22 headings · 57 list items · 1 code blocks
Verification and caution signals4 verification signals · 5 risk/limitation signals5 verification signals · 19 risk/limitation signals

A prompt you can use

Use the synthetic-biology Skill pinned at 0e1e42e75212 for my task. Follow its source-specific constraints around `synthetic-biology`, `synthetic`, `biology`, `design`, then return the finished deliverable with explicit assumptions, verification, failure conditions, and limits. Do not treat the Skill text as a factual source or claim that a single demonstration proves universal performance.

Method and limitationsExpand

Test method

  • Baseline and treatment used the same task, model (gpt-5.3-codex-low), and runner; the only planned difference was whether the complete target Skill text was injected.
  • The treatment used snapshot edd585468549a0921be5b3b19cb6284d65d6b5d9; the current source commit 0e1e42e7521287b6c1426a9b48e761138e588f74 was verified against content hash c9dba07ec622. The baseline explicitly prohibited loading any Skill or external rule file.
  • The same deterministic script counted characters, headings, lists, code blocks, verification terms, caution terms, and source signals in both artifacts. Source signals: `synthetic-biology`, `synthetic`, `biology`, `design`, `simulation`, `installation`, `quick`, `start`.
  • The visuals are local screenshots of the actual Markdown artifacts in a fixed 1200 × 800 evidence canvas, not recreated product mockups. Raw JSON artifacts and request records are retained in the research directory.

Do not over-read this demo

  • This is one controlled demonstration per condition, not a multi-run statistical benchmark; the model is stochastic.
  • Character, structure, and keyword counts show observable differences but cannot by themselves prove correctness, originality, or business impact.
  • The task is a representative test designed for repeatability, not every real-world use of the Skill; rerun after a material source change.
Editorial review
SkillSignal editorial
Runner
Cursor Agent 2026.08.04-aaa8809
Model
gpt-5.3-codex-low
Refresh due
2026-11-18
Reviewed commit
0e1e42e7521287b6c1426a9b48e761138e588f74
Test snapshot
edd585468549a0921be5b3b19cb6284d65d6b5d9

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/synthetic-sciences/openscience --skill "backend/cli/skills/biology/synthetic-biology"
Safe inspection promptEditorial

Inspect the Agent Skill "synthetic-biology" from https://github.com/synthetic-sciences/openscience/blob/d7129109cc959e2bbbfee84bba019e4e722221da/backend/cli/skills/biology/synthetic-biology/SKILL.md at commit d7129109cc959e2bbbfee84bba019e4e722221da. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Quick Start

    python import numpy as np from scipy.integrate import solveivp

    python import numpy as np from scipy.integrate import solveivp
  2. 02

    E. coli codon usage table (fraction per amino acid)

    ECOLICODONTABLE = { 'F': {'TTT': 0.58, 'TTC': 0.42}, 'L': {'TTA': 0.11, 'TTG': 0.11, 'CTT': 0.10, 'CTC': 0.10, 'CTA': 0.04, 'CTG': 0.54}, 'I': {'ATT': 0.49, 'ATC': 0.39, 'ATA': 0.07}, 'M': {'ATG': 1.0}, 'V': {'GTT': 0.28, 'GTC': 0.20, 'GTA': 0.17, 'GTG': 0.35}, 'S': {'TCT': 0.17…

    ECOLICODONTABLE = { 'F': {'TTT': 0.58, 'TTC': 0.42}, 'L': {'TTA': 0.11, 'TTG': 0.11, 'CTT': 0.10, 'CTC': 0.10, 'CTA': 0.04, 'CTG': 0.54}, 'I': {'ATT': 0.49, 'ATC': 0.39, 'ATA': 0.07}, 'M': {'ATG': 1.0}, 'V': {'GTT': 0.2…CODONTOAA = {} for aa, codons in ECOLICODONTABLE.items(): for codon in codons: CODONTOAA[codon] = aadef calculatecai(dnaseq, codontable=ECOLICODONTABLE): """Calculate Codon Adaptation Index.""" codons = [dnaseq[i:i+3] for i in range(0, len(dnaseq)-2, 3)] weights = []
  3. 03

    Workflow 1: Optimize Gene for E. coli Expression and Calculate CAI

    Review the “Workflow 1: Optimize Gene for E. coli Expression and Calculate CAI” section in the pinned source before continuing.

    Review and apply the “Workflow 1: Optimize Gene for E. coli Expression and Calculate CAI” source section.
  4. 04

    Workflow 2: Simulate Toggle Switch with Growth Dilution

    Review the “Workflow 2: Simulate Toggle Switch with Growth Dilution” section in the pinned source before continuing.

    Review and apply the “Workflow 2: Simulate Toggle Switch with Growth Dilution” source section.
  5. 05

    Workflow 3: Create SBML Model of a Metabolic Pathway

    Review the “Workflow 3: Create SBML Model of a Metabolic Pathway” section in the pinned source before continuing.

    Review and apply the “Workflow 3: Create SBML Model of a Metabolic Pathway” source section.

Permission review

Static risk signals and limitations

Writes files

medium · line 290

The documentation asks the agent to create, modify, or delete local files.

# Write to file

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score94/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars3,337SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guidetested outcome pageTestedGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
synthetic-sciences/openscience
Skill path
backend/cli/skills/biology/synthetic-biology/SKILL.md
Commit
d7129109cc959e2bbbfee84bba019e4e722221da
License
Apache-2.0
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Synthetic Biology: Design & Simulation

Overview

Synthetic Biology provides computational tools for designing and simulating engineered biological systems. This skill covers codon optimization with species-specific usage tables, gene circuit ODE modeling (repressilator, toggle switch, inducible promoters) with growth dilution coupling, SBML model creation and validation using python-libsbml, bifurcation analysis for bistable circuits, barcode sequencing fitness analysis, and genome engineering with expression cassette insertion. All simulations produce quantitative outputs suitable for guiding experimental design.

When to Use This Skill

  • Optimizing gene sequences for heterologous expression (codon adaptation)
  • Simulating gene circuit dynamics (toggle switches, repressilators, inducible systems)
  • Creating standardized SBML models of biological networks
  • Analyzing bistability and bifurcation behavior in synthetic circuits
  • Processing barcode sequencing data for fitness landscape analysis
  • Designing expression cassettes and generating annotated plasmid maps
  • Sensitivity analysis of circuit parameters for robust design

Related Skills: For constraint-based metabolic modeling use cobrapy. For sequence manipulation and file parsing use biopython. For molecular cloning simulation use molecular-cloning.

Installation

uv pip install python-libsbml scipy biopython numpy pandas matplotlib

Quick Start

import numpy as np
from scipy.integrate import solve_ivp

# Toggle switch: two mutually repressing genes
def toggle_switch(t, y, alpha1, alpha2, beta, n, gamma):
    u, v = y  # Protein concentrations
    du = alpha1 / (1 + v**n) - (beta + gamma) * u  # gamma = growth dilution
    dv = alpha2 / (1 + u**n) - (beta + gamma) * v
    return [du, dv]

sol = solve_ivp(toggle_switch, [0, 50], [0.1, 3.0],
                args=(5.0, 5.0, 0.5, 2.0, 0.1),
                t_eval=np.linspace(0, 50, 500))

print(f"Final state: u={sol.y[0,-1]:.3f}, v={sol.y[1,-1]:.3f}")
print(f"Bistable: {'Yes' if abs(sol.y[0,-1] - sol.y[1,-1]) > 0.5 else 'No'}")

Core Capabilities

1. Codon Optimization

Optimize gene sequences for expression in target organisms.

import numpy as np
from collections import Counter

# E. coli codon usage table (fraction per amino acid)
ECOLI_CODON_TABLE = {
    'F': {'TTT': 0.58, 'TTC': 0.42},
    'L': {'TTA': 0.11, 'TTG': 0.11, 'CTT': 0.10, 'CTC': 0.10, 'CTA': 0.04, 'CTG': 0.54},
    'I': {'ATT': 0.49, 'ATC': 0.39, 'ATA': 0.07},
    'M': {'ATG': 1.0},
    'V': {'GTT': 0.28, 'GTC': 0.20, 'GTA': 0.17, 'GTG': 0.35},
    'S': {'TCT': 0.17, 'TCC': 0.15, 'TCA': 0.14, 'TCG': 0.14, 'AGT': 0.16, 'AGC': 0.25},
    'P': {'CCT': 0.18, 'CCC': 0.13, 'CCA': 0.20, 'CCG': 0.49},
    'T': {'ACT': 0.19, 'ACC': 0.40, 'ACA': 0.17, 'ACG': 0.25},
    'A': {'GCT': 0.18, 'GCC': 0.26, 'GCA': 0.23, 'GCG': 0.33},
    'Y': {'TAT': 0.59, 'TAC': 0.41},
    '*': {'TAA': 0.61, 'TAG': 0.09, 'TGA': 0.30},
    'H': {'CAT': 0.57, 'CAC': 0.43},
    'Q': {'CAA': 0.34, 'CAG': 0.66},
    'N': {'AAT': 0.49, 'AAC': 0.51},
    'K': {'AAA': 0.74, 'AAG': 0.26},
    'D': {'GAT': 0.63, 'GAC': 0.37},
    'E': {'GAA': 0.68, 'GAG': 0.32},
    'C': {'TGT': 0.46, 'TGC': 0.54},
    'W': {'TGG': 1.0},
    'R': {'CGT': 0.36, 'CGC': 0.36, 'CGA': 0.07, 'CGG': 0.11, 'AGA': 0.07, 'AGG': 0.04},
    'G': {'GGT': 0.35, 'GGC': 0.37, 'GGA': 0.13, 'GGG': 0.15},
}

CODON_TO_AA = {}
for aa, codons in ECOLI_CODON_TABLE.items():
    for codon in codons:
        CODON_TO_AA[codon] = aa

def calculate_cai(dna_seq, codon_table=ECOLI_CODON_TABLE):
    """Calculate Codon Adaptation Index."""
    codons = [dna_seq[i:i+3] for i in range(0, len(dna_seq)-2, 3)]
    weights = []

    for codon in codons:
        aa = CODON_TO_AA.get(codon)
        if aa and aa != '*':
            aa_codons = codon_table[aa]
            max_freq = max(aa_codons.values())
            w = aa_codons.get(codon, 0) / max_freq if max_freq > 0 else 0
            if w > 0:
                weights.append(np.log(w))

    cai = np.exp(np.mean(weights)) if weights else 0
    return cai

def optimize_codons(protein_seq, codon_table=ECOLI_CODON_TABLE,
                    gc_min=0.40, gc_max=0.60):
    """Optimize codons for target organism."""
    optimized = []

    for aa in protein_seq:
        if aa == '*':
            break
        if aa not in codon_table:
            raise ValueError(f"Unknown amino acid: {aa}")

        codons = codon_table[aa]
        # Select highest-frequency codon
        best_codon = max(codons, key=codons.get)
        optimized.append(best_codon)

    dna_seq = ''.join(optimized)

    # Check GC content
    gc = (dna_seq.count('G') + dna_seq.count('C')) / len(dna_seq)
    cai = calculate_cai(dna_seq, codon_table)

    print(f"Optimized sequence: {len(dna_seq)} bp")
    print(f"GC content: {gc:.1%}")
    print(f"CAI: {cai:.4f}")

    if gc < gc_min or gc > gc_max:
        print(f"WARNING: GC content {gc:.1%} outside target range [{gc_min:.0%}-{gc_max:.0%}]")

    return dna_seq, cai, gc

# Example
protein = "MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKL"  # GFP fragment
opt_dna, cai, gc = optimize_codons(protein)

2. Gene Circuit Simulation

ODE models for common synthetic gene circuits.

import numpy as np
from scipy.integrate import solve_ivp

def repressilator(t, y, alpha, n, beta, gamma):
    """Repressilator: 3-gene oscillator (Elowitz & Leibler).
    gamma = growth dilution rate."""
    m1, p1, m2, p2, m3, p3 = y

    dm1 = alpha / (1 + p3**n) - (beta + gamma) * m1
    dp1 = m1 - (beta + gamma) * p1
    dm2 = alpha / (1 + p1**n) - (beta + gamma) * m2
    dp2 = m2 - (beta + gamma) * p2
    dm3 = alpha / (1 + p2**n) - (beta + gamma) * m3
    dp3 = m3 - (beta + gamma) * p3

    return [dm1, dp1, dm2, dp2, dm3, dp3]

def inducible_promoter(t, y, V_max, Km, n, beta, gamma, inducer_conc):
    """Inducible gene expression (Hill function)."""
    mRNA, protein = y
    induction = V_max * inducer_conc**n / (Km**n + inducer_conc**n)
    dmRNA = induction - (beta + gamma) * mRNA
    dprotein = mRNA - (beta + gamma) * protein
    return [dmRNA, dprotein]

# Simulate repressilator
y0 = [0.5, 1.0, 0.0, 0.0, 0.0, 0.0]
sol = solve_ivp(repressilator, [0, 200], y0,
                args=(5.0, 2.0, 0.5, 0.1),
                t_eval=np.linspace(0, 200, 2000),
                method='RK45')

# Check for oscillation
from scipy.signal import find_peaks
peaks, _ = find_peaks(sol.y[1])
if len(peaks) > 2:
    period = np.mean(np.diff(sol.t[peaks]))
    print(f"Oscillation period: {period:.1f} time units")
    print(f"Amplitude: {sol.y[1, peaks].mean() - sol.y[1].min():.3f}")
else:
    print("No sustained oscillations detected")

# Parameter sensitivity analysis
def sensitivity_analysis(param_name, param_values, base_params, y0, t_span):
    """Sweep one parameter and measure output."""
    results = []
    for val in param_values:
        params = base_params.copy()
        params[param_name] = val
        sol = solve_ivp(repressilator, t_span, y0,
                        args=tuple(params.values()),
                        t_eval=np.linspace(*t_span, 500))
        # Measure amplitude
        amplitude = sol.y[1].max() - sol.y[1].min()
        results.append({'param_value': val, 'amplitude': amplitude})
    return pd.DataFrame(results)

3. SBML Model Creation

Build standardized SBML models with python-libsbml.

import libsbml

def create_sbml_model(model_name, compartments, species_list, reactions):
    """Create SBML Level 3 model.

    Args:
        model_name: string name
        compartments: list of (id, size) tuples
        species_list: list of (id, compartment, initial_amount) tuples
        reactions: list of dicts with 'id', 'reactants', 'products', 'kinetic_law'
    """
    doc = libsbml.SBMLDocument(3, 2)
    model = doc.createModel()
    model.setId(model_name)

    # Compartments
    for comp_id, size in compartments:
        c = model.createCompartment()
        c.setId(comp_id)
        c.setConstant(True)
        c.setSize(size)
        c.setSpatialDimensions(3)

    # Species
    for sp_id, comp_id, init_amount in species_list:
        s = model.createSpecies()
        s.setId(sp_id)
        s.setCompartment(comp_id)
        s.setInitialAmount(init_amount)
        s.setConstant(False)
        s.setBoundaryCondition(False)
        s.setHasOnlySubstanceUnits(False)

    # Reactions
    for rxn in reactions:
        r = model.createReaction()
        r.setId(rxn['id'])
        r.setReversible(rxn.get('reversible', False))

        for reactant_id, stoich in rxn.get('reactants', []):
            sr = r.createReactant()
            sr.setSpecies(reactant_id)
            sr.setStoichiometry(stoich)
            sr.setConstant(True)

        for product_id, stoich in rxn.get('products', []):
            sp = r.createProduct()
            sp.setSpecies(product_id)
            sp.setStoichiometry(stoich)
            sp.setConstant(True)

        kl = r.createKineticLaw()
        kl.setMath(libsbml.parseL3Formula(rxn['kinetic_law']))

        # Add parameters
        for param_id, value in rxn.get('parameters', []):
            p = kl.createLocalParameter()
            p.setId(param_id)
            p.setValue(value)

    # Validate
    errors = doc.getNumErrors()
    if errors > 0:
        for i in range(errors):
            print(f"SBML Error: {doc.getError(i).getMessage()}")

    return doc

# Example: simple enzymatic reaction
doc = create_sbml_model(
    'enzyme_kinetics',
    compartments=[('cell', 1.0)],
    species_list=[('S', 'cell', 10.0), ('P', 'cell', 0.0), ('E', 'cell', 1.0)],
    reactions=[{
        'id': 'v1',
        'reactants': [('S', 1)],
        'products': [('P', 1)],
        'kinetic_law': 'Vmax * S / (Km + S)',
        'parameters': [('Vmax', 1.0), ('Km', 0.5)]
    }]
)

# Write to file
libsbml.writeSBMLToFile(doc, 'model.xml')
print("SBML model written to model.xml")

4. Bifurcation Analysis

Identify bistability in gene circuits.

import numpy as np
from scipy.optimize import fsolve

def toggle_steady_states(alpha1, alpha2, n, beta):
    """Find steady states of toggle switch by sweeping inducer."""
    def steady_state_eq(x, alpha1_eff, alpha2, n, beta):
        u, v = x
        eq1 = alpha1_eff / (1 + v**n) - beta * u
        eq2 = alpha2 / (1 + u**n) - beta * v
        return [eq1, eq2]

    inducer_values = np.linspace(0, 10, 200)
    stable_u = []
    stable_v = []

    for ind in inducer_values:
        alpha1_eff = alpha1 * (1 + ind)  # Inducer enhances gene 1 expression
        solutions = []

        # Try multiple initial conditions to find all steady states
        for u0 in [0.01, 1.0, 5.0, 10.0]:
            for v0 in [0.01, 1.0, 5.0, 10.0]:
                try:
                    sol = fsolve(steady_state_eq, [u0, v0],
                                args=(alpha1_eff, alpha2, n, beta),
                                full_output=True)
                    if sol[2] == 1:  # Converged
                        u, v = sol[0]
                        if u > 0 and v > 0:
                            solutions.append((round(u, 4), round(v, 4)))
                except Exception:
                    pass

        # Deduplicate
        unique = list(set(solutions))
        for u, v in unique:
            stable_u.append({'inducer': ind, 'u': u, 'branch': 'high' if u > v else 'low'})

    import pandas as pd
    df = pd.DataFrame(stable_u)
    n_branches = df.groupby('inducer')['branch'].nunique()
    bistable_range = n_branches[n_branches > 1]

    if len(bistable_range) > 0:
        print(f"Bistable region: inducer = [{bistable_range.index.min():.2f}, "
              f"{bistable_range.index.max():.2f}]")
    else:
        print("No bistability detected")

    return df

results = toggle_steady_states(alpha1=3.0, alpha2=3.0, n=2.5, beta=1.0)

5. Barcode Sequencing Analysis

Analyze fitness from barcode tracking experiments.

import pandas as pd
import numpy as np
from scipy.cluster.hierarchy import linkage, fcluster

def analyze_barcode_fitness(count_table, reference_timepoint='T0', min_reads=10):
    """Calculate fitness from barcode count data.

    Args:
        count_table: DataFrame with barcodes as index, timepoints as columns
        reference_timepoint: column name for initial counts
    """
    # Filter low-abundance barcodes
    mask = count_table[reference_timepoint] >= min_reads
    filtered = count_table[mask].copy()
    print(f"Barcodes passing filter: {len(filtered)} / {len(count_table)}")

    # Normalize to relative frequency
    normalized = filtered.div(filtered.sum(axis=0), axis=1)

    # Calculate log2 fold change vs reference
    fitness = np.log2(normalized.div(normalized[reference_timepoint], axis=0) + 1e-10)
    fitness = fitness.drop(columns=[reference_timepoint])

    # Summary statistics
    for col in fitness.columns:
        positive = (fitness[col] > 0).sum()
        negative = (fitness[col] < 0).sum()
        print(f"{col}: {positive} positive, {negative} negative fitness barcodes")

    return fitness

def cluster_lineage_fitness(fitness_df, n_clusters=5):
    """Hierarchical clustering of barcode fitness profiles."""
    Z = linkage(fitness_df.values, method='ward')
    clusters = fcluster(Z, n_clusters, criterion='maxclust')
    fitness_df['cluster'] = clusters

    # Cluster summary
    for c in range(1, n_clusters+1):
        cluster_data = fitness_df[fitness_df['cluster'] == c].drop(columns=['cluster'])
        print(f"Cluster {c} ({len(cluster_data)} barcodes): "
              f"mean fitness = {cluster_data.values.mean():.3f}")

    return fitness_df

6. Genome Engineering

Design and annotate expression cassettes.

from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio.SeqFeature import SeqFeature, FeatureLocation
from Bio import SeqIO

def insert_expression_cassette(genome_record, insert_seq, locus_position,
                                promoter_name='Ptac', gene_name='gfp',
                                terminator_name='T7_term'):
    """Insert expression cassette at specified genomic locus."""
    # Build cassette
    cassette_features = []
    pos = 0

    # Promoter (assume 100bp)
    promoter_seq = 'A' * 100  # Placeholder — use actual sequence
    cassette_features.append(SeqFeature(
        FeatureLocation(pos, pos + len(promoter_seq)),
        type='promoter', qualifiers={'label': promoter_name}
    ))
    pos += len(promoter_seq)

    # RBS (20bp)
    rbs_seq = 'AAGGAGATATACAT'  # Consensus RBS
    cassette_features.append(SeqFeature(
        FeatureLocation(pos, pos + len(rbs_seq)),
        type='RBS', qualifiers={'label': 'RBS'}
    ))
    pos += len(rbs_seq)

    # CDS
    cassette_features.append(SeqFeature(
        FeatureLocation(pos, pos + len(insert_seq)),
        type='CDS', qualifiers={'label': gene_name, 'translation': str(Seq(insert_seq).translate())}
    ))
    pos += len(insert_seq)

    # Terminator (50bp)
    term_seq = 'T' * 50
    cassette_features.append(SeqFeature(
        FeatureLocation(pos, pos + len(term_seq)),
        type='terminator', qualifiers={'label': terminator_name}
    ))

    full_cassette = promoter_seq + rbs_seq + insert_seq + term_seq

    # Insert into genome
    new_seq = str(genome_record.seq[:locus_position]) + full_cassette + \
              str(genome_record.seq[locus_position:])

    # Adjust feature positions
    offset = len(full_cassette)
    new_features = []
    for f in genome_record.features:
        if f.location.start >= locus_position:
            new_loc = FeatureLocation(f.location.start + offset,
                                       f.location.end + offset, f.location.strand)
            new_features.append(SeqFeature(new_loc, type=f.type, qualifiers=f.qualifiers))
        else:
            new_features.append(f)

    # Add cassette features
    for f in cassette_features:
        adjusted = SeqFeature(
            FeatureLocation(f.location.start + locus_position,
                           f.location.end + locus_position),
            type=f.type, qualifiers=f.qualifiers
        )
        new_features.append(adjusted)

    new_record = SeqRecord(Seq(new_seq), id=genome_record.id,
                           name=genome_record.name,
                           description=f"{genome_record.description} + {gene_name} cassette",
                           features=new_features)
    return new_record

Typical Workflows

Workflow 1: Optimize Gene for E. coli Expression and Calculate CAI

protein_seq = "MVSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTLTYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITLGMDELYK"
opt_dna, cai, gc = optimize_codons(protein_seq)
print(f"Original CAI: {calculate_cai(opt_dna):.4f}")

Workflow 2: Simulate Toggle Switch with Growth Dilution

import numpy as np
from scipy.integrate import solve_ivp

sol = solve_ivp(toggle_switch, [0, 100], [0.1, 3.0],
                args=(5.0, 5.0, 0.5, 2.0, 0.1),
                t_eval=np.linspace(0, 100, 1000))
print(f"Final: u={sol.y[0,-1]:.3f}, v={sol.y[1,-1]:.3f}")
print(f"State: {'Gene 1 ON' if sol.y[0,-1] > sol.y[1,-1] else 'Gene 2 ON'}")

Workflow 3: Create SBML Model of a Metabolic Pathway

doc = create_sbml_model(
    'glycolysis_simplified',
    compartments=[('cytoplasm', 1.0)],
    species_list=[
        ('glucose', 'cytoplasm', 5.0),
        ('G6P', 'cytoplasm', 0.0),
        ('pyruvate', 'cytoplasm', 0.0),
        ('ATP', 'cytoplasm', 2.0),
    ],
    reactions=[
        {'id': 'hexokinase', 'reactants': [('glucose', 1), ('ATP', 1)],
         'products': [('G6P', 1)], 'kinetic_law': 'Vmax * glucose * ATP / ((Km_g + glucose) * (Km_a + ATP))',
         'parameters': [('Vmax', 1.0), ('Km_g', 0.1), ('Km_a', 0.5)]},
        {'id': 'glycolysis', 'reactants': [('G6P', 1)],
         'products': [('pyruvate', 2), ('ATP', 2)], 'kinetic_law': 'k * G6P',
         'parameters': [('k', 0.5)]},
    ]
)
libsbml.writeSBMLToFile(doc, 'glycolysis.xml')

Best Practices

  1. Codon optimization — always check GC content after optimization; extreme GC can cause expression problems
  2. Circuit simulation — include growth dilution term (gamma * x) in all ODE models; cells divide, diluting intracellular molecules
  3. SBML validation — always call doc.getNumErrors() after model creation; common errors are missing units and unbalanced reactions
  4. Bifurcation analysis — use multiple initial conditions to find all steady states; bistable systems have hysteresis
  5. Barcode fitness — require minimum read count (>10) to filter PCR/sequencing noise; use log2 fold change for fitness
  6. Stiffness — gene circuits with fast mRNA and slow protein dynamics are stiff; use method='BDF' in solve_ivp

Troubleshooting

Problem: ODE solver fails with "excess work" Solution: Increase max_step or switch to stiff solver (BDF, Radau). Check parameter values for unreasonably large rates.

Problem: python-libsbml not found after installation Solution: Use pip install python-libsbml (not libsbml). On some systems: pip install python-libsbml-experimental.

Problem: Codon optimization produces sequence with internal stop codons Solution: Verify protein sequence uses standard single-letter amino acid codes. Check for ambiguous residues (B, X, Z).

Problem: Bifurcation analysis misses steady states Solution: Use more initial conditions for fsolve. Add parameter continuation methods for systematic sweeps.

Resources

Frequently asked questions

What to verify before installation and use

What does the synthetic-biology source document cover?

Synthetic biology design and simulation tools. Codon optimization, gene circuit ODE modeling with growth feedback, SBML model creation, bifurcation analysis, barcode sequencing fitness analysis, and therapeutic genome engineering.

How do I install synthetic-biology?

The source record exposes this install command: npx skills add https://github.com/synthetic-sciences/openscience --skill "backend/cli/skills/biology/synthetic-biology". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged write-files in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 9965

brucesongs/kali-claw

insecure-design

Insecure Design (OWASP A06:2025) focuses on security flaws in system architecture and design phases, rather than code implementation-level bugs.

Computed 9916

NintendaDev/unikit-ai

unikit-docs

Generate and maintain the project's TECHNICAL documentation from its codebase — scans the project structure, tech stack, and module boundaries, then writes a lean README landing page plus detailed topic pages (architecture, modules, setup, build, APIs), only the docs that are relevant. Use whenever the user wants to create, update, or validate documentation of the CODE or the project itself, e.g. "generate documentation", "create docs", "write the README", "update the project docs", "document th

Computed 9864

Jamie-BitFlight/claude_skills

agent-creator

Create high-quality Claude Code agents from scratch or by adapting existing agents as templates. Use when the user wants to create a new agent, modify agent configurations, build specialized subagents, or design agent architectures. Guides through requirements gathering, template selection, and agent file generation following Anthropic best practices (v2.1.63+).

Computed 9858

magnus919/agent-skills

software-architecture-analysis

Use this skill to reverse-engineer an existing software system, map its architecture, data flow, privacy posture, coupling, quality characteristics, and feature surface, then produce an evidence-grounded clean-room design document, PRD, or migration plan under new constraints. Use for codebase archaeology, implicit contract extraction, architecture health assessment, or decomposition-readiness analysis. Do not use for greenfield architecture design, direct code review, bug hunting, security audi