Formulas
Transforme qualquer comando CLI em um workflow confiável e repetível
Copy any prompt below and use it with the Dagu AI assistant. Install Dagu/Set up the AI skill
Daily Standup Prep
Fetch your GitHub activity across all orgs, generate a spoken standup draft per org with Claude.
Use the Dagu skill to create a daily standup preparation workflow. Refer to the schema, coding agent, and pitfalls references for correct syntax. Ask the user: - How many days back should the report cover? (default: 1) - What time should it run on weekdays? (default: 8:00 AM) - Which AI coding agent CLI do they have installed? (check for claude, codex, gemini, opencode, aider in that order — use the first one found, or ask if none detected) Prerequisites: gh CLI authenticated (gh auth login), at least one AI coding agent CLI installed. The workflow should: 1. Fetch the user's GitHub activity using gh api graphql with --jq for server-side JSON formatting (do NOT use jq CLI). Fetch commits per repo (with messages via REST), merged PRs (with body), open/draft PRs updated in the period (with recent commits and timestamps, grouped by repo), and reviews. 2. Auto-discover all organizations from the activity and group everything by org. 3. For each org with activity, use an inline sub-DAG (--- separator) to generate a spoken standup draft using the user's AI agent CLI. Use the cheapest/fastest model available for that agent since this is a simple text summarization task. Skip the call entirely for orgs with no activity to avoid wasting tokens. 4. The agent command, model, and draft prompt should all be defined as top-level env variables (use YAML multiline | for the prompt) so users can easily swap agents or customize the output without editing step logic. 5. Assemble each org section as markdown: spoken draft, merged PRs, open PRs grouped by repo with commit history and timestamps, and reviews. 6. Combine all org sections into a single report saved to DAG_DOCS_DIR. 7. Schedule on weekdays with catchup, retry defaults, and timeouts on agent steps. Important: review the pitfalls reference for known workarounds. Follow the coding agent reference for the correct non-interactive command and model flags for each agent CLI.
Release Notes Generator
Generate formatted release notes from git tags with PR details, linked issues, and contributor credits.
Use the Dagu skill to create a release notes generator workflow. Refer to the schema, coding agent, and pitfalls references for correct syntax. Ask the user: - Which repository? (default: the current repo, detected via gh repo view --json nameWithOwner) - Which tags to compare? (default: latest tag vs previous tag, auto-detected) Prerequisites: gh CLI authenticated (gh auth login), at least one AI coding agent CLI installed. The workflow should: 1. Resolve the two git tags to compare. If not specified, auto-detect the latest and previous tags using the GitHub API. Output them as JSON so downstream steps can reference individual fields via JSON path (e.g. ${TAGS.to}). 2. Extract all PR numbers from commits between the two tags using the GitHub compare API with --jq (do NOT use jq CLI). Output one PR number per line. 3. For each PR, fetch details via gh api graphql: number, title, author login, body summary (first ~300 chars), labels, and closingIssuesReferences (number, title, author login). Build a JSON array from the results. - CRITICAL: When iterating over output from a previous step, do NOT use "for X in $VAR" — Dagu captures multiline output into a single string variable, so word splitting does not work. Instead, read the previous step's stdout file line by line: `while IFS= read -r line; do ... done < "${prev_step.stdout}"`. Strip non-numeric characters from each line with `tr -dc '0-9'` before passing to the GraphQL query. - The gh GraphQL query string uses $-prefixed variable names ($owner, $name, $num). These are safe in Dagu scripts because Dagu only expands ${braced} variables and bare $varname patterns that match defined Dagu variables — undefined bare $names are preserved as-is for the shell. However, pass integer variables to -F without quotes (e.g. -F num=$NUM not -F num="$NUM") so gh sends them as integers, not strings. 4. Use a single AI agent step (auto-detect which CLI is available, use the cheapest model) to both categorize each PR and format the final release notes. Feed it the PR details JSON, the changelog template, and context (repo, tags, date, repo owner to exclude from contributors). 5. Save the output to DAG_DOCS_DIR. 6. Use defaults.retry_policy and timeout_sec: 300 on the AI agent step. The changelog format template MUST be defined as a top-level env variable using YAML multiline (|) so users can customize the output without editing step logic. Use this exact template: ``` ## {VERSION} ({DATE}) ### Added - Short title: Description of what was added. ([#PR](https://github.com/{REPO}/pull/PR)) ### Changed - Short title: Description of what changed. ([#PR](https://github.com/{REPO}/pull/PR)) ### Fixed - Short title: Description of what was fixed. ([#PR](https://github.com/{REPO}/pull/PR)) ### Contributors Thanks to our contributors for this release: | Contribution | Contributor | | --- | --- | | Short description of contribution ([#N](link)) | [@user](https://github.com/user) | | Bug report title ([#N](link)) | [@user](https://github.com/user) (report) | Rules: - Each entry starts with a short bolded-style title, then colon, then description. - Group multiple contributions by the same person into one row. - PR authors get a plain entry. Issue reporters get (report) suffix. - Do NOT include the repository owner as a contributor. **Full Changelog**: [{FROM}...{TO}](https://github.com/{REPO}/compare/{FROM}...{TO}) ``` Important: review the pitfalls reference for known workarounds. Follow the coding agent reference for the correct non-interactive command and model flags for each agent CLI.