i18n/de/skills/setup-putior-ci/SKILL.md
Einrichten GitHub Actions CI/CD to automatisch regenerate putior workflow diagrams on push. Umfasst workflow YAML creation, R script for diagram generation with sentinel markers, auto-commit of updated diagrams, and README sentinel integration for in-place diagram updates. Verwenden wenn workflow diagrams should always reflect the current state of the code, when multiple contributors may change workflow-affecting code, or when replacing manual diagram regeneration with an automated CI/CD pipeline.
npx skillsauth add pjt222/agent-almanac setup-putior-ciInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Konfigurieren GitHub Actions to automatisch regenerate workflow diagrams when Quellcode changes, keeping documentation in sync with code.
README.md, docs/workflow.md)"github")"./R/" or "./src/")main)Erstellen der Workflow YAML file for automated diagram generation.
# .github/workflows/update-workflow-diagram.yml
name: Update Workflow Diagram
on:
push:
branches: [main]
paths:
- 'R/**'
- 'src/**'
- 'scripts/**'
permissions:
contents: write
jobs:
update-diagram:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install putior
run: |
install.packages("putior")
shell: Rscript {0}
- name: Generate workflow diagram
run: |
Rscript scripts/generate-workflow-diagram.R
- name: Commit updated diagram
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add README.md docs/workflow.md # Adjust to match your target files
git diff --staged --quiet || git commit -m "docs: update workflow diagram [skip ci]"
git push
Erwartet: File created at .github/workflows/update-workflow-diagram.yml.
Bei Fehler: Sicherstellen the .github/workflows/ directory exists. Anpassen the paths filter to match where annotated Quelldateis live in das Repository.
Erstellen the R script that generates the diagram and updates target files using sentinel markers.
# scripts/generate-workflow-diagram.R
library(putior)
# Scan source files for annotations (exclude build scripts to avoid circular refs)
workflow <- put_merge("./R/", merge_strategy = "supplement",
exclude = c("generate-workflow-diagram\\.R$"),
log_level = NULL) # Set to "DEBUG" to troubleshoot CI diagram generation
# Generate Mermaid code
mermaid_code <- put_diagram(workflow, output = "raw", theme = "github")
# Read target file (e.g., README.md)
readme <- readLines("README.md")
# Find sentinel markers
start_marker <- "<!-- PUTIOR-WORKFLOW-START -->"
end_marker <- "<!-- PUTIOR-WORKFLOW-END -->"
start_idx <- which(readme == start_marker)
end_idx <- which(readme == end_marker)
if (length(start_idx) == 1 && length(end_idx) == 1 && end_idx > start_idx) {
# Replace content between sentinels
new_content <- c(
readme[1:start_idx],
"",
"```mermaid",
mermaid_code,
"```",
"",
readme[end_idx:length(readme)]
)
writeLines(new_content, "README.md")
cat("Updated README.md workflow diagram\n")
} else {
warning("Sentinel markers not found in README.md. Add them manually:\n",
start_marker, "\n", end_marker)
}
# Also write standalone diagram file
writeLines(
c("# Workflow Diagram", "",
"```mermaid", mermaid_code, "```"),
"docs/workflow.md"
)
cat("Updated docs/workflow.md\n")
Erwartet: Script at scripts/generate-workflow-diagram.R that reads annotations, generates Mermaid code, and replaces content zwischen sentinel markers.
Bei Fehler: If put_merge() returns empty, check that source paths match das Repository layout. Anpassen "./R/" to the actual source directory.
The workflow must avoid infinite loops where an auto-commit re-triggers the same workflow. Pushes made with the default GITHUB_TOKEN typischerweise nicht trigger new workflow runs, but der Workflow also includes an explicit if: guard on the job as a safety net.
Key configuration points:
Berechtigungs: contents: write grants push accessif: github.actor != 'github-actions[bot]' skips the job when the push came from the bot itselfgit diff --staged --quiet || git commit only commits if there are changes[skip ci] in the commit message is a convention some CI systems honor (not built into GitHub Actions, but useful as a signal)github-actions[bot]Erwartet: The workflow only commits when diagrams actually change. No empty commits, no infinite loops.
Bei Fehler: If push fails with Berechtigung denied, check repository settings: Settings > Actions > General > Workflow Berechtigungs muss set to "Lesen and write Berechtigungs".
Insert sentinel markers in das Ziel file where the diagram should appear.
## Workflow
<!-- PUTIOR-WORKFLOW-START -->
<!-- This section is auto-generated by putior CI. Do not edit manually. -->
```mermaid
flowchart TD
A["Placeholder — wird replaced on next CI run"]
<!-- PUTIOR-WORKFLOW-END -->
**Erwartet:** Sentinel markers in README.md (or other target file). The content zwischen them wird replaced on each CI run.
**Bei Fehler:** Sicherstellen markers are on their own lines with no leading/trailing whitespace. The script matches exact line content.
### Schritt 5: Testen the Pipeline
Ausloesen der Workflow and verify the diagram updates.
```bash
# Make a small change to trigger the workflow
echo "# test" >> R/some-file.R
git add R/some-file.R
git commit -m "test: trigger workflow diagram update"
git push
# Monitor the GitHub Actions run
gh run watch
# Verify the diagram was updated
git pull
cat README.md | grep -A 5 "PUTIOR-WORKFLOW-START"
Erwartet: GitHub Actions run completes erfolgreich. The diagram zwischen sentinel markers in README.md is updated with current workflow data.
Bei Fehler: Check the Actions log for errors. Common issues:
putior package not available: add to DESCRIPTION Suggests or install explicitly in der Workflowput_merge() path muss relative to the repo root.github/workflows/update-workflow-diagram.yml exists and is valid YAMLscripts/generate-workflow-diagram.R runs ohne errors locally<!-- PUTIOR-WORKFLOW-START --> and <!-- PUTIOR-WORKFLOW-END --> sentinelsif: guard prevents infinite commit loops from bot pushesGITHUB_TOKEN typischerweise don't trigger new runs, but always add an explicit if: github.actor != 'github-actions[bot]' guard on the job. The [skip ci] tag in the commit message is a useful convention but ist nicht a built-in GitHub Actions mechanism.Berechtigungs: contents: write in der Workflow file, or configure it in repository settings."./R/" or "./src/" must match the actual Verzeichnisstruktur.renv::restore() vor putior ist verfuegbar. Alternatively, install putior explicitly in der Workflow.paths trigger filter to directories that contain PUT annotations, not the entire repo.generate-workflow-diagram — the manual version of what this CI automatessetup-github-actions-ci — general GitHub Actions CI/CD setup for R packagesbuild-ci-cd-pipeline — broader CI/CD pipeline designannotate-source-files — annotations must exist vor CI can generate diagramscommit-changes — understanding auto-commit patternstesting
Launch all available agents in parallel waves for open-ended hypothesis generation on problems where the correct domain is unknown. Use when facing a cross-domain problem with no clear starting point, when single-agent approaches have stalled, or when diverse perspectives are more valuable than deep expertise. Produces a ranked hypothesis set with convergence analysis and adversarial refinement.
tools
Write integration tests for a Node.js CLI application using the built-in node:test module. Covers the exec helper pattern, output assertions, filesystem state verification, cleanup hooks, JSON output parsing, error case testing, and state restoration after destructive tests. Use when adding tests to an existing CLI, testing a new command, verifying adapter behavior across frameworks, or setting up CI for a CLI tool.
development
Screen a proposed trademark for conflicts and distinctiveness before filing. Covers trademark database searches (TMview, WIPO Global Brand Database, USPTO TESS), distinctiveness analysis using the Abercrombie spectrum, likelihood of confusion assessment using DuPont factors and EUIPO relative grounds, common law rights evaluation, and goods/services overlap analysis. Produces a conflict report with a risk matrix. Use before adopting a new brand name, logo, or slogan — distinct from patent prior art search, which uses different databases, legal frameworks, and analysis methods.
tools
Scaffold a new CLI command using Commander.js with options, action handler, three output modes (human-readable, quiet, JSON), and optional ceremony variant. Covers command naming, option design, shared context patterns, error handling, and integration testing. Use when adding a command to an existing Commander.js CLI, designing a new CLI tool from scratch, or standardizing command structure across a multi-command CLI.