agentleFS
Cogni-AI-OUCogni-AI-OU/cogni-ai-agent-skills/gh-aw-compile/SKILL.md

gh-aw-compile

Skill4 starsChanged 6 months agoMITView on GitHub

Regenerate and post-process all agentic workflows. You MUST load this skill when gh-aw is updated, workflow .md files change, or when asked to recompile/regenerate workflows.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when you need to regenerate all agentic workflow lock files and verify them.

    line 12
  2. Very specific:

    When you have modified a .md GitHub Agentic Workflow file and need to update its .lock.yml GitHub Actions file.

    line 21
  3. Very specific:

    After running gh aw upgrade to ensure the repository has the latest action definitions.

    line 22
  4. Distinctive:

    When prompted by the system or another workflow to validate the schema of an agentic workflow.

    line 23
  5. Very specific:

    When editing generic GitHub Actions workflows (.github/workflows/*.yml) that are not managed by gh-aw.

    line 27
  6. Very specific:

    If you lack write permissions to the repository's .github/ directory.

    line 29
  7. Distinctive:

    Use whichever command is appropriate:

    line 41
  8. Very specific:

    If any workflow fails to compile (e.g., due to permission violations), fix the .md source file and re-run.

    line 51
  9. Distinctive:

    After recompiling, run the pre-commit hooks to ensure everything is valid:

    line 55
  10. Very specific:

    When compiling with --strict (or if enforced by the version), gh-aw disallows write permissions like contents: write, issues: write, etc.

    line 65
  11. Distinctive:

    After both steps, run git diff --stat to review all changed files.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Recompile Agentic Workflows

Use this skill when you need to regenerate all agentic workflow lock files and verify them.

IMPORTANT: Verification is required after EVERY lock file change

Any time .lock.yml files are regenerated — whether via gh aw compile, gh aw upgrade, or any other gh-aw command — you MUST run the repo-standard pre-commit hooks afterward. This is not optional.

When to Use

  • When you have modified a .md GitHub Agentic Workflow file and need to update its .lock.yml GitHub Actions file.
  • After running gh aw upgrade to ensure the repository has the latest action definitions.
  • When prompted by the system or another workflow to validate the schema of an agentic workflow.

When Not to Use

  • When editing generic GitHub Actions workflows (.github/workflows/*.yml) that are not managed by gh-aw.
  • For compiling application source code (e.g., C++, Java, or TypeScript).
  • If you lack write permissions to the repository's .github/ directory.

Common Pitfalls

  • Forgetting Pre-Commit: Compiling the workflow but failing to run pre-commit run --all-files, leaving the repository in a lint-failed state.
  • Ignoring Validation Errors: Running gh aw compile but missing the schema validation warnings in the output, resulting in broken agent features.
  • Direct YAML Edits: Trying to manually fix the .lock.yml file instead of editing the .md source and running the compile command.

Steps

1. Compile or upgrade workflows

Use whichever command is appropriate:

# Full upgrade (updates agents, actions, codemods, then compiles)
gh aw upgrade

# Just recompile (when only .md workflow files changed)
gh aw compile

If any workflow fails to compile (e.g., due to permission violations), fix the .md source file and re-run.

2. Run verification

After recompiling, run the pre-commit hooks to ensure everything is valid:

pre-commit run --all-files

Common Issues

Strict mode violations

When compiling with --strict (or if enforced by the version), gh-aw disallows write permissions like contents: write, issues: write, etc. Workflows should use safe-outputs for write operations and only request read permissions.

Discussion category warnings

Warnings about "General" vs "general" discussion category casing are non-blocking.

Verification

After both steps, run git diff --stat to review all changed files. Expect changes in:

  • .github/agents/ - Updated agent files
  • .github/aw/actions-lock.json - Updated action pins
  • .github/workflows/*.lock.yml - Regenerated lock files
  • .github/workflows/*.md - If codemods applied fixes

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.