ETE Toolkit for phylogenetic trees
Works with phylogenetic trees that already exist, in ETE 4: Newick and Nexus I/O, annotation, rooting, pruning, Robinson-Foulds comparison, gene-tree events, NCBI and GTDB taxonomy, SmartView and figures. Use when the tree is already inferred.
etetoolkit- Author
- K-Dense
- Source
- K-Dense-AI/scientific-agent-skills/skills/etetoolkit @ ec59a29
- License
- GPL-3.0-or-later
About this skill
What it does
The skill teaches the agent ETE 4, the Python library for trees that already exist: reading Newick and Nexus, traversing and annotating nodes, rooting, pruning to the leaves you need, writing back to Newick or NHX. Then come Robinson–Foulds comparison of two topologies, TreePattern searches for repeated subtrees, duplication and speciation events on gene trees with PhyloTree, reconciliation against a species tree, local NCBI and GTDB taxonomy databases, the interactive SmartView and publication figures. It pins ETE 4.4.0, and a separate section stops the agent slipping into ETE 3 code: parser= instead of format=, props for node data, tree["name"] for lookup. Before reporting, the agent checks that the parser kept internal names and support values, states whether the tree is treated as rooted, and records the version, parser, rooting and taxonomy snapshot.
Two scripts ship with it. tree_operations.py prints stats, an ASCII view and leaf names, converts between parsers, reroots, prunes and compares two trees by RF distance as JSON. quick_visualize.py opens the SmartView browser viewer or renders PNG, PDF and SVG, colouring by support only when you declare its scale, percent or fractions. Five reference files cover the API, workflows, visualisation, taxonomy and ETE 3 to ETE 4 migration, and review.md records what was checked and where the traps are.
When to use it, and when not
Use it when the tree already exists — from IQ-TREE, FastTree or a database — and you need to clean it up, compare it with another, label taxa, call orthologs and paralogs or make a figure. It also helps port old ete3 scripts.
It does not align sequences or infer trees; for raw FASTA the skill itself sends you to MAFFT and IQ-TREE first.
How to run it
We do not copy this skill: its own licence is GPL-3.0-or-later, which differs from the repository's MIT. Install it from K-Dense's repository with the button to the source: gh skill install K-Dense-AI/scientific-agent-skills etetoolkit for one skill, npx skills add K-Dense-AI/scientific-agent-skills for the set, or the whole repository as an Agent Plugins package for Cursor and Codex, where the skill may show under the scientific-agent-skills prefix. The scripts run through uv with ete4==4.4.0. No keys needed; NCBI and GTDB downloads need internet and disk space, PNG needs ete4[render-sm] and Chrome, PDF and SVG need ete4[treeview].
- Claude Code:
/etetoolkit, or ask for the skill by name. - Codex:
$etetoolkit. - Cursor: type
/in the Agent chat and picketetoolkit.
Example: /etetoolkit Prune tree.nw to the taxa in keep.txt, midpoint-root it and render a circular SVG.
How it differs from similar skills
Phylogenetics workflows from the same pack starts one step earlier: it aligns sequences with MAFFT and infers the tree with IQ-TREE or FastTree, and its helper uses ETE 3, not ETE 4. The two chain well: infer there, analyse here. Nothing else in our catalog works with phylogenetic trees.
Install
This skill is not copied to the catalog: its licence allows a copy only under the same licence, and the catalog does not copy under such licences. Install it from the author's repository.
Connect through AnyModel API
This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.
AnyModel