Skip to main content
T2 chain · SEO / content marketing: two nika:fetch extractions chained (sitemap mode, then article mode), a jq slice binding, CEL indexing, and a schema-typed brief at the end.

The job

« Write something that ranks for X » usually starts with an hour of tab-hopping through the competitor’s site. This workflow maps their sitemap, reads their best page on the topic, finds the gaps, and hands your writer a typed brief: title, angle, outline, keywords.

The shape

The file

seo-content-brief.nika.yaml

How it works

1

Sitemap mode + a jq slice

mode: sitemap returns the URL list; the output: binding top: ".[:5] | map(.loc)" keeps just the head of it, as bare loc URLs. Bindings are jq: slices, filters, everything.
2

CEL indexes into the binding

The second fetch binds map_top: ${{ tasks.map.top[0] }} in with:: index access is part of the CEL subset, and the binding IS the edge — every reference is a visible edge, declared where the data crosses.
3

The brief is a contract

title · angle · outline · keywords: your writer (or your next workflow) consumes fields, not a wall of prose.

Constructs you just used

Make it yours

  • Brief the top THREE pages instead of one: bind top: ${{ tasks.map.top }} in with: and fan out with for_each: ${{ with.top }}. The fan-out tier shows how (Competitor radar).
  • Feed your own sitemap too and ask the model for internal-linking opportunities.
  • Pipe the brief straight into a draft: a second infer consuming ${{ tasks.brief.output.outline }}.

Next · Invoice chaser

CSV → JSON with nika:convert, a jq filter, and the three-line human-approval gate.