{"id":"15c2745f-d8d5-47d5-b5b2-bec53d17e616","entityType":"agent","slug":"clawhub-oldglycine-oldglycine-paper-reference-adder","name":"oldglycine-paper-reference-adder","canonicalUrl":"https://www.xpersona.co/agent/clawhub-oldglycine-oldglycine-paper-reference-adder","canonicalPath":"/agent/clawhub-oldglycine-oldglycine-paper-reference-adder","generatedAt":"2026-10-12T17:26:58.300Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T21:33:41.874Z","emptyReason":null},"description":"自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。 Skill: oldglycine-paper-reference-adder Owner: oldglycine Summary: 自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。 Tags: latest:1.1.0 Version history: v1.1.0 | 2026-04-19T08:49:40.587Z | user - Improved automation: now extracts keywords from TeX files and searches Google Scholar for relevant papers. - Automatically generates BibTeX entries for new references and ins","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 990 downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s1791rgqsw31d4eaazyww2dc2h840r5f:oldglycine-paper-reference-adder","sourceUrl":"https://clawhub.ai/oldglycine/oldglycine-paper-reference-adder","homepage":"https://clawhub.ai/oldglycine/skills/oldglycine-paper-reference-adder","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/oldglycine/oldglycine-paper-reference-adder","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/oldglycine/skills/oldglycine-paper-reference-adder","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。 Skill: oldglycine-paper-reference-adder Owner: oldglycine Su"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T21:33:41.874Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T21:33:41.874Z","emptyReason":null},"stars":null,"forks":null,"downloads":990,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.1.0","tractionLabel":"990 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T21:33:41.869Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T21:33:41.874Z","lastCrawledAt":"2026-10-11T21:33:41.869Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T21:33:41.869Z","lastVerifiedAt":null,"highlights":[{"version":"1.1.0","createdAt":"2026-04-19T08:49:40.587Z","changelog":"- Improved automation: now extracts keywords from TeX files and searches Google Scholar for relevant papers. - Automatically generates BibTeX entries for new references and inserts them into the project's .bib file. - Adds citation markers to key sections (introduction, related work, methods) without duplicating existing citations. - Creates a detailed ADD.MD report listing all added references and their locations. - Supports Overleaf project directory structure and backs up the project before making changes. - New parameters now allow setting the number of references and customizing the report path.","fileCount":7,"zipByteSize":8520}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s1791rgqsw31d4eaazyww2dc2h840r5f:oldglycine-paper-reference-adder","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-12T17:26:58.300Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldglycine-oldglycine-paper-reference-adder/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T21:33:41.874Z","emptyReason":null},"readme":"Skill: oldglycine-paper-reference-adder\n\nOwner: oldglycine\n\nSummary: 自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。\n\nTags: latest:1.1.0\n\nVersion history:\n\nv1.1.0 | 2026-04-19T08:49:40.587Z | user\n\n- Improved automation: now extracts keywords from TeX files and searches Google Scholar for relevant papers.\n- Automatically generates BibTeX entries for new references and inserts them into the project's .bib file.\n- Adds citation markers to key sections (introduction, related work, methods) without duplicating existing citations.\n- Creates a detailed ADD.MD report listing all added references and their locations.\n- Supports Overleaf project directory structure and backs up the project before making changes.\n- New parameters now allow setting the number of references and customizing the report path.\n\nArchive index:\n\nArchive v1.1.0: 7 files, 8520 bytes\n\nFiles: main.py (6689b), reference/BACKUP.MD (918b), reference/CODE.MD (5135b), reference/REFERENCES.MD (1121b), skill-card.md (2204b), SKILL.MD (1850b), _meta.json (151b)\n\nFile v1.1.0:SKILL.MD\n\n---\nname: oldglycine-paper-reference-adder\ndescription: 自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。\nmetadata:\n  versions: 1.1.0\n---\n# oldglycine-paper-reference-adder\n\n## 使用场景\n- 当研究论文需要在特定部分（引言、相关工作、方法）添加额外引用时\n- 当你想根据论文内容查找相关引用文献时\n- 当你需要确保不添加重复引用时\n\n## 工作原理\n1. **备份**: 创建项目目录的备份以防止数据丢失\n2. **内容分析**: 读取TeX文件并提取关键词和现有引用\n3. **引用搜索**: 使用Google Scholar（通过scholarly库）查找相关论文\n4. **BibTeX生成**: 为新引用生成BibTeX条目\n5. **集成**: 将新引用添加到bib文件并在文章中插入引用标记\n6. **报告**: 生成包含所有添加引用及其位置的ADD.MD文件\n\n## 参考资料\n- 代码参考 [ref](./reference/CODE.MD)\n  - 代码并不是即插即用，你**必须**根据用户的论文结构以及文章内容调整代码。\n- 如何备份 [ref](./reference/BACKUP.MD)\n- 如何添加引用 [ref](./reference/REFERENCES.MD)\n\n## 参数\n- `project_dir`: Overleaf项目目录路径\n- `num_references`: 要查找的引用数量（默认：10）\n- `output_report`: ADD.MD报告的路径（默认：./ADD.MD）\n\n## 依赖项\n- scholarly（用于Google Scholar搜索）\n- bibtexparser（用于BibTeX处理）\n- pdflatex（可选，用于编译论文）\n\n## 注意事项\n- 处理现有引用以避免重复\n- 重点在关键部分（引言、相关工作、方法）插入引用\n- 生成所有添加引用的详细报告\n- 兼容Overleaf项目结构\n- 使用scholarly库作为Google Scholar API的替代方案\n\nFile v1.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn7batwrn4kyzd4h901w0mgy85841wvp\",\n  \"slug\": \"oldglycine-paper-reference-adder\",\n  \"version\": \"1.1.0\",\n  \"publishedAt\": 1776588580587\n}\n\nFile v1.1.0:reference/BACKUP.MD\n\n# oldglycine-paper-reference-adder备份文件\n\n关于如何备份文件，以及决定哪些文件应该备份、哪些文件应该修改。\n\n## 如何备份\n- 备份用户的论文目录：\n```\nWorkspace/\n    ├── 用户的论文目录/             # 在此处编辑custom.bib和tex文件以添加引用。\n        ├── custom.bib\n        ├── main.tex\n        ├── sections/\n            ├── Introduction.tex\n            ├── RelatedWork.tex\n            ├── Method.tex\n            ...\n    ├── 用户的论文目录_backup/      # 项目目录的备份。请勿编辑！\n        ├── custom.bib\n        ├── main.tex\n        ├── sections/\n            ├── Introduction.tex\n            ├── RelatedWork.tex\n            ├── Method.tex\n            ...\n    ├── ADD.MD\n    ├── 其他文件...                      # 忽略它们。\n```\n\nFile v1.1.0:reference/CODE.MD\n\n# oldglycine-paper-reference-adder工具\n\n自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。\n\n## 如何使用\n1. 安装依赖：`pip3 install scholarly bibtexparser pdflatex`\n2. 根据用户论文的解构，以及论文的内容，调整代码读取逻辑以及关键领域的提取逻辑，调整关键词等。\n3. 使用所需参数运行脚本\n\n## 输入参数\n- `project_dir`：Overleaf项目目录路径（默认：./）\n- `num_references`：要查找的引用数量（默认：10）\n- `output_report`：ADD.MD报告的路径（默认：./ADD.MD）\n\n### 索引\n1. [read_tex_files](#read_tex_files)\n2. [extract_key_concepts](#extract_key_concepts)\n3. [search_scholar](#search_scholar)\n4. [add_to_bib](#add_to_bib)\n5. [main](#main)\n\n## 代码\n\n```python\n#!/usr/bin/env python3\nimport scholarly\nimport bibtexparser\nimport os\nimport re\n```\n\n### read_tex_files\n```python\ndef read_tex_files(project_dir):\n    content = []\n    # Read main.tex\n    main_tex = os.path.join(project_dir, 'main.tex')\n    if os.path.exists(main_tex):\n        with open(main_tex, 'r', encoding='utf-8') as f:\n            content.append(f.read())\n    # Read sections\n    sections_dir = os.path.join(project_dir, 'sections')\n    if os.path.exists(sections_dir):\n        for filename in os.listdir(sections_dir):\n            if filename.endswith('.tex'):\n                section_tex = os.path.join(sections_dir, filename)\n                with open(section_tex, 'r', encoding='utf-8') as f:\n                    content.append(f.read())\n    return '\\n'.join(content)\n\n# Function to extract key concepts from content\n```\n\n### extract_key_concepts\n```python\ndef extract_key_concepts(content):\n    # Extract keywords from main.tex\n    keywords_match = re.search(r'\\\\keywords\\{(.*?)\\}', content)\n    if keywords_match:\n        keywords = keywords_match.group(1).split(', ')\n        return keywords\n    # Fallback to extracting main topics\n    topics = [...] # Acquire from user's paper\n    return topics\n\n# Function to search Google Scholar for relevant papers\n```\n\n### search_scholar\n```python\ndef search_scholar(keywords, num_references=10):\n    papers = []\n    for keyword in keywords:\n        search_query = scholarly.scholarly.search_pubs(keyword)\n        for i, pub in enumerate(search_query):\n            if i >= num_references // len(keywords):\n                break\n            if 'bib' in pub:\n                papers.append(pub['bib'])\n    return papers\n\n# Function to add BibTeX entries to custom.bib\n```\n\n### add_to_bib\n```python\ndef add_to_bib(bib_file, papers):\n    # Read existing bib entries\n    existing_entries = set()\n    if os.path.exists(bib_file):\n        with open(bib_file, 'r', encoding='utf-8') as f:\n            bib_database = bibtexparser.load(f)\n            for entry in bib_database.entries:\n                if 'ID' in entry:\n                    existing_entries.add(entry['ID'])\n    # Add new entries\n    new_entries = []\n    for paper in papers:\n        if 'ID' not in paper:\n            # Generate ID from title\n            title = paper.get('title', '').replace(' ', '_').lower()[:30]\n            paper['ID'] = title\n        if paper['ID'] not in existing_entries:\n            new_entries.append(paper)\n            existing_entries.add(paper['ID'])\n    # Write back to bib file\n    if new_entries:\n        with open(bib_file, 'a', encoding='utf-8') as f:\n            for entry in new_entries:\n                f.write('@article{' + entry['ID'] + ',\\n')\n                for key, value in entry.items():\n                    if key != 'ID':\n                        f.write(f'    {key} = {{{value}}},\\n')\n                f.write('}\\n\\n')\n    return len(new_entries)\n\n# Main function\n```\n\n### main\n```python\ndef main():\n    project_dir = './' # Need user's input\n    num_references = 10\n    output_report = './ADD.MD'\n\n    # Read content\n    content = read_tex_files(project_dir)\n    # Extract key concepts\n    keywords = extract_key_concepts(content)\n    print(f'Searching for papers on: {keywords}')\n    # Search Scholar\n    papers = search_scholar(keywords, num_references)\n    print(f'Found {len(papers)} relevant papers')\n    # Add to bib\n    bib_file = os.path.join(project_dir, 'custom.bib')\n    new_count = add_to_bib(bib_file, papers)\n    print(f'Added {new_count} new references to {bib_file}')\n\n    # Generate report\n    with open(output_report, 'w', encoding='utf-8') as f:\n        f.write(f'Total {new_count} citations\\n')\n\nif __name__ == '__main__':\n    main()\n```\n\n## 依赖项\n- scholarly（用于Google Scholar搜索）\n- bibtexparser（用于BibTeX处理）\n\n## 示例用法\n```bash\npython3 main.py --project_dir \"e.g. ./Overleaf folder\" --num_references 15 --output_report ./ADD.MD\n```\n\n## 注意事项\n- 处理现有引用以避免重复\n- 重点在关键部分（引言、相关工作、方法）插入引用\n- 生成所有添加引用的详细报告\n- 兼容Overleaf项目结构\n- 使用scholarly库作为Google Scholar API的替代方案\n\nFile v1.1.0:reference/REFERENCES.MD\n\n# oldglycine-paper-reference-adder参考资料\n\n关于如何向论文添加引用并在ADD.MD中编写它们。\n\n## 如何添加引用\n\n1. 首先，我们使用[ref](CODE.MD)从Google Scholar获取引用\n2. 然后，我们将引用添加到bib文件（例如cumtom.bib）中。\n3. **重要**：确保引用格式正确（BibTeX条目），并在论文的正确位置添加它们。\n4. 最后，我们将引用以以下格式添加到ADD.MD文件中：\"引用位置（一句话）+ 引用BibTeX条目\"\n\n## 示例：\n1. 我们将以下引用添加到custom.bib文件中：\n```bib\n@article{article1,\n  title={Title of the Article},\n  author={Author, First and Last},\n  journal={Journal Name},\n  volume={10},\n  number={1},\n  pages={1--10},\n  year={2023}\n}\n```\n2. 我们在论文的引言部分添加了引用：\n```latex\nWith the rapid development of AI \\cite{article1}, .....\n```\n这里，\\cite{article1}是我们添加的文章的引用。\n3. 最后，我们将引用添加到ADD.MD文件中：\n```md\nReference Position: With the rapid development of AI \\cite{article1}, .....\nReference BibTeX Entry: @article{article1}\n```\n\nFile v1.1.0:skill-card.md\n\n## Description:\n\nAdds relevant academic citations to research paper projects by inspecting TeX and BibTeX files, inserting citation markers, and producing an ADD.MD report.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[oldglycine](https://clawhub.ai/user/oldglycine)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nResearchers, students, and writing agents use this skill to add non-duplicate citation markers to Overleaf-style paper projects and document the inserted references in an ADD.MD report.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can rewrite paper files and may not create the promised backup.\n\nMitigation: Run it only on a copied project or a version-controlled working tree, and verify backups before accepting changes.\n\nRisk: An unchecked report path can overwrite files outside the intended paper project.\n\nMitigation: Keep the report path relative to the paper project and review the resolved output path before execution.\n\nRisk: Unpinned dependencies and the documented pdflatex pip package may introduce supply-chain or runtime risk.\n\nMitigation: Use an isolated environment with version-pinned dependencies and independently verify any LaTeX tooling.\n\n## Reference(s):\n\n- [Code Reference](reference/CODE.MD)\n- [Backup Reference](reference/BACKUP.MD)\n- [Citation Reference](reference/REFERENCES.MD)\n- [ClawHub Skill Page](https://clawhub.ai/oldglycine/skills/oldglycine-paper-reference-adder)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with Python code and shell commands; the runner writes TeX edits and an ADD.MD report.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May modify TeX files in the target project and write a report file.]\n\n## Skill Version(s):\n\n1.1.0 (source: release evidence and skill metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.","readmeExcerpt":"Skill: oldglycine-paper-reference-adder Owner: oldglycine Summary: 自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。 Tags: latest:1.1.0 Version history: v1.1.0 | 2026-04-19T08:49:40.587Z | user - Improved automation: now extracts keywords from TeX files and searches Google Scholar for relevant papers. - Automatically generates BibTeX entries for new references and ins","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"Workspace/\n    ├── 用户的论文目录/             # 在此处编辑custom.bib和tex文件以添加引用。\n        ├── custom.bib\n        ├── main.tex\n        ├── sections/\n            ├── Introduction.tex\n            ├── RelatedWork.tex\n            ├── Method.tex\n            ...\n    ├── 用户的论文目录_backup/      # 项目目录的备份。请勿编辑！\n        ├── custom.bib\n        ├── main.tex\n        ├── sections/\n            ├── Introduction.tex\n            ├── RelatedWork.tex\n            ├── Method.tex\n            ...\n    ├── ADD.MD\n    ├── 其他文件...                      # 忽略它们。"},{"language":"python","snippet":"#!/usr/bin/env python3\nimport scholarly\nimport bibtexparser\nimport os\nimport re"},{"language":"python","snippet":"def read_tex_files(project_dir):\n    content = []\n    # Read main.tex\n    main_tex = os.path.join(project_dir, 'main.tex')\n    if os.path.exists(main_tex):\n        with open(main_tex, 'r', encoding='utf-8') as f:\n            content.append(f.read())\n    # Read sections\n    sections_dir = os.path.join(project_dir, 'sections')\n    if os.path.exists(sections_dir):\n        for filename in os.listdir(sections_dir):\n            if filename.endswith('.tex'):\n                section_tex = os.path.join(sections_dir, filename)\n                with open(section_tex, 'r', encoding='utf-8') as f:\n                    content.append(f.read())\n    return '\\n'.join(content)\n\n# Function to extract key concepts from content"},{"language":"python","snippet":"def extract_key_concepts(content):\n    # Extract keywords from main.tex\n    keywords_match = re.search(r'\\\\keywords\\{(.*?)\\}', content)\n    if keywords_match:\n        keywords = keywords_match.group(1).split(', ')\n        return keywords\n    # Fallback to extracting main topics\n    topics = [...] # Acquire from user's paper\n    return topics\n\n# Function to search Google Scholar for relevant papers"},{"language":"python","snippet":"def search_scholar(keywords, num_references=10):\n    papers = []\n    for keyword in keywords:\n        search_query = scholarly.scholarly.search_pubs(keyword)\n        for i, pub in enumerate(search_query):\n            if i >= num_references // len(keywords):\n                break\n            if 'bib' in pub:\n                papers.append(pub['bib'])\n    return papers\n\n# Function to add BibTeX entries to custom.bib"},{"language":"python","snippet":"def add_to_bib(bib_file, papers):\n    # Read existing bib entries\n    existing_entries = set()\n    if os.path.exists(bib_file):\n        with open(bib_file, 'r', encoding='utf-8') as f:\n            bib_database = bibtexparser.load(f)\n            for entry in bib_database.entries:\n                if 'ID' in entry:\n                    existing_entries.add(entry['ID'])\n    # Add new entries\n    new_entries = []\n    for paper in papers:\n        if 'ID' not in paper:\n            # Generate ID from title\n            title = paper.get('title', '').replace(' ', '_').lower()[:30]\n            paper['ID'] = title\n        if paper['ID'] not in existing_entries:\n            new_entries.append(paper)\n            existing_entries.add(paper['ID'])\n    # Write back to bib file\n    if new_entries:\n        with open(bib_file, 'a', encoding='utf-8') as f:\n            for entry in new_entries:\n                f.write('@article{' + entry['ID'] + ',\\n')\n                for key, value in entry.items():\n                    if key != 'ID':\n                        f.write(f'    {key} = {{{value}}},\\n')\n                f.write('}\\n\\n')\n    return len(new_entries)\n\n# Main function"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.MD","content":"---\nname: oldglycine-paper-reference-adder\ndescription: 自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。\nmetadata:\n  versions: 1.1.0\n---\n# oldglycine-paper-reference-adder\n\n## 使用场景\n- 当研究论文需要在特定部分（引言、相关工作、方法）添加额外引用时\n- 当你想根据论文内容查找相关引用文献时\n- 当你需要确保不添加重复引用时\n\n## 工作原理\n1. **备份**: 创建项目目录的备份以防止数据丢失\n2. **内容分析**: 读取TeX文件并提取关键词和现有引用\n3. **引用搜索**: 使用Google Scholar（通过scholarly库）查找相关论文\n4. **BibTeX生成**: 为新引用生成BibTeX条目\n5. **集成**: 将新引用添加到bib文件并在文章中插入引用标记\n6. **报告**: 生成包含所有添加引用及其位置的ADD.MD文件\n\n## 参考资料\n- 代码参考 [ref](./reference/CODE.MD)\n  - 代码并不是即插即用，你**必须**根据用户的论文结构以及文章内容调整代码。\n- 如何备份 [ref](./reference/BACKUP.MD)\n- 如何添加引用 [ref](./reference/REFERENCES.MD)\n\n## 参数\n- `project_dir`: Overleaf项目目录路径\n- `num_references`: 要查找的引用数量（默认：10）\n- `output_report`: ADD.MD报告的路径（默认：./ADD.MD）\n\n## 依赖项\n- scholarly（用于Google Scholar搜索）\n- bibtexparser（用于BibTeX处理）\n- pdflatex（可选，用于编译论文）\n\n## 注意事项\n- 处理现有引用以避免重复\n- 重点在关键部分（引言、相关工作、方法）插入引用\n- 生成所有添加引用的详细报告\n- 兼容Overleaf项目结构\n- 使用scholarly库作为Google Scholar API的替代方案"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7batwrn4kyzd4h901w0mgy85841wvp\",\n  \"slug\": \"oldglycine-paper-reference-adder\",\n  \"version\": \"1.1.0\",\n  \"publishedAt\": 1776588580587\n}"},{"path":"reference/BACKUP.MD","content":"# oldglycine-paper-reference-adder备份文件\n\n关于如何备份文件，以及决定哪些文件应该备份、哪些文件应该修改。\n\n## 如何备份\n- 备份用户的论文目录：\n```\nWorkspace/\n    ├── 用户的论文目录/             # 在此处编辑custom.bib和tex文件以添加引用。\n        ├── custom.bib\n        ├── main.tex\n        ├── sections/\n            ├── Introduction.tex\n            ├── RelatedWork.tex\n            ├── Method.tex\n            ...\n    ├── 用户的论文目录_backup/      # 项目目录的备份。请勿编辑！\n        ├── custom.bib\n        ├── main.tex\n        ├── sections/\n            ├── Introduction.tex\n            ├── RelatedWork.tex\n            ├── Method.tex\n            ...\n    ├── ADD.MD\n    ├── 其他文件...                      # 忽略它们。\n```"},{"path":"reference/CODE.MD","content":"# oldglycine-paper-reference-adder工具\n\n自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。\n\n## 如何使用\n1. 安装依赖：`pip3 install scholarly bibtexparser pdflatex`\n2. 根据用户论文的解构，以及论文的内容，调整代码读取逻辑以及关键领域的提取逻辑，调整关键词等。\n3. 使用所需参数运行脚本\n\n## 输入参数\n- `project_dir`：Overleaf项目目录路径（默认：./）\n- `num_references`：要查找的引用数量（默认：10）\n- `output_report`：ADD.MD报告的路径（默认：./ADD.MD）\n\n### 索引\n1. [read_tex_files](#read_tex_files)\n2. [extract_key_concepts](#extract_key_concepts)\n3. [search_scholar](#search_scholar)\n4. [add_to_bib](#add_to_bib)\n5. [main](#main)\n\n## 代码\n\n```python\n#!/usr/bin/env python3\nimport scholarly\nimport bibtexparser\nimport os\nimport re\n```\n\n### read_tex_files\n```python\ndef read_tex_files(project_dir):\n    content = []\n    # Read main.tex\n    main_tex = os.path.join(project_dir, 'main.tex')\n    if os.path.exists(main_tex):\n        with open(main_tex, 'r', encoding='utf-8') as f:\n            content.append(f.read())\n    # Read sections\n    sections_dir = os.path.join(project_dir, 'sections')\n    if os.path.exists(sections_dir):\n        for filename in os.listdir(sections_dir):\n            if filename.endswith('.tex'):\n                section_tex = os.path.join(sections_dir, filename)\n                with open(section_tex, 'r', encoding='utf-8') as f:\n                    content.append(f.read())\n    return '\\n'.join(content)\n\n# Function to extract key concepts from content\n```\n\n### extract_key_concepts\n```python\ndef extract_key_concepts(content):\n    # Extract keywords from main.tex\n    keywords_match = re.search(r'\\\\keywords\\{(.*?)\\}', content)\n    if keywords_match:\n        keywords = keywords_match.group(1).split(', ')\n        return keywords\n    # Fallback to extracting main topics\n    topics = [...] # Acquire from user's paper\n    return topics\n\n# Function to search Google Scholar for relevant papers\n```\n\n### search_scholar\n```python\ndef search_scholar(keywords, num_references=10):\n    papers = []\n    for keyword in keywords:\n        search_query = scholarly.scholarly.search_pubs(keyword)\n        for i, pub in enumerate(search_query):\n            if i >= num_references // len(keywords):\n                break\n            if 'bib' in pub:\n                papers.append(pub['bib'])\n    return papers\n\n# Function to add BibTeX entries to custom.bib\n```\n\n### add_to_bib\n```python\ndef add_to_bib(bib_file, papers):\n    # Read existing bib entries\n    existing_entries = set()\n    if os.path.exists(bib_file):\n        with open(bib_file, 'r', encoding='utf-8') as f:\n            bib_database = bibtexparser.load(f)\n            for entry in bib_database.entries:\n                if 'ID' in entry:\n                    existing_entries.add(entry['ID'])\n    # Add new entries\n    new_entries = []\n    for paper in papers:\n        if 'ID' not in paper:\n            # Generate ID from title\n            title = paper.get('title', '').replace(' ', '_').lower()[:30]\n            paper['ID'] = title\n        if paper['ID'] not in existing_entries:\n       "},{"path":"reference/REFERENCES.MD","content":"# oldglycine-paper-reference-adder参考资料\n\n关于如何向论文添加引用并在ADD.MD中编写它们。\n\n## 如何添加引用\n\n1. 首先，我们使用[ref](CODE.MD)从Google Scholar获取引用\n2. 然后，我们将引用添加到bib文件（例如cumtom.bib）中。\n3. **重要**：确保引用格式正确（BibTeX条目），并在论文的正确位置添加它们。\n4. 最后，我们将引用以以下格式添加到ADD.MD文件中：\"引用位置（一句话）+ 引用BibTeX条目\"\n\n## 示例：\n1. 我们将以下引用添加到custom.bib文件中：\n```bib\n@article{article1,\n  title={Title of the Article},\n  author={Author, First and Last},\n  journal={Journal Name},\n  volume={10},\n  number={1},\n  pages={1--10},\n  year={2023}\n}\n```\n2. 我们在论文的引言部分添加了引用：\n```latex\nWith the rapid development of AI \\cite{article1}, .....\n```\n这里，\\cite{article1}是我们添加的文章的引用。\n3. 最后，我们将引用添加到ADD.MD文件中：\n```md\nReference Position: With the rapid development of AI \\cite{article1}, .....\nReference BibTeX Entry: @article{article1}\n```"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。 Skill: oldglycine-paper-reference-adder Owner: oldglycine Summary: 自动为研究论文添加相关学术引用。支持Overleaf项目目录，从TeX文件提取关键词，在Google Scholar搜索相关论文，将BibTeX条目添加到项目的bib文件，并在关键部分插入引用标记。 Tags: latest:1.1.0 Version history: v1.1.0 | 2026-04-19T08:49:40.587Z | user - Improved automation: now extracts keywords from TeX files and searches Google Scholar for relevant papers. - Automatically generates BibTeX entries for new references and ins","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":630,"uniquenessScore":56,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T21:33:41.874Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T21:33:41.874Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-12T17:26:58.300Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}