ワンクリックで
plugin-structure-migration
Migrate improperly structured plugins to correct .claude-plugin/ layout
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Migrate improperly structured plugins to correct .claude-plugin/ layout
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Normalize long-form CODEX cycle folders to short form before notebooks run. Trigger: cyc001_reg001_*, hard-coded cyc paths breaking, staged CODEX raw data failing in Notebooks 1/2.
v5.6.0 joint multi-TF model: single model per symbol with broadcast 1Hour context replaces dual 15Min/1Hour models. Trigger: (1) replacing weighted-voting model aggregation, (2) adding broadcast features to vectorized env, (3) limited training data + worried about overfitting from doubling obs_dim, (4) backtest builder mismatch with newer feature counts.
DEPRECATED in v5.6.0 — see joint-multi-tf-v560 skill. Documents the v5.2.0 dual-model approach (train separate 15Min/1Hour models, combine via weighted voting). Still relevant for: (1) loading legacy v5.5.0 dual models, (2) understanding the historical aggregation layer, (3) resampling pattern via origin='start'.
Surface a shipped-but-undocumented CLI feature in user-facing docs. Trigger: user reports a known feature missing from README/readthedocs even though the CLI command exists.
KINTSUGI Snakefile + CLI changes that route SLURM jobs around accounts saturated by OTHER users on the same QOS pool. Trigger: QOSGrpMemLimit, jobs stuck pending despite available GPU slots in config, noisy neighbor on shared QOS, multi-user investment pool exhaustion, _build_cycle_assignment static-vs-live.
KINTSUGI SLURM batch processing: Maximize throughput using multi-account resource calculation with GPU+CPU pools per account. Trigger: SLURM job submission, batch processing, resource maximization, GPU+CPU concurrent, headless processing, resource pool.
| name | plugin-structure-migration |
| description | Migrate improperly structured plugins to correct .claude-plugin/ layout |
| author | KINTSUGI Team |
| date | "2026-03-26T00:00:00.000Z" |
| Item | Details |
|---|---|
| Date | 2026-03-26 |
| Goal | Fix 38 improperly structured Skills Registry plugins that fail CI validation |
| Environment | Skills_Registry submodule, Python 3.10+, GitHub Actions CI |
| Status | Success |
Over time, 38 plugins were created with plugin.json at the root level instead of inside .claude-plugin/. Some also had SKILL.md at root instead of skills/{name}/SKILL.md. The "skills" field in many plugin.json files was an array (e.g., ["skill-name"]) instead of a string path ("./skills"). The CI validation script (validate_plugins.py) also had a bug where it called .lstrip("./") on the "skills" field without checking if it was an array, causing AttributeError.
Handle "skills" as either string or array in validate_plugins.py:
skills_field = plugin_data.get("skills", "./skills")
if isinstance(skills_field, str):
skills_path = skills_field
else:
skills_path = "./skills"
skills_dir = plugin_dir / skills_path.lstrip("./")
# Preview changes
python3 scripts/fix_plugin_structure.py --dry-run
# Apply changes
python3 scripts/fix_plugin_structure.py
The script handles 4 structural issues:
.claude-plugin/plugin.jsonskills/{name}/SKILL.md"./skills"Some moved plugin.json files were missing the "skills" field entirely:
import json
from pathlib import Path
failing = ['trading/symbol-database-selection', ...]
for p in failing:
path = Path('plugins') / p / '.claude-plugin' / 'plugin.json'
with open(path) as f:
data = json.load(f)
if 'skills' not in data:
data['skills'] = './skills'
with open(path, 'w') as f:
json.dump(data, f, indent=2)
python3 scripts/validate_plugins.py
# Expected: "Validated 157 plugins — All plugins valid!"
| Attempt | Why it Failed | Lesson Learned |
|---|---|---|
| Manual fix per plugin | 38 plugins × 3 fixes each = too many manual edits | Write a migration script for bulk structural changes |
| Migration script without dry-run | Couldn't verify actions before applying | Always add --dry-run mode to migration scripts |
| Fixing validation script only | Plugins still had wrong structure, just weren't detected | Fix both the validator AND the data it validates |
| Moving files without fixing "skills" field | Array format still caused issues in generate_marketplace.py | Fix data format (array→string) at the same time as file moves |
| Not checking for missing fields after move | 7 plugins had no "skills" field at all in their JSON | Run validation after migration to catch edge cases |
Correct plugin structure:
plugins/{category}/{skill-name}/
├── .claude-plugin/
│ └── plugin.json # Must have: name, description, skills, version, author
└── skills/
└── {skill-name}/
└── SKILL.md # Frontmatter + experiment sections
Required plugin.json fields:
{
"name": "skill-name",
"version": "1.0.0",
"description": "Trigger conditions: (1) ..., (2) ...",
"author": {"name": "Team Name"},
"skills": "./skills"
}
"skills" field must be a string path, not an array — the validator and marketplace generator both call .lstrip() on itplugin.json from directory name is a reasonable fallback for skills with only SKILL.md.claude-plugin/) as renames when staged togethervalidate_plugins.py after any structural changes to catch edge casesscripts/fix_plugin_structure.py — bulk migration scriptscripts/validate_plugins.py — CI validation script.github/workflows/validate.yml — CI workflow that runs validation on push/PR