mr-li-writer
Verified面向中文内容创作的编辑判断、研究、策划、写作与平台原生交付工作流。根据标题、素材、参考资料、核心想法或模糊灵感,先识别读者任务、材料条件和创新必要性,再按需完成语境扫描、可写性判断与方向校准,并区分发布平台与内容目标,进行事实检索、观点设计、平台原生正文写作、标题策划和对应交付。适用于公众号文章、知乎回答、小红书原生笔记、官网/网页、个人博客、行业解读、实用指南和基于素材的扩展研究写作。
scripts/scan_sensitive.py
View on GitHub#!/usr/bin/env python3
"""Fail when tracked text files contain high-confidence credential material."""
import pathlib
import re
import subprocess
import sys
ROOT = pathlib.Path(__file__).resolve().parents[1]
SELF = pathlib.Path(__file__).resolve()
TEXT_SUFFIXES = {
".css",
".html",
".ini",
".js",
".json",
".md",
".py",
".sh",
".svg",
".toml",
".txt",
".yaml",
".yml",
}
PATTERNS = (
("private key", re.compile(r"-----BEGIN (?:RSA |EC |DSA |OPENSSH )?PRIVATE KEY-----")),
("AWS access key", re.compile(r"AKIA[0-9A-Z]{16}")),
("GitHub token", re.compile(r"gh[pousr]_[A-Za-z0-9]{36,}")),
("OpenAI-style key", re.compile(r"sk-[A-Za-z0-9_-]{20,}")),
("Tencent SecretId", re.compile(r"AKID[A-Za-z0-9]{13,40}")),
)
def tracked_files():
result = subprocess.run(
["git", "ls-files", "-z", "--cached", "--others", "--exclude-standard"],
cwd=ROOT,
capture_output=True,
check=True,
)
for raw in result.stdout.split(b"\0"):
if raw:
yield ROOT / raw.decode("utf-8", errors="surrogateescape")
def main():
findings = []
for path in tracked_files():
if path.resolve() == SELF or path.suffix.lower() not in TEXT_SUFFIXES:
continue
try:
text = path.read_text(encoding="utf-8")
except (OSError, UnicodeDecodeError):
continue
for label, pattern in PATTERNS:
match = pattern.search(text)
if match:
line = text.count("\n", 0, match.start()) + 1
findings.append("%s:%d: %s" % (path.relative_to(ROOT), line, label))
if findings:
print("[阻断] 待纳入版本控制的文件中发现疑似敏感凭据:")
for finding in findings:
print("- %s" % finding)
return 1
print("[通过] 待纳入版本控制的文本文件未发现高置信度敏感凭据")
return 0
if __name__ == "__main__":
sys.exit(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 |