Skip to content

EliasOulkadi/shokunin / .pack/skills/kami

FileKindSize
.claude-plugin/marketplace.jsonconfig537 B
.github/FUNDING.ymlconfig61 B
.github/workflows/check.ymlconfig673 B
.github/workflows/release.ymlconfig1.4 KB
.gitignoreother436 B
CHEATSHEET.mdmarkdown15.6 KB
LICENSEother1.0 KB
README.mdmarkdown9.2 KB
SKILL.mdskill md30.3 KB
assets/demos/demo-agent-slides.htmlother22.1 KB
assets/demos/demo-agent-slides.pdfbinary96.7 KB
assets/demos/demo-agent-slides.pngbinary156.3 KB
assets/demos/demo-kaku.htmlother27.9 KB
assets/demos/demo-kaku.pdfbinary1.1 MB
assets/demos/demo-kaku.pngbinary86.5 KB
assets/demos/demo-musk-resume.htmlother24.0 KB
assets/demos/demo-musk-resume.pdfbinary336.1 KB
assets/demos/demo-musk-resume.pngbinary417.3 KB
assets/demos/demo-tesla.htmlother22.3 KB
assets/demos/demo-tesla.pdfbinary301.7 KB
assets/demos/demo-tesla.pngbinary313.0 KB
assets/demos/equity-report-en.pngbinary368.5 KB
assets/demos/images/kaku-action.jpgbinary949.2 KB
assets/demos/images/kaku-hero.jpgbinary460.5 KB
assets/diagrams/architecture.htmlother9.1 KB
assets/diagrams/bar-chart.htmlother8.3 KB
assets/diagrams/candlestick.htmlother10.0 KB
assets/diagrams/donut-chart.htmlother7.8 KB
assets/diagrams/flowchart.htmlother7.7 KB
assets/diagrams/layer-stack.htmlother7.9 KB
assets/diagrams/line-chart.htmlother10.1 KB
assets/diagrams/quadrant.htmlother7.7 KB
assets/diagrams/state-machine.htmlother9.5 KB
assets/diagrams/swimlane.htmlother8.8 KB
assets/diagrams/timeline.htmlother7.2 KB
assets/diagrams/tree.htmlother9.9 KB
assets/diagrams/venn.htmlother5.6 KB
assets/diagrams/waterfall.htmlother8.9 KB
assets/fonts/JetBrainsMono.woff2binary54.4 KB
assets/fonts/TsangerJinKai02-W04.ttfbinary18.1 MB
assets/fonts/TsangerJinKai02-W05.ttfbinary18.1 MB
assets/illustrations/travel-3d-representations.pngbinary2.0 MB
assets/illustrations/travel-spatialvla.pngbinary1.8 MB
assets/illustrations/travel-tesla-optimus.pngbinary1.8 MB
assets/images/logo.svgother8.7 KB
assets/templates/changelog-en.htmlother5.8 KB
assets/templates/changelog.htmlother6.6 KB
assets/templates/equity-report-en.htmlother12.5 KB
assets/templates/equity-report.htmlother13.6 KB
assets/templates/letter-en.htmlother7.2 KB
assets/templates/letter.htmlother8.3 KB
assets/templates/long-doc-en.htmlother13.8 KB
assets/templates/long-doc.htmlother15.6 KB
assets/templates/one-pager-en.htmlother9.4 KB
assets/templates/one-pager.htmlother10.9 KB
assets/templates/portfolio-en.htmlother15.7 KB
assets/templates/portfolio.htmlother16.7 KB
assets/templates/resume-en.htmlother23.8 KB
assets/templates/resume.htmlother25.6 KB
assets/templates/slides-en.pyscript13.5 KB
assets/templates/slides-weasy-en.htmlother6.9 KB
assets/templates/slides-weasy.htmlother7.8 KB
assets/templates/slides.pyscript14.6 KB
index-en.htmlother485 B
index-ja.htmlother43.4 KB
index-zh.htmlother41.1 KB
index.htmlother40.9 KB
llms.txtmarkdown1.6 KB
long-doc-en-template.htmlother13.8 KB
references/anti-patterns.mdmarkdown4.2 KB
references/brand-profile.mdmarkdown4.5 KB
references/brand.example.mdmarkdown2.8 KB
references/design.mdmarkdown30.5 KB
references/diagrams.mdmarkdown18.6 KB
references/production.mdmarkdown30.0 KB
references/resume-writing.mdmarkdown6.8 KB
references/stabilizer_profiles.jsonconfig3.2 KB
references/tokens.jsonconfig471 B
references/writing.mdmarkdown23.1 KB
robots.txtmarkdown708 B
scripts/build.pyscript33.8 KB
scripts/draft-release-notes.pyscript5.6 KB
scripts/ensure-fonts.shscript3.2 KB
scripts/package-skill.shscript850 B
scripts/shared.pyscript4.7 KB
scripts/stabilize.pyscript26.1 KB
scripts/tests/test_build.pyscript14.7 KB
sitemap.xmlconfig879 B
styles.cssother26.1 KB
vercel.jsonconfig121 B

scripts/shared.py

View on GitHub
"""Shared constants and helpers for kami build and stabilize scripts."""
from __future__ import annotations

import os
import sys
from pathlib import Path

ROOT = Path(__file__).resolve().parent.parent
TEMPLATES = ROOT / "assets" / "templates"
DIAGRAMS = ROOT / "assets" / "diagrams"
EXAMPLES = ROOT / "assets" / "examples"
TOKENS_FILE = ROOT / "references" / "tokens.json"

# Canonical parchment background color, kept here so build/stabilize/density
# checks share one source of truth instead of redefining the RGB triple.
PARCHMENT_HEX = "#f5f4ed"
PARCHMENT_RGB = (0xF5, 0xF4, 0xED)

_HOMEBREW_PREFIXES = (Path("/opt/homebrew"), Path("/usr/local"))


def _default_cache_dir() -> Path:
    """Return a sensible per-platform fontconfig cache directory."""
    if sys.platform == "darwin":
        return Path("/private/tmp/kami-fontconfig-cache")
    xdg = os.environ.get("XDG_CACHE_HOME")
    if xdg:
        return Path(xdg) / "kami"
    return Path.home() / ".cache" / "kami"


def configure_weasyprint_runtime() -> None:
    """Make platform-native libraries discoverable before importing WeasyPrint.

    On macOS, also surface Homebrew's gobject lib so cairo/pango can load.
    On Linux/other, only the fontconfig cache hint is set; the system loader
    is expected to find the libraries.
    """
    os.environ.setdefault("XDG_CACHE_HOME", str(_default_cache_dir()))

    if sys.platform != "darwin":
        return

    brew_lib = next(
        (p / "lib" for p in _HOMEBREW_PREFIXES if (p / "lib" / "libgobject-2.0.dylib").exists()),
        None,
    )
    if brew_lib is None:
        return

    existing = os.environ.get("DYLD_FALLBACK_LIBRARY_PATH", "")
    paths = [path for path in existing.split(":") if path]
    brew_lib_str = str(brew_lib)
    if brew_lib_str in paths:
        return

    os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = ":".join([brew_lib_str, *paths])

# Cool / neutral gray hex values that violate the "warm undertone only" rule.
COOL_GRAY_BLOCKLIST = {
    "#888", "#888888", "#666", "#666666", "#999", "#999999",
    "#ccc", "#cccccc", "#ddd", "#dddddd", "#eee", "#eeeeee",
    "#111", "#111111", "#222", "#222222", "#333", "#333333",
    "#444", "#444444", "#555", "#555555", "#777", "#777777",
    "#aaa", "#aaaaaa", "#bbb", "#bbbbbb",
    # Tailwind cool grays
    "#6b7280", "#9ca3af", "#d1d5db", "#e5e7eb", "#f3f4f6",
    "#4b5563", "#374151", "#1f2937", "#111827",
    # Bootstrap-like neutrals
    "#f8f9fa", "#e9ecef", "#dee2e6", "#ced4da", "#adb5bd",
    "#6c757d", "#495057", "#343a40", "#212529",
}


# ---------------------------------------------------------------------------
# Template registry
#
# Single source of truth for HTML targets across build.py and stabilize.py.
#
# Each entry is (source_filename, build_max_pages, stabilize_max_pages):
#   - build_max_pages: hard ceiling enforced by `build.py --verify`. 0 = no
#     limit.
#   - stabilize_max_pages: target pages for the overflow solver in
#     `stabilize.py`. 0 = solver disabled. The two values can differ because
#     stabilize aims to keep doc-style targets within an editorial range while
#     build only catches gross overflow.
# ---------------------------------------------------------------------------
HTML_TEMPLATES: dict[str, tuple[str, int, int]] = {
    # Core six
    "one-pager":    ("one-pager.html",    1, 1),
    "letter":       ("letter.html",       1, 1),
    "long-doc":     ("long-doc.html",     0, 9),
    "portfolio":    ("portfolio.html",    0, 8),
    "resume":       ("resume.html",       2, 2),
    "one-pager-en": ("one-pager-en.html", 1, 1),
    "letter-en":    ("letter-en.html",    1, 1),
    "long-doc-en":  ("long-doc-en.html",  0, 9),
    "portfolio-en": ("portfolio-en.html", 0, 8),
    "resume-en":    ("resume-en.html",    2, 2),
    # Equity report
    "equity-report":    ("equity-report.html",    3, 0),
    "equity-report-en": ("equity-report-en.html", 3, 0),
    # Changelog
    "changelog":    ("changelog.html",    2, 0),
    "changelog-en": ("changelog-en.html", 2, 0),
    # Slides (WeasyPrint default)
    "slides-weasy":    ("slides-weasy.html",    0, 0),
    "slides-weasy-en": ("slides-weasy-en.html", 0, 0),
}


def build_targets() -> dict[str, tuple[str, int]]:
    """Return target -> (source, max_pages) mapping for build.py."""
    return {name: (src, build_max) for name, (src, build_max, _) in HTML_TEMPLATES.items()}


def stabilize_targets() -> dict[str, tuple[str, int]]:
    """Return target -> (source, max_pages) mapping for stabilize.py.

    Only includes templates with a non-zero stabilize ceiling (the ones the
    overflow solver should constrain).
    """
    return {
        name: (src, stab_max)
        for name, (src, _build_max, stab_max) in HTML_TEMPLATES.items()
        if stab_max > 0
    }
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall