kohulan/chemaudit/chemaudit-diagnostics
Claude Code and agent skill by kohulan/chemaudit
- community
Checking that the SKILL.md file is still in the repository.
Diagnose SMILES parse errors with position and fix suggestions, compare InChI strings layer-by-layer, check format round-trip lossiness (SMILES→InChI→SMILES and SMILES→MOL→SMILES), compare three standardization pipelines side-by-side, and pre-validate SDF/CSV files for structural integrity. Use when user says "why does this SMILES fail", "diagnose this structure", "InChI diff", "layer comparison", "round-trip check", "compare InChI strings", "file pre-validation", "SDF integrity", "M END missing", or "fix this SMILES error".
Install
npx vskill@latest install kohulan/chemaudit/chemaudit-diagnosticsSKILL.md
ChemAudit Diagnostics
Overview
Five targeted diagnostic endpoints. Each answers a different "why didn't this work?" question.
| Endpoint | Answers | |
|---|---|---|
POST /api/v1/diagnostics/smiles | "Why does this SMILES fail to parse?" | |
POST /api/v1/diagnostics/inchi-diff | "How do these two InChI strings differ?" | |
POST /api/v1/diagnostics/roundtrip | "Does this SMILES survive a round-trip through InChI (or MOL)?" | |
POST /api/v1/diagnostics/cross-pipeline | "Do three different standardization pipelines agree?" | |
POST /api/v1/diagnostics/file-prevalidate | "Is this SDF/CSV structurally sound before batch upload?" |
Workflow
1. SMILES error diagnostics (DIAG-01)
Uses a dual strategy: RDKit DetectChemistryProblems for parseable-but-problematic SMILES, log-capture for unparseable SMILES. Returns error type, character position, and ranked fix suggestions.
Response:
Error types returned: unmatched_bracket, valence_error, ring_closure_mismatch, unknown_atom_symbol, invalid_charge, parse_error.
For valid-but-suspicious SMILES, valid: true with populated warnings[] (RDKit chemistry warnings, e.g. kekulization issues).
2. InChI layer diff (DIAG-02)
Pure string comparison — no RDKit. Parses each InChI into its constituent layers and produces a per-layer diff table.
Response:
Great for answering "same compound, stereo-defined vs racemic?" at a glance — rows with match=false isolate the exact disagreement.
3. Format round-trip (DIAG-03)
Does the molecule survive conversion to an intermediate and back?
Response:
When lossy:
Loss types: stereo, charge, isotope.
4. Cross-pipeline standardization comparison (DIAG-04)
Runs the molecule through three pipelines and compares outputs. Useful for picking which pipeline to use on a new dataset, or diagnosing why standardized SMILES disagree between sources.
Response:
highlight_atoms / highlight_bonds mark atoms outside the cross-pipeline MCS — useful for rendering a side-by-side visual diff in the UI.
5. File pre-validation (DIAG-05)
Catches file-level problems before you pay the cost of a batch upload.
Response (SDF):
Response (CSV):
Issue types: missing_m_end, malformed_count_line, encoding_fallback, encoding_error, suspicious_content, missing_smiles_column, empty_rows, empty_file, duplicate_columns.
Severity levels: error, warning, info. valid=false only when at least one error severity appears — warnings don't block validity.
Max upload size: 50 MB (hard-coded in this endpoint).
Examples
Example 1 — "This SMILES fails to parse; what's wrong?"
POST /diagnostics/smileswith the bad SMILES.- Read
errors[0].error_typeandmessage— tells you what. - Read
errors[0].position— tells you where in the string. - Try
errors[0].suggestions[0].corrected_smiles— first suggestion is ranked highest confidence.
Example 2 — "I have two InChI strings for the 'same' compound — are they really the same?"
POST /diagnostics/inchi-diffwith both.- Check
identical— iftrue, you're done. - If
false, scanlayer_rows[]for rows withmatch=false. Formula differences mean different compounds; only stereo/isotope differences mean "same skeleton, different specification".
Example 3 — "Will my dataset survive saving as an SDF?"
- For each distinct SMILES,
POST /diagnostics/roundtripwithroute="smiles_mol_smiles". - Any entry with
lossy=truemeans something will be lost when saving. Thelosses[]array tells you what. - Stereo loss is the most common — MOL v2000 handles it poorly for some R/S cases. If it matters, save as SDF v3000 or export as SMILES instead.
Example 4 — "Pre-flight an SDF before a 10k-molecule batch"
POST /diagnostics/file-prevalidatewith the file.- If
valid=true, go straight to/batch/upload. - If
valid=false, fix eachseverity=errorissue; warnings can be ignored at your discretion. Common fix: appendM ENDto blocks missing it, or re-save from RDKit.
Rate limits
/diagnostics/smiles,/diagnostics/inchi-diff,/diagnostics/roundtrip: 30/min./diagnostics/cross-pipeline,/diagnostics/file-prevalidate: 10/min.
Troubleshooting
400 "Invalid characters in SMILES string"
The validator blocks < > & ; | $ \`. These chars are never valid in SMILES — strip client-side.
errors[] is empty but valid=false
Rare but possible for cases where the parse error is in the RDKit C++ layer with no accompanying log message. Try /standardize to see if the ChEMBL pipeline's error message is more informative.
Round-trip shows lossy for SMILES that "should" work
Check losses[].type:
stereo: the intermediate format doesn't encode your stereo (e.g. atropisomerism).isotope: InChI's optional isotope layer was dropped in the round trip (shouldn't happen with standard InChI but occasionally does on edge cases).charge: MOL v2000 loses some charge states.
Cross-pipeline: all three disagree
Usually means the input is unusual (organometallic, radical, mixture). Treat each pipeline's output as "one opinion of many" and pick the one matching the source database's convention (ChEMBL for ChEMBL-derived data, RDKit for exotic cases).
File pre-validation: encoding_fallback warning
The file wasn't valid UTF-8; the validator fell back to Latin-1 and succeeded. Usually fine but worth noting — re-save as UTF-8 if you'll reuse the file.
File pre-validation: suspicious_content
Pattern-matched against script/macro patterns. False positives happen on legitimate SMILES containing <, >, or similar characters (rare). Audit-logged server-side regardless.
Further reading
chemaudit-molecule-validation— for check-level issues once a SMILES parses.chemaudit-standardization— for the ChEMBL-style standardization pipeline.chemaudit-batch-validation— pair/file-prevalidatewith/batch/upload.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/chemaudit-diagnostics/SKILL.md
Popularity
- Repository stars
- 63
- Repository forks
- 7
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kohulan/chemaudit/chemaudit-diagnostics)