[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BZT7VF8WWASBS38HWJXSJ1":3,"skill-same:01M7BZT7VF8WWASBS38HWJXSJ1":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BZT7VF8WWASBS38HWJXSJ1","academic-pdf-redaction",null,"Redact identifying text from academic PDFs for blind review while preserving the References section byte-for-byte.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fopus47_clean_20261016_partial14\u002Ftasks\u002Fpaper-anonymizer\u002Frepaired_skill\u002Facademic-pdf-redaction\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: academic-pdf-redaction\ndescription: Redact identifying text from academic PDFs for blind review while preserving the References section byte-for-byte.\n---\n\n# PDF Redaction for Blind Review\n\nRedact identifying information from academic papers for blind review. The deliverable is a redacted PDF whose pre-References pages carry zero identity-leaking strings and whose References section is unchanged.\n\n## Core rules\n\n1. **Preserve References section** — self-citations stay intact; skip redaction on and after the References page.\n2. **Redact at the span\u002Ftoken level, not multi-word literals** — `page.search_for(long phrase)` silently misses wrapped, rotated, and Unicode-variant text.\n3. **Verify by re-scanning the redacted output with the same leak regexes** — passing a page-count \u002F char-retention check is not sufficient.\n\n## Workflow\n\n1. Enumerate leak classes on each pre-References page (authors, affiliations, emails, venues, arXiv IDs, DOIs, grant signatures, acknowledgements, equal-contribution footnotes, \"Preprint\"\u002Fbanner text, venue footers).\n2. Build a **regex list** for class-based leaks (arXiv, DOI, email, grant) and a **token list** for named entities (split each full name\u002Faffiliation\u002Fgrant into individual tokens; include Unicode variants).\n3. Walk `page.get_text(\"dict\")` spans and redact any span whose text matches a regex or token (see `references\u002Frobust-redaction.md`).\n4. Save, then re-open the output and run the leak re-scan under \"Verification\" below. On any hit, treat it as a mechanism failure, widen the strategy, and re-run until clean.\n\n## Leak-class regex list (pre-References pages)\n\nUse these as the primary matcher — not multi-word literal strings.\n\n```python\nLEAK_REGEXES = [\n    r\"arXiv:\\s*\\d{4}\\.\\d{4,5}(v\\d+)?\",           # arXiv IDs (also in body citations)\n    r\"\\b10\\.\\d{4,9}\u002F\\S+\",                         # DOIs\n    r\"[\\w.+-]+@[\\w.-]+\\.\\w+\",                     # emails\n    r\"\\b(ARO|NSF|DARPA|ONR|DOE|NIH|AFOSR)\\b\"      # grant-agency signatures;\n    r\"(\\s*[\\w.\u002F-]*\\d{3,})?\",                      #   trailing grant number may wrap\n    r\"\\bPreprint\\b\",                               # preprint banner text\n    r\"\\bISSN\\s*[\\d-]+\",                           # venue footers\n]\n```\n\nNamed-entity targets (authors, affiliations, acknowledgement names, venue names) are task-specific — enumerate from the PDF, then **tokenize**: split a full name into its sub-tokens plus the full phrase, and add curly-quote \u002F straight-quote and hyphen \u002F en-dash variants of any phrase containing those characters.\n\n## Span-level redaction (primary mechanism)\n\nWalk the glyph stream directly so wrapped lines, rotated spans, and Unicode variants are all caught in one pass.\n\n```python\nimport fitz, re, unicodedata\n\ndef redact_page(page, regexes, tokens):\n    \"\"\"Redact every span whose normalized text matches any regex or token.\"\"\"\n    compiled = [re.compile(p) for p in regexes]\n    norm_tokens = {unicodedata.normalize(\"NFKC\", t) for t in tokens}\n    for block in page.get_text(\"dict\")[\"blocks\"]:\n        for line in block.get(\"lines\", []):\n            for span in line.get(\"spans\", []):\n                text = unicodedata.normalize(\"NFKC\", span[\"text\"])\n                if any(c.search(text) for c in compiled) or \\\n                   any(tok in text for tok in norm_tokens):\n                    page.add_redact_annot(fitz.Rect(span[\"bbox\"]), fill=(0, 0, 0))\n    page.apply_redactions()\n```\n\nRead `references\u002Frobust-redaction.md` when any target may wrap across lines, appear in a rotated\u002Fvertical banner, use curly quotes or en-dashes, or when a leak remains after one pass. Skip when every target is a short single-word ASCII token and no rotated runs exist on the page.\n\n## Why `page.search_for(literal)` is not enough\n\n`search_for` returns rectangles only for contiguous glyph runs on a single line in default orientation with exact Unicode codepoints. It silently returns `[]` when:\n\n- the target wraps across a soft line break or hyphenation (e.g. a grant number splits mid-string);\n- the text is rotated (e.g. a vertical banner — one glyph per line in the extracted coordinate system);\n- the stored codepoints differ (curly vs straight quotes, en-dash vs hyphen-minus, ligatures).\n\nTreat `search_for` as a convenience shortcut for short single-token ASCII targets only, and always back it up by the span walk above.\n\n## Skipping the References section\n\n```python\ndef references_page_index(doc):\n    for i, page in enumerate(doc):\n        for block in page.get_text(\"dict\")[\"blocks\"]:\n            for line in block.get(\"lines\", []):\n                txt = \"\".join(s[\"text\"] for s in line.get(\"spans\", [])).strip().lower()\n                if txt in {\"references\", \"bibliography\"} or txt.startswith(\"references\"):\n                    return i\n    return None  # no References section found; redact all pages conservatively\n```\n\nPages `>= references_page_index(doc)` are left untouched. Also skip them in the leak re-scan to avoid flagging legitimate self-citations.\n\n## Verification: re-scan to convergence\n\nStructural checks (page count, char retention) are necessary but not sufficient. Verification **must** re-scan the redacted output with the same leak regexes and fail on any hit outside the References section.\n\n```python\nimport fitz, re, unicodedata\n\nclass LeakRemainingError(AssertionError): pass\n\ndef verify_no_leaks(output_path, regexes, tokens, ref_page_idx):\n    doc = fitz.open(output_path)\n    compiled = [re.compile(p) for p in regexes]\n    norm_tokens = {unicodedata.normalize(\"NFKC\", t) for t in tokens}\n    hits = []\n    for pno, page in enumerate(doc):\n        if ref_page_idx is not None and pno >= ref_page_idx:\n            continue\n        text = unicodedata.normalize(\"NFKC\", page.get_text())\n        for c in compiled:\n            for m in c.finditer(text):\n                hits.append((pno, m.group(0), c.pattern))\n        for tok in norm_tokens:\n            if tok in text:\n                hits.append((pno, tok, \"token\"))\n    # structural sanity\n    o_len = sum(len(p.get_text()) for p in fitz.open(output_path))\n    doc.close()\n    if hits:\n        raise LeakRemainingError(f\"{len(hits)} leaks remain: {hits[:5]}\")\n```\n\nOn `LeakRemainingError`: do **not** append the leaked literal to the token list as the only fix. Diagnose which failure mode let it through (line wrap → tokenize; rotated → confirm span walk ran; Unicode variant → normalize; missing class → add regex), widen the mechanism, and re-run `redact_page` + `verify_no_leaks` until it returns cleanly. See `references\u002Frobust-redaction.md` for the diagnosis flow and the `redact_until_clean` convergence loop.\n\n## Common Pitfalls\n\n- **Multi-word literal `search_for` as sole mechanism** — misses wrapped \u002F rotated \u002F Unicode-variant text. Use span walk + regex instead.\n- **Partial-token matches damaging References** — redacting the bare surname also damages citations in References. Keep References excluded, but *also* tokenize so wrapped full names still match on pre-References pages.\n- **Scope omissions on pre-References pages** — body-text arXiv IDs, DOI citations, \"Preprint\" banner, grant signatures (ARO\u002FNSF\u002FDARPA\u002F…), and venue ISSN+page footers are leaks too, not only authors\u002Faffiliations\u002Femails.\n- **Verification that only checks structure** — printing a page-count \u002F char-retention pass without a zero-hit leak re-scan is not sufficient; a positive leak hit is a mechanism-failure signal, not a data-list omission.\n- **One-shot patch on a surfaced leak** — if the re-scan flags residual text, widen the mechanism (span walk, token split, Unicode normalize, new regex class) rather than appending that one string to the literal list and stopping.\n","# PDF Redaction for Blind Review\n\nRedact identifying information from academic papers for blind review. The deliverable is a redacted PDF whose pre-References pages carry zero identity-leaking strings and whose References section is unchanged.\n\n## Core rules\n\n1. **Preserve References section** — self-citations stay intact; skip redaction on and after the References page.\n2. **Redact at the span\u002Ftoken level, not multi-word literals** — `page.search_for(long phrase)` silently misses wrapped, rotated, and Unicode-variant text.\n3. **Verify by re-scanning the redacted output with the same leak regexes** — passing a page-count \u002F char-retention check is not sufficient.\n\n## Workflow\n\n1. Enumerate leak classes on each pre-References page (authors, affiliations, emails, venues, arXiv IDs, DOIs, grant signatures, acknowledgements, equal-contribution footnotes, \"Preprint\"\u002Fbanner text, venue footers).\n2. Build a **regex list** for class-based leaks (arXiv, DOI, email, grant) and a **token list** for named entities (split each full name\u002Faffiliation\u002Fgrant into individual tokens; include Unicode variants).\n3. Walk `page.get_text(\"dict\")` spans and redact any span whose text matches a regex or token (see `references\u002Frobust-redaction.md`).\n4. Save, then re-open the output and run the leak re-scan under \"Verification\" below. On any hit, treat it as a mechanism failure, widen the strategy, and re-run until clean.\n\n## Leak-class regex list (pre-References pages)\n\nUse these as the primary matcher — not multi-word literal strings.\n\n```python\nLEAK_REGEXES = [\n    r\"arXiv:\\s*\\d{4}\\.\\d{4,5}(v\\d+)?\",           # arXiv IDs (also in body citations)\n    r\"\\b10\\.\\d{4,9}\u002F\\S+\",                         # DOIs\n    r\"[\\w.+-]+@[\\w.-]+\\.\\w+\",                     # emails\n    r\"\\b(ARO|NSF|DARPA|ONR|DOE|NIH|AFOSR)\\b\"      # grant-agency signatures;\n    r\"(\\s*[\\w.\u002F-]*\\d{3,})?\",                      #   trailing grant number may wrap\n    r\"\\bPreprint\\b\",                               # preprint banner text\n    r\"\\bISSN\\s*[\\d-]+\",                           # venue footers\n]\n```\n\nNamed-entity targets (authors, affiliations, acknowledgement names, venue names) are task-specific — enumerate from the PDF, then **tokenize**: split a full name into its sub-tokens plus the full phrase, and add curly-quote \u002F straight-quote and hyphen \u002F en-dash variants of any phrase containing those characters.\n\n## Span-level redaction (primary mechanism)\n\nWalk the glyph stream directly so wrapped lines, rotated spans, and Unicode variants are all caught in one pass.\n\n```python\nimport fitz, re, unicodedata\n\ndef redact_page(page, regexes, tokens):\n    \"\"\"Redact every span whose normalized text matches any regex or token.\"\"\"\n    compiled = [re.compile(p) for p in regexes]\n    norm_tokens = {unicodedata.normalize(\"NFKC\", t) for t in tokens}\n    for block in page.get_text(\"dict\")[\"blocks\"]:\n        for line in block.get(\"lines\", []):\n            for span in line.get(\"spans\", []):\n                text = unicodedata.normalize(\"NFKC\", span[\"text\"])\n                if any(c.search(text) for c in compiled) or \\\n                   any(tok in text for tok in norm_tokens):\n                    page.add_redact_annot(fitz.Rect(span[\"bbox\"]), fill=(0, 0, 0))\n    page.apply_redactions()\n```\n\nRead `references\u002Frobust-redaction.md` when any target may wrap across lines, appear in a rotated\u002Fvertical banner, use curly quotes or en-dashes, or when a leak remains after one pass. Skip when every target is a short single-word ASCII token and no rotated runs exist on the page.\n\n## Why `page.search_for(literal)` is not enough\n\n`search_for` returns rectangles only for contiguous glyph runs on a single line in default orientation with exact Unicode codepoints. It silently returns `[]` when:\n\n- the target wraps across a soft line break or hyphenation (e.g. a grant number splits mid-string);\n- the text is rotated (e.g. a vertical banner — one glyph per line in the extracted coordinate system);\n- the stored codepoints differ (curly vs straight quotes, en-dash vs hyphen-minus, ligatures).\n\nTreat `search_for` as a convenience shortcut for short single-token ASCII targets only, and always back it up by the span walk above.\n\n## Skipping the References section\n\n```python\ndef references_page_index(doc):\n    for i, page in enumerate(doc):\n        for block in page.get_text(\"dict\")[\"blocks\"]:\n            for line in block.get(\"lines\", []):\n                txt = \"\".join(s[\"text\"] for s in line.get(\"spans\", [])).strip().lower()\n                if txt in {\"references\", \"bibliography\"} or txt.startswith(\"references\"):\n                    return i\n    return None  # no References section found; redact all pages conservatively\n```\n\nPages `>= references_page_index(doc)` are left untouched. Also skip them in the leak re-scan to avoid flagging legitimate self-citations.\n\n## Verification: re-scan to convergence\n\nStructural checks (page count, char retention) are necessary but not sufficient. Verification **must** re-scan the redacted output with the same leak regexes and fail on any hit outside the References section.\n\n```python\nimport fitz, re, unicodedata\n\nclass LeakRemainingError(AssertionError): pass\n\ndef verify_no_leaks(output_path, regexes, tokens, ref_page_idx):\n    doc = fitz.open(output_path)\n    compiled = [re.compile(p) for p in regexes]\n    norm_tokens = {unicodedata.normalize(\"NFKC\", t) for t in tokens}\n    hits = []\n    for pno, page in enumerate(doc):\n        if ref_page_idx is not None and pno >= ref_page_idx:\n            continue\n        text = unicodedata.normalize(\"NFKC\", page.get_text())\n        for c in compiled:\n            for m in c.finditer(text):\n                hits.append((pno, m.group(0), c.pattern))\n        for tok in norm_tokens:\n            if tok in text:\n                hits.append((pno, tok, \"token\"))\n    # structural sanity\n    o_len = sum(len(p.get_text()) for p in fitz.open(output_path))\n    doc.close()\n    if hits:\n        raise LeakRemainingError(f\"{len(hits)} leaks remain: {hits[:5]}\")\n```\n\nOn `LeakRemainingError`: do **not** append the leaked literal to the token list as the only fix. Diagnose which failure mode let it through (line wrap → tokenize; rotated → confirm span walk ran; Unicode variant → normalize; missing class → add regex), widen the mechanism, and re-run `redact_page` + `verify_no_leaks` until it returns cleanly. See `references\u002Frobust-redaction.md` for the diagnosis flow and the `redact_until_clean` convergence loop.\n\n## Common Pitfalls\n\n- **Multi-word literal `search_for` as sole mechanism** — misses wrapped \u002F rotated \u002F Unicode-variant text. Use span walk + regex instead.\n- **Partial-token matches damaging References** — redacting the bare surname also damages citations in References. Keep References excluded, but *also* tokenize so wrapped full names still match on pre-References pages.\n- **Scope omissions on pre-References pages** — body-text arXiv IDs, DOI citations, \"Preprint\" banner, grant signatures (ARO\u002FNSF\u002FDARPA\u002F…), and venue ISSN+page footers are leaks too, not only authors\u002Faffiliations\u002Femails.\n- **Verification that only checks structure** — printing a page-count \u002F char-retention pass without a zero-hit leak re-scan is not sufficient; a positive leak hit is a mechanism-failure signal, not a data-list omission.\n- **One-shot patch on a surfaced leak** — if the re-scan flags residual text, widen the mechanism (span walk, token split, Unicode normalize, new regex class) rather than appending that one string to the literal list and stopping.\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillGrad\u002Fopus47_clean_20261016_partial14\u002Ftasks\u002Fpaper-anonymizer\u002Frepaired_skill\u002Facademic-pdf-redaction",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill academic-pdf-redaction",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill academic-pdf-redaction",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill academic-pdf-redaction","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fopus47_clean_20261016_partial14\u002Ftasks\u002Fpaper-anonymizer\u002Frepaired_skill\u002Facademic-pdf-redaction\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Frobust-redaction.md","REFERENCE","参考文档",9290,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fopus47_clean_20261016_partial14\u002Ftasks\u002Fpaper-anonymizer\u002Frepaired_skill\u002Facademic-pdf-redaction\u002Freferences\u002Frobust-redaction.md",[52,59,66,73,78,83],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":74,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":79,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":84,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]