Problem
The current npm install -g @scienceintelligence/researchskills-extract distribution uses postinstall hooks to copy files into legacy Claude Code paths:
- Bootstrap command →
~/.claude/commands/researchskills-extract.md
- 12 helper scripts →
~/.claude/utils/
- Extracted skills →
~/.claude/commands/researchskills/<slug>.md (frontmatter stripped)
Claude Code now recommends SKILL.md-based skills in ~/.claude/skills/ for new work. The current approach has concrete downsides:
- Legacy path:
~/.claude/commands/ is legacy; ~/.claude/skills/ with SKILL.md is the current standard
- Metadata loss:
store-local.js:128 strips YAML frontmatter for Claude, losing skill metadata that the platform can use
- Hidden side effects:
postinstall hooks silently mutate ~/.claude/ and ~/.codex/ directories, which is surprising and hard to audit
- Collision risk: Helper scripts copied to shared
~/.claude/utils/ namespace can collide with other tools
- Aging worse: As Claude Code's skill ecosystem matures, this pattern will fall further behind
Note: The Codex CLI side already uses a proper SKILL.md directory structure (~/.codex/skills/researchskills-extract/SKILL.md), so only the Claude Code side needs migration.
Proposed Changes (incremental)
Phase 1: Migrate to skills/ format
- Move bootstrap from
~/.claude/commands/researchskills-extract.md to ~/.claude/skills/researchskills-extract/SKILL.md
- Colocate helper scripts in the skill directory (
~/.claude/skills/researchskills-extract/scripts/) instead of ~/.claude/utils/
- Update extracted skill output from
~/.claude/commands/researchskills/<slug>.md to ~/.claude/skills/researchskills/<slug>/SKILL.md
- Preserve YAML frontmatter for Claude (stop stripping in
store-local.js)
Phase 2: Replace postinstall with explicit install
- Replace hidden
postinstall.js hook with an explicit install command or npx flow
- Keep cache management and version invalidation logic
- Keep dual-platform (Claude + Codex) support
Phase 3 (optional): Evaluate plugin marketplace
- Consider publishing as a Claude Code plugin for discoverability
- Assess UX tradeoffs (namespaced invocation, etc.)
Files to Change
researchskills-extract/scripts/postinstall.js — change install targets
researchskills-extract/scripts/postuninstall.js — change cleanup targets
researchskills-extract/scripts/store-local.js — stop stripping frontmatter, change output paths
researchskills-extract/commands/researchskills-extract.md — update script paths referenced in pipeline
readme.md — update installation instructions
Context
- Codex CLI review confirmed this is medium priority, not urgent breakage
- The extraction pipeline itself (scan, classify, extract, clean, score, upload) is unaffected — only the distribution/installation mechanism changes
- Codex side is already using proper
SKILL.md format, so Claude side should match
Priority
Medium — current system works but will age poorly as Claude Code's ecosystem evolves.
Problem
The current
npm install -g @scienceintelligence/researchskills-extractdistribution usespostinstallhooks to copy files into legacy Claude Code paths:~/.claude/commands/researchskills-extract.md~/.claude/utils/~/.claude/commands/researchskills/<slug>.md(frontmatter stripped)Claude Code now recommends
SKILL.md-based skills in~/.claude/skills/for new work. The current approach has concrete downsides:~/.claude/commands/is legacy;~/.claude/skills/withSKILL.mdis the current standardstore-local.js:128strips YAML frontmatter for Claude, losing skill metadata that the platform can usepostinstallhooks silently mutate~/.claude/and~/.codex/directories, which is surprising and hard to audit~/.claude/utils/namespace can collide with other toolsNote: The Codex CLI side already uses a proper
SKILL.mddirectory structure (~/.codex/skills/researchskills-extract/SKILL.md), so only the Claude Code side needs migration.Proposed Changes (incremental)
Phase 1: Migrate to skills/ format
~/.claude/commands/researchskills-extract.mdto~/.claude/skills/researchskills-extract/SKILL.md~/.claude/skills/researchskills-extract/scripts/) instead of~/.claude/utils/~/.claude/commands/researchskills/<slug>.mdto~/.claude/skills/researchskills/<slug>/SKILL.mdstore-local.js)Phase 2: Replace postinstall with explicit install
postinstall.jshook with an explicit install command ornpxflowPhase 3 (optional): Evaluate plugin marketplace
Files to Change
researchskills-extract/scripts/postinstall.js— change install targetsresearchskills-extract/scripts/postuninstall.js— change cleanup targetsresearchskills-extract/scripts/store-local.js— stop stripping frontmatter, change output pathsresearchskills-extract/commands/researchskills-extract.md— update script paths referenced in pipelinereadme.md— update installation instructionsContext
SKILL.mdformat, so Claude side should matchPriority
Medium — current system works but will age poorly as Claude Code's ecosystem evolves.