> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getskillmd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Action

> Keep your skills fresh automatically in CI.

Run skillmd in GitHub Actions to keep a project's skills in sync with their sources — so
your agent's context never silently goes stale.

## Example workflow

```yaml .github/workflows/skills.yml theme={null}
name: Sync skills

on:
  schedule:
    - cron: "0 6 * * 1" # every Monday
  workflow_dispatch:

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Sync skillmd skills
        run: npx @getskillmd/cli sync
        env:
          SKILLMD_TOKEN: ${{ secrets.SKILLMD_TOKEN }}

      - name: Commit refreshed skills
        run: |
          git config user.name "skillmd-bot"
          git config user.email "bot@users.noreply.github.com"
          git add -A
          git diff --cached --quiet || git commit -m "chore: refresh skills"
          git push
```

<Steps>
  <Step title="Add a token">
    Store your skillmd token as the `SKILLMD_TOKEN` repository secret.
  </Step>

  <Step title="Commit the workflow">
    Add the file above to `.github/workflows/`.
  </Step>

  <Step title="Let it run">
    Skills refresh on schedule, and a commit lands whenever a source changes.
  </Step>
</Steps>

<Tip>
  Combine the schedule with `workflow_dispatch` so you can also refresh skills on demand
  from the Actions tab.
</Tip>
