[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AFDP9VY1TG1TH68F9K487B":3,"skill-same:01M6AFDP9VY1TG1TH68F9K487B":91},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6AFDP9VY1TG1TH68F9K487B","etetoolkit",null,"Phylogenetic tree toolkit (ETE). Tree manipulation (Newick\u002FNHX), evolutionary event detection, orthology\u002Fparalogy, NCBI taxonomy, visualization (PDF\u002FSVG), for phylogenomics.","davila7\u002Fclaude-code-templates","davila7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6216945?v=4","01M6ADEWWFPS191NFM0Y1EX1JH","Daniel Avila","01M6ADJHGM78PHQRD3XZTFDVKK",33481,"MIT","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fetetoolkit\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000013","分析与可视化",[5,27,28,29,30,31,32,33,34,35,36,37],"PDF","toolkit","visualization","detection","taxonomy","SVG","event","tree","for","evolutionary","NCBI","2026-11-10 10:12:30",false,"---\nname: etetoolkit\ndescription: \"Phylogenetic tree toolkit (ETE). Tree manipulation (Newick\u002FNHX), evolutionary event detection, orthology\u002Fparalogy, NCBI taxonomy, visualization (PDF\u002FSVG), for phylogenomics.\"\n---\n\n# ETE Toolkit Skill\n\n## Overview\n\nETE (Environment for Tree Exploration) is a toolkit for phylogenetic and hierarchical tree analysis. Manipulate trees, analyze evolutionary events, visualize results, and integrate with biological databases for phylogenomic research and clustering analysis.\n\n## Core Capabilities\n\n### 1. Tree Manipulation and Analysis\n\nLoad, manipulate, and analyze hierarchical tree structures with support for:\n\n- **Tree I\u002FO**: Read and write Newick, NHX, PhyloXML, and NeXML formats\n- **Tree traversal**: Navigate trees using preorder, postorder, or levelorder strategies\n- **Topology modification**: Prune, root, collapse nodes, resolve polytomies\n- **Distance calculations**: Compute branch lengths and topological distances between nodes\n- **Tree comparison**: Calculate Robinson-Foulds distances and identify topological differences\n\n**Common patterns:**\n\n```python\nfrom ete3 import Tree\n\n# Load tree from file\ntree = Tree(\"tree.nw\", format=1)\n\n# Basic statistics\nprint(f\"Leaves: {len(tree)}\")\nprint(f\"Total nodes: {len(list(tree.traverse()))}\")\n\n# Prune to taxa of interest\ntaxa_to_keep = [\"species1\", \"species2\", \"species3\"]\ntree.prune(taxa_to_keep, preserve_branch_length=True)\n\n# Midpoint root\nmidpoint = tree.get_midpoint_outgroup()\ntree.set_outgroup(midpoint)\n\n# Save modified tree\ntree.write(outfile=\"rooted_tree.nw\")\n```\n\nUse `scripts\u002Ftree_operations.py` for command-line tree manipulation:\n\n```bash\n# Display tree statistics\npython scripts\u002Ftree_operations.py stats tree.nw\n\n# Convert format\npython scripts\u002Ftree_operations.py convert tree.nw output.nw --in-format 0 --out-format 1\n\n# Reroot tree\npython scripts\u002Ftree_operations.py reroot tree.nw rooted.nw --midpoint\n\n# Prune to specific taxa\npython scripts\u002Ftree_operations.py prune tree.nw pruned.nw --keep-taxa \"sp1,sp2,sp3\"\n\n# Show ASCII visualization\npython scripts\u002Ftree_operations.py ascii tree.nw\n```\n\n### 2. Phylogenetic Analysis\n\nAnalyze gene trees with evolutionary event detection:\n\n- **Sequence alignment integration**: Link trees to multiple sequence alignments (FASTA, Phylip)\n- **Species naming**: Automatic or custom species extraction from gene names\n- **Evolutionary events**: Detect duplication and speciation events using Species Overlap or tree reconciliation\n- **Orthology detection**: Identify orthologs and paralogs based on evolutionary events\n- **Gene family analysis**: Split trees by duplications, collapse lineage-specific expansions\n\n**Workflow for gene tree analysis:**\n\n```python\nfrom ete3 import PhyloTree\n\n# Load gene tree with alignment\ntree = PhyloTree(\"gene_tree.nw\", alignment=\"alignment.fasta\")\n\n# Set species naming function\ndef get_species(gene_name):\n    return gene_name.split(\"_\")[0]\n\ntree.set_species_naming_function(get_species)\n\n# Detect evolutionary events\nevents = tree.get_descendant_evol_events()\n\n# Analyze events\nfor node in tree.traverse():\n    if hasattr(node, \"evoltype\"):\n        if node.evoltype == \"D\":\n            print(f\"Duplication at {node.name}\")\n        elif node.evoltype == \"S\":\n            print(f\"Speciation at {node.name}\")\n\n# Extract ortholog groups\northo_groups = tree.get_speciation_trees()\nfor i, ortho_tree in enumerate(ortho_groups):\n    ortho_tree.write(outfile=f\"ortholog_group_{i}.nw\")\n```\n\n**Finding orthologs and paralogs:**\n\n```python\n# Find orthologs to query gene\nquery = tree & \"species1_gene1\"\n\northologs = []\nparalogs = []\n\nfor event in events:\n    if query in event.in_seqs:\n        if event.etype == \"S\":\n            orthologs.extend([s for s in event.out_seqs if s != query])\n        elif event.etype == \"D\":\n            paralogs.extend([s for s in event.out_seqs if s != query])\n```\n\n### 3. NCBI Taxonomy Integration\n\nIntegrate taxonomic information from NCBI Taxonomy database:\n\n- **Database access**: Automatic download and local caching of NCBI taxonomy (~300MB)\n- **Taxid\u002Fname translation**: Convert between taxonomic IDs and scientific names\n- **Lineage retrieval**: Get complete evolutionary lineages\n- **Taxonomy trees**: Build species trees connecting specified taxa\n- **Tree annotation**: Automatically annotate trees with taxonomic information\n\n**Building taxonomy-based trees:**\n\n```python\nfrom ete3 import NCBITaxa\n\nncbi = NCBITaxa()\n\n# Build tree from species names\nspecies = [\"Homo sapiens\", \"Pan troglodytes\", \"Mus musculus\"]\nname2taxid = ncbi.get_name_translator(species)\ntaxids = [name2taxid[sp][0] for sp in species]\n\n# Get minimal tree connecting taxa\ntree = ncbi.get_topology(taxids)\n\n# Annotate nodes with taxonomy info\nfor node in tree.traverse():\n    if hasattr(node, \"sci_name\"):\n        print(f\"{node.sci_name} - Rank: {node.rank} - TaxID: {node.taxid}\")\n```\n\n**Annotating existing trees:**\n\n```python\n# Get taxonomy info for tree leaves\nfor leaf in tree:\n    species = extract_species_from_name(leaf.name)\n    taxid = ncbi.get_name_translator([species])[species][0]\n\n    # Get lineage\n    lineage = ncbi.get_lineage(taxid)\n    ranks = ncbi.get_rank(lineage)\n    names = ncbi.get_taxid_translator(lineage)\n\n    # Add to node\n    leaf.add_feature(\"taxid\", taxid)\n    leaf.add_feature(\"lineage\", [names[t] for t in lineage])\n```\n\n### 4. Tree Visualization\n\nCreate publication-quality tree visualizations:\n\n- **Output formats**: PNG (raster), PDF, and SVG (vector) for publications\n- **Layout modes**: Rectangular and circular tree layouts\n- **Interactive GUI**: Explore trees interactively with zoom, pan, and search\n- **Custom styling**: NodeStyle for node appearance (colors, shapes, sizes)\n- **Faces**: Add graphical elements (text, images, charts, heatmaps) to nodes\n- **Layout functions**: Dynamic styling based on node properties\n\n**Basic visualization workflow:**\n\n```python\nfrom ete3 import Tree, TreeStyle, NodeStyle\n\ntree = Tree(\"tree.nw\")\n\n# Configure tree style\nts = TreeStyle()\nts.show_leaf_name = True\nts.show_branch_support = True\nts.scale = 50  # pixels per branch length unit\n\n# Style nodes\nfor node in tree.traverse():\n    nstyle = NodeStyle()\n\n    if node.is_leaf():\n        nstyle[\"fgcolor\"] = \"blue\"\n        nstyle[\"size\"] = 8\n    else:\n        # Color by support\n        if node.support > 0.9:\n            nstyle[\"fgcolor\"] = \"darkgreen\"\n        else:\n            nstyle[\"fgcolor\"] = \"red\"\n        nstyle[\"size\"] = 5\n\n    node.set_style(nstyle)\n\n# Render to file\ntree.render(\"tree.pdf\", tree_style=ts)\ntree.render(\"tree.png\", w=800, h=600, units=\"px\", dpi=300)\n```\n\nUse `scripts\u002Fquick_visualize.py` for rapid visualization:\n\n```bash\n# Basic visualization\npython scripts\u002Fquick_visualize.py tree.nw output.pdf\n\n# Circular layout with custom styling\npython scripts\u002Fquick_visualize.py tree.nw output.pdf --mode c --color-by-support\n\n# High-resolution PNG\npython scripts\u002Fquick_visualize.py tree.nw output.png --width 1200 --height 800 --units px --dpi 300\n\n# Custom title and styling\npython scripts\u002Fquick_visualize.py tree.nw output.pdf --title \"Species Phylogeny\" --show-support\n```\n\n**Advanced visualization with faces:**\n\n```python\nfrom ete3 import Tree, TreeStyle, TextFace, CircleFace\n\ntree = Tree(\"tree.nw\")\n\n# Add features to nodes\nfor leaf in tree:\n    leaf.add_feature(\"habitat\", \"marine\" if \"fish\" in leaf.name else \"land\")\n\n# Layout function\ndef layout(node):\n    if node.is_leaf():\n        # Add colored circle\n        color = \"blue\" if node.habitat == \"marine\" else \"green\"\n        circle = CircleFace(radius=5, color=color)\n        node.add_face(circle, column=0, position=\"aligned\")\n\n        # Add label\n        label = TextFace(node.name, fsize=10)\n        node.add_face(label, column=1, position=\"aligned\")\n\nts = TreeStyle()\nts.layout_fn = layout\nts.show_leaf_name = False\n\ntree.render(\"annotated_tree.pdf\", tree_style=ts)\n```\n\n### 5. Clustering Analysis\n\nAnalyze hierarchical clustering results with data integration:\n\n- **ClusterTree**: Specialized class for clustering dendrograms\n- **Data matrix linking**: Connect tree leaves to numerical profiles\n- **Cluster metrics**: Silhouette coefficient, Dunn index, inter\u002Fintra-cluster distances\n- **Validation**: Test cluster quality with different distance metrics\n- **Heatmap visualization**: Display data matrices alongside trees\n\n**Clustering workflow:**\n\n```python\nfrom ete3 import ClusterTree\n\n# Load tree with data matrix\nmatrix = \"\"\"#Names\\tSample1\\tSample2\\tSample3\nGene1\\t1.5\\t2.3\\t0.8\nGene2\\t0.9\\t1.1\\t1.8\nGene3\\t2.1\\t2.5\\t0.5\"\"\"\n\ntree = ClusterTree(\"((Gene1,Gene2),Gene3);\", text_array=matrix)\n\n# Evaluate cluster quality\nfor node in tree.traverse():\n    if not node.is_leaf():\n        silhouette = node.get_silhouette()\n        dunn = node.get_dunn()\n\n        print(f\"Cluster: {node.name}\")\n        print(f\"  Silhouette: {silhouette:.3f}\")\n        print(f\"  Dunn index: {dunn:.3f}\")\n\n# Visualize with heatmap\ntree.show(\"heatmap\")\n```\n\n### 6. Tree Comparison\n\nQuantify topological differences between trees:\n\n- **Robinson-Foulds distance**: Standard metric for tree comparison\n- **Normalized RF**: Scale-invariant distance (0.0 to 1.0)\n- **Partition analysis**: Identify unique and shared bipartitions\n- **Consensus trees**: Analyze support across multiple trees\n- **Batch comparison**: Compare multiple trees pairwise\n\n**Compare two trees:**\n\n```python\nfrom ete3 import Tree\n\ntree1 = Tree(\"tree1.nw\")\ntree2 = Tree(\"tree2.nw\")\n\n# Calculate RF distance\nrf, max_rf, common_leaves, parts_t1, parts_t2 = tree1.robinson_foulds(tree2)\n\nprint(f\"RF distance: {rf}\u002F{max_rf}\")\nprint(f\"Normalized RF: {rf\u002Fmax_rf:.3f}\")\nprint(f\"Common leaves: {len(common_leaves)}\")\n\n# Find unique partitions\nunique_t1 = parts_t1 - parts_t2\nunique_t2 = parts_t2 - parts_t1\n\nprint(f\"Unique to tree1: {len(unique_t1)}\")\nprint(f\"Unique to tree2: {len(unique_t2)}\")\n```\n\n**Compare multiple trees:**\n\n```python\nimport numpy as np\n\ntrees = [Tree(f\"tree{i}.nw\") for i in range(4)]\n\n# Create distance matrix\nn = len(trees)\ndist_matrix = np.zeros((n, n))\n\nfor i in range(n):\n    for j in range(i+1, n):\n        rf, max_rf, _, _, _ = trees[i].robinson_foulds(trees[j])\n        norm_rf = rf \u002F max_rf if max_rf > 0 else 0\n        dist_matrix[i, j] = norm_rf\n        dist_matrix[j, i] = norm_rf\n```\n\n## Installation and Setup\n\nInstall ETE toolkit:\n\n```bash\n# Basic installation\nuv pip install ete3\n\n# With external dependencies for rendering (optional but recommended)\n# On macOS:\nbrew install qt@5\n\n# On Ubuntu\u002FDebian:\nsudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg\n\n# For full features including GUI\nuv pip install ete3[gui]\n```\n\n**First-time NCBI Taxonomy setup:**\n\nThe first time NCBITaxa is instantiated, it automatically downloads the NCBI taxonomy database (~300MB) to `~\u002F.etetoolkit\u002Ftaxa.sqlite`. This happens only once:\n\n```python\nfrom ete3 import NCBITaxa\nncbi = NCBITaxa()  # Downloads database on first run\n```\n\nUpdate taxonomy database:\n\n```python\nncbi.update_taxonomy_database()  # Download latest NCBI data\n```\n\n## Common Use Cases\n\n### Use Case 1: Phylogenomic Pipeline\n\nComplete workflow from gene tree to ortholog identification:\n\n```python\nfrom ete3 import PhyloTree, NCBITaxa\n\n# 1. Load gene tree with alignment\ntree = PhyloTree(\"gene_tree.nw\", alignment=\"alignment.fasta\")\n\n# 2. Configure species naming\ntree.set_species_naming_function(lambda x: x.split(\"_\")[0])\n\n# 3. Detect evolutionary events\ntree.get_descendant_evol_events()\n\n# 4. Annotate with taxonomy\nncbi = NCBITaxa()\nfor leaf in tree:\n    if leaf.species in species_to_taxid:\n        taxid = species_to_taxid[leaf.species]\n        lineage = ncbi.get_lineage(taxid)\n        leaf.add_feature(\"lineage\", lineage)\n\n# 5. Extract ortholog groups\northo_groups = tree.get_speciation_trees()\n\n# 6. Save and visualize\nfor i, ortho in enumerate(ortho_groups):\n    ortho.write(outfile=f\"ortho_{i}.nw\")\n```\n\n### Use Case 2: Tree Preprocessing and Formatting\n\nBatch process trees for analysis:\n\n```bash\n# Convert format\npython scripts\u002Ftree_operations.py convert input.nw output.nw --in-format 0 --out-format 1\n\n# Root at midpoint\npython scripts\u002Ftree_operations.py reroot input.nw rooted.nw --midpoint\n\n# Prune to focal taxa\npython scripts\u002Ftree_operations.py prune rooted.nw pruned.nw --keep-taxa taxa_list.txt\n\n# Get statistics\npython scripts\u002Ftree_operations.py stats pruned.nw\n```\n\n### Use Case 3: Publication-Quality Figures\n\nCreate styled visualizations:\n\n```python\nfrom ete3 import Tree, TreeStyle, NodeStyle, TextFace\n\ntree = Tree(\"tree.nw\")\n\n# Define clade colors\nclade_colors = {\n    \"Mammals\": \"red\",\n    \"Birds\": \"blue\",\n    \"Fish\": \"green\"\n}\n\ndef layout(node):\n    # Highlight clades\n    if node.is_leaf():\n        for clade, color in clade_colors.items():\n            if clade in node.name:\n                nstyle = NodeStyle()\n                nstyle[\"fgcolor\"] = color\n                nstyle[\"size\"] = 8\n                node.set_style(nstyle)\n    else:\n        # Add support values\n        if node.support > 0.95:\n            support = TextFace(f\"{node.support:.2f}\", fsize=8)\n            node.add_face(support, column=0, position=\"branch-top\")\n\nts = TreeStyle()\nts.layout_fn = layout\nts.show_scale = True\n\n# Render for publication\ntree.render(\"figure.pdf\", w=200, units=\"mm\", tree_style=ts)\ntree.render(\"figure.svg\", tree_style=ts)  # Editable vector\n```\n\n### Use Case 4: Automated Tree Analysis\n\nProcess multiple trees systematically:\n\n```python\nfrom ete3 import Tree\nimport os\n\ninput_dir = \"trees\"\noutput_dir = \"processed\"\n\nfor filename in os.listdir(input_dir):\n    if filename.endswith(\".nw\"):\n        tree = Tree(os.path.join(input_dir, filename))\n\n        # Standardize: midpoint root, resolve polytomies\n        midpoint = tree.get_midpoint_outgroup()\n        tree.set_outgroup(midpoint)\n        tree.resolve_polytomy(recursive=True)\n\n        # Filter low support branches\n        for node in tree.traverse():\n            if hasattr(node, 'support') and node.support \u003C 0.5:\n                if not node.is_leaf() and not node.is_root():\n                    node.delete()\n\n        # Save processed tree\n        output_file = os.path.join(output_dir, f\"processed_{filename}\")\n        tree.write(outfile=output_file)\n```\n\n## Reference Documentation\n\nFor comprehensive API documentation, code examples, and detailed guides, refer to the following resources in the `references\u002F` directory:\n\n- **`api_reference.md`**: Complete API documentation for all ETE classes and methods (Tree, PhyloTree, ClusterTree, NCBITaxa), including parameters, return types, and code examples\n- **`workflows.md`**: Common workflow patterns organized by task (tree operations, phylogenetic analysis, tree comparison, taxonomy integration, clustering analysis)\n- **`visualization.md`**: Comprehensive visualization guide covering TreeStyle, NodeStyle, Faces, layout functions, and advanced visualization techniques\n\nLoad these references when detailed information is needed:\n\n```python\n# To use API reference\n# Read references\u002Fapi_reference.md for complete method signatures and parameters\n\n# To implement workflows\n# Read references\u002Fworkflows.md for step-by-step workflow examples\n\n# To create visualizations\n# Read references\u002Fvisualization.md for styling and rendering options\n```\n\n## Troubleshooting\n\n**Import errors:**\n\n```bash\n# If \"ModuleNotFoundError: No module named 'ete3'\"\nuv pip install ete3\n\n# For GUI and rendering issues\nuv pip install ete3[gui]\n```\n\n**Rendering issues:**\n\nIf `tree.render()` or `tree.show()` fails with Qt-related errors, install system dependencies:\n\n```bash\n# macOS\nbrew install qt@5\n\n# Ubuntu\u002FDebian\nsudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg\n```\n\n**NCBI Taxonomy database:**\n\nIf database download fails or becomes corrupted:\n\n```python\nfrom ete3 import NCBITaxa\nncbi = NCBITaxa()\nncbi.update_taxonomy_database()  # Redownload database\n```\n\n**Memory issues with large trees:**\n\nFor very large trees (>10,000 leaves), use iterators instead of list comprehensions:\n\n```python\n# Memory-efficient iteration\nfor leaf in tree.iter_leaves():\n    process(leaf)\n\n# Instead of\nfor leaf in tree.get_leaves():  # Loads all into memory\n    process(leaf)\n```\n\n## Newick Format Reference\n\nETE supports multiple Newick format specifications (0-100):\n\n- **Format 0**: Flexible with branch lengths (default)\n- **Format 1**: With internal node names\n- **Format 2**: With bootstrap\u002Fsupport values\n- **Format 5**: Internal node names + branch lengths\n- **Format 8**: All features (names, distances, support)\n- **Format 9**: Leaf names only\n- **Format 100**: Topology only\n\nSpecify format when reading\u002Fwriting:\n\n```python\ntree = Tree(\"tree.nw\", format=1)\ntree.write(outfile=\"output.nw\", format=5)\n```\n\nNHX (New Hampshire eXtended) format preserves custom features:\n\n```python\ntree.write(outfile=\"tree.nhx\", features=[\"habitat\", \"temperature\", \"depth\"])\n```\n\n## Best Practices\n\n1. **Preserve branch lengths**: Use `preserve_branch_length=True` when pruning for phylogenetic analysis\n2. **Cache content**: Use `get_cached_content()` for repeated access to node contents on large trees\n3. **Use iterators**: Employ `iter_*` methods for memory-efficient processing of large trees\n4. **Choose appropriate traversal**: Postorder for bottom-up analysis, preorder for top-down\n5. **Validate monophyly**: Always check returned clade type (monophyletic\u002Fparaphyletic\u002Fpolyphyletic)\n6. **Vector formats for publication**: Use PDF or SVG for publication figures (scalable, editable)\n7. **Interactive testing**: Use `tree.show()` to test visualizations before rendering to file\n8. **PhyloTree for phylogenetics**: Use PhyloTree class for gene trees and evolutionary analysis\n9. **Copy method selection**: \"newick\" for speed, \"cpickle\" for full fidelity, \"deepcopy\" for complex objects\n10. **NCBI query caching**: Store NCBI taxonomy query results to avoid repeated database access\n","# ETE Toolkit Skill\n\n## Overview\n\nETE (Environment for Tree Exploration) is a toolkit for phylogenetic and hierarchical tree analysis. Manipulate trees, analyze evolutionary events, visualize results, and integrate with biological databases for phylogenomic research and clustering analysis.\n\n## Core Capabilities\n\n### 1. Tree Manipulation and Analysis\n\nLoad, manipulate, and analyze hierarchical tree structures with support for:\n\n- **Tree I\u002FO**: Read and write Newick, NHX, PhyloXML, and NeXML formats\n- **Tree traversal**: Navigate trees using preorder, postorder, or levelorder strategies\n- **Topology modification**: Prune, root, collapse nodes, resolve polytomies\n- **Distance calculations**: Compute branch lengths and topological distances between nodes\n- **Tree comparison**: Calculate Robinson-Foulds distances and identify topological differences\n\n**Common patterns:**\n\n```python\nfrom ete3 import Tree\n\n# Load tree from file\ntree = Tree(\"tree.nw\", format=1)\n\n# Basic statistics\nprint(f\"Leaves: {len(tree)}\")\nprint(f\"Total nodes: {len(list(tree.traverse()))}\")\n\n# Prune to taxa of interest\ntaxa_to_keep = [\"species1\", \"species2\", \"species3\"]\ntree.prune(taxa_to_keep, preserve_branch_length=True)\n\n# Midpoint root\nmidpoint = tree.get_midpoint_outgroup()\ntree.set_outgroup(midpoint)\n\n# Save modified tree\ntree.write(outfile=\"rooted_tree.nw\")\n```\n\nUse `scripts\u002Ftree_operations.py` for command-line tree manipulation:\n\n```bash\n# Display tree statistics\npython scripts\u002Ftree_operations.py stats tree.nw\n\n# Convert format\npython scripts\u002Ftree_operations.py convert tree.nw output.nw --in-format 0 --out-format 1\n\n# Reroot tree\npython scripts\u002Ftree_operations.py reroot tree.nw rooted.nw --midpoint\n\n# Prune to specific taxa\npython scripts\u002Ftree_operations.py prune tree.nw pruned.nw --keep-taxa \"sp1,sp2,sp3\"\n\n# Show ASCII visualization\npython scripts\u002Ftree_operations.py ascii tree.nw\n```\n\n### 2. Phylogenetic Analysis\n\nAnalyze gene trees with evolutionary event detection:\n\n- **Sequence alignment integration**: Link trees to multiple sequence alignments (FASTA, Phylip)\n- **Species naming**: Automatic or custom species extraction from gene names\n- **Evolutionary events**: Detect duplication and speciation events using Species Overlap or tree reconciliation\n- **Orthology detection**: Identify orthologs and paralogs based on evolutionary events\n- **Gene family analysis**: Split trees by duplications, collapse lineage-specific expansions\n\n**Workflow for gene tree analysis:**\n\n```python\nfrom ete3 import PhyloTree\n\n# Load gene tree with alignment\ntree = PhyloTree(\"gene_tree.nw\", alignment=\"alignment.fasta\")\n\n# Set species naming function\ndef get_species(gene_name):\n    return gene_name.split(\"_\")[0]\n\ntree.set_species_naming_function(get_species)\n\n# Detect evolutionary events\nevents = tree.get_descendant_evol_events()\n\n# Analyze events\nfor node in tree.traverse():\n    if hasattr(node, \"evoltype\"):\n        if node.evoltype == \"D\":\n            print(f\"Duplication at {node.name}\")\n        elif node.evoltype == \"S\":\n            print(f\"Speciation at {node.name}\")\n\n# Extract ortholog groups\northo_groups = tree.get_speciation_trees()\nfor i, ortho_tree in enumerate(ortho_groups):\n    ortho_tree.write(outfile=f\"ortholog_group_{i}.nw\")\n```\n\n**Finding orthologs and paralogs:**\n\n```python\n# Find orthologs to query gene\nquery = tree & \"species1_gene1\"\n\northologs = []\nparalogs = []\n\nfor event in events:\n    if query in event.in_seqs:\n        if event.etype == \"S\":\n            orthologs.extend([s for s in event.out_seqs if s != query])\n        elif event.etype == \"D\":\n            paralogs.extend([s for s in event.out_seqs if s != query])\n```\n\n### 3. NCBI Taxonomy Integration\n\nIntegrate taxonomic information from NCBI Taxonomy database:\n\n- **Database access**: Automatic download and local caching of NCBI taxonomy (~300MB)\n- **Taxid\u002Fname translation**: Convert between taxonomic IDs and scientific names\n- **Lineage retrieval**: Get complete evolutionary lineages\n- **Taxonomy trees**: Build species trees connecting specified taxa\n- **Tree annotation**: Automatically annotate trees with taxonomic information\n\n**Building taxonomy-based trees:**\n\n```python\nfrom ete3 import NCBITaxa\n\nncbi = NCBITaxa()\n\n# Build tree from species names\nspecies = [\"Homo sapiens\", \"Pan troglodytes\", \"Mus musculus\"]\nname2taxid = ncbi.get_name_translator(species)\ntaxids = [name2taxid[sp][0] for sp in species]\n\n# Get minimal tree connecting taxa\ntree = ncbi.get_topology(taxids)\n\n# Annotate nodes with taxonomy info\nfor node in tree.traverse():\n    if hasattr(node, \"sci_name\"):\n        print(f\"{node.sci_name} - Rank: {node.rank} - TaxID: {node.taxid}\")\n```\n\n**Annotating existing trees:**\n\n```python\n# Get taxonomy info for tree leaves\nfor leaf in tree:\n    species = extract_species_from_name(leaf.name)\n    taxid = ncbi.get_name_translator([species])[species][0]\n\n    # Get lineage\n    lineage = ncbi.get_lineage(taxid)\n    ranks = ncbi.get_rank(lineage)\n    names = ncbi.get_taxid_translator(lineage)\n\n    # Add to node\n    leaf.add_feature(\"taxid\", taxid)\n    leaf.add_feature(\"lineage\", [names[t] for t in lineage])\n```\n\n### 4. Tree Visualization\n\nCreate publication-quality tree visualizations:\n\n- **Output formats**: PNG (raster), PDF, and SVG (vector) for publications\n- **Layout modes**: Rectangular and circular tree layouts\n- **Interactive GUI**: Explore trees interactively with zoom, pan, and search\n- **Custom styling**: NodeStyle for node appearance (colors, shapes, sizes)\n- **Faces**: Add graphical elements (text, images, charts, heatmaps) to nodes\n- **Layout functions**: Dynamic styling based on node properties\n\n**Basic visualization workflow:**\n\n```python\nfrom ete3 import Tree, TreeStyle, NodeStyle\n\ntree = Tree(\"tree.nw\")\n\n# Configure tree style\nts = TreeStyle()\nts.show_leaf_name = True\nts.show_branch_support = True\nts.scale = 50  # pixels per branch length unit\n\n# Style nodes\nfor node in tree.traverse():\n    nstyle = NodeStyle()\n\n    if node.is_leaf():\n        nstyle[\"fgcolor\"] = \"blue\"\n        nstyle[\"size\"] = 8\n    else:\n        # Color by support\n        if node.support > 0.9:\n            nstyle[\"fgcolor\"] = \"darkgreen\"\n        else:\n            nstyle[\"fgcolor\"] = \"red\"\n        nstyle[\"size\"] = 5\n\n    node.set_style(nstyle)\n\n# Render to file\ntree.render(\"tree.pdf\", tree_style=ts)\ntree.render(\"tree.png\", w=800, h=600, units=\"px\", dpi=300)\n```\n\nUse `scripts\u002Fquick_visualize.py` for rapid visualization:\n\n```bash\n# Basic visualization\npython scripts\u002Fquick_visualize.py tree.nw output.pdf\n\n# Circular layout with custom styling\npython scripts\u002Fquick_visualize.py tree.nw output.pdf --mode c --color-by-support\n\n# High-resolution PNG\npython scripts\u002Fquick_visualize.py tree.nw output.png --width 1200 --height 800 --units px --dpi 300\n\n# Custom title and styling\npython scripts\u002Fquick_visualize.py tree.nw output.pdf --title \"Species Phylogeny\" --show-support\n```\n\n**Advanced visualization with faces:**\n\n```python\nfrom ete3 import Tree, TreeStyle, TextFace, CircleFace\n\ntree = Tree(\"tree.nw\")\n\n# Add features to nodes\nfor leaf in tree:\n    leaf.add_feature(\"habitat\", \"marine\" if \"fish\" in leaf.name else \"land\")\n\n# Layout function\ndef layout(node):\n    if node.is_leaf():\n        # Add colored circle\n        color = \"blue\" if node.habitat == \"marine\" else \"green\"\n        circle = CircleFace(radius=5, color=color)\n        node.add_face(circle, column=0, position=\"aligned\")\n\n        # Add label\n        label = TextFace(node.name, fsize=10)\n        node.add_face(label, column=1, position=\"aligned\")\n\nts = TreeStyle()\nts.layout_fn = layout\nts.show_leaf_name = False\n\ntree.render(\"annotated_tree.pdf\", tree_style=ts)\n```\n\n### 5. Clustering Analysis\n\nAnalyze hierarchical clustering results with data integration:\n\n- **ClusterTree**: Specialized class for clustering dendrograms\n- **Data matrix linking**: Connect tree leaves to numerical profiles\n- **Cluster metrics**: Silhouette coefficient, Dunn index, inter\u002Fintra-cluster distances\n- **Validation**: Test cluster quality with different distance metrics\n- **Heatmap visualization**: Display data matrices alongside trees\n\n**Clustering workflow:**\n\n```python\nfrom ete3 import ClusterTree\n\n# Load tree with data matrix\nmatrix = \"\"\"#Names\\tSample1\\tSample2\\tSample3\nGene1\\t1.5\\t2.3\\t0.8\nGene2\\t0.9\\t1.1\\t1.8\nGene3\\t2.1\\t2.5\\t0.5\"\"\"\n\ntree = ClusterTree(\"((Gene1,Gene2),Gene3);\", text_array=matrix)\n\n# Evaluate cluster quality\nfor node in tree.traverse():\n    if not node.is_leaf():\n        silhouette = node.get_silhouette()\n        dunn = node.get_dunn()\n\n        print(f\"Cluster: {node.name}\")\n        print(f\"  Silhouette: {silhouette:.3f}\")\n        print(f\"  Dunn index: {dunn:.3f}\")\n\n# Visualize with heatmap\ntree.show(\"heatmap\")\n```\n\n### 6. Tree Comparison\n\nQuantify topological differences between trees:\n\n- **Robinson-Foulds distance**: Standard metric for tree comparison\n- **Normalized RF**: Scale-invariant distance (0.0 to 1.0)\n- **Partition analysis**: Identify unique and shared bipartitions\n- **Consensus trees**: Analyze support across multiple trees\n- **Batch comparison**: Compare multiple trees pairwise\n\n**Compare two trees:**\n\n```python\nfrom ete3 import Tree\n\ntree1 = Tree(\"tree1.nw\")\ntree2 = Tree(\"tree2.nw\")\n\n# Calculate RF distance\nrf, max_rf, common_leaves, parts_t1, parts_t2 = tree1.robinson_foulds(tree2)\n\nprint(f\"RF distance: {rf}\u002F{max_rf}\")\nprint(f\"Normalized RF: {rf\u002Fmax_rf:.3f}\")\nprint(f\"Common leaves: {len(common_leaves)}\")\n\n# Find unique partitions\nunique_t1 = parts_t1 - parts_t2\nunique_t2 = parts_t2 - parts_t1\n\nprint(f\"Unique to tree1: {len(unique_t1)}\")\nprint(f\"Unique to tree2: {len(unique_t2)}\")\n```\n\n**Compare multiple trees:**\n\n```python\nimport numpy as np\n\ntrees = [Tree(f\"tree{i}.nw\") for i in range(4)]\n\n# Create distance matrix\nn = len(trees)\ndist_matrix = np.zeros((n, n))\n\nfor i in range(n):\n    for j in range(i+1, n):\n        rf, max_rf, _, _, _ = trees[i].robinson_foulds(trees[j])\n        norm_rf = rf \u002F max_rf if max_rf > 0 else 0\n        dist_matrix[i, j] = norm_rf\n        dist_matrix[j, i] = norm_rf\n```\n\n## Installation and Setup\n\nInstall ETE toolkit:\n\n```bash\n# Basic installation\nuv pip install ete3\n\n# With external dependencies for rendering (optional but recommended)\n# On macOS:\nbrew install qt@5\n\n# On Ubuntu\u002FDebian:\nsudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg\n\n# For full features including GUI\nuv pip install ete3[gui]\n```\n\n**First-time NCBI Taxonomy setup:**\n\nThe first time NCBITaxa is instantiated, it automatically downloads the NCBI taxonomy database (~300MB) to `~\u002F.etetoolkit\u002Ftaxa.sqlite`. This happens only once:\n\n```python\nfrom ete3 import NCBITaxa\nncbi = NCBITaxa()  # Downloads database on first run\n```\n\nUpdate taxonomy database:\n\n```python\nncbi.update_taxonomy_database()  # Download latest NCBI data\n```\n\n## Common Use Cases\n\n### Use Case 1: Phylogenomic Pipeline\n\nComplete workflow from gene tree to ortholog identification:\n\n```python\nfrom ete3 import PhyloTree, NCBITaxa\n\n# 1. Load gene tree with alignment\ntree = PhyloTree(\"gene_tree.nw\", alignment=\"alignment.fasta\")\n\n# 2. Configure species naming\ntree.set_species_naming_function(lambda x: x.split(\"_\")[0])\n\n# 3. Detect evolutionary events\ntree.get_descendant_evol_events()\n\n# 4. Annotate with taxonomy\nncbi = NCBITaxa()\nfor leaf in tree:\n    if leaf.species in species_to_taxid:\n        taxid = species_to_taxid[leaf.species]\n        lineage = ncbi.get_lineage(taxid)\n        leaf.add_feature(\"lineage\", lineage)\n\n# 5. Extract ortholog groups\northo_groups = tree.get_speciation_trees()\n\n# 6. Save and visualize\nfor i, ortho in enumerate(ortho_groups):\n    ortho.write(outfile=f\"ortho_{i}.nw\")\n```\n\n### Use Case 2: Tree Preprocessing and Formatting\n\nBatch process trees for analysis:\n\n```bash\n# Convert format\npython scripts\u002Ftree_operations.py convert input.nw output.nw --in-format 0 --out-format 1\n\n# Root at midpoint\npython scripts\u002Ftree_operations.py reroot input.nw rooted.nw --midpoint\n\n# Prune to focal taxa\npython scripts\u002Ftree_operations.py prune rooted.nw pruned.nw --keep-taxa taxa_list.txt\n\n# Get statistics\npython scripts\u002Ftree_operations.py stats pruned.nw\n```\n\n### Use Case 3: Publication-Quality Figures\n\nCreate styled visualizations:\n\n```python\nfrom ete3 import Tree, TreeStyle, NodeStyle, TextFace\n\ntree = Tree(\"tree.nw\")\n\n# Define clade colors\nclade_colors = {\n    \"Mammals\": \"red\",\n    \"Birds\": \"blue\",\n    \"Fish\": \"green\"\n}\n\ndef layout(node):\n    # Highlight clades\n    if node.is_leaf():\n        for clade, color in clade_colors.items():\n            if clade in node.name:\n                nstyle = NodeStyle()\n                nstyle[\"fgcolor\"] = color\n                nstyle[\"size\"] = 8\n                node.set_style(nstyle)\n    else:\n        # Add support values\n        if node.support > 0.95:\n            support = TextFace(f\"{node.support:.2f}\", fsize=8)\n            node.add_face(support, column=0, position=\"branch-top\")\n\nts = TreeStyle()\nts.layout_fn = layout\nts.show_scale = True\n\n# Render for publication\ntree.render(\"figure.pdf\", w=200, units=\"mm\", tree_style=ts)\ntree.render(\"figure.svg\", tree_style=ts)  # Editable vector\n```\n\n### Use Case 4: Automated Tree Analysis\n\nProcess multiple trees systematically:\n\n```python\nfrom ete3 import Tree\nimport os\n\ninput_dir = \"trees\"\noutput_dir = \"processed\"\n\nfor filename in os.listdir(input_dir):\n    if filename.endswith(\".nw\"):\n        tree = Tree(os.path.join(input_dir, filename))\n\n        # Standardize: midpoint root, resolve polytomies\n        midpoint = tree.get_midpoint_outgroup()\n        tree.set_outgroup(midpoint)\n        tree.resolve_polytomy(recursive=True)\n\n        # Filter low support branches\n        for node in tree.traverse():\n            if hasattr(node, 'support') and node.support \u003C 0.5:\n                if not node.is_leaf() and not node.is_root():\n                    node.delete()\n\n        # Save processed tree\n        output_file = os.path.join(output_dir, f\"processed_{filename}\")\n        tree.write(outfile=output_file)\n```\n\n## Reference Documentation\n\nFor comprehensive API documentation, code examples, and detailed guides, refer to the following resources in the `references\u002F` directory:\n\n- **`api_reference.md`**: Complete API documentation for all ETE classes and methods (Tree, PhyloTree, ClusterTree, NCBITaxa), including parameters, return types, and code examples\n- **`workflows.md`**: Common workflow patterns organized by task (tree operations, phylogenetic analysis, tree comparison, taxonomy integration, clustering analysis)\n- **`visualization.md`**: Comprehensive visualization guide covering TreeStyle, NodeStyle, Faces, layout functions, and advanced visualization techniques\n\nLoad these references when detailed information is needed:\n\n```python\n# To use API reference\n# Read references\u002Fapi_reference.md for complete method signatures and parameters\n\n# To implement workflows\n# Read references\u002Fworkflows.md for step-by-step workflow examples\n\n# To create visualizations\n# Read references\u002Fvisualization.md for styling and rendering options\n```\n\n## Troubleshooting\n\n**Import errors:**\n\n```bash\n# If \"ModuleNotFoundError: No module named 'ete3'\"\nuv pip install ete3\n\n# For GUI and rendering issues\nuv pip install ete3[gui]\n```\n\n**Rendering issues:**\n\nIf `tree.render()` or `tree.show()` fails with Qt-related errors, install system dependencies:\n\n```bash\n# macOS\nbrew install qt@5\n\n# Ubuntu\u002FDebian\nsudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg\n```\n\n**NCBI Taxonomy database:**\n\nIf database download fails or becomes corrupted:\n\n```python\nfrom ete3 import NCBITaxa\nncbi = NCBITaxa()\nncbi.update_taxonomy_database()  # Redownload database\n```\n\n**Memory issues with large trees:**\n\nFor very large trees (>10,000 leaves), use iterators instead of list comprehensions:\n\n```python\n# Memory-efficient iteration\nfor leaf in tree.iter_leaves():\n    process(leaf)\n\n# Instead of\nfor leaf in tree.get_leaves():  # Loads all into memory\n    process(leaf)\n```\n\n## Newick Format Reference\n\nETE supports multiple Newick format specifications (0-100):\n\n- **Format 0**: Flexible with branch lengths (default)\n- **Format 1**: With internal node names\n- **Format 2**: With bootstrap\u002Fsupport values\n- **Format 5**: Internal node names + branch lengths\n- **Format 8**: All features (names, distances, support)\n- **Format 9**: Leaf names only\n- **Format 100**: Topology only\n\nSpecify format when reading\u002Fwriting:\n\n```python\ntree = Tree(\"tree.nw\", format=1)\ntree.write(outfile=\"output.nw\", format=5)\n```\n\nNHX (New Hampshire eXtended) format preserves custom features:\n\n```python\ntree.write(outfile=\"tree.nhx\", features=[\"habitat\", \"temperature\", \"depth\"])\n```\n\n## Best Practices\n\n1. **Preserve branch lengths**: Use `preserve_branch_length=True` when pruning for phylogenetic analysis\n2. **Cache content**: Use `get_cached_content()` for repeated access to node contents on large trees\n3. **Use iterators**: Employ `iter_*` methods for memory-efficient processing of large trees\n4. **Choose appropriate traversal**: Postorder for bottom-up analysis, preorder for top-down\n5. **Validate monophyly**: Always check returned clade type (monophyletic\u002Fparaphyletic\u002Fpolyphyletic)\n6. **Vector formats for publication**: Use PDF or SVG for publication figures (scalable, editable)\n7. **Interactive testing**: Use `tree.show()` to test visualizations before rendering to file\n8. **PhyloTree for phylogenetics**: Use PhyloTree class for gene trees and evolutionary analysis\n9. **Copy method selection**: \"newick\" for speed, \"cpickle\" for full fidelity, \"deepcopy\" for complex objects\n10. **NCBI query caching**: Store NCBI taxonomy query results to avoid repeated database access\n",{"name":5,"description":7},"main","2b749c82b5d11fac39d9a6e021ce3f5b8a541bd1","cli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fetetoolkit",3931,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates","https:\u002F\u002Faitmpl.com","https:\u002F\u002Fgithub.com\u002Fdavila7","https:\u002F\u002Fdanielavila.me","Building AI dev tools with LLMs","2026-11-14 06:14:46",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add davila7\u002Fclaude-code-templates --skill etetoolkit",{"tool":59,"command":60},"bunx","bunx skills add davila7\u002Fclaude-code-templates --skill etetoolkit",{"tool":62,"command":63},"pnpm","pnpm dlx skills add davila7\u002Fclaude-code-templates --skill etetoolkit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fetetoolkit\u002FSKILL.md",true,[67,73,77,81,87],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fapi_reference.md","REFERENCE","参考文档",12736,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fetetoolkit\u002Freferences\u002Fapi_reference.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fvisualization.md",19529,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fetetoolkit\u002Freferences\u002Fvisualization.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fworkflows.md",18933,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fetetoolkit\u002Freferences\u002Fworkflows.md",{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Fquick_visualize.py","SCRIPT","脚本",7156,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fetetoolkit\u002Fscripts\u002Fquick_visualize.py",{"path":88,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":89,"sourceHtmlUrl":90},"scripts\u002Ftree_operations.py",8235,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fetetoolkit\u002Fscripts\u002Ftree_operations.py",[92,121,148,181,216,239],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":101,"publishedAt":38},"01M70NHBTQ8BV0A2SCAZXEPHCX","wealthville-pool-scoring","Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter\u002FHold\u002FExit\u002FReduce\u002FAvoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fweb-data\u002Fwealthville-pool-scoring\u002FSKILL.md",[98],{"categoryNo":99,"categoryName":100,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[102,103,104,105,106,35,107,108,109,110,111,112,113,114,115,116,117,118,119,120],"scoring","pool","wealthville pool scoring","liquidity","which","exit","now","use","when","reduce","with","record","track","verdict","evm","solana","how","public","look",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":128,"publishedAt":38},"01M70MB6VR8ERJ4EM8D5KHBMEV","technical-debt-auditor","Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO\u002FFIXME\u002FHACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like \"where should I focus refactoring\", \"find code smells\", \"audit my codebase\", \"what technical debt do we have\", \"prioritize cleanup work\", or asks about code quality metrics. Also trigger when the user mentions \"code rot\", \"legacy cleanup\", \"refactoring priorities\", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say \"technical debt\" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftechnical-debt-auditor\u002FSKILL.md",[127],{"categoryNo":99,"categoryName":100,"taxonomyType":21,"taxonomyTypeDesc":22},[129,130,131,132,133,134,135,136,137,138,139,110,140,141,142,143,144,145,146,147],"technical debt","debt","technical","technical debt auditor","auditor","coverage","complexity","markers","project","cleanup","unused","code","todo","work","plan","focus","signals","audit","dependency",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":163,"publishedAt":38},"01M70KPYH9QNHCNME5GJQGE22K","readonly-sql-guard","Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production\u002FERP\u002Fanalytics database (a \"query\" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write\u002FDDL\u002Fside-effect\u002Ftransaction-escape risks. Checks what a statement CALLS, not just its shape.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdatabase\u002Freadonly-sql-guard\u002FSKILL.md",[154,157,158],{"categoryNo":155,"categoryName":156,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":99,"categoryName":100,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":159,"categoryName":160,"taxonomyType":161,"taxonomyTypeDesc":162},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[164,165,166,167,168,169,170,35,171,172,173,174,175,176,177,109,178,179,110,180],"readonly","guard","sql guard","sql","readonly sql guard","erp","effect","read-only","db","just","tool","calls","only","MCP","access","database","query",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":185,"licenseFileUrl":186,"sourceHtmlUrl":187,"categories":188,"keywords":192,"publishedAt":38},"01M6AFY6F7CC2BBZP1QD6VTNVC","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[189],{"categoryNo":190,"categoryName":191,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,35,215],"artifacts builder","web","web artifacts builder","artifacts","builder","state","routing","state management","component","css","frontend","ui","Tools","file","components","shadcn","react","Tailwind","suite","jsx","html","single-file","ui components",{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":185,"licenseFileUrl":220,"sourceHtmlUrl":221,"categories":222,"keywords":227,"publishedAt":38},"01M6AFWF33SFV9Z3SF4PEEE4BF","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[223,226],{"categoryNo":224,"categoryName":225,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":190,"categoryName":191,"taxonomyType":21,"taxonomyTypeDesc":22},[228,229,230,231,232,194,233,203,204,234,28,235,236,35,237,112,238],"webapp testing","testing","webapp","browser","playwright","applications","debugging","logs","screenshots","local","behavior",{"skillNo":240,"name":241,"nameZh":6,"description":242,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":185,"licenseFileUrl":243,"sourceHtmlUrl":244,"categories":245,"keywords":253,"publishedAt":38},"01M6AF67Q67JJJ5V51JR2P52KA","discernment-nudge","After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FSKILL.md",[246,249,250],{"categoryNo":247,"categoryName":248,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":99,"categoryName":100,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":251,"categoryName":252,"taxonomyType":161,"taxonomyTypeDesc":162},"01JBSEEDCAT000000000000036","内容创作者",[254,255,256,257,258,259,260,261,196,262,206,140,263,264,265,266,267,176,268,110,269,270,271,272,273,118,274],"discernment nudge","nudge","interpretation","help","run","reasoning","data","writing","lookup","content","review","conversation","short","up","invoke","you","analysis","claims","argument","assemble","recommendations"]