ZenUml/conf-app / .claude/skills/find-macros-on-page
find-macros-on-page
VerifiedList ZenUML (and other) macros on any Confluence page in render order, with their customContentId, type, title, and ADF localId — and fetch a chosen macro's stored body (DrawIO XML / Mermaid / PlantUML / ZenUML DSL / OpenAPI). Two operations, one skill. Use whenever investigating a customer page, locating which macro to inspect/reproduce, correlating "the third diagram on page X" to a specific customContentId, or extracting a stored macro source for rebuild. Triggers on "what macros are on this page", "find the macro at <URL>", "fetch the macro source", "extract macro XML", "rebuild this customer's macro", or any starting step of a customer-page investigation.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.9 KB |
| scripts/fetch-source-snippet.js | script | 2.2 KB |
| scripts/fetch.mjs | script | 3.3 KB |
| scripts/list.mjs | script | 5.3 KB |
| scripts/snippet.js | script | 2.4 KB |
scripts/snippet.js
View on GitHub// Paste into Playwright MCP `browser_evaluate` or claude-in-chrome `javascript_tool`
// after navigating to ANY Confluence page on the tenant. Uses the page's own
// cookies — no API token required. Works on customer tenants the user can
// view in their browser.
//
// Returns: { renderedCount, rendered, orphans, totalCC }
// `rendered` is every ADF extension node (including third-party apps) in page
// order. Filter `moduleKey` to just `zenuml-*-macro-*` to see only our macros.
(async () => {
// Pull the page id from the URL (works on any /wiki/spaces/.../pages/<id>/... page)
const m = location.pathname.match(/\/pages\/(\d+)/);
const pageId = m ? m[1] : null;
if (!pageId) return { err: "no /pages/<id> in URL — navigate to a page first" };
const [pageRes, ccRes] = await Promise.all([
fetch(`/wiki/api/v2/pages/${pageId}?body-format=atlas_doc_format`, { credentials: "include" }).then(r => r.json()),
fetch(`/wiki/api/v2/pages/${pageId}/custom-content?limit=250`, { credentials: "include" }).then(r => r.json()),
]);
if (!pageRes.body) return { err: "no page body", pageRes };
const adf = JSON.parse(pageRes.body.atlas_doc_format.value);
const ccById = new Map((ccRes.results || []).map(c => [c.id, c]));
const exts = [];
(function walk(n) {
if (!n || typeof n !== "object") return;
if (n.type === "extension" || n.type === "bodiedExtension" || n.type === "inlineExtension") exts.push(n);
if (Array.isArray(n.content)) for (const c of n.content) walk(c);
})(adf);
const rendered = exts.map((ext, i) => {
const ccId = ext.attrs?.parameters?.guestParams?.["custom-content-id"]
|| ext.attrs?.parameters?.guestParams?.customContentId;
const cc = ccId ? ccById.get(String(ccId)) : null;
const key = ext.attrs?.extensionKey || "";
return {
pos: i + 1,
moduleKey: key.slice(key.lastIndexOf("/") + 1),
customContentId: ccId || null,
title: cc?.title ?? null,
contentType: (cc?.type || "").split(":").pop(),
localId: ext.attrs?.parameters?.localId || "",
};
});
const renderedIds = new Set(rendered.map(r => String(r.customContentId)).filter(Boolean));
const orphans = (ccRes.results || [])
.filter(c => !renderedIds.has(String(c.id)))
.map(c => ({ id: c.id, type: (c.type || "").split(":").pop(), title: c.title }));
return { renderedCount: rendered.length, rendered, orphanCount: orphans.length, orphans };
})();
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |