Skip to content

YCC-Lover/research-starter-skills / skills/rsk-research-workflow

rsk-research-workflow

Unverified

准备组会、论文汇报、开题与答辩,支持可编辑 PPTX 制作、既有模板改稿、讲稿与问答演练;也用于会议交流、研究记录与 AI 协作。只要提纲或练习时不启动制稿,现行会议与资助规则另行核验。

scripts/presentation_mirror.py

View on GitHub
"""Identify byte-bound, unchanged mirror modules for inherited geometry findings."""

import hashlib
import json
import re
from pathlib import Path
from xml.etree import ElementTree as ET


def unchanged_mirror_groups(checker, root, result):
    """Never exempt changed text, changed context, or unverified prototypes."""
    svg_path = getattr(checker, '_rsk_current_svg_path', None)
    if svg_path is None or Path(svg_path).parent.name != 'svg_output':
        return set()
    project = Path(svg_path).parent.parent.resolve()
    templates = project / 'templates'
    try:
        manifest = json.loads((templates / 'template_execution_manifest.json').read_text(encoding='utf-8'))
        if (manifest.get('schema') != 'ppt-master.template-execution-manifest.v1' or
                manifest.get('replication_mode') != 'mirror' or
                manifest.get('source_geometry_unchanged') is not True or
                not re.fullmatch('[0-9a-f]{64}', str(manifest.get('source_package_sha256', '')))):
            return set()
        entries = [entry for entry in manifest['templates']
                   if entry['prototype'] == Path(svg_path).name]
        if len(entries) != 1:
            return set()
        prototype = templates / entries[0]['prototype']
        if not prototype.resolve().is_relative_to(templates.resolve()) or prototype.is_symlink():
            return set()
        dependencies = manifest['source_files_sha256']
        if not isinstance(dependencies, dict) or not dependencies:
            return set()
        for relative, expected in dependencies.items():
            path = templates / relative
            if (not path.resolve().is_relative_to(project) or path.is_symlink() or
                    hashlib.sha256(path.read_bytes()).hexdigest() != expected):
                return set()
        raw = prototype.read_bytes()
        if hashlib.sha256(raw).hexdigest() != entries[0]['source_svg_sha256']:
            return set()
        original = ET.fromstring(raw)
        if original.tag != root.tag or original.attrib != root.attrib:
            return set()
        if any(node.get('data-pptx-native-ref') for node in original.iter()):
            from native_payloads import hydrate_native_payload_refs
            hydrate_native_payload_refs(original, prototype)
        def context(tree):
            return (tree.text, [ET.tostring(node) for node in tree
                                if node.tag.rsplit('}', 1)[-1] != 'g'])

        if context(original) != context(root):
            return set()
        groups = [node for node in original if node.tag.rsplit('}', 1)[-1] == 'g' and node.get('id')]
        by_id = {node.get('id'): node for node in groups}
        if len(by_id) != len(groups):
            return set()
        unchanged = {id(node) for node in root if node.get('id') in by_id and
                     ET.tostring(node) == ET.tostring(by_id[node.get('id')])}
    except (OSError, ValueError, KeyError, TypeError, ET.ParseError, ImportError):
        return set()
    if unchanged:
        result.setdefault('info', {}).setdefault('inherited', []).append({
            'kind': 'unchanged-mirror-module-geometry',
            'message': 'Text geometry remains source-owned in ' + str(len(unchanged)) +
                       ' exact, context-identical modules; edited modules remain checked.',
        })
    return unchanged
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall