Detects, validates, and migrates codex configuration formats (JSON → YAML). Provides deprecation warnings and migration guidance.
Detects and migrates codex config from deprecated JSON to YAML format. Automatically triggered when legacy config.json is found, providing safe migration with preview mode.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-codex@fractaryThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Your responsibility is to detect configuration format, provide deprecation warnings, and assist with migration from legacy JSON format to the preferred YAML format used by @fractary/cli and @fractary/codex SDK.
Configuration Evolution:
.fractary/plugins/codex/config.json or ~/.config/fractary/codex/config.json.fractary/codex.yaml (project-level only)Key Changes:
<CRITICAL_RULES>
Purpose: Detect configuration format and provide migration guidance.
Steps:
Execute Detection Script:
./scripts/detect-config.sh
Parse Response:
status: "found" or "not_found"format: "json" or "yaml"location: "project" or "global"path: Absolute path to configis_preferred: Boolean - true if YAML project configmigration_needed: Boolean - true if JSON or globaldeprecation_warning: String - warning message if deprecatedOutput Results:
IF status == "not_found":
📋 Configuration Status: Not Found
No codex configuration detected.
Next Steps:
1. Run: /fractary-codex:init
2. This will create: .fractary/codex.yaml
Preferred format: YAML at .fractary/codex.yaml
IF format == "yaml" AND location == "project":
✅ Configuration Status: OK
Format: YAML (preferred)
Location: .fractary/codex.yaml
Status: Up to date
No migration needed.
IF format == "json" AND location == "project":
⚠️ Configuration Status: Deprecated
Format: JSON (deprecated)
Location: .fractary/plugins/codex/config.json
Status: Migration recommended
Deprecation Warning:
JSON format is deprecated. Please migrate to YAML format.
To migrate:
1. Preview: USE SKILL: config-helper with operation="migrate" and dry_run=true
2. Execute: USE SKILL: config-helper with operation="migrate"
3. This creates: .fractary/codex.yaml (version 4.0)
IF format == "json" AND location == "global":
⚠️ Configuration Status: Legacy
Format: JSON (deprecated)
Location: ~/.config/fractary/codex/config.json
Status: Migration required
Deprecation Warning:
Global config is deprecated. Please migrate to project-level YAML config.
To migrate:
1. cd to your project directory
2. Preview: USE SKILL: config-helper with operation="migrate" and dry_run=true
3. Execute: USE SKILL: config-helper with operation="migrate" and remove_source=true
4. This creates: .fractary/codex.yaml (version 4.0)
Purpose: Migrate configuration from JSON to YAML format.
Steps:
Validate Prerequisites:
command -v jqcommand -v yqExecute Migration Script:
./scripts/migrate-config.sh \
--source "${source_path}" \
--target "${target_path}" \
${dry_run ? "--dry-run" : ""} \
${remove_source ? "--remove-source" : ""}
Parse Response:
IF dry_run == true:
{
"status": "success",
"operation": "dry-run",
"source": {"path": "...", "format": "json"},
"target": {"path": "...", "format": "yaml"},
"would_remove_source": false,
"preview": "...yaml content..."
}
IF dry_run == false:
{
"status": "success",
"operation": "migrate",
"source": {"path": "...", "format": "json", "removed": false},
"target": {"path": "...", "format": "yaml", "created": true},
"message": "Configuration migrated successfully",
"next_steps": [...]
}
IF dry_run == true:
🔍 Migration Preview (Dry Run)
Source: .fractary/plugins/codex/config.json (JSON)
Target: .fractary/codex.yaml (YAML)
Changes:
- Format: JSON → YAML
- Version: 3.0 → 4.0 (CLI compatible)
- Location: .fractary/plugins/codex/ → .fractary/
Preview of .fractary/codex.yaml:
───────────────────────────────────────
{yaml_preview}
───────────────────────────────────────
To execute migration:
USE SKILL: config-helper with operation="migrate" and dry_run=false
IF dry_run == false:
✅ Configuration Migrated Successfully
Source: .fractary/plugins/codex/config.json
Target: .fractary/codex.yaml
Actions taken:
✓ Converted JSON → YAML
✓ Updated version: 3.0 → 4.0
✓ Created: .fractary/codex.yaml
{remove_source ? "✓ Removed source JSON config" : "○ Source JSON config preserved"}
Next Steps:
1. Review new config: cat .fractary/codex.yaml
2. Test CLI: fractary codex health
3. Update any scripts referencing old path
{!remove_source ? "4. Remove old config: rm .fractary/plugins/codex/config.json" : ""}
IF error occurs:
❌ Migration Failed
Error: {error_message}
Suggested fixes:
{suggested_fixes}
No changes were made to your configuration.
Purpose: Validate configuration format and structure.
Steps:
Detect Config:
Validate Format:
yq validatejq .Validate Against CLI:
fractary codex healthOutput Results:
🔍 Configuration Validation
Format: {format}
Location: {path}
Format validation: {pass|fail}
CLI compatibility: {pass|fail}
{if deprecated}
⚠️ Deprecation warning: {warning}
{endif}
{if errors}
Errors found:
- {error 1}
- {error 2}
{endif}
</WORKFLOW>
<COMPLETION_CRITERIA> Operation is complete when:
✅ For detect:
✅ For migrate (dry-run):
✅ For migrate (execute):
✅ For validate:
✅ In all cases:
✅ Configuration Status: OK
Format: YAML (preferred)
Location: .fractary/codex.yaml
No migration needed.
⚠️ Configuration Status: Deprecated
Format: JSON (deprecated)
Location: .fractary/plugins/codex/config.json
Migration recommended.
To migrate: USE SKILL: config-helper with operation="migrate"
🔍 Migration Preview
Source: config.json → Target: codex.yaml
Preview of changes: {...}
✅ Configuration Migrated
Created: .fractary/codex.yaml (version 4.0)
Next: Test with fractary codex health
❌ Migration Failed
Error: yq not installed
Install: brew install yq (macOS) or snap install yq (Ubuntu)
❌ Migration Failed
Error: Target .fractary/codex.yaml already exists
Use --dry-run to preview or remove existing file first
</OUTPUTS>
<ERROR_HANDLING>
When jq or yq not installed:
When source config doesn't exist:
When target YAML already exists:
When source JSON is malformed:
When CLI can't read migrated config:
</ERROR_HANDLING>
<DOCUMENTATION> Upon completion, output:Success (detect):
📋 Configuration Status
Format: {format}
Location: {path}
Status: {up-to-date|deprecated}
{migration guidance if needed}
Success (migrate):
✅ Configuration Migrated
Created: {target_path}
Version: 4.0 (CLI compatible)
Next: {next_steps}
Failure:
❌ Operation Failed
Error: {error_message}
Resolution: {suggested_fixes}
</DOCUMENTATION>
<NOTES>
JSON → YAML:
Global → Project:
Both formats supported by SDK, but CLI prefers YAML.
jq (JSON parsing):
brew install jqapt-get install jqyum install jqyq (YAML generation - mikefarah/yq):
brew install yqsnap install yqTo test config-helper:
# Detect current config
USE SKILL: config-helper
Parameters: {"operation": "detect"}
# Preview migration
USE SKILL: config-helper
Parameters: {
"operation": "migrate",
"dry_run": true
}
# Execute migration
USE SKILL: config-helper
Parameters: {
"operation": "migrate",
"remove_source": true
}
# Validate result
USE SKILL: config-helper
Parameters: {"operation": "validate"}
</NOTES>Create employment contracts, offer letters, and HR policy documents following legal best practices. Use when drafting employment agreements, creating HR policies, or standardizing employment documentation.
Implement GDPR-compliant data handling with consent management, data subject rights, and privacy by design. Use when building systems that process EU personal data, implementing privacy controls, or conducting GDPR compliance reviews.