Langgraph 7. Skills 案例源代码

上传者: zyctimes | 上传时间: 2026-03-23 16:57:48 | 文件大小: 244KB | 文件类型: ZIP
**摘要**:技能(Skills)是可复用、可插拔的能力单元,让智能体按名称或描述**发现**、**选择**、**加载**、**使用**外部能力,而不是把逻辑写死在代码里。本文说明 Skills 的动机、业界标准 [Agent Skills](https://agentskills.io/specification)(SKILL.md + 文件夹),以及**最佳实践**:在 `demo_codes` 中通过 **skills_library/**(技能库)、**skill_loader**(发现→选择→加载→使用)、**main.py** 演示如何按规范接入 SkillMD、Anthropic 官方等技能库。文中给出技能库下载与放置说明,以及典型 skill(Summarize、Launch Brief Builder、PR Review Guard)的对照参考。 **关键词**:技能;Skills;Agent Skills;SKILL.md;发现;加载;使用;LangGraph;Agentic Design Patterns 这里,我们给出一个示例。其严格按上述流程实现,作为 **Skills 用法的 Best Practice**:技能存放在 **skills_library/**,通过 **skill_loader.py** 提供 `discover_skills()`、`load_skill()`、`select_skill_for_task()`、`use_skill_with_llm()`,入口为 **main.py**。 博客链接:https://blog.csdn.net/zyctimes/article/details/159010743?spm=1011.2415.3001.5331

文件下载

资源详情

[{"title":"( 93 个子文件 244KB ) Langgraph 7. Skills 案例源代码","children":[{"title":"Langgraph_7_skills_source_codes","children":[{"title":"skill_loader.py <span style='color:#111;'> 7.05KB </span>","children":null,"spread":false},{"title":"skills_library","children":[{"title":"pdf","children":[{"title":"LICENSE.txt <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"forms.md <span style='color:#111;'> 11.86KB </span>","children":null,"spread":false},{"title":"reference.md <span style='color:#111;'> 16.90KB </span>","children":null,"spread":false},{"title":"SKILL.md <span style='color:#111;'> 8.19KB </span>","children":null,"spread":false},{"title":"scripts","children":[{"title":"create_validation_image.py <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"check_bounding_boxes.py <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"check_fillable_fields.py <span style='color:#111;'> 279B </span>","children":null,"spread":false},{"title":"extract_form_structure.py <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"fill_fillable_fields.py <span style='color:#111;'> 3.83KB </span>","children":null,"spread":false},{"title":"convert_pdf_to_images.py <span style='color:#111;'> 1.02KB </span>","children":null,"spread":false},{"title":"extract_form_field_info.py <span style='color:#111;'> 4.32KB </span>","children":null,"spread":false},{"title":"fill_pdf_form_with_annotations.py <span style='color:#111;'> 3.26KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".gitkeep <span style='color:#111;'> 135B </span>","children":null,"spread":false},{"title":"doc-coauthoring","children":[{"title":"SKILL.md <span style='color:#111;'> 15.81KB </span>","children":null,"spread":false}],"spread":true},{"title":"docx","children":[{"title":"LICENSE.txt <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"SKILL.md <span style='color:#111;'> 20.19KB </span>","children":null,"spread":false},{"title":"scripts","children":[{"title":"__init__.py <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"templates","children":[{"title":"commentsIds.xml <span style='color:#111;'> 2.56KB </span>","children":null,"spread":false},{"title":"commentsExtended.xml <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false},{"title":"commentsExtensible.xml <span style='color:#111;'> 2.65KB </span>","children":null,"spread":false},{"title":"people.xml <span style='color:#111;'> 118B </span>","children":null,"spread":false},{"title":"comments.xml <span style='color:#111;'> 2.54KB </span>","children":null,"spread":false}],"spread":true},{"title":"comment.py <span style='color:#111;'> 10.75KB </span>","children":null,"spread":false},{"title":"accept_changes.py <span style='color:#111;'> 4.09KB </span>","children":null,"spread":false},{"title":"office","children":[{"title":"soffice.py <span style='color:#111;'> 5.36KB </span>","children":null,"spread":false},{"title":"schemas","children":[{"title":"mce","children":[{"title":"mc.xsd <span style='color:#111;'> 3.13KB </span>","children":null,"spread":false}],"spread":false},{"title":"microsoft","children":[{"title":"wml-sdtdatahash-2020.xsd <span style='color:#111;'> 604B </span>","children":null,"spread":false},{"title":"wml-2012.xsd <span style='color:#111;'> 3.72KB </span>","children":null,"spread":false},{"title":"wml-cex-2018.xsd <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false},{"title":"wml-cid-2016.xsd <span style='color:#111;'> 1015B </span>","children":null,"spread":false},{"title":"wml-2018.xsd <span style='color:#111;'> 915B </span>","children":null,"spread":false},{"title":"wml-2010.xsd <span style='color:#111;'> 26.47KB </span>","children":null,"spread":false},{"title":"wml-symex-2015.xsd <span style='color:#111;'> 753B </span>","children":null,"spread":false}],"spread":false},{"title":"ecma","children":[{"title":"fouth-edition","children":[{"title":"opc-relationships.xsd <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"opc-digSig.xsd <span style='color:#111;'> 2.84KB </span>","children":null,"spread":false},{"title":"opc-contentTypes.xsd <span style='color:#111;'> 1.96KB </span>","children":null,"spread":false},{"title":"opc-coreProperties.xsd <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"ISO-IEC29500-4_2016","children":[{"title":"dml-diagram.xsd <span style='color:#111;'> 51.16KB </span>","children":null,"spread":false},{"title":"sml.xsd <span style='color:#111;'> 240.93KB </span>","children":null,"spread":false},{"title":"vml-wordprocessingDrawing.xsd <span style='color:#111;'> 4.01KB </span>","children":null,"spread":false},{"title":"dml-chart.xsd <span style='color:#111;'> 74.69KB </span>","children":null,"spread":false},{"title":"shared-relationshipReference.xsd <span style='color:#111;'> 1.36KB </span>","children":null,"spread":false},{"title":"wml.xsd <span style='color:#111;'> 170.91KB </span>","children":null,"spread":false},{"title":"dml-spreadsheetDrawing.xsd <span style='color:#111;'> 8.83KB </span>","children":null,"spread":false},{"title":"dml-wordprocessingDrawing.xsd <span style='color:#111;'> 14.73KB </span>","children":null,"spread":false},{"title":"shared-additionalCharacteristics.xsd <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"shared-documentPropertiesCustom.xsd <span style='color:#111;'> 2.60KB </span>","children":null,"spread":false},{"title":"shared-math.xsd <span style='color:#111;'> 23.33KB </span>","children":null,"spread":false},{"title":"vml-officeDrawing.xsd <span style='color:#111;'> 25.18KB </span>","children":null,"spread":false},{"title":"xml.xsd <span style='color:#111;'> 4.65KB </span>","children":null,"spread":false},{"title":"vml-main.xsd <span style='color:#111;'> 26.09KB </span>","children":null,"spread":false},{"title":"vml-presentationDrawing.xsd <span style='color:#111;'> 547B </span>","children":null,"spread":false},{"title":"shared-bibliography.xsd <span style='color:#111;'> 7.30KB </span>","children":null,"spread":false},{"title":"shared-documentPropertiesExtended.xsd <span style='color:#111;'> 3.48KB </span>","children":null,"spread":false},{"title":"dml-lockedCanvas.xsd <span style='color:#111;'> 635B </span>","children":null,"spread":false},{"title":"shared-customXmlSchemaProperties.xsd <span style='color:#111;'> 898B </span>","children":null,"spread":false},{"title":"dml-main.xsd <span style='color:#111;'> 151.48KB </span>","children":null,"spread":false},{"title":"pml.xsd <span style='color:#111;'> 83.29KB </span>","children":null,"spread":false},{"title":"dml-chartDrawing.xsd <span style='color:#111;'> 6.94KB </span>","children":null,"spread":false},{"title":"shared-customXmlDataProperties.xsd <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false},{"title":"shared-documentPropertiesVariantTypes.xsd <span style='color:#111;'> 7.52KB </span>","children":null,"spread":false},{"title":"shared-commonSimpleTypes.xsd <span style='color:#111;'> 6.40KB </span>","children":null,"spread":false},{"title":"dml-picture.xsd <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"vml-spreadsheetDrawing.xsd <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"helpers","children":[{"title":"simplify_redlines.py <span style='color:#111;'> 5.81KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"merge_runs.py <span style='color:#111;'> 5.63KB </span>","children":null,"spread":false}],"spread":false},{"title":"validate.py <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false},{"title":"unpack.py <span style='color:#111;'> 4.09KB </span>","children":null,"spread":false},{"title":"validators","children":[{"title":"__init__.py <span style='color:#111;'> 351B </span>","children":null,"spread":false},{"title":"pptx.py <span style='color:#111;'> 9.86KB </span>","children":null,"spread":false},{"title":"redlining.py <span style='color:#111;'> 8.95KB </span>","children":null,"spread":false},{"title":"docx.py <span style='color:#111;'> 16.43KB </span>","children":null,"spread":false},{"title":"base.py <span style='color:#111;'> 32.71KB </span>","children":null,"spread":false}],"spread":false},{"title":"pack.py <span style='color:#111;'> 5.03KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 2.43KB </span>","children":null,"spread":false}],"spread":true},{"title":"config_parser.py <span style='color:#111;'> 721B </span>","children":null,"spread":false},{"title":"skills.log <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false},{"title":".env <span style='color:#111;'> 46B </span>","children":null,"spread":false},{"title":"main.py <span style='color:#111;'> 2.63KB </span>","children":null,"spread":false},{"title":"main.ipynb <span style='color:#111;'> 27.57KB </span>","children":null,"spread":false},{"title":"skills","children":[{"title":"__pycache__","children":[{"title":"research_skill.cpython-311.pyc <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false},{"title":"reflector_skill.cpython-311.pyc <span style='color:#111;'> 5.11KB </span>","children":null,"spread":false},{"title":"__init__.cpython-311.pyc <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"writer_skill.cpython-311.pyc <span style='color:#111;'> 3.27KB </span>","children":null,"spread":false},{"title":"__init__.cpython-39.pyc <span style='color:#111;'> 923B </span>","children":null,"spread":false},{"title":"research_skill.cpython-39.pyc <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"base.cpython-311.pyc <span style='color:#111;'> 3.88KB </span>","children":null,"spread":false},{"title":"base.cpython-39.pyc <span style='color:#111;'> 3.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"requirements.txt <span style='color:#111;'> 135B </span>","children":null,"spread":false},{"title":"log_config.py <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 4.41KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明