stark-ai-de/agent-skills / plugins/stark-ai-developer/skills/visual-reports
visual-reports
VerifiedCreate and update visual reports with optional native interaction, one guided topic at a time, useful diagrams, concise points, joint comparisons and complete offline HTML/Markdown/JSON exports. Use when richer output helps an authorized answer or the user asks for a visual report; keep small answers in chat. Not production application UI or clinical advice.
assets/preview.js
View on GitHub// SPDX-License-Identifier: Apache-2.0
(() => {
const byId = (id) => document.getElementById(id),
frame = byId("report"),
select = byId("versions");
let loaded = null,
latest = null,
requested = null,
initialRequested = false,
pendingView = null;
const view = () => frame.contentWindow?.visualReportView;
const announce = (text) => {
byId("notice").textContent = text;
};
function apply(revision) {
if (!revision || revision === loaded) return;
if (requested) {
announce("Eine Revision wird noch geladen. Bitte warten, bevor Sie erneut übernehmen.");
return;
}
if (view()?.isDirty() && !byId("discard").checked) {
announce(
"Ungesicherter Entwurf geschützt. Erst exportieren oder ausdrücklich Verwerfen wählen.",
);
return;
}
pendingView ??= view()?.capture() ?? null;
if (byId("discard").checked) view()?.discardDraft();
requested = revision;
byId("discard").checked = false;
frame.src = `/revision/${revision}/report.html`;
select.value = revision;
announce("Revision wird geladen …");
}
frame.addEventListener("load", () => {
if (!requested) return;
const revision = requested;
if (new URL(frame.contentWindow.location.href).pathname !== `/revision/${revision}/report.html`)
return;
const reportView = view();
if (!reportView || typeof reportView.capture !== "function") {
requested = null;
announce(
"Revision konnte nicht geladen werden. Wählen Sie Übernehmen, um es erneut zu versuchen.",
);
return;
}
loaded = revision;
requested = null;
select.value = revision;
for (const ext of ["html", "md", "json"])
byId(ext).href = `/revision/${revision}/report.${ext}`;
if (pendingView) reportView.restore(pendingView);
pendingView = null;
announce(
revision === latest
? "Aktueller Stand übernommen."
: "Historischer Stand geöffnet. Ein neuerer Stand ist verfügbar.",
);
});
byId("apply").addEventListener("click", () => apply(select.value));
byId("draft").addEventListener("click", () => view()?.exportDraft());
window.addEventListener("beforeunload", (e) => {
if (view()?.isDirty()) {
e.preventDefault();
e.returnValue = "";
}
});
async function poll() {
try {
const response = await fetch("/current", { cache: "no-store" });
if (!response.ok) throw new Error("Unavailable");
const data = await response.json();
const previous = latest;
latest = data.revision;
const selected = select.value;
select.replaceChildren(
...data.history.map((revision, i) => {
const option = document.createElement("option");
option.value = revision.revision;
option.textContent = `${revision.createdAt}${i === 0 ? " · aktuell" : ""}`;
return option;
}),
);
select.value = selected || latest;
if (!loaded && !initialRequested && !requested) {
initialRequested = true;
apply(latest);
} else if (loaded && previous !== latest && loaded !== latest) {
select.value = latest;
announce(
"Neuer Stand verfügbar. Mit Übernehmen wechseln; der angezeigte Report bleibt erhalten.",
);
}
} catch {
announce("Vorschau-Verbindung unterbrochen. Der geöffnete Report bleibt lesbar.");
}
setTimeout(poll, 1500);
}
poll();
})();
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |