Skip to content

Trim SKILL.md from 791 to 684 lines (1.7.1) - #32

Open
fedorov wants to merge 1 commit into
mainfrom
trim-skill-md
Open

Trim SKILL.md from 791 to 684 lines (1.7.1)#32
fedorov wants to merge 1 commit into
mainfrom
trim-skill-md

Conversation

@fedorov

@fedorov fedorov commented Jul 31, 2026

Copy link
Copy Markdown
Member

SKILL.md grew to 791 lines in 1.7.0 with the MCP section, reversing the reduction trend since v1.5.0 (862 → 773 → 750). The guidance refactor.md has been tracking is under 500 lines, with a Phase 2 target of ~600.

791 → 684 lines (−13.5%), 15 code blocks.

Nearly all relocation, not deletion

  • The three "what's new in IDC vX" queries move to a new Version Tracking section in references/sql_patterns.md. SKILL.md keeps the part that prevents mistakes — use series_init_idc_version / series_revised_idc_version, never prior_versions_index — as a pointer.
  • The repeated from idc_index import IDCClient / client = IDCClient() preamble is dropped from six examples and stated once in the Overview. This matches how sql_patterns.md is already written.
  • The second filter-value-discovery query duplicated the BodyPartExamined idiom already at sql_patterns.md:38-43. The flat-dirTemplate and source_bucket_location="gcs" download variants are now prose beside the canonical example.
  • The DICOMweb endpoint table, the citations_from_selection parameter list, and the downloaded-file-naming bullets are condensed to prose; the full endpoint details remain in references/dicomweb_guide.md.
  • Deduplicated the two references/bigquery_guide.md pointers in "Advanced Queries with BigQuery".

Deliberately kept

The cloud storage bucket table stays inline. cloud_storage_guide.md:23-25 does carry it verbatim, so compressing it wouldn't lose anything from the skill as a whole — but the table carries the CC BY-NC distinction that the license workflow depends on, and the compressed wording dropped the idc-open-data-two head-scans bucket entirely.

~600 is not reachable without deleting content rather than relocating it. What remains in the largest sections is anti-footgun guidance (the two download-method signatures, the "takes filter kwargs, NOT a DataFrame" warning) and decision tables, not redundant examples. refactor.md records this rather than leaving the target looking silently missed.

Test docstrings

Five test docstrings referenced SKILL.md sections by number (§1, §2, …), which is opaque without the file open. They now name the section. One was stale: "§6 Batch Processing" — section 6 has been Advanced Queries with BigQuery since batch processing moved to use_cases.md in v1.6.0.

Testing

Run against idc-index 0.12.5 / idc-index-data 24.2.2 / pandas 3.0.5:

Suite Result
tests/test_snippets.py 98 passed (5m31s)
tests/test_mcp_server.py 8 passed

The version guard (SKILL.md frontmatter ↔ check_version.py) passes at 1.7.1.

🤖 Generated with Claude Code

SKILL.md grew to 791 lines in 1.7.0 with the MCP section, reversing the
reduction trend since v1.5.0 (862 -> 773 -> 750). The guidance the repo has
been tracking is under 500 lines, with a Phase 2 target of ~600.

Nearly all of this is relocation, not deletion:

- The three "what's new in IDC vX" queries move to a new Version Tracking
  section in sql_patterns.md. SKILL.md keeps the guidance that prevents
  mistakes: use series_init_idc_version / series_revised_idc_version, never
  prior_versions_index.
- The repeated `from idc_index import IDCClient` / `client = IDCClient()`
  preamble is dropped from six examples and stated once in the Overview,
  matching how sql_patterns.md is already written.
- The second filter-value-discovery query duplicated the BodyPartExamined
  idiom already in sql_patterns.md; the flat-dirTemplate and
  source_bucket_location="gcs" download variants are now prose beside the
  canonical example.
- The DICOMweb endpoint table, citations_from_selection parameter list, and
  downloaded-file-naming bullets are condensed to prose; full endpoint
  details remain in dicomweb_guide.md.

The cloud storage bucket table is deliberately kept: it carries the CC BY-NC
distinction the license workflow depends on, and compressing it to prose
dropped the head-scans bucket.

~600 is not reachable without deleting content rather than relocating it.
What remains in the largest sections is anti-footgun guidance (the two
download-method signatures, "not a DataFrame") and decision tables.

Test docstrings now name their SKILL.md section instead of numbering it;
"§6 Batch Processing" was stale, since batch processing moved to
use_cases.md in v1.6.0 and section 6 is now BigQuery.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant