Document Iteration Skill

A structured markdown syntax for iterating on documents with Claude AI

View the Project on GitHub foksa/document-iteration-skill

CI/CD Check

A GitHub Action (or similar) that fails PRs containing iteration markers. The final safety net for teams.

How It Works

When code is pushed or a PR is opened, the CI pipeline scans for markers. If found, the check fails and blocks merge.

GitHub Actions Setup

Create .github/workflows/check-markers.yml:

name: Check Iteration Markers

on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

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

      - name: Check for iteration markers
        run: |
          # Find all markdown files with markers
          # Patterns: %% comment %%, •%%>response <%%•, ==text(TOKEN)==
          FOUND=$(grep -r -l -E '%%[^%]*%%|•%%>[^<]*<%%•|==[^=]*\([^)]+\)==' --include="*.md" . 2>/dev/null || true)

          if [ -n "$FOUND" ]; then
            echo "❌ Iteration markers found in:"
            echo "$FOUND" | sed 's/^/  - /'
            echo ""
            echo "Please clean up markers before merging."
            exit 1
          fi

          echo "✅ No iteration markers found"

Customization

Exclude Certain Files

- name: Check for iteration markers
  run: |
    FOUND=$(grep -r -l -E '%%[^%]*%%|•%%>[^<]*<%%•|==[^=]*\([^)]+\)==' \
      --include="*.md" \
      --exclude="SKILL.md" \
      --exclude-dir="examples" \
      . 2>/dev/null || true)

Only Check Changed Files

- name: Get changed files
  id: changed
  uses: tj-actions/changed-files@v40
  with:
    files: '**/*.md'

- name: Check for iteration markers
  if: steps.changed.outputs.any_changed == 'true'
  run: |
    echo "$" | tr ' ' '\n' | xargs grep -l -E '%%[^%]*%%' || true

Show Marker Locations

- name: Check for iteration markers
  run: |
    MATCHES=$(grep -r -n -E '%%[^%]*%%|•%%>[^<]*<%%•|==[^=]*\([^)]+\)==' --include="*.md" . 2>/dev/null || true)

    if [ -n "$MATCHES" ]; then
      echo "❌ Iteration markers found:"
      echo "$MATCHES"
      exit 1
    fi

Other CI Systems

GitLab CI

check-markers:
  script:
    - grep -r -l -E '%%[^%]*%%' --include="*.md" . && exit 1 || exit 0

CircleCI

jobs:
  check-markers:
    docker:
      - image: alpine
    steps:
      - checkout
      - run:
          name: Check for markers
          command: |
            ! grep -r -l -E '%%[^%]*%%' --include="*.md" .

Benefits

Limitations