Safe Skill Updater
Improve a skill only when evidence shows a measurable benefit. "No change" is a successful result when a proposed rewrite would add length, remove useful behavior, weaken safety, or merely restyle working instructions.
Scope Boundary
- Limit write and modification targets to user-owned Codex/ChatGPT personal
skills. In ChatGPT Work Mode, resolve and edit
user-owned skills through the active personal Skills checkout and follow the
installed
skill-creator save and verification workflow; never claim an
account-level update from a scratch copy.
- Do not install or mirror this updater into OpenCode.
- Do not edit managed plugin caches, system skills, marketplace checkouts, or generated runtime caches. Update their source package or leave a report.
- Do not change Claude/OpenCode variants unless the user names those targets separately.
- Run
skill-package-security-audit before inspecting or importing an untrusted
package. Its static verdict does not authorize installation or execution.
Preservation-First Workflow
Snapshot the baseline.
- Record source path, full tree hash, frontmatter, sidecars, referenced files, platform scope, and current validation result.
- Back up the complete skill folder before any write.
Recover the behavioral contract.
- List trigger phrases, supported tasks, required tools, outputs, fallbacks, safety rules, and verification steps.
- Read every same-name variant as a separate implementation; newer or longer is not automatically better.
- Identify user-authored constraints that must survive.
Classify evidence.
DETERMINISTIC_BREAK: reproducible missing file, invalid metadata, broken command, encoding damage, or validator failure.
TRIGGER_ERROR: confirmed over-trigger or under-trigger.
STALE_INTEGRATION: official current documentation contradicts a tool, API, path, or config.
MODEL_POLICY: prescriptive model/provider choice is stale or incorrectly placed.
PORTABILITY_ERROR: host-specific behavior was copied into a shared core.
DUPLICATE: exact or semantic duplicate with no unique contract.
REGRESSION_RISK: a proposed simplification drops capabilities, sidecars, safeguards, or user preferences.
UNSUPPORTED_CLAIM: the concern has no reproducible or authoritative evidence.
Produce a semantic diff before editing.
| Contract item | Current | Proposed | Evidence | Risk |
|---|---|---|---|---|
| Trigger | ... | ... | ... | low/medium/high |
| Workflow | ... | ... | ... | ... |
| Tools/sidecars | ... | ... | ... | ... |
| Verification | ... | ... | ... | ... |
| Platform/model policy | ... | ... | ... | ... |
- Mark each operation
ADD, REMOVE, MODIFY, REORDER, MERGE, SPLIT, or NO_CHANGE.
- Prefer the smallest change that resolves the confirmed issue.
Apply only an authorized, evidence-backed diff.
- Preserve the folder/name unless a collision or invalid ID requires a migration.
- Keep frontmatter to
name and a concise trigger-focused description.
- Keep
SKILL.md under 500 lines when practical; move deep detail to directly linked references.
- Preserve scripts/assets unless the replacement is verified and all references are updated.
Validate at three levels.
- Structural: frontmatter, name/folder match, links, encoding, metadata, and package layout.
- Behavioral: replay representative trigger, non-trigger, edge, and failure prompts; run harmless script tests.
- Comparative: prove the updated variant preserves every accepted baseline contract item and improves the targeted issue.
Use independent review for high-risk changes.
- Required for deletion, merge, split, platform migration, security logic, model/tool rewrites, or changes above roughly 20% of the body.
- Give reviewers the raw before/after artifacts and test prompts, not the desired verdict.
Commit or roll back.
- Keep the update only if validation passes and no accepted behavior regresses.
- Restore the backup when results are ambiguous or worse.
- Report evidence, diff, tests, residual risk, and rollback path.
Optional cross-skill rule extraction
Use this mode only when the user explicitly asks to extract, consolidate, or promote rules across a named skill scope. Read references/evaluation-and-rule-promotion.md. It may propose a rule with evidence and a semantic diff; it must not auto-write global instructions or silently replace a local/host-specific contract.
Merge and Delete Rules
Merge only when trigger domains, dependencies, safety constraints, and output contracts substantially overlap. Preserve distinct platform integrations as namespaced variants or overlays.
Archive before permanent deletion. High-confidence removal candidates include exact physical duplicates, aliases loaded twice, test fixtures, example packages already represented by production skills, broken pointer stubs, managed-plugin copies without their runtime, and instructions whose primary purpose is bypassing safety or policy.
Do not delete based only on file age, length, a heuristic score, popularity, or a newer version number.
Model and Provider Rules
Read references/model-provider-policy.md before changing any provider or model language. Shared skills should use the active host's available capabilities and must not select a provider/model automatically. Keep a fixed model name only when the skill explicitly configures or documents that runtime and the name is verified from an official current source.
Audit Tools
Run the read-only scanner before broad work:
python scripts/analyze_skill_corpus.py --output <audit-dir> --root "codex=<path>" --root "agents=<path>"
Review all_skills.csv, exact_duplicate_groups.csv, same_name_conflicts.csv, vendor_model_review.csv, and quality_and_format_review.csv. Heuristic flags are evidence prompts, never automatic edit decisions.
Use references/quality-preservation-rubric.md for the final go/no-go decision.
Stop Conditions
Stop without editing when the source is managed, the target platform is unclear, required tools cannot be verified, the change is cosmetic, tests cannot distinguish better from worse, or the proposed benefit does not exceed regression risk.
1---2name: safe-skill-updater3description: Audit, compare, merge, repair, or improve user-owned Codex and ChatGPT skill variants while preserving proven behavior. Use for skill regression analysis, semantic diffs, trigger repair, host migration, merge/split decisions, and safe rollback. Turkish triggers: becerileri karşılaştır, skill geliştir, birleştir/böl, tetikleyiciyi düzelt, kaliteyi koruyarak güncelle. For downloaded or third-party package safety, use skill-package-security-audit first.4---56# Safe Skill Updater78Improve a skill only when evidence shows a measurable benefit. "No change" is a successful result when a proposed rewrite would add length, remove useful behavior, weaken safety, or merely restyle working instructions.910## Scope Boundary1112- Limit write and modification targets to user-owned Codex/ChatGPT personal13 skills. In ChatGPT Work Mode, resolve and edit14 user-owned skills through the active personal Skills checkout and follow the15 installed `skill-creator` save and verification workflow; never claim an16 account-level update from a scratch copy.17- Do not install or mirror this updater into OpenCode.18- Do not edit managed plugin caches, system skills, marketplace checkouts, or generated runtime caches. Update their source package or leave a report.19- Do not change Claude/OpenCode variants unless the user names those targets separately.20- Run `skill-package-security-audit` before inspecting or importing an untrusted21 package. Its static verdict does not authorize installation or execution.2223## Preservation-First Workflow24251. Snapshot the baseline.26 - Record source path, full tree hash, frontmatter, sidecars, referenced files, platform scope, and current validation result.27 - Back up the complete skill folder before any write.28292. Recover the behavioral contract.30 - List trigger phrases, supported tasks, required tools, outputs, fallbacks, safety rules, and verification steps.31 - Read every same-name variant as a separate implementation; newer or longer is not automatically better.32 - Identify user-authored constraints that must survive.33343. Classify evidence.35 - `DETERMINISTIC_BREAK`: reproducible missing file, invalid metadata, broken command, encoding damage, or validator failure.36 - `TRIGGER_ERROR`: confirmed over-trigger or under-trigger.37 - `STALE_INTEGRATION`: official current documentation contradicts a tool, API, path, or config.38 - `MODEL_POLICY`: prescriptive model/provider choice is stale or incorrectly placed.39 - `PORTABILITY_ERROR`: host-specific behavior was copied into a shared core.40 - `DUPLICATE`: exact or semantic duplicate with no unique contract.41 - `REGRESSION_RISK`: a proposed simplification drops capabilities, sidecars, safeguards, or user preferences.42 - `UNSUPPORTED_CLAIM`: the concern has no reproducible or authoritative evidence.43444. Produce a semantic diff before editing.4546```markdown47| Contract item | Current | Proposed | Evidence | Risk |48|---|---|---|---|---|49| Trigger | ... | ... | ... | low/medium/high |50| Workflow | ... | ... | ... | ... |51| Tools/sidecars | ... | ... | ... | ... |52| Verification | ... | ... | ... | ... |53| Platform/model policy | ... | ... | ... | ... |54```5556 - Mark each operation `ADD`, `REMOVE`, `MODIFY`, `REORDER`, `MERGE`, `SPLIT`, or `NO_CHANGE`.57 - Prefer the smallest change that resolves the confirmed issue.58595. Apply only an authorized, evidence-backed diff.60 - Preserve the folder/name unless a collision or invalid ID requires a migration.61 - Keep frontmatter to `name` and a concise trigger-focused `description`.62 - Keep `SKILL.md` under 500 lines when practical; move deep detail to directly linked references.63 - Preserve scripts/assets unless the replacement is verified and all references are updated.64656. Validate at three levels.66 - Structural: frontmatter, name/folder match, links, encoding, metadata, and package layout.67 - Behavioral: replay representative trigger, non-trigger, edge, and failure prompts; run harmless script tests.68 - Comparative: prove the updated variant preserves every accepted baseline contract item and improves the targeted issue.69707. Use independent review for high-risk changes.71 - Required for deletion, merge, split, platform migration, security logic, model/tool rewrites, or changes above roughly 20% of the body.72 - Give reviewers the raw before/after artifacts and test prompts, not the desired verdict.73748. Commit or roll back.75 - Keep the update only if validation passes and no accepted behavior regresses.76 - Restore the backup when results are ambiguous or worse.77 - Report evidence, diff, tests, residual risk, and rollback path.7879## Optional cross-skill rule extraction8081Use this mode only when the user explicitly asks to extract, consolidate, or promote rules across a named skill scope. Read [references/evaluation-and-rule-promotion.md](references/evaluation-and-rule-promotion.md). It may propose a rule with evidence and a semantic diff; it must not auto-write global instructions or silently replace a local/host-specific contract.8283## Merge and Delete Rules8485Merge only when trigger domains, dependencies, safety constraints, and output contracts substantially overlap. Preserve distinct platform integrations as namespaced variants or overlays.8687Archive before permanent deletion. High-confidence removal candidates include exact physical duplicates, aliases loaded twice, test fixtures, example packages already represented by production skills, broken pointer stubs, managed-plugin copies without their runtime, and instructions whose primary purpose is bypassing safety or policy.8889Do not delete based only on file age, length, a heuristic score, popularity, or a newer version number.9091## Model and Provider Rules9293Read [references/model-provider-policy.md](references/model-provider-policy.md) before changing any provider or model language. Shared skills should use the active host's available capabilities and must not select a provider/model automatically. Keep a fixed model name only when the skill explicitly configures or documents that runtime and the name is verified from an official current source.9495## Audit Tools9697Run the read-only scanner before broad work:9899```powershell100python scripts/analyze_skill_corpus.py --output <audit-dir> --root "codex=<path>" --root "agents=<path>"101```102103Review `all_skills.csv`, `exact_duplicate_groups.csv`, `same_name_conflicts.csv`, `vendor_model_review.csv`, and `quality_and_format_review.csv`. Heuristic flags are evidence prompts, never automatic edit decisions.104105Use [references/quality-preservation-rubric.md](references/quality-preservation-rubric.md) for the final go/no-go decision.106107## Stop Conditions108109Stop without editing when the source is managed, the target platform is unclear, required tools cannot be verified, the change is cosmetic, tests cannot distinguish better from worse, or the proposed benefit does not exceed regression risk.