Skip to Content
DocsGithubGenerate with AI

Generate with AI

If you already have a GitHub Actions workflow, an AI coding assistant can produce the equivalent Mélodium pipeline in minutes, without you having to learn the language first.

What You Need

  • Your existing .github/workflows/ directory, the agent will read it directly.
  • An AI coding assistant running locally in your project (Claude Code, Cursor, Zed, or similar).
  • The Mélodium skill installed in your AI tool, the Mélodium MCP server connected to it, or both. See Install the Mélodium Skill. The MCP server provides the same migration guide through get_cicd_migration_guide, and lets the AI check the program it writes.

Step 1: Make Sure the Migration Reference Is Included

The general Mélodium skill covers the language and project layout. For a GitHub Actions migration, the AI also needs skills/melodium/references/github-migration.md, which has the exact treatment patterns for runAction, prepareContexts, githubJobResult, matrix jobs, and status reporting.

With Claude Code, this comes included automatically once the skill is installed under ~/.claude/skills/melodium, it loads its reference files on demand. With Cursor or Zed, make sure your rule file includes it:

# Cursor cat skills/melodium/SKILL.md \ skills/melodium/references/github-migration.md \ skills/melodium/references/projects.md \ > .cursor/rules/melodium.md # Zed cat skills/melodium/SKILL.md \ skills/melodium/references/github-migration.md \ skills/melodium/references/projects.md \ > .rules

Step 2: Ask for the Migration

Your AI agent is already running inside your project and can read your workflow files directly, so a simple prompt is enough:

Read the workflows in .github/workflows/ and migrate them to Mélodium. Generate a complete project under .melodium-ci/ with Compo.toml and .mel files. Use simpleStep for container jobs, localStep for self-hosted jobs. Report status back to GitHub using the token and project parameters.

If your workflows reference composite actions stored in .github/actions/, mention them so the agent reads those too:

Also read the composite actions in .github/actions/ and inline them as treatments.

The AI will produce a ready-to-use Mélodium project: a Compo.toml declaring the right dependencies, one .mel file per workflow with one treatment per job, parallel wiring for matrix jobs, artifact streaming between jobs that depend on each other, and GitHub commit status reporting.

Step 3: Review and Adjust

Read through the generated code before running it. The cpu, memory, and storage parameters in simpleStep have generic defaults, adjust them to your actual build requirements. Check that github_project and github_sha are wired to the right entrypoint parameters, and that the token is read from the right secret: github_token defaults to "env:MELODIUM_SECRET_GITHUB_TOKEN", which the reusable workflows provide. Third-party actions (uses:) from the marketplace can’t be translated automatically, the AI inlines their logic as shell commands where it can, but complex actions may need your attention. And for conditional jobs (if:), verify the filterBlock wiring actually matches the intent of the original condition.

Concept Reference

If you want to understand what the AI produced, or adjust it yourself, this table shows how GitHub Actions concepts map to Mélodium:

GitHub ActionsMélodium
Workflow file.mel treatment
JobTreatment with simpleStep or localStep
run: steprunAction[contexts=contexts]()
${{ }} expressionEvaluated via JavaScriptEngine
jobs.<job>.needsSequential wiring + includeNeeds
strategy.matrixParallel treatment instances with one<void>()
jobs.<job>.iffilterBlock<void>() on the job trigger
actions/cachecache parameter of simpleStep, or work/cache in programs (see Caches)
actions/upload-artifact / download-artifactartifacts parameter of simpleStep, or work/artifact in programs (see Run Artifacts)
Status reportingpostGithubState / postGithubStateContext

Full API documentation is at doc.melodium.tech .

Going Further

The generated code is a good starting point, and can be extended with any Mélodium element. For distribution across multiple machines and more advanced parallelisation, see Simple CI/CD Implementation and Advanced CI/CD Implementation.