Summary
The InSituPy MCP server currently provides Claude with dynamic, on-demand access to API documentation, source code, and workflows at runtime. A complementary Claude skill (a SKILL.md file) would make this knowledge available upfront - without requiring tool calls - improving response quality and reducing latency for common coding tasks.
Motivation
- The MCP server requires a running process and tool calls for every lookup
- A skill bakes in the most important patterns so Claude "knows" them before writing any code
- Skills and the MCP server are complementary: skill for common patterns, MCP for deep/dynamic introspection
- Reduces the need to re-explain InSituPy conventions in every chat session
Proposed Strategy
Phase 1 - Content extraction
Use the MCP server's own tools to generate the skill content:
get_workflow_guide → Standard workflows section
get_public_api → API overview and submodule structure
get_plotting_api → Plotting conventions
get_preprocessing_api → Preprocessing conventions
get_tools_api → Analysis tools
get_data_model → InSituData/InSituExperiment structure
get_io_formats → Supported input formats
get_result_types → Output object patterns
get_spatialdata_api → SpatialData interoperability
get_interactive_guide → napari viewer usage
get_datasets_guide → Sample datasets for examples
Phase 2 - Distillation
Condense the raw output into a concise SKILL.md with these sections:
- When to use this skill - trigger description for Claude's routing
- Core data model -
InSituData, InSituExperiment, key attributes (cells.table, images, annotations)
- Common workflows - read → preprocess → cluster → visualize, multi-sample DGE, image registration
- API conventions - submodule shorthands (
ispy.pl, ispy.pp, ispy.tl, ispy.io, ispy.im), parameter naming patterns
- Key gotchas - lazy loading behavior, pixel size requirements, segmentation layer switching, AnnData access patterns
- SpatialData interoperability - conversion patterns
- Code examples - one representative snippet per major workflow
Phase 3 - Integration and testing
- Place
SKILL.md in /mnt/skills/user/insitupy/ (or repo equivalent)
- Test by prompting Claude with typical InSituPy tasks and verifying it applies patterns correctly without needing MCP tool calls
- Iterate: add gotchas and examples discovered during testing
Notes
- The skill should be kept concise - ideally under ~500 lines - to avoid bloating Claude's context
- The MCP server remains valuable for deep lookups (source code, full docstrings, test files) that don't belong in a skill
- The skill can be regenerated periodically as the API evolves, using the same MCP-based extraction approach
Summary
The InSituPy MCP server currently provides Claude with dynamic, on-demand access to API documentation, source code, and workflows at runtime. A complementary Claude skill (a
SKILL.mdfile) would make this knowledge available upfront - without requiring tool calls - improving response quality and reducing latency for common coding tasks.Motivation
Proposed Strategy
Phase 1 - Content extraction
Use the MCP server's own tools to generate the skill content:
Phase 2 - Distillation
Condense the raw output into a concise
SKILL.mdwith these sections:InSituData,InSituExperiment, key attributes (cells.table,images,annotations)ispy.pl,ispy.pp,ispy.tl,ispy.io,ispy.im), parameter naming patternsPhase 3 - Integration and testing
SKILL.mdin/mnt/skills/user/insitupy/(or repo equivalent)Notes