claude_plugin/skills/sciris-utils/SKILL.md
Use when working with Sciris miscellaneous utilities — sc.mergedicts, sc.mergelists, sc.tolist, sc.toarray, sc.isnumber, sc.suggest, sc.download, sc.runcommand, sc.importbypath, sc.loadtext, sc.help, sc.traceback, sc.autolist, sc.pp, or type checking/conversion.
npx skillsauth add sciris/sciris sciris-utilsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference for type handling, downloading, and other tools. See full tutorial: docs/tutorials/tut_utils.ipynb.
If you need more detail, use your MCP tools (Context7 or GitMCP) to look up current Sciris documentation, or consult the other Sciris skills.
def my_func(json=None, **kwargs):
default = dict(a=1, b=2)
output = sc.mergedicts(default, json, kwargs) # None inputs are OK
return output
sc.mergelists(['a', 'b'], 'c', None, {'d': 1}) # ['a', 'b', 'c', {'d': 1}]
sc.tolist('single') # ['single'] — safe to iterate
sc.tolist(['already']) # ['already'] — unchanged
sc.toarray(2) # array([2]) — handles scalars (np.array doesn't)
sc.toarray([1, 2, 3]) # array([1, 2, 3])
sc.cat(1, [2, 3], np.array([4, 5])) # array([1, 2, 3, 4, 5]) — concatenates
output = sc.autolist()
for item in data:
output += f'Result: {item}' # Appends automatically with +=
sc.isnumber(3) # True
sc.isnumber(3.14j) # True
sc.isnumber('3') # False
sc.suggest('Scirys', ['Python', 'NumPy', 'Sciris'], n=2) # ['Sciris']
data = sc.download(urls, save=False) # Download to memory (parallel)
sc.download(urls, save=True) # Download to disk
out = sc.runcommand('ls *.py', printoutput=True) # Use instead of Popen()
old = sc.importbypath('sim_v1/sim.py') # Import without sys.path
new = sc.importbypath('sim_v2/sim.py') # Two modules with same name
sc.help('interpol') # Search all Sciris source code
sc.help('interpol', context=True) # With surrounding context
sc.traceback() # Get exception traceback as string
sc.loadtext('file.py') # Load text file as string
sc.pp(obj) # Pretty-print any object
development
Use when printing or formatting output with Sciris — sc.heading, sc.printgreen, sc.printblue, colored output, sc.strjoin, sc.newlinejoin, sc.pr, sc.prettyobj, sc.indent, sc.progressbar, sc.printmedian, or monitoring loop progress.
development
Use when plotting with Sciris or Matplotlib — sc.options, sc.dateformatter, sc.commaticks, sc.SIticks, sc.boxoff, sc.setylim, sc.figlayout, sc.getrowscols, sc.vectocolor, sc.gridcolors, sc.scatter3d, sc.savefig, plot styles (sciris.simple, sciris.fancy), colormaps (parula, orangeblue), or 3D plotting.
development
Use when parallelizing code or profiling performance with Sciris — sc.parallelize, sc.Parallel, iterarg, iterkwargs, maxcpu, maxmem, async parallelization, sc.profile, sc.benchmark, sc.memload, sc.checkram, line profiling, or CPU/memory monitoring.
development
Use when the user needs to implement a basic Sciris features — finding array values, plotting with date formatting, objdict containers, saving/loading objects, or parallelization.