From datascience
Use this skill when implementing progress bars in Python scripts or notebooks. Covers tqdm (classic) and rich (modern) styles, library configuration, Jupyter compatibility, and completion fixes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/datascience:progressbarsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Progress bars for Python scripts and Jupyter.
Progress bars for Python scripts and Jupyter.
MANDATORY: ASK user which style (classic or modern) before implementing. Never assume.
Works everywhere - terminals, Jupyter, IDE. Renders native ipywidgets in Jupyter when ipywidgets installed.
Deps: tqdm, ipywidgets (Jupyter widgets)
Import: from tqdm.auto import tqdm - .auto auto-selects backend.
from tqdm.auto import tqdm
# determinate
for item in tqdm(items, desc="Processing", unit="file"):
process(item)
# with ThreadPoolExecutor
from concurrent.futures import ThreadPoolExecutor, as_completed
with ThreadPoolExecutor(max_workers=16) as executor:
futures = {executor.submit(fn, item): item for item in items}
for future in tqdm(as_completed(futures), total=len(futures), desc="Loading", unit="item"):
result = future.result()
Spinners, elapsed time, ETA. Terminals + Jupyter.
Deps: rich
from rich.progress import (
BarColumn, MofNCompleteColumn, Progress,
SpinnerColumn, TextColumn, TimeElapsedColumn,
)
with Progress(
SpinnerColumn(),
TextColumn("[steel_blue]{task.description}"),
BarColumn(bar_width=40),
MofNCompleteColumn(),
TimeElapsedColumn(),
refresh_per_second=10,
) as progress:
task = progress.add_task("Processing", total=len(items))
for item in items:
process(item)
progress.advance(task)
# force completion (prevents N-1 issue)
progress.update(task, completed=len(items))
progress.refresh()
progress.update(task, completed=total) then progress.refresh(). Defensive for sequential tootransient=True clears on context exit. transient=False (default) keeps visibletotal= doesn't match advance() count. Advance every iteration, even when skippingcompleted == total. Verify total matches iteration countrefresh_per_second=10 or call progress.refresh()progress.reset(task, total=...) per batchipywidgets = native widget barstqdm.auto (not tqdm.tqdm) for classic stylelogger.info() and print() bypass Jupyter display (stderr/stdout), causing messages to appear below or interleaved with rich Progress. Use rich.print() instead - shares Progress pipeline:
from rich import print as rprint
rprint(f"found {len(items)} items") # correct ordering guaranteed
with Progress(...) as progress:
task = progress.add_task("Processing", total=len(items))
...
[project]
dependencies = [
"tqdm", # classic progress bars
# or
"rich", # modern progress bars
]
[project.optional-dependencies]
dev = [
"ipywidgets", # tqdm widget rendering in Jupyter
]
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
npx claudepluginhub stellarshenson/claude-code-plugins --plugin datascience