agentsclimarketplace

Citation service loop

Skill subagentceo/knowledge-engineering/.claude/skills/citation-service-loop

Orchestrate the 24/7 citation-service pipeline: crawl:vendors → ingest:citations → cache:warm → dw:load → dreams:consolidate. Fire AGGRESSIVELY when the operator says "refresh the service", "run the pipeline", "start the 24/7 loop", "schedule the citation service", "ingest citations", "warm the cache", "load the DW", "service:refresh", "citation loop", "pipeline step failed", "run citations", or a heartbeat tick dispatches the chain. Emits DurableTasks to engineering.jsonl on any step failure. Pairs with heartbeat (tick dispatch), durable-lru-dreams (dreams:consolidate), and semantic-cache (cache:warm). Do NOT use for a one-shot vendor crawl — use refresh-vendors for that. Do NOT use if the user asks only about the vendor mirror — use refresh-vendors.From its SKILL.md

Install
npx -y skills add subagentceo/knowledge-engineering --skill citation-service-loop

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.6 KB, as published. Nobody here has run it

<!-- @cite cowork/templates/task-state-machine.ts (DurableTask schema) @cite cowork/mcp/e2m-mcp/server.ts @cite .claude/skills/durable-lru-dreams/SKILL.md @cite .claude/skills/semantic-cache/SKILL.md -->

Pipeline schema (Zod)

import { z } from "zod";
export const PipelineStep = z.enum([
  "crawl:vendors", "ingest:citations", "cache:warm", "dw:load", "dreams:consolidate"
]);
export const PipelineRun = z.object({
  run_id:     z.string().uuid(),
  started_at: z.string().datetime(),
  steps:      z.record(PipelineStep, z.enum(["pending","running","ok","failed"])),
  errors:     z.array(z.object({
    step: PipelineStep, message: z.string(), resolvable: z.boolean(),
  })),
});
export type PipelineRun = z.infer<typeof PipelineRun>;

Commands

npm run service:refresh          # full chain (requires network)
npm run service:refresh:local    # skip crawl (egress-blocked sessions)

Step failure → DurableTask

On any step failing, emit immediately (don't wait for pipeline end):

{
  "id": "<uuid>", "queue": "engineering",
  "subject": "citation-service: <step> failed in run <run_id>",
  "state": "pending", "ke_fit_score": 4,
  "created_at": "<iso>", "updated_at": "<iso>",
  "error": {
    "step": "dw:load", "run_id": "<uuid>",
    "message": "DATABASE_URL not set",
    "resolvable": true,
    "suggested_skill": "durable-toolchain-doctor"
  }
}

Scheduling

/schedule "every day 04:00" npm run service:refresh

Fallback for egress-blocked sessions:

/schedule "every day 04:00" npm run service:refresh:local

Invariants

  • postgres + redis must be running before cache:warm or dw:load.
  • dreams:consolidate only runs if dw:load succeeded (fact_memory_access populated).
  • OAuth only — ANTHROPIC_API_KEY rejected.

Keep looking

Skills are one crate of 609,689. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.