Agent skill

Add Module

by bactopia in bactopia/bactopia

Scaffold a new Bactopia module from a bioconda/conda-forge package.

MITAuto-check passed

Install Add Module

skills CLI
$ npx skills add bactopia/bactopia --skill add-module -a claude-code

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

GitHub CLI
$ gh skill install bactopia/bactopia add-module --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/bactopia/bactopia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-module .claude/skills/add-module && 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
add-module
GitHub stars
522
Token cost
~3.1k tokens
SKILL.md length
1,251 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Scaffold a new Bactopia module from a bioconda/conda-forge package.

  • Works in 4 steps: Package Verification → Tool Design → File Generation → …
  • Asked to add a new module
  • SKILL.md covers Prerequisites, Interactive Questioning, Phased Workflow and Edge Cases, plus 1 more section
  • Calls bash

What it does

Add Module is an agent skill from bactopia/bactopia. Scaffold a new Bactopia module from a bioconda/conda-forge package. Creates main.nf, module.config, schema.json, and test files following project standards. Use when asked to add a new module, create a new module, scaffold module files, or add a new tool's module.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A flexible pipeline for complete analysis of bacterial genomes. The licence is MIT.

When your agent uses it

  • Asked to add a new module
  • Create a new module
  • Scaffold module files
  • Add a new tools module

Example prompts

  • “/add-module”

Requirements

  • Docker

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Package Verification
  2. Tool Design
  3. File Generation
  4. Review & Customize

What it can do on your machine

Read from SKILL.md and the folder at commit 29fb741. 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

    Shell commands in SKILL.md call:

    • bash

    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

Add Module loads about 3.1k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 1,251 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

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 bactopia/bactopia at commit 29fb741, republished under its MIT licence (© bactopia). 1,251 words, ~3,134 tokens.

Download SKILL.mdSave it as .claude/skills/add-module/SKILL.md (or your agent's skills folder).
name
add-module
description
Scaffold a new Bactopia module from a bioconda/conda-forge package. Creates main.nf, module.config, schema.json, and test files following project standards. Use when asked to add a new module, create a new module, scaffold module files, or add a new tool's module.

Add Module

Scaffold a complete Bactopia module for a bioconda/conda-forge package, creating all required files with GroovyDoc documentation and nf-test tests.

Prerequisites

Before using this skill, read:

  • .agents/docs/standards/05-module-documentation.md -- Module standards including module.config, schema.json, and test templates
  • .agents/docs/project/04-testing-framework.md -- Testing framework details

Interactive Questioning

This skill is interactive -- ask the user early and often, especially before creating files.

  • Multiple questions at once: Use AskUserQuestion popups (up to 4 questions per batch). Mark the recommended option with "(Recommended)" at the end of its label and place it first.
  • Single simple question: Just ask in chat, no popup needed.
  • When in doubt: Ask. It's cheaper to clarify upfront than to regenerate files.

Phased Workflow

Follow these phases in order. When unsure about ANYTHING, ask the user rather than guess.


Phase 1: Package Verification

Goal: Confirm the bioconda package exists and retrieve version/container information.

  1. Ask the user for the bioconda package name (e.g., mlst, bakta, ssuissero).

  2. Ask: Is this a standalone module or part of a multi-process set?

    • Standalone: files go in modules/{tool}/
    • Multi-process: files go in modules/{tool}/{process}/ (e.g., modules/bakta/run/)
    • If multi-process: ask which process this is (run, download, summary, collate, etc.)
  3. Run the lookup command:

    bash
    bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh lookup {package_name} --bactopia-path . --pretty
  4. The output includes:

    • package, channel, version, build -- package identity
    • summary, home -- tool description and documentation URL
    • container_refs -- toolName, docker, image strings
    • existing_components.module -- whether the module already exists
  5. Present findings to the user and ask them to confirm before proceeding. If the module already exists, warn the user.


Phase 2: Tool Design

Goal: Gather all design decisions using interactive prompts so files can be generated coherently.

Important: Use the AskUserQuestion tool for structured choices throughout this phase. Present up to 4 questions per batch. Mark the recommended option (based on WebFetch findings) with "(Recommended)" at the end of its label and place it first in the options list.

  1. Fetch the tool's documentation using WebFetch on the home URL from Phase 1.

    • Extract: command-line options, input file types, output files, version command
    • If WebFetch fails, ask the user directly
  2. Batch 1: Core design choices (AskUserQuestion, up to 4 questions)

    Based on WebFetch findings, ask these structured questions:

    Question 1 -- Input type:

    Input TypeRecord fields
    Assemblyrecord(meta: Record, fna: Path)
    Readsrecord(meta: Record, r1: Path?, r2: Path?, se: Path?, lr: Path?)
    Assembly + readsAssembly record + reads on separate lines
    Alignmentrecord(meta: Record, aln: Path)
    Download / no inputNo record input

    Options (pick top 3 most relevant, "Other" is auto-added for the rest):

    • Assembly -- takes FASTA assembly files
    • Reads -- takes FASTQ read files
    • Assembly + Reads -- takes both FASTA and FASTQ

    Question 2 -- Database requirement:

    • No database needed
    • Yes, requires a user-provided database

    Question 3 -- Resource label:

    • process_low -- 4 CPU, 8GB, 4h (default for most tools)
    • process_medium -- 8 CPU, 32GB, 12h (BLAST-based, database searches)
    • process_high -- 12 CPU, 64GB, 24h (memory-intensive)
    • process_single -- 1 CPU, 4GB, 2h (single-threaded only)

    Question 4 -- Compressed input:

    • Yes, handles .gz natively
    • No, needs decompression first
  3. Run test-data discovery based on the input type selected in Batch 1:

    bash
    bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {input_type} --bactopia-path . --pretty

    This returns species/accession combinations already used by similar modules, with pre-computed test_data_path, test_uncompressed_path, test_species, and test_sample_id values. Use the returned paths directly in the scaffold config (Phase 3) -- do NOT construct paths manually.

  4. Batch 2: Outputs, parameters, and test data (AskUserQuestion, up to 3 questions)

    Question 1 -- Output files: Present what WebFetch found. Ask the user to confirm file extensions, descriptions, and whether each is single (file()) or multiple (files()).

    Question 2 -- User parameters: Only flags representing user-meaningful analysis choices (identity thresholds, scheme selection, algorithm toggles). Exclude infrastructure params (see below).

    Question 3 -- Test data species: Present top 3-4 species from the test-data discovery results. Recommend species that exercise the tool's functionality. Include the accession in each option's description.

  5. Present auto-detected details for confirmation.

    After the structured choices, present these findings from WebFetch in a summary and ask the user to confirm or request changes:

    • Tool identity: name (snake_case), display name, one-sentence description
    • Version command: how the tool reports its version
    • Citation key and keywords for GroovyDoc

    Infrastructure vs. user parameters (do NOT expose these):

    Tool flagWired toWhere
    --prefix, --label, --sample-name, etc.prefix variable (task.ext.prefix ?: "${_meta.name}")Shell block
    --threads, --cpus, -t, -p, etc.${task.cpus}Shell block or ext.args in module.config
    --output, --outdir, -o, etc.Usually . or ${prefix}Shell block

    These are written directly in the module's shell block (e.g., --prefix ${prefix}, --threads ${task.cpus}). The prefix variable is set in every module's script block as prefix = task.ext.prefix ?: "${_meta.name}" and carries the sample name.

    Only expose flags that represent user-meaningful analysis choices.

    Every user parameter MUST be prefixed with the tool name: {tool}_{param}.

    Parameter defaults:

    • Do NOT assume a default is needed. Ask the user whether each parameter should have a specific default value.
    • If a string parameter needs a default, use an empty string "", never null.
    • Only include a parameter in the config's "parameters" array if the user confirms it should be exposed.
  6. Final confirmation (AskUserQuestion, 1 question)

    After presenting the summary, ask:

    • Looks good, proceed to file generation
    • I need to make changes (user provides details via "Other" or notes)

Show full SKILL.md (510 more words)Show less
Phase 3: File Generation

Goal: Generate the 6 module files using bactopia-scaffold.

  1. Construct the JSON config from the design decisions. Write it to /tmp/scaffold-config.json:

    json
    {
        "tool": "{tool_name}",
        "display_name": "{DisplayName}",
        "description": "{One-sentence description}",
        "process_name": "{TOOL_NAME}",
        "package": "{package_name}",
        "version": "{version}",
        "build": "{build}",
        "home_url": "{github_url}",
        "input_type": "assembly",
        "has_database": false,
        "handles_gz": false,
        "layout": "flat",
        "resource_label": "process_low",
        "version_command": "{version_command}",
        "citation_key": "{citation_key}",
        "keywords": ["{keyword1}", "{keyword2}"],
        "aggregation": {"strategy": "none"},
        "outputs": [
            {"name": "{field}", "extension": "{ext}", "description": "{desc}"}
        ],
        "parameters": [
            {"name": "{tool}_{param}", "type": "{type}", "default": "{default}", "description": "{desc}", "flag": "{--flag}"}
        ],
        "container_refs": {
            "toolName": "{from lookup}",
            "docker": "{from lookup}",
            "image": "{from lookup}"
        },
        "test_species": "{species}",
        "test_sample_id": "{sample_id}",
        "test_data_path": "{compressed_path}",
        "test_uncompressed_path": "{uncompressed_path}"
    }
  2. Run the scaffold command:

    bash
    bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh module --config /tmp/scaffold-config.json --bactopia-path . --pretty
  3. The command creates 6 files:

    • modules/{tool}/main.nf
    • modules/{tool}/module.config
    • modules/{tool}/schema.json
    • modules/{tool}/tests/main.nf.test
    • modules/{tool}/tests/nextflow.config
    • modules/{tool}/tests/nf-test.config

Phase 4: Review & Customize

Goal: Review generated files and make tool-specific adjustments.

  1. Module main.nf -- the shell script block is a placeholder. Customize:

    • The actual tool command, flags, and I/O handling
    • Input decompression logic (if the tool doesn't handle .gz)
    • Database extraction logic (if database-dependent)
    • Always preserve the # Cleanup comment line -- even if empty, it marks where cleanup steps go and keeps the shell block structure consistent across all modules
    • Version extraction command
  2. Module module.config -- review the ext.args construction:

    • Verify boolean/string/integer flag handling is correct for each parameter
    • Add any fixed flags (e.g., --threads ${task.cpus})
  3. schema.json -- verify parameter types and defaults match module.config

  4. Test files -- verify test data paths and snapshot fields

  5. Run the linter to catch structural issues before proceeding:

    bash
    bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh {tool} --bactopia-path .

    This runs bactopia-lint scoped to the new module. Fix any FAILs before moving on. Common issues:

    • JS005: type/default mismatch in schema.json (e.g., type=string but default=null)
    • M035: citation key not found in data/citations.yml
  6. Update data/citations.yml -- add the tool citation entry in alphabetical order:

    yaml
    {tool}:
      name: "{ToolName}"
      link: "{github_url}"
      description: "{One-sentence description}"
      cite: "{Full citation text}"
  7. List all created files with full paths.

  8. Remind the user to run these follow-up steps in order:

    1. /run-tests {tool} module --generate -- generate snapshots and verify the module test passes (new modules have no existing snapshots)
    2. If this module is part of a subworkflow, use /add-subworkflow next
    3. If this is a standalone bactopia-tool, use /add-bactopia-tool instead (it handles all tiers)

    The --generate flag is required because newly scaffolded modules have no snapshot files yet. Without it, nf-test will fail immediately on missing snapshots.


Edge Cases

  1. Multi-process modules: For nested layouts (modules/{tool}/run/, modules/{tool}/summary/), the scaffold command currently generates flat layout. Manually move files to the nested structure after generation.

  2. No build string: Container URLs will contain TODO_BUILD placeholders.

  3. Multi-package tools (mulled containers): Container URLs cannot be auto-constructed. Flag for manual review.

Test Data Discovery

Test data paths are discovered dynamically from existing module tests using:

bash
bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {type} --bactopia-path . --pretty

This scans modules/*/tests/main.nf.test for paths matching the input type and returns pre-computed template variables. Always use the discovered paths -- never construct test data paths manually. The output includes test_data_path (compressed, for subworkflow tests), test_uncompressed_path (for module tests), test_species, and test_sample_id.

Supported input types: assembly, reads, assembly_reads, proteins, gff, genbank.

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

Files

Just SKILL.md in .agents/skills/add-module of bactopia/bactopia.

Open the folder on GitHubat commit 29fb741

Compare with similar skills

Add Module 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.

Add Module compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Module this skillbactopia/bactopia522—~3.1kAutomated safety check: PassMIT
Scaffoldingdotnet/efcore15k—~165Automated safety check: PassMIT
Module Scaffolderaiskillstore/marketplace430—~846Automated safety check: NotesNone
Scaffold Elementremotion-dev/remotion62k—~202Automated safety check: PassCustom licence
Es Modulesthedaviddias/Front-End-Checklist74k—~482Automated safety check: PassMIT
Power Apps Code App Scaffoldgithub/awesome-copilot40k1 repos~1.8kAutomated safety check: PassMIT

Similar skills

  • Scaffolding

    dotnet/efcore

    Official

    Implementation details for EF Core scaffolding (reverse engineering).

    15k GitHub stars~165 tokensUpdated yesterday
    SecurityAuto-check passed
  • Module Scaffolder

    aiskillstore/marketplace

    Scaffolds new feature modules in DevPrep AI following the 6-folder architecture with proper TypeScript interfaces, path aliases, and quality standards.

    430 GitHub stars~846 tokensUpdated today
    DevelopmentAuto-check: notes
  • Scaffold Element

    remotion-dev/remotion

    Official

    Scaffold a new Remotion Element for development in the docs Remotion Studio.

    62k GitHub stars~202 tokensUpdated today
    Media & CreativeAuto-check passed
  • Es Modules

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Use ES modules (import/export).

    74k GitHub stars~482 tokensUpdated yesterday
    Auto-check passed
  • Power Apps Code App Scaffold

    github/awesome-copilot

    Official

    Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration

    40k GitHub starsUsed in 1 repo~1.8k tokens
    DevelopmentAuto-check passed
  • SaaS Scaffolder

    alirezarezvani/claude-skills

    Generates complete, production-ready SaaS project boilerplate including authentication, database schemas, billing integration, API routes, and a working dashboard using Next.js 14+ App Router…

    28k GitHub starsUsed in 1 repo~2.6k tokens
    DatabasesAuto-check passed

More from bactopia/bactopia

All 15 skills in this repo
  • Add Bactopia Tool

    bactopia/bactopia

    Scaffold a complete Bactopia Tool across all three tiers -- module, subworkflow, and workflow entry point under workflows/bactopia-tools/.

    522 GitHub stars~4.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Bump Versions

    bactopia/bactopia

    Propagate the Bactopia and nf-bactopia versions declared in versions.yml into the hand-maintained files that carry a literal version (conf/testbase.config, CITATION.cff, bin/bactopia…

    522 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Merge Schemas

    bactopia/bactopia

    Regenerate nextflow.config and nextflowschema.json for Bactopia workflows by running bactopia-merge-schemas.

    522 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Project Status

    bactopia/bactopia

    Show a live snapshot of the Bactopia project state — component counts, GroovyDoc coverage, nf-test coverage, and structural issues.

    522 GitHub stars~787 tokensUpdated 2 mo ago
    Auto-check passed
  • Release Checklist

    bactopia/bactopia

    Audit whether Bactopia is ready for a version release and produce a GO / NO-GO recommendation report.

    522 GitHub stars~4.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Review Citations

    bactopia/bactopia

    Review citation integrity across data/citations.yml and @citation tags using bactopia-citations --validate.

    522 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Add Module

What does Add Module do?

Scaffold a new Bactopia module from a bioconda/conda-forge package. Add Module is an agent skill from bactopia/bactopia. Scaffold a new Bactopia module from a bioconda/conda-forge package.

When should I use Add Module?

Add Module fits situations like: asked to add a new module; create a new module; scaffold module files; add a new tools module.

How do I install Add Module in Claude Code?

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

How do I install Add Module in Codex?

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

Can I use Add Module 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 bactopia/bactopia --skill add-module -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-module, .gemini/skills/add-module, .github/skills/add-module and .opencode/skills/add-module in your project.

What does Add Module need to run?

Going by SKILL.md and its folder, Add Module needs the command-line tools its instructions call (bash). Our summary lists: Docker.

Does Add Module 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 Add Module 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 Add Module use?

Add Module is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Module use?

About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Module?

Skills that share tags, products or a category with Add Module: Scaffolding (dotnet/efcore, 15k stars), Module Scaffolder (aiskillstore/marketplace, 430 stars), Scaffold Element (remotion-dev/remotion, 62k stars) and Es Modules (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Module?

bactopia (a GitHub organization) maintains it in bactopia/bactopia, which has 522 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on August 5, 2026.

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