dag-best-practices

dag-best-practices is a skill for Claude Code, Codex from xiaotianfotos/homerail. It costs 48 tokens per session (943 once invoked), scanned A, original, MIT.

A set of practices for checking and running HomeRail DAGs, which are workflows where tasks branch out and later join together. It focuses on shared facts, clear handoffs, and evidence for each result.

In plain words
What is it for?
Use it when designing, running, or reviewing model-backed DAGs. It helps structure checks for code, builds, runtime health, data retention, environment access, and final decisions.
Why use it?
It prevents different tasks from using conflicting information or claiming success without proof, especially when environments differ.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing, running, or reviewing model-backed DAGs. It helps structure checks for code, builds, runtime health, data retention, environment access, and final decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaotianfotos/homerail/dag-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xiaotianfotos/homerail --skill dag-best-practices
Clone the repo
git clone --depth 1 https://github.com/xiaotianfotos/homerail

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dag-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaotianfotos/homerail/dag-best-practices/github.svg)](https://agentmods.dev/skills/xiaotianfotos/homerail/dag-best-practices)
Your own site
<a href="https://agentmods.dev/skills/xiaotianfotos/homerail/dag-best-practices"><img src="https://agentmods.dev/badge/skills/xiaotianfotos/homerail/dag-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dag-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaotianfotos/homerail/dag-best-practices"><img src="https://agentmods.dev/badge/skills/xiaotianfotos/homerail/dag-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 943 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00943
Opus 5 $0.00024 $0.00472
Sonnet 5 $0.00010 $0.00189
Haiku 4.5 $0.00005 $0.00094

Measured 13d ago against content hash e64e7d66e093, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

dag-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

assets/orchestrations/dag-best-practices/SKILL.md · 50 lines

What it actually says

HomeRail DAG 最佳实践

一句话原则:先统一事实,再分头检查,最后只按证据下结论。

DO

  • 先建立唯一事实源。用 seed 节点拿到代码、版本、输入参数和外部证据,再把同一份事实交给所有下游节点。
  • 让每个节点只回答一个清晰问题,例如源码是否干净、构建是否通过、运行时是否健康、数据是否保留。
  • 让节点真的检查事实。该跑命令就跑命令,该读文件就读文件,该查 API 就查 API,不要只复述提示词。
  • 让节点输出结构化 handoff。至少包含结论、证据、缺口、阻塞原因;失败时给出可行动的修复方向。
  • 让 fan-in 节点只做裁决。它可以汇总和判断,但不应该重新做所有检查,也不应该替上游补证据。
  • 把 hard gate 和 advisory 分开。必须通过的检查失败就阻塞;参考意见只能提示风险,不能替代证据。
  • 把运行环境差异当成默认存在。宿主机、容器、本地、远端、CI 看到的路径、网络、权限、工具链可能都不同。
  • 把会改变运行时的动作放在 DAG 外或明确隔离。部署、迁移、重启服务这类动作不要破坏正在执行 DAG 的基础设施。
  • 给长期状态留 baseline。涉及升级、迁移、用户数据、配置和历史记录时,先记录基准,再用后续运行对比。
  • 留下可复查的证据。每次运行都应该能回答:看了什么、跑了什么、结果是什么、为什么通过或阻塞。
  • 用小 smoke 验证流程,用真实任务验证能力。快速 smoke 证明线路能通,真实模型和真实命令才证明任务完成质量。
  • 使用执行环境真的能访问的地址、路径和凭证。给容器节点的输入,要从容器视角验证可用。

DO NOT

  • 不要让节点各自使用不同事实源。版本不一致时,后面的汇总没有意义。
  • 不要把模糊自然语言当成节点间协议。节点间传递要用结构化字段,不要靠读聊天猜含义。
  • 不要让一个节点承担太多职责。职责越混,失败原因越难定位。
  • 不要把没输出结果的节点算作成功。没有 handoff 就是缺证据。
  • 不要自动补 handoff 后继续判通过。自动补只能说明节点没有按契约完成。
  • 不要让 fan-in 节点靠感觉补全缺失信息。缺少证据就阻塞,而不是猜测通过。
  • 不要把参考意见当成硬结论。LLM review、人工建议、摘要和 smoke 都不能替代 hard gate 的实际证据。
  • 不要把快速跑通说成完整完成。smoke 是线路检查,不是质量证明。
  • 不要默认所有环境都一样。宿主机能访问,不代表容器能访问;本机能跑,不代表 CI 能跑。
  • 不要只保存最终结论,不保存过程证据。没有过程,结论无法复查。
  • 不要隐藏不确定性。没查到、没权限、环境不可达、证据不足,都应该明确写进结果。
  • 不要把 token、本机路径、私有地址、临时目录写死在可复用模板里。需要这些值时,通过运行参数或环境配置传入。

快速检查

  • 有没有唯一事实源?
  • 每个节点的问题是否足够单一?
  • 每个节点是否会产生结构化 handoff?
  • fan-in 是否只基于 handoff 和 evidence 下结论?
  • hard gate 和 advisory 是否分清?
  • smoke 和真实验证是否分清?
  • 运行环境的网络、路径、权限是否从执行节点视角验证过?
  • 失败时是否能直接看出原因和下一步?
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 50 lines · 48 tokens per session scan A e64e7d66e093

Subscribe to this mod's changes

dag-best-practices is a skill published in the GitHub repository xiaotianfotos/homerail (951 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 943 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens