@1aboveio/skills 1.0.34 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +1 -1
- package/.codex-plugin/resources.json +176 -131
- package/README.md +2 -2
- package/package.json +6 -4
- package/skills/app-dev/airflow/SKILL.md +1 -1
- package/skills/app-dev/android-development/SKILL.md +1 -1
- package/skills/app-dev/app-debug/SKILL.md +1 -1
- package/skills/app-dev/better-auth/SKILL.md +1 -1
- package/skills/app-dev/data-catalog/SKILL.md +1 -1
- package/skills/app-dev/data-quality/SKILL.md +1 -1
- package/skills/app-dev/ios-foundation/SKILL.md +1 -1
- package/skills/app-dev/maestro/SKILL.md +1 -1
- package/skills/app-dev/monorepo/SKILL.md +1 -1
- package/skills/app-dev/nextjs-fullstack/SKILL.md +1 -1
- package/skills/app-dev/prisma-setup/SKILL.md +1 -1
- package/skills/app-dev/pyspark/SKILL.md +1 -1
- package/skills/app-dev/python-backend/SKILL.md +1 -1
- package/skills/app-dev/shadcn/SKILL.md +1 -1
- package/skills/app-dev/zod-v4/SKILL.md +1 -1
- package/skills/cicd/cloud-build/SKILL.md +1 -1
- package/skills/cicd/cloud-debug/SKILL.md +1 -1
- package/skills/cicd/cloud-deploy/SKILL.md +1 -1
- package/skills/cicd/docker/SKILL.md +1 -1
- package/skills/cicd/github-actions/SKILL.md +1 -1
- package/skills/cicd/github-flow/SKILL.md +1 -1
- package/skills/cicd/google-cloud/SKILL.md +1 -1
- package/skills/cicd/mergify/SKILL.md +1 -1
- package/skills/cicd/podman/SKILL.md +1 -1
- package/skills/content/article-review/SKILL.md +1 -1
- package/skills/content/article-to-image/SKILL.md +1 -1
- package/skills/content/flowchart-svg/SKILL.md +1 -1
- package/skills/content/image-gen/SKILL.md +1 -1
- package/skills/content/mermaid/SKILL.md +1 -1
- package/skills/content/wechat-article-writer/SKILL.md +1 -1
- package/skills/content/wechat-publisher/SKILL.md +1 -1
- package/skills/content/wechat-search/SKILL.md +1 -1
- package/skills/content/xai-search/SKILL.md +1 -1
- package/skills/core/distill-writing/SKILL.md +1 -1
- package/skills/core/doc-to-md/SKILL.md +1 -1
- package/skills/core/editorial-review/SKILL.md +1 -1
- package/skills/core/house-style/SKILL.md +1 -1
- package/skills/core/plain-language/SKILL.md +1 -1
- package/skills/core/polish-cn/SKILL.md +1 -1
- package/skills/core/reg-parser/SKILL.md +1 -1
- package/skills/core/terminology/SKILL.md +1 -1
- package/skills/core/write-doc/SKILL.md +1 -1
- package/skills/core/write-report/SKILL.md +1 -1
- package/skills/engineering/acceptance-design/LICENSE +3 -0
- package/skills/engineering/acceptance-design/SKILL.md +47 -0
- package/skills/engineering/acceptance-design/references/project-setup.md +8 -0
- package/skills/engineering/acceptance-design/release-check.mjs +95 -0
- package/skills/engineering/better-review/SKILL.md +1 -1
- package/skills/engineering/e2e-test/SKILL.md +1 -1
- package/skills/engineering/engineering/SKILL.md +3 -1
- package/skills/engineering/engineering-runtime/SKILL.md +1 -1
- package/skills/engineering/engineering-runtime/coherence/workflow.json +32 -15
- package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +6 -1
- package/skills/engineering/ensure-coverage/SKILL.md +3 -1
- package/skills/engineering/golden-path/SKILL.md +1 -1
- package/skills/engineering/harness-runtime/SKILL.md +1 -1
- package/skills/engineering/resolve-issues/SKILL.md +3 -3
- package/skills/engineering/resolve-release/SKILL.md +1 -1
- package/skills/engineering/rush-issues/SKILL.md +1 -1
- package/skills/engineering/rush-release/SKILL.md +1 -1
- package/skills/engineering/test-quality/SKILL.md +3 -1
- package/skills/risk-compliance/compliance-audit/SKILL.md +1 -1
- package/skills/risk-compliance/contract-compare/SKILL.md +1 -1
- package/skills/risk-compliance/contract-review/SKILL.md +1 -1
- package/skills/risk-compliance/doc-authenticity/SKILL.md +1 -1
- package/skills/risk-compliance/fraud-detection/SKILL.md +1 -1
- package/skills/risk-compliance/payment-analysis/SKILL.md +1 -1
- package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +1 -1
- package/skills/risk-compliance/rfi-writing/LICENSE +3 -0
- package/skills/risk-compliance/rfi-writing/SKILL.md +162 -0
- package/skills/risk-compliance/rfi-writing/references/attachments.md +76 -0
- package/skills/risk-compliance/rfi-writing/references/narrative-rules.md +97 -0
- package/skills/risk-compliance/rfi-writing/references/review-brief.md +65 -0
- package/skills/risk-compliance/rfi-writing/references/worked-example.md +24 -0
- package/skills/risk-compliance/rfi-writing/release-check.mjs +95 -0
- package/skills/risk-compliance/rfi-writing/scripts/docx-case-extract.py +122 -0
- package/skills/risk-compliance/rfi-writing/scripts/images-to-pdf.sh +118 -0
- package/skills/risk-compliance/similar-domain/SKILL.md +1 -1
- package/skills/risk-compliance/tld-detection/SKILL.md +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Dump a Word case file as agent-readable text, and inventory its attachments.
|
|
3
|
+
|
|
4
|
+
python3 docx-case-extract.py case.docx [-o outdir]
|
|
5
|
+
|
|
6
|
+
Writes <stem>.md beside the document unless -o is given: paragraphs and tables
|
|
7
|
+
in document order, with [IMAGE word/media/imageN.png] markers where pictures sit,
|
|
8
|
+
so the narrative can be written against the sequence the author intended.
|
|
9
|
+
|
|
10
|
+
It also prints an inventory of word/media and word/embeddings. Read that section
|
|
11
|
+
before concluding a report is missing: a case file that says "Not application"
|
|
12
|
+
for KYC or AML traces may still carry the report as an embedded OLE object, and
|
|
13
|
+
an EMF/PDF icon in the page is usually a live PDF stream rather than a picture.
|
|
14
|
+
|
|
15
|
+
Why a script: every response run would otherwise rewrite this parser, and the
|
|
16
|
+
edge cases (tables, tabs, line breaks, pictures in runs) are where a hand-written
|
|
17
|
+
version silently drops content.
|
|
18
|
+
"""
|
|
19
|
+
import argparse
|
|
20
|
+
import re
|
|
21
|
+
import sys
|
|
22
|
+
import zipfile
|
|
23
|
+
from xml.etree import ElementTree as ET
|
|
24
|
+
|
|
25
|
+
W = "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
|
|
26
|
+
R = "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
|
|
27
|
+
NS = {"w": W}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def rels(z):
|
|
31
|
+
try:
|
|
32
|
+
xml = z.read("word/_rels/document.xml.rels").decode("utf8")
|
|
33
|
+
except KeyError:
|
|
34
|
+
return {}
|
|
35
|
+
return dict(re.findall(r'Id="([^"]+)"[^>]*Target="([^"]+)"', xml))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def para_text(p, relmap):
|
|
39
|
+
out = []
|
|
40
|
+
for node in p.iter():
|
|
41
|
+
tag = node.tag.split("}")[1]
|
|
42
|
+
if tag == "t":
|
|
43
|
+
out.append(node.text or "")
|
|
44
|
+
elif tag == "tab":
|
|
45
|
+
out.append("\t")
|
|
46
|
+
elif tag == "br":
|
|
47
|
+
out.append("\n")
|
|
48
|
+
elif tag == "blip":
|
|
49
|
+
out.append("[[IMAGE %s]]" % relmap.get(node.get("{%s}embed" % R), "?"))
|
|
50
|
+
elif tag == "imagedata": # legacy VML picture
|
|
51
|
+
out.append("[[IMAGE %s]]" % relmap.get(node.get("{%s}id" % R), "?"))
|
|
52
|
+
return "".join(out)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def style(p):
|
|
56
|
+
pPr = p.find("w:pPr", NS)
|
|
57
|
+
if pPr is None:
|
|
58
|
+
return None
|
|
59
|
+
s = pPr.find("w:pStyle", NS)
|
|
60
|
+
return s.get("{%s}val" % W) if s is not None else None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def extract(path):
|
|
64
|
+
z = zipfile.ZipFile(path)
|
|
65
|
+
relmap = rels(z)
|
|
66
|
+
root = ET.fromstring(z.read("word/document.xml"))
|
|
67
|
+
body = root.find("w:body", NS)
|
|
68
|
+
lines = []
|
|
69
|
+
tables = 0
|
|
70
|
+
for child in body:
|
|
71
|
+
tag = child.tag.split("}")[1]
|
|
72
|
+
if tag == "p":
|
|
73
|
+
txt = para_text(child, relmap)
|
|
74
|
+
if txt.strip() or "[[IMAGE" in txt:
|
|
75
|
+
st = style(child)
|
|
76
|
+
lines.append("## %s" % txt if st and st.lower().startswith("heading") else txt)
|
|
77
|
+
elif tag == "tbl":
|
|
78
|
+
tables += 1
|
|
79
|
+
lines.append("[TABLE %d]" % tables)
|
|
80
|
+
for tr in child.findall("w:tr", NS):
|
|
81
|
+
cells = [para_text(tc, relmap).replace("\n", " ").strip()
|
|
82
|
+
for tc in tr.findall("w:tc", NS)]
|
|
83
|
+
lines.append(" | ".join(cells))
|
|
84
|
+
lines.append("[/TABLE]")
|
|
85
|
+
media = sorted(n for n in z.namelist() if n.startswith("word/media/"))
|
|
86
|
+
embeddings = sorted(n for n in z.namelist() if n.startswith("word/embeddings/"))
|
|
87
|
+
return "\n".join(lines), media, embeddings, tables
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def main():
|
|
91
|
+
ap = argparse.ArgumentParser(description="Extract text, tables and an attachment inventory from a .docx")
|
|
92
|
+
ap.add_argument("docx")
|
|
93
|
+
ap.add_argument("-o", "--outdir", default=".")
|
|
94
|
+
args = ap.parse_args()
|
|
95
|
+
|
|
96
|
+
try:
|
|
97
|
+
text, media, embeddings, tables = extract(args.docx)
|
|
98
|
+
except (KeyError, zipfile.BadZipFile) as exc:
|
|
99
|
+
sys.exit("error: not a readable .docx (%s)" % exc)
|
|
100
|
+
|
|
101
|
+
import os
|
|
102
|
+
stem = os.path.splitext(os.path.basename(args.docx))[0]
|
|
103
|
+
out = os.path.join(args.outdir, stem + ".md")
|
|
104
|
+
header = "# %s — extracted\n\n" % stem
|
|
105
|
+
inv = ["", "## Attachment inventory", "",
|
|
106
|
+
"- pictures in word/media: %d" % len(media)]
|
|
107
|
+
inv += [" - %s" % m for m in media]
|
|
108
|
+
inv.append("- embedded objects in word/embeddings: %d" % len(embeddings))
|
|
109
|
+
inv += [" - %s" % e for e in embeddings]
|
|
110
|
+
if embeddings:
|
|
111
|
+
inv.append("")
|
|
112
|
+
inv.append("Embedded objects are usually live PDFs behind a page icon. Recover and read")
|
|
113
|
+
inv.append("them before reporting the underlying report missing.")
|
|
114
|
+
with open(out, "w") as fh:
|
|
115
|
+
fh.write(header + text + "\n" + "\n".join(inv) + "\n")
|
|
116
|
+
|
|
117
|
+
print(out)
|
|
118
|
+
print("tables: %d | media: %d | embeddings: %d" % (tables, len(media), len(embeddings)))
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
if __name__ == "__main__":
|
|
122
|
+
main()
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Combine images into a single PDF, one image per page, fit-to-page.
|
|
3
|
+
#
|
|
4
|
+
# images-to-pdf.sh -o out.pdf shot1.png shot2.png ...
|
|
5
|
+
# images-to-pdf.sh -o email.pdf --landscape email_01.png
|
|
6
|
+
#
|
|
7
|
+
# Why headless Chrome: it is already present on most operator machines, needs no
|
|
8
|
+
# Python packages, and renders exactly what a browser shows. ImageMagick and
|
|
9
|
+
# img2pdf are often absent, and Ghostscript-based paths fail silently on ICC
|
|
10
|
+
# profiles embedded by macOS screenshots.
|
|
11
|
+
#
|
|
12
|
+
# Orientation matters. A wide screenshot on an A4 portrait page sits small in the
|
|
13
|
+
# middle; pass --landscape when the images are wider than tall (email threads,
|
|
14
|
+
# dashboards, wide tables).
|
|
15
|
+
set -euo pipefail
|
|
16
|
+
|
|
17
|
+
LANDSCAPE=0
|
|
18
|
+
OUT=""
|
|
19
|
+
IMAGES=()
|
|
20
|
+
|
|
21
|
+
while [[ $# -gt 0 ]]; do
|
|
22
|
+
case "$1" in
|
|
23
|
+
-o|--output) OUT="$2"; shift 2 ;;
|
|
24
|
+
-l|--landscape) LANDSCAPE=1; shift ;;
|
|
25
|
+
-h|--help) awk 'NR==1{next} /^set -e/{exit} {print}' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
|
26
|
+
*) IMAGES+=("$1"); shift ;;
|
|
27
|
+
esac
|
|
28
|
+
done
|
|
29
|
+
|
|
30
|
+
[[ -n "$OUT" ]] || { echo "error: -o <out.pdf> is required" >&2; exit 1; }
|
|
31
|
+
[[ ${#IMAGES[@]} -gt 0 ]] || { echo "error: no input images" >&2; exit 1; }
|
|
32
|
+
|
|
33
|
+
for f in "${IMAGES[@]}"; do
|
|
34
|
+
[[ -f "$f" ]] || { echo "error: missing image: $f" >&2; exit 1; }
|
|
35
|
+
done
|
|
36
|
+
|
|
37
|
+
# --- locate a Chromium-family browser -------------------------------------------
|
|
38
|
+
BROWSER=""
|
|
39
|
+
for c in \
|
|
40
|
+
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
|
|
41
|
+
"/Applications/Chromium.app/Contents/MacOS/Chromium" \
|
|
42
|
+
"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" \
|
|
43
|
+
"$(command -v google-chrome || true)" \
|
|
44
|
+
"$(command -v chromium || true)" \
|
|
45
|
+
"$(command -v chromium-browser || true)"
|
|
46
|
+
do
|
|
47
|
+
[[ -n "$c" && -x "$c" ]] && { BROWSER="$c"; break; }
|
|
48
|
+
done
|
|
49
|
+
[[ -n "$BROWSER" ]] || { echo "error: no Chrome/Chromium found" >&2; exit 1; }
|
|
50
|
+
|
|
51
|
+
# --- page geometry --------------------------------------------------------------
|
|
52
|
+
# A4 at 96dpi. Chrome honours these as CSS pixels for @page sizing. The page box
|
|
53
|
+
# is one pixel short of the sheet: a box that exactly matches the printable area
|
|
54
|
+
# can tip Chrome into shrink-to-fit, which silently rescales every page.
|
|
55
|
+
if [[ $LANDSCAPE -eq 1 ]]; then
|
|
56
|
+
PAGE_W=1122; PAGE_H=793; CSS_SIZE="A4 landscape"
|
|
57
|
+
else
|
|
58
|
+
PAGE_W=793; PAGE_H=1122; CSS_SIZE="A4 portrait"
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
WORKDIR="$(mktemp -d)"
|
|
62
|
+
trap 'rm -rf "$WORKDIR"' EXIT
|
|
63
|
+
|
|
64
|
+
# Images are referenced by absolute file:// URL so the HTML can live in the temp dir.
|
|
65
|
+
PAGES=""
|
|
66
|
+
for f in "${IMAGES[@]}"; do
|
|
67
|
+
abs="$(cd "$(dirname "$f")" && pwd)/$(basename "$f")"
|
|
68
|
+
PAGES+="<div class=\"page\"><img src=\"file://${abs}\"></div>"
|
|
69
|
+
done
|
|
70
|
+
|
|
71
|
+
cat > "$WORKDIR/pack.html" <<HTML
|
|
72
|
+
<!doctype html><html><head><meta charset="utf-8"><style>
|
|
73
|
+
@page { size: ${CSS_SIZE}; margin: 0; }
|
|
74
|
+
html, body { margin: 0; padding: 0; background: #fff; }
|
|
75
|
+
.page {
|
|
76
|
+
width: ${PAGE_W}px; height: ${PAGE_H}px;
|
|
77
|
+
display: flex; align-items: center; justify-content: center;
|
|
78
|
+
overflow: hidden; page-break-after: always; break-after: page;
|
|
79
|
+
}
|
|
80
|
+
.page:last-child { page-break-after: auto; break-after: auto; }
|
|
81
|
+
img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
|
|
82
|
+
</style></head><body>${PAGES}</body></html>
|
|
83
|
+
HTML
|
|
84
|
+
|
|
85
|
+
# Rendering is attempted twice. Chrome has shipped several headless modes, and
|
|
86
|
+
# plain `--headless` is deprecated in newer builds; a locked default profile (a
|
|
87
|
+
# browser already open on the operator's desktop) or a container without a
|
|
88
|
+
# user namespace then kills the run with an error that a silent redirect hides.
|
|
89
|
+
# Each attempt gets its own throwaway profile and its stderr kept, so a failure
|
|
90
|
+
# reports why instead of just "not produced".
|
|
91
|
+
rendered=0
|
|
92
|
+
for attempt in 1 2; do
|
|
93
|
+
flags=(--disable-gpu --disable-dev-shm-usage --user-data-dir="$WORKDIR/chrome$attempt" --no-pdf-header-footer)
|
|
94
|
+
if [[ $attempt -eq 1 ]]; then
|
|
95
|
+
flags+=(--headless=new)
|
|
96
|
+
else
|
|
97
|
+
# Last resort for containers and heavily restricted shells.
|
|
98
|
+
flags+=(--headless --no-sandbox)
|
|
99
|
+
fi
|
|
100
|
+
if "$BROWSER" "${flags[@]}" --print-to-pdf="$OUT" "file://$WORKDIR/pack.html" 2>"$WORKDIR/err$attempt"; then
|
|
101
|
+
[[ -s "$OUT" ]] && { rendered=1; break; }
|
|
102
|
+
fi
|
|
103
|
+
rm -f "$OUT"
|
|
104
|
+
done
|
|
105
|
+
|
|
106
|
+
if [[ $rendered -ne 1 ]]; then
|
|
107
|
+
echo "error: PDF rendering failed on attempt 1 and 2" >&2
|
|
108
|
+
tail -5 "$WORKDIR/err1" >&2 2>/dev/null || true
|
|
109
|
+
tail -5 "$WORKDIR/err2" >&2 2>/dev/null || true
|
|
110
|
+
exit 1
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
# Report the page count so the caller can verify nothing was dropped.
|
|
114
|
+
if command -v pdfinfo >/dev/null 2>&1; then
|
|
115
|
+
echo "$OUT: $(pdfinfo "$OUT" | awk '/^Pages:/{print $2}') pages, ${CSS_SIZE}"
|
|
116
|
+
else
|
|
117
|
+
echo "$OUT: written (${CSS_SIZE})"
|
|
118
|
+
fi
|
|
@@ -8,7 +8,7 @@ description: >
|
|
|
8
8
|
links, an entity chain, and a watchlist for the operator's next domains.
|
|
9
9
|
Not transaction data (tld-detection) or fraud rules (fraud-detection).
|
|
10
10
|
disable-model-invocation: true
|
|
11
|
-
release-version: 0.50.
|
|
11
|
+
release-version: 0.50.16
|
|
12
12
|
---
|
|
13
13
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
14
14
|
# Similar Domain
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
patterns, with USD and BIN-country currency views, group profiles and priorities.
|
|
7
7
|
Not payment-analysis, fraud-detection, or website research.
|
|
8
8
|
disable-model-invocation: true
|
|
9
|
-
release-version: 0.50.
|
|
9
|
+
release-version: 0.50.16
|
|
10
10
|
---
|
|
11
11
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
12
12
|
# TLD detection
|