Just shippedBest skills for each job.See the picks →

CodexScheduleNot executed· 1 caveat

Guardian: Codex-driven incremental TypeScript migration

Runs daily. Codex migrates a small batch of JavaScript files to TypeScript and opens a pull request, so a large migration happens incrementally.

schedule: daily (cron) + push + workflow_dispatch

How it works

From event to result

1
Trigger
GitHub starts a run when the schedule "23 7 * * *" is due, or you run it by hand. Only changes under the paths list count.
2
Agent
Codex, via openai/codex-action.
3
What it does
Runs daily. Codex migrates a small batch of JavaScript files to TypeScript and opens a pull request, so a large migration happens incrementally.
4
What you get
This listing does not state a pull request or a comment. Read the prompt, and treat the result as not executed.

Setup

Where to paste this

  1. Create .github/workflows/giant-typescript-migration.yml
  2. Paste the workflow below into that file. The notes beside the YAML are not part of the file.
  3. Add this repository secret: OPENAI_API_KEY. The file reads it as secrets.NAME. Do not paste the key into the YAML.
  4. Steps that call gh with github.token use the token Actions already provides. You do not create that secret.

Let your agent do it

Copy a prompt for Claude Code, Codex, or Cursor.

Paste it into your coding agent in this repo. It does the setup and asks before anything leaves your machine.

Runs the same job in your agent session, on the plan you are signed in with. No API key, no Action.

Do the job of the "Guardian: Codex-driven incremental TypeScript migration" workflow from AgentFlows (https://agentflows.sh/flows/giant-typescript-migration) right here, in this session, using the plan I'm signed in with. No API key and no GitHub Action.

Install these agent skills first. Download each SKILL.md from its source (respect its license) into .claude/skills/<name>/SKILL.md, or wherever this agent loads skills from:
- Incremental implementation: thin, verifiable slices: https://github.com/addyosmani/agent-skills/tree/main/skills/incremental-implementation (MIT), notes at https://agentflows.sh/skills/addyosmani-incremental-implementation

What it does: Runs daily. Codex migrates a small batch of JavaScript files to TypeScript and opens a pull request, so a large migration happens incrementally.

The workflow normally runs on: schedule: daily (cron) + push + workflow_dispatch. Instead, ask me which pull request, issue, or branch to work on, then follow these instructions:

```text
Runs daily. Codex migrates a small batch of JavaScript files to TypeScript and opens a pull request, so a large migration happens incrementally.
```

Use the gh CLI for anything on GitHub, and show me what you plan to post or change before you do it.

The file

Workflow YAML

Copy the file as-is. The notes beside each block explain it.

.github/workflows/giant-typescript-migration.yml

Name

The name GitHub shows in the Actions tab. The file path is under Where to paste this.

name: Daily TypeScript migration

Trigger

GitHub starts a run when the schedule "23 7 * * *" is due, or you run it by hand. Only changes under the paths list count.

on:  push:    branches: [main]    paths:      - '.github/workflows/typescript-migration.yml'  schedule:    - cron: '23 7 * * *'  workflow_dispatch:concurrency:  group: typescript-migration  cancel-in-progress: false

Permissions

This token may read the repo, and read pull requests. Anything not listed is not granted.

permissions:  contents: read  pull-requests: readenv:  MIGRATION_BRANCH: ${{ github.ref_name == github.event.repository.default_branch && 'automation/typescript-migration' || 'automation/typescript-migration-test' }}

Jobs

Each job is one runner. The steps inside it run top to bottom.

jobs:  check:    runs-on: ubuntu-latest    timeout-minutes: 15    outputs:      ready: ${{ steps.check.outputs.ready }}

Steps

These steps run in order on that job.

    steps:      - name: Wait for the previous migration to be reviewed        id: check        env:          GH_TOKEN: ${{ github.token }}          GH_REPO: ${{ github.repository }}        run: |          count=$(gh pr list --state open --head "$MIGRATION_BRANCH" --json number --jq 'length')          if [ "$count" = 0 ]; then            echo 'ready=true' >> "$GITHUB_OUTPUT"          else            echo 'Skipping: a TypeScript migration PR is still open.' >> "$GITHUB_STEP_SUMMARY"          fi  migrate:    needs: check    if: needs.check.outputs.ready == 'true'    runs-on: ubuntu-latest    timeout-minutes: 15

Permissions

This token may push commits, and comment on pull requests and open them. Anything not listed is not granted.

    permissions:      contents: write      pull-requests: write

Steps

These steps run in order on that job.

    steps:      - uses: actions/checkout@v7        with:          ref: ${{ github.ref_name }}          persist-credentials: false      - name: Check for remaining JavaScript        id: candidates        run: |          if [ -n "$(git ls-files 'frontend/src/*.js' 'frontend/src/*.jsx')" ]; then            echo 'remaining=true' >> "$GITHUB_OUTPUT"          else            echo 'No JavaScript source files remain to migrate.' >> "$GITHUB_STEP_SUMMARY"          fi      - uses: actions/setup-node@v7        if: steps.candidates.outputs.remaining == 'true'        with:          node-version-file: .nvmrc          cache: npm          cache-dependency-path: frontend/package-lock.json      - name: Install dependencies and check the baseline        if: steps.candidates.outputs.remaining == 'true'        working-directory: frontend        run: |          npm ci          npm run build          npm run lint          npm test          npm run prettier:check      - name: Migrate a small batch        id: codex        if: steps.candidates.outputs.remaining == 'true'

Agent

Runs Codex with openai/codex-action@v1.11. Inputs: openai-api-key (the OpenAI API key secret); prompt-file; model; sandbox; safety-strategy.

        uses: openai/codex-action@v1.11        with:          openai-api-key: ${{ secrets.OPENAI_API_KEY }}          prompt-file: .github/codex/typescript-migration.md          model: ${{ vars.TYPESCRIPT_MIGRATION_MODEL }}          sandbox: workspace-write          safety-strategy: drop-sudo      - name: Check migration scope        if: steps.candidates.outputs.remaining == 'true'        run: |          git add --intent-to-add .          python3 - <<'PY'          import pathlib          import subprocess          def changed(*args):              return subprocess.check_output(                  ['git', 'diff', '--name-only', '--no-renames', '-z', *args, 'HEAD']              ).decode().split('\0')[:-1]          paths = changed()          if not paths:              raise SystemExit('No migration produced; no PR will be opened.')          plan = '.github/codex/typescript-migration-plan.md'          if any(not p.startswith('frontend/src/') and p != plan for p in paths):              raise SystemExit('Migration changed files outside frontend/src and the migration plan.')          if not pathlib.Path(plan).is_file():              raise SystemExit('Keep the migration plan file, even when all steps are complete.')          deleted = changed('--diff-filter=D')          migrated = [p for p in deleted if pathlib.Path(p).suffix in ('.js', '.jsx')                      and any(pathlib.Path(p).with_suffix(ext).is_file() for ext in ('.ts', '.tsx'))]          if not migrated:              raise SystemExit('No JavaScript files were converted to TypeScript.')          print(f'Migrated {len(migrated)} JavaScript files; {len(paths)} changed paths including renames.')          PY          git diff --check HEAD      - name: Validate the migration        if: steps.candidates.outputs.remaining == 'true'        working-directory: frontend        run: |          npm run build          npm run lint          npm test          npm run prettier:check      - name: Open a pull request        if: steps.candidates.outputs.remaining == 'true'        uses: peter-evans/create-pull-request@v7        with:          token: ${{ github.token }}          branch: ${{ env.MIGRATION_BRANCH }}          base: ${{ github.ref_name }}          add-paths: |            frontend/src/            .github/codex/typescript-migration-plan.md          commit-message: 'Migrate a batch of frontend files to TypeScript'          title: 'Migrate a batch of frontend files to TypeScript'          labels: maintenance          body: |            ${{ steps.codex.outputs.final-message }}            The workflow passed the frontend build (including typecheck), lint, tests, and formatting checks.            [Workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})            Generated automatically; human review is required before merging.

Keep going

More workflows

All workflows
  • CodexPull request
    12

    Codex PR review posted as a comment

    Two-job split keeps the API key job read-only (README example pattern). `:read-only` profile per README Permission profiles.

    pull_request: opened

    Est. cost per run~$0.03 runner + OpenAI tokens (UNVERIFIED)Checked Oct 16, 2026

    Not executed· 3 caveats
  • CodexLabel
    13

    Codex implements an issue on label

    `:workspace` profile lets Codex edit the checkout (README). PR creation is plain git/gh, not an action input.

    issues: labeled == codex

    Est. cost per run~$0.09 runner + OpenAI tokens (UNVERIFIED)Checked Oct 16, 2026

    Not executed· 2 caveats
  • CodexIssue opened
    14

    Codex triage with JSON output schema

    `output-schema` is forwarded to `codex exec --output-schema` (README inputs table).

    issues: opened

    Est. cost per run~$0.01 runner + OpenAI tokens (UNVERIFIED)Checked Oct 16, 2026

    Not executed· 3 caveats