topmindspace/topmind-writing-skills / topmind-briefs
topmind-briefs
Verified创作 X 与公众号的高信噪比干货短文、经验技巧、提示词交付、快讯改写、新品、榜单、论文解读、规则分析与实测观点。按稿型选择价值前置或体感切口,交付可复制文本;公众号短文通常 300–800 字。纯排版用 topmind-format,互动段子用 topmind-viral-posts,长文用对应平台技能。
scripts/audit_styles.py
View on GitHub#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""样式资产审计:主题/风格资源有效性(任一不过 → 退出码 1)。
本组技能无 CSS 样式表:若存在 assets/themes/*.json 则校验 JSON 可解析;
references 风格文档非空(已由 audit_docs 覆盖,此处做存在性断言)。
"""
from __future__ import annotations
import json
import sys
from pathlib import Path
try:
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
except Exception:
pass
ROOT = Path(__file__).resolve().parent.parent
NAME = ROOT.name
errors: list[str] = []
def check(cond: bool, msg: str) -> None:
print((" ✓ " if cond else " ✗ ") + msg)
if not cond:
errors.append(msg)
def main() -> None:
print(f"[audit_styles] {NAME}")
themes = sorted((ROOT / "assets" / "themes").glob("*.json")) if (ROOT / "assets" / "themes").is_dir() else []
if themes:
for t in themes:
try:
json.loads(t.read_text(encoding="utf-8"))
check(True, f"assets/themes/{t.name} JSON 可解析")
except (OSError, json.JSONDecodeError) as e:
check(False, f"assets/themes/{t.name} 解析失败: {e}")
else:
check(True, "无主题 JSON 资产(本技能不依赖主题文件)")
refdir = ROOT / "references"
has_style_doc = refdir.is_dir() and any(refdir.glob("*.md"))
check(has_style_doc, "references 风格/格式文档存在")
if errors:
print(f"\n[audit_styles] {NAME}: {len(errors)} 项失败")
sys.exit(1)
print(f"\n[audit_styles] {NAME}: 全部通过")
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |