xiaohongshu
xiaohongshu
config-helper
Detects, validates, and migrates codex configuration formats (JSON → YAML). Provides deprecation warnings and migration guidance.
Full skill instructions
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>
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience