moda-design/moda

moda-automate

- Recurring Moda work — scheduled posts, weekly reports, sync jobs: a host-side scheduler drives the Moda command line; the artifact itself still routes to its format skill.

Vedi sorgente
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

moda-automate

<!-- moda:banner --> PREREQUISITE — load `moda-core` once per session (step-0, write contract, free/metered map). Already loaded? Skip ahead. If you cannot load it, the non-negotiables: run moda doctor --json before anything; moda brand list before creating; writes that pin a revision use your last read's — on stale_revision, re-read and retry once (it heals); send the canvas link the moment it exists; stuck or failed? moda ask "<question>" — free and fast, never guess. <!-- /moda:banner -->

Say the architecture plainly, once

Moda hosts no scheduler. Recurring Moda work is a scheduler you already have — cron, launchd, a systemd timer, a CI schedule — running Moda on a cadence.

  • Moda produces; your scheduler delivers. Nothing in Moda posts to a

platform or sends mail. Each tick leaves a canvas link and an export file; the publishing step belongs to the host, and you say so before promising it.

  • The artifact still routes to its format skill. This skill owns the

schedule and the unattended-run discipline; moda-social, moda-document, moda-chart and the rest own what each tick actually builds.

Make one run work unattended, then schedule it

  1. Run it by hand end to end first. A schedule wrapped around a broken run

fails quietly forever.

  1. Auth with no browser: the user mints a key at moda.app/cli/auth, and the

scheduler gets it as MODA_API_KEY in its environment. (moda auth login --paste needs an interactive prompt, so it is not the unattended lane.) Never print, echo, log, or commit a key.

  1. Every command takes --json --no-input: it fails instead of prompting, and

you decide from the JSON fields, not the human prose.

  1. Pin the workspace so the script carries no flags — .moda/context.json

(load moda-context) for org, brand, and canvas.

  1. No browser verbs in a detached run: moda canvas open and its siblings are

for a person at a keyboard.

  1. Writes to one canvas stay serial. They serialize on the server anyway, so a

parallel batch buys nothing and can come back canvas_busy.

# crontab — Mondays 08:00; the wrapper holds the steps, the environment holds the key
0 8 * * 1  cd /srv/reports && ./moda-weekly.sh >> /var/log/moda-weekly.log 2>&1

Three shapes cover almost everything

ShapeEach tickWhy it wins
Refresh one canvas (weekly report)read the pinned canvas → edit → export → deliverthe link never changes, so anyone watching it just sees the update
New artifact per tick (weekly post set)instantiate the team template → author → exportmoda-templates keeps every week on the approved layout
Sync jobpull the source data → author → export where the delivery step looksModa never reaches into your systems; the fetch is yours

Whichever shape it is, load the format skill for the authoring half — this skill does not teach how to build the artifact.

Discipline for a run nobody is watching

  • A failed write commits nothing: retry once is safe. stale_revision heals on

a re-read and retry.

  • Same typed error twice → stop this tick, record moda last-error, let the

next tick try. Never spin.

  • An identical repeated metered call REPLAYS its result instead of charging

twice — retrying with the same inputs is safe; a reworded prompt is a new charge, so never "retry" generation by nudging the wording.

  • Keep the log: what ran, the canvas link, the export path, and the failure if

there was one. An unattended run that reports nothing is indistinguishable from one that never ran.

Hand back the schedule itself

Tell the user the literal schedule line you installed, where it lives, which skill builds the artifact, and how to turn it off. A schedule they cannot find is a schedule they cannot trust — and never install one they did not ask for.

Examples

  • "post our metrics chart to Slack every Monday" → this skill installs the

weekly run, moda-chart builds the chart, the Slack step is the host's.

  • "keep the launch one-pager up to date" → refresh-one-canvas shape;

moda-document owns the page.

  • "a fresh set of posts every week" → new-artifact shape off a team template;

the platform's moda-social child owns the creative.

  • "every night, turn yesterday's numbers into a chart" → sync-job shape; pin

the repo first (moda-context) so the tick needs no flags.

Errors

Any typed error → load moda-core and read its recovery reference. Auth failures in an unattended run are almost always a missing or expired MODA_API_KEY in the scheduler's environment — check it there, not in the interactive shell where it works.

See also: moda-core — the contract, recovery, everything Moda can do.

dallo stesso repository

Altri Skills

Tutti gli Skills
moda-design
Community

moda-context

- Pin a repo to Moda defaults via .moda/context.json — org, brand, canvas — so every run in this repo lands in the right place. CLI-only: these defaults are files on your disk.

installazioni
1
GitHub Stars
0
Aggiornato
20 set
moda-design
Community

moda-deck-theme

- A deck's visual theme, designed with you before any content exists: four title directions, section heads and a closing, then eight workhorse layouts — placeholder only, approved phase by phase.

installazioni
1
GitHub Stars
0
Aggiornato
20 set
moda-design
Community

moda-diagram

- Boxes-and-arrows diagrams on Moda with anchored connectors: flowchart, org chart, architecture, decision tree, swimlane, journey map, 2x2, quadrant, market map. Use for: "diagram this". NOT: data charts → moda-chart; UI screens/wireframes → moda-mockup; a decorative shape graphic (a circle with a caption) → moda-social; a diagram for a deck/document being built stays with that skill.

installazioni
1
GitHub Stars
0
Aggiornato
20 set
moda-design
Community

moda-document

- Design documents on Moda — one page or fifty: one-pager, report, brief, whitepaper, proposal, fact sheet, handout, infographic; US-Letter/A4 pages on a live canvas, exported as a real PDF with selectable text. Use for: PDF (any page count), newsletter, email HTML, "make this markdown/README look designed". NOT: print pieces (poster, flyer, menu, resume, cards) → moda-document-print; slides → moda-deck; animated/motion → moda-video.

installazioni
1
GitHub Stars
0
Aggiornato
20 set