Skip to content

feat: Add Claude skill for generating Allotropy parsers#1160

Merged
nathan-stender merged 7 commits into
mainfrom
feat/add-parser-generator-skill
May 11, 2026
Merged

feat: Add Claude skill for generating Allotropy parsers#1160
nathan-stender merged 7 commits into
mainfrom
feat/add-parser-generator-skill

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a Claude skill to help developers quickly generate complete Allotropy instrument parsers from example input files
  • The skill analyzes files, suggests appropriate schemas, and generates all necessary boilerplate code
  • Includes three main scripts: analyze_file.py, list_schemas.py, and create_parser.py

Features

  • File Analysis: Automatically detects file format and suggests appropriate Allotrope schema based on content
  • Schema Discovery: Lists all available schemas with filtering and shows example parsers
  • Parser Generation: Creates complete parser structure with reader, structure, tests, and all required files
  • Smart Detection: Recognizes measurement types (absorbance, CT values, pH, etc.) to suggest the right schema

Files Added

  • .claude/skills/parser-generator/skill.md - Main skill definition for Claude
  • .claude/skills/parser-generator/README.md - Documentation for using the skill
  • .claude/skills/parser-generator/scripts/analyze_file.py - Analyzes input files and suggests schemas
  • .claude/skills/parser-generator/scripts/list_schemas.py - Lists available Allotrope schemas
  • .claude/skills/parser-generator/scripts/create_parser.py - Generates complete parser structure
  • .claude/.ruff.toml - Ruff configuration for Claude skill scripts

Usage

  1. Analyze a file: python .claude/skills/parser-generator/scripts/analyze_file.py <file>
  2. List schemas: python .claude/skills/parser-generator/scripts/list_schemas.py [filter]
  3. Generate parser: python .claude/skills/parser-generator/scripts/create_parser.py <name> "<Display Name>"

Test Plan

  • Tested file analysis on Excel files (Exp6.xlsx)
  • Tested schema listing with filtering
  • All linting checks pass
  • Scripts are executable

This skill will significantly speed up the process of adding new instrument parsers to the allotropy library.

🤖 Generated with Claude Code

nathan-stender and others added 4 commits March 31, 2026 15:23
This skill helps developers quickly generate complete Allotropy instrument parsers from example input files.

Features:
- Analyzes input files to auto-detect appropriate Allotrope schemas
- Lists all available schemas with filtering and example parsers
- Generates complete parser structure with all required files
- Creates test files and directory structure
- Supports Excel, CSV, and text file formats

The skill includes three main scripts:
1. analyze_file.py - Analyzes input files and suggests schemas
2. list_schemas.py - Lists available Allotrope schemas from the repository
3. create_parser.py - Generates complete parser with reader, structure, and tests

Co-Authored-By: Claude Opus 4.1 <noreply@anthropic.com>
- Fix bare except clauses to use Exception
- Add .ruff.toml to allow print statements in CLI scripts
- Apply black formatting

Co-Authored-By: Claude Opus 4.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.1 <noreply@anthropic.com>
- Add type: ignore comments for CLI scripts
- Update ruff config to use extend-ignore
- Fix syntax error in analyze_file.py
- Allow long lines (E501) in CLI scripts

Co-Authored-By: Claude Opus 4.1 <noreply@anthropic.com>
@nathan-stender
nathan-stender requested review from a team and slopez-b as code owners April 1, 2026 14:55
@nathan-stender
nathan-stender merged commit bc1fc2b into main May 11, 2026
9 checks passed
@nathan-stender
nathan-stender deleted the feat/add-parser-generator-skill branch May 11, 2026 19:41
nathan-stender added a commit that referenced this pull request May 19, 2026
### Added

- Add Claude skill for generating Allotropy parsers (#1160)

### Fixed

- Support bare UV curve name in Cytiva Unicorn parser (#1200)
- Handle transposed flow cell format in Biacore Insight parser (#1199)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants