GodModeAI2025/SkillSafeWerkstatt / maintain-llm-wiki
maintain-llm-wiki
UnverifiedCreate, maintain, inventory, migrate, recover, quality-review, optionally clean, release, or export an evidence-linked SkillSafeWerkstatt Markdown wiki. Use whenever the user wants to initialize or extend this wiki, ingest documents as Markdown, curate claims, clusters or concepts, clean metadata, restore files, record who reviewed which pages, resolve a OneDrive or SharePoint conflict copy, publish a release, or export a frozen read-only knowledge skill or an Open Knowledge Format bundle in Claude Code, Claude Cowork, or Codex.
scripts/secret_screen.py
View on GitHub#!/usr/bin/env python3
"""Keep credentials out of the wiki, and out of every report about them.
The contract has always said that generated files contain no secrets. Nothing
checked it. A wiki is copied, synchronized through OneDrive or SharePoint,
released, exported as a frozen skill, and exported as an OKF bundle; once a key
has travelled that far it cannot be called back.
The screen is deliberately narrow. It recognizes forms that practically never
occur by accident in prose: private key blocks, token prefixes with a fixed
shape, JSON Web Tokens, and URLs carrying a user name and password. There is
no entropy heuristic, because every finding stops registration and release,
and a check that cries wolf gets worked around.
A finding names the file, the line, and the kind of credential - **never the
matched text**. The lint report is itself written into the wiki; repeating the
secret there would leak it a second time.
"""
from __future__ import annotations
import re
from pathlib import Path
from typing import Iterable
#: (kind, pattern). Kinds are stable identifiers suitable for reports.
PATTERNS: tuple[tuple[str, "re.Pattern[str]"], ...] = (
("private-key", re.compile(r"-----BEGIN (?:[A-Z]+ )*PRIVATE KEY-----")),
("aws-access-key", re.compile(r"\b(?:AKIA|ASIA)[0-9A-Z]{16}\b")),
("github-token", re.compile(r"\b(?:gh[pousr]_[A-Za-z0-9]{36,}|github_pat_[A-Za-z0-9_]{40,})")),
("api-key", re.compile(r"(?<![\w-])sk-(?:ant-|proj-)?[A-Za-z0-9_-]{32,}")),
("slack-token", re.compile(r"\bxox[abprs]-[A-Za-z0-9-]{20,}")),
("google-api-key", re.compile(r"\bAIza[0-9A-Za-z_-]{35}\b")),
("json-web-token", re.compile(r"\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}")),
("url-credentials", re.compile(r"\b[a-z][a-z0-9+.-]*://[^/\s:@<>\"'`]+:[^/\s:@<>\"'`]+@")),
)
#: Documentation shows credentials as patterns: ghp_xxxx..., sk-proj-XXXX..., the
#: AWS documentation key ending in EXAMPLE, the jwt.io sample token, or
#: postgres://user:password@host. A source that explains authentication is not
#: a leak, and blocking it would push people to edit faithful extractions.
EXAMPLE_SIGNATURES = {"SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}
URL_PASSWORD_PLACEHOLDERS = {
"pass", "passwd", "password", "passwort", "pw", "pwd", "secret", "geheim",
"token", "changeme",
}
def is_placeholder(kind: str, match: str) -> bool:
"""Whether a credential-shaped match is recognizably a documentation placeholder."""
if kind == "url-credentials":
password = match.rsplit("@", 1)[0].split("://", 1)[1].split(":", 1)[1]
return (
password.lower() in URL_PASSWORD_PLACEHOLDERS
or password[:1] in {"$", "{", "%", "*"}
or len(set(password.lower())) == 1
)
if "example" in match.lower() or match.rsplit(".", 1)[-1] in EXAMPLE_SIGNATURES:
return True
# The longest body segment made of at most two characters: xxxx, XXXX, 0000.
body = max(re.split(r"[_.-]", match[4:]), key=len)
return len(body) >= 12 and len(set(body.lower())) <= 2
#: Text formats a wiki holds. Everything else is refused elsewhere or derived.
SCANNED_SUFFIXES = {".md", ".json", ".jsonl"}
def scan_text(text: str) -> list[tuple[int, str]]:
"""Return (line number, kind) for every credential-shaped line."""
findings: list[tuple[int, str]] = []
for number, line in enumerate(text.splitlines(), 1):
for kind, pattern in PATTERNS:
if any(not is_placeholder(kind, m.group(0)) for m in pattern.finditer(line)):
findings.append((number, kind))
break
return findings
def describe(label: str, findings: Iterable[tuple[int, str]]) -> list[str]:
"""Render findings as report lines that never contain the matched value."""
return [
f"{label}:{number}: possible credential ({kind}); remove it and rotate it, "
f"never publish it"
for number, kind in findings
]
def scan_file(path: Path) -> list[tuple[int, str]]:
"""Scan one file; unreadable files are reported by the checks that own them."""
try:
return scan_text(path.read_text(encoding="utf-8"))
except (OSError, UnicodeError):
return []
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 |