claudecode-omc 5.1.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.local/skills/conductor/SKILL.md +397 -0
- package/bundled/manifest.json +3 -2
- package/bundled/upstream/anthropic-skills/skills/algorithmic-art/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/algorithmic-art/SKILL.md +405 -0
- package/bundled/upstream/anthropic-skills/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/bundled/upstream/anthropic-skills/skills/algorithmic-art/templates/viewer.html +599 -0
- package/bundled/upstream/anthropic-skills/skills/brand-guidelines/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/brand-guidelines/SKILL.md +73 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/SKILL.md +130 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/bundled/upstream/anthropic-skills/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +262 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/csharp/claude-api.md +402 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +216 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/go/claude-api.md +421 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +432 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +375 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/README.md +355 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/patterns.md +359 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +420 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +185 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +165 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +162 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +590 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +113 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +206 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +121 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +119 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +128 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +305 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/README.md +297 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/patterns.md +209 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +333 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +106 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +98 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +178 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +527 -0
- package/bundled/upstream/anthropic-skills/skills/doc-coauthoring/SKILL.md +375 -0
- package/bundled/upstream/anthropic-skills/skills/docx/LICENSE.txt +30 -0
- package/bundled/upstream/anthropic-skills/skills/docx/SKILL.md +590 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/__init__.py +1 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/accept_changes.py +135 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/comment.py +318 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/helpers/__init__.py +0 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/pack.py +159 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/soffice.py +183 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/unpack.py +132 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/validate.py +111 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/validators/__init__.py +15 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/validators/base.py +847 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/validators/docx.py +446 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/validators/pptx.py +275 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/office/validators/redlining.py +247 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/templates/comments.xml +3 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/bundled/upstream/anthropic-skills/skills/docx/scripts/templates/people.xml +3 -0
- package/bundled/upstream/anthropic-skills/skills/frontend-design/LICENSE.txt +177 -0
- package/bundled/upstream/anthropic-skills/skills/frontend-design/SKILL.md +42 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/SKILL.md +32 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/examples/3p-updates.md +47 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/examples/faq-answers.md +30 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/examples/general-comms.md +16 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/SKILL.md +236 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/reference/evaluation.md +602 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/scripts/connections.py +151 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/LICENSE.txt +30 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/SKILL.md +314 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/forms.md +294 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/reference.md +612 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/scripts/check_bounding_boxes.py +65 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/scripts/check_fillable_fields.py +11 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/scripts/create_validation_image.py +37 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/scripts/extract_form_field_info.py +122 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/scripts/extract_form_structure.py +115 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/scripts/fill_fillable_fields.py +98 -0
- package/bundled/upstream/anthropic-skills/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/LICENSE.txt +30 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/SKILL.md +232 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/editing.md +205 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/pptxgenjs.md +420 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/__init__.py +0 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/add_slide.py +195 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/clean.py +286 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/helpers/__init__.py +0 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/pack.py +159 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/soffice.py +183 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/unpack.py +132 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/validate.py +111 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/validators/__init__.py +15 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/validators/base.py +847 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/validators/docx.py +446 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/validators/pptx.py +275 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/office/validators/redlining.py +247 -0
- package/bundled/upstream/anthropic-skills/skills/pptx/scripts/thumbnail.py +289 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/SKILL.md +485 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/agents/analyzer.md +274 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/agents/comparator.md +202 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/agents/grader.md +223 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/assets/eval_review.html +146 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/references/schemas.md +430 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/__init__.py +0 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/generate_report.py +326 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/improve_description.py +247 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/package_skill.py +136 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/run_eval.py +310 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/run_loop.py +328 -0
- package/bundled/upstream/anthropic-skills/skills/skill-creator/scripts/utils.py +47 -0
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/SKILL.md +254 -0
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/core/easing.py +234 -0
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/core/validators.py +136 -0
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/requirements.txt +4 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/SKILL.md +59 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/theme-showcase.pdf +0 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/desert-rose.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/golden-hour.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/SKILL.md +74 -0
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/LICENSE.txt +202 -0
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/SKILL.md +96 -0
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/examples/console_logging.py +35 -0
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/scripts/with_server.py +106 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/LICENSE.txt +30 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/SKILL.md +292 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/pack.py +159 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/soffice.py +183 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/unpack.py +132 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/validate.py +111 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/validators/__init__.py +15 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/validators/base.py +847 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/validators/docx.py +446 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/validators/pptx.py +275 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/office/validators/redlining.py +247 -0
- package/bundled/upstream/anthropic-skills/skills/xlsx/scripts/recalc.py +184 -0
- package/bundled/upstream/anthropic-skills/spec/agent-skills-spec.md +3 -0
- package/bundled/upstream/anthropic-skills/template/SKILL.md +6 -0
- package/package.json +1 -1
- package/scripts/sync-upstream.sh +30 -10
- package/src/cli/artifact.js +2 -1
- package/src/cli/index.js +6 -0
- package/src/cli/setup.js +3 -0
- package/src/cli/skill.js +271 -0
- package/src/config/sources.js +12 -0
- package/src/merge/base-merger.js +28 -6
- package/src/utils/overlap.js +300 -0
- package/src/utils/quality.js +286 -32
- package/bundled/upstream/oh-my-claudecode/skills/conductor/SKILL.md +0 -231
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/AGENTS.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/ai-commenting/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/analyze/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/bdd-generator/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/e2e/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/electron-driver/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/electron-driver/scripts/driver-template.js +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/multi-model-research/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/examples.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/reference.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/scripts/check-complete.ps1 +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/scripts/check-complete.sh +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/scripts/init-session.ps1 +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/scripts/init-session.sh +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/scripts/session-catchup.py +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/templates/findings.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/templates/progress.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/planning-with-files/templates/task_plan.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/quick-init-project/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-creator/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-creator/references/upstream-anthropic-skill-creator.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-debugger/README.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-debugger/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-quality-analyzer/HOW_TO_USE.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-quality-analyzer/README.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-quality-analyzer/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-quality-analyzer/analyzer.py +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-quality-analyzer/expected_output.json +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-quality-analyzer/sample_input.json +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-tester/README.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/skill-tester/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/start-dev/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/tdd-generator/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/test-coverage/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/test-gen/SKILL.md +0 -0
- /package/{bundled/upstream/oh-my-claudecode → .local}/skills/ultraqa.md +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Agent SDK Patterns — TypeScript
|
|
2
|
+
|
|
3
|
+
## Basic Agent
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
for await (const message of query({
|
|
10
|
+
prompt: "Explain what this repository does",
|
|
11
|
+
options: {
|
|
12
|
+
cwd: "/path/to/project",
|
|
13
|
+
allowedTools: ["Read", "Glob", "Grep"],
|
|
14
|
+
},
|
|
15
|
+
})) {
|
|
16
|
+
if ("result" in message) {
|
|
17
|
+
console.log(message.result);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
main();
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Hooks
|
|
28
|
+
|
|
29
|
+
### After Tool Use Hook
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { query, HookCallback } from "@anthropic-ai/claude-agent-sdk";
|
|
33
|
+
import { appendFileSync } from "fs";
|
|
34
|
+
|
|
35
|
+
const logFileChange: HookCallback = async (input) => {
|
|
36
|
+
const filePath = (input as any).tool_input?.file_path ?? "unknown";
|
|
37
|
+
appendFileSync(
|
|
38
|
+
"./audit.log",
|
|
39
|
+
`${new Date().toISOString()}: modified ${filePath}\n`,
|
|
40
|
+
);
|
|
41
|
+
return {};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
for await (const message of query({
|
|
45
|
+
prompt: "Refactor utils.py to improve readability",
|
|
46
|
+
options: {
|
|
47
|
+
allowedTools: ["Read", "Edit", "Write"],
|
|
48
|
+
permissionMode: "acceptEdits",
|
|
49
|
+
hooks: {
|
|
50
|
+
PostToolUse: [{ matcher: "Edit|Write", hooks: [logFileChange] }],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
})) {
|
|
54
|
+
if ("result" in message) console.log(message.result);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Subagents
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
64
|
+
|
|
65
|
+
for await (const message of query({
|
|
66
|
+
prompt: "Use the code-reviewer agent to review this codebase",
|
|
67
|
+
options: {
|
|
68
|
+
allowedTools: ["Read", "Glob", "Grep", "Agent"],
|
|
69
|
+
agents: {
|
|
70
|
+
"code-reviewer": {
|
|
71
|
+
description: "Expert code reviewer for quality and security reviews.",
|
|
72
|
+
prompt: "Analyze code quality and suggest improvements.",
|
|
73
|
+
tools: ["Read", "Glob", "Grep"],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
})) {
|
|
78
|
+
if ("result" in message) console.log(message.result);
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## MCP Server Integration
|
|
85
|
+
|
|
86
|
+
### Browser Automation (Playwright)
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
for await (const message of query({
|
|
90
|
+
prompt: "Open example.com and describe what you see",
|
|
91
|
+
options: {
|
|
92
|
+
mcpServers: {
|
|
93
|
+
playwright: { command: "npx", args: ["@playwright/mcp@latest"] },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
})) {
|
|
97
|
+
if ("result" in message) console.log(message.result);
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Session Resumption
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
107
|
+
|
|
108
|
+
let sessionId: string | undefined;
|
|
109
|
+
|
|
110
|
+
// First query: capture the session ID
|
|
111
|
+
for await (const message of query({
|
|
112
|
+
prompt: "Read the authentication module",
|
|
113
|
+
options: { allowedTools: ["Read", "Glob"] },
|
|
114
|
+
})) {
|
|
115
|
+
if (message.type === "system" && message.subtype === "init") {
|
|
116
|
+
sessionId = message.session_id;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Resume with full context from the first query
|
|
121
|
+
for await (const message of query({
|
|
122
|
+
prompt: "Now find all places that call it",
|
|
123
|
+
options: { resume: sessionId },
|
|
124
|
+
})) {
|
|
125
|
+
if ("result" in message) console.log(message.result);
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Session History
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { listSessions, getSessionMessages, getSessionInfo } from "@anthropic-ai/claude-agent-sdk";
|
|
135
|
+
|
|
136
|
+
async function main() {
|
|
137
|
+
// List past sessions (supports pagination via limit/offset)
|
|
138
|
+
const sessions = await listSessions();
|
|
139
|
+
for (const session of sessions) {
|
|
140
|
+
console.log(`Session ${session.sessionId} in ${session.cwd} (tag: ${session.tag})`);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Get metadata for a single session
|
|
144
|
+
if (sessions.length > 0) {
|
|
145
|
+
const info = await getSessionInfo(sessions[0].sessionId);
|
|
146
|
+
console.log(`Created: ${info.createdAt}, Tag: ${info.tag}`);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Retrieve messages from the most recent session
|
|
150
|
+
if (sessions.length > 0) {
|
|
151
|
+
const messages = await getSessionMessages(sessions[0].sessionId, { limit: 50 });
|
|
152
|
+
for (const msg of messages) {
|
|
153
|
+
console.log(msg);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
main();
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Session Mutations
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import { renameSession, tagSession, forkSession } from "@anthropic-ai/claude-agent-sdk";
|
|
167
|
+
|
|
168
|
+
async function main() {
|
|
169
|
+
const sessionId = "your-session-id";
|
|
170
|
+
|
|
171
|
+
// Rename a session
|
|
172
|
+
await renameSession(sessionId, "Refactoring auth module");
|
|
173
|
+
|
|
174
|
+
// Tag a session for filtering
|
|
175
|
+
await tagSession(sessionId, "experiment-v2");
|
|
176
|
+
|
|
177
|
+
// Clear a tag
|
|
178
|
+
await tagSession(sessionId, null);
|
|
179
|
+
|
|
180
|
+
// Fork a conversation to branch from a point
|
|
181
|
+
const { sessionId: forkedId } = await forkSession(sessionId);
|
|
182
|
+
console.log(`Forked session: ${forkedId}`);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
main();
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Custom System Prompt
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
194
|
+
|
|
195
|
+
for await (const message of query({
|
|
196
|
+
prompt: "Review this code",
|
|
197
|
+
options: {
|
|
198
|
+
allowedTools: ["Read", "Glob", "Grep"],
|
|
199
|
+
systemPrompt: `You are a senior code reviewer focused on:
|
|
200
|
+
1. Security vulnerabilities
|
|
201
|
+
2. Performance issues
|
|
202
|
+
3. Code maintainability
|
|
203
|
+
|
|
204
|
+
Always provide specific line numbers and suggestions for improvement.`,
|
|
205
|
+
},
|
|
206
|
+
})) {
|
|
207
|
+
if ("result" in message) console.log(message.result);
|
|
208
|
+
}
|
|
209
|
+
```
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
# Claude API — TypeScript
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @anthropic-ai/sdk
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Client Initialization
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
13
|
+
|
|
14
|
+
// Default (uses ANTHROPIC_API_KEY env var)
|
|
15
|
+
const client = new Anthropic();
|
|
16
|
+
|
|
17
|
+
// Explicit API key
|
|
18
|
+
const client = new Anthropic({ apiKey: "your-api-key" });
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Basic Message Request
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
const response = await client.messages.create({
|
|
27
|
+
model: "claude-opus-4-6",
|
|
28
|
+
max_tokens: 16000,
|
|
29
|
+
messages: [{ role: "user", content: "What is the capital of France?" }],
|
|
30
|
+
});
|
|
31
|
+
// response.content is ContentBlock[] — a discriminated union. Narrow by .type
|
|
32
|
+
// before accessing .text (TypeScript will error on content[0].text without this).
|
|
33
|
+
for (const block of response.content) {
|
|
34
|
+
if (block.type === "text") {
|
|
35
|
+
console.log(block.text);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## System Prompts
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
const response = await client.messages.create({
|
|
46
|
+
model: "claude-opus-4-6",
|
|
47
|
+
max_tokens: 16000,
|
|
48
|
+
system:
|
|
49
|
+
"You are a helpful coding assistant. Always provide examples in Python.",
|
|
50
|
+
messages: [{ role: "user", content: "How do I read a JSON file?" }],
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Vision (Images)
|
|
57
|
+
|
|
58
|
+
### URL
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
const response = await client.messages.create({
|
|
62
|
+
model: "claude-opus-4-6",
|
|
63
|
+
max_tokens: 16000,
|
|
64
|
+
messages: [
|
|
65
|
+
{
|
|
66
|
+
role: "user",
|
|
67
|
+
content: [
|
|
68
|
+
{
|
|
69
|
+
type: "image",
|
|
70
|
+
source: { type: "url", url: "https://example.com/image.png" },
|
|
71
|
+
},
|
|
72
|
+
{ type: "text", text: "Describe this image" },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Base64
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import fs from "fs";
|
|
83
|
+
|
|
84
|
+
const imageData = fs.readFileSync("image.png").toString("base64");
|
|
85
|
+
|
|
86
|
+
const response = await client.messages.create({
|
|
87
|
+
model: "claude-opus-4-6",
|
|
88
|
+
max_tokens: 16000,
|
|
89
|
+
messages: [
|
|
90
|
+
{
|
|
91
|
+
role: "user",
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: "image",
|
|
95
|
+
source: { type: "base64", media_type: "image/png", data: imageData },
|
|
96
|
+
},
|
|
97
|
+
{ type: "text", text: "What's in this image?" },
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Prompt Caching
|
|
107
|
+
|
|
108
|
+
**Caching is a prefix match** — any byte change anywhere in the prefix invalidates everything after it. For placement patterns, architectural guidance (frozen system prompt, deterministic tool order, where to put volatile content), and the silent-invalidator audit checklist, read `shared/prompt-caching.md`.
|
|
109
|
+
|
|
110
|
+
### Automatic Caching (Recommended)
|
|
111
|
+
|
|
112
|
+
Use top-level `cache_control` to automatically cache the last cacheable block in the request:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
const response = await client.messages.create({
|
|
116
|
+
model: "claude-opus-4-6",
|
|
117
|
+
max_tokens: 16000,
|
|
118
|
+
cache_control: { type: "ephemeral" }, // auto-caches the last cacheable block
|
|
119
|
+
system: "You are an expert on this large document...",
|
|
120
|
+
messages: [{ role: "user", content: "Summarize the key points" }],
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Manual Cache Control
|
|
125
|
+
|
|
126
|
+
For fine-grained control, add `cache_control` to specific content blocks:
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
const response = await client.messages.create({
|
|
130
|
+
model: "claude-opus-4-6",
|
|
131
|
+
max_tokens: 16000,
|
|
132
|
+
system: [
|
|
133
|
+
{
|
|
134
|
+
type: "text",
|
|
135
|
+
text: "You are an expert on this large document...",
|
|
136
|
+
cache_control: { type: "ephemeral" }, // default TTL is 5 minutes
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
messages: [{ role: "user", content: "Summarize the key points" }],
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// With explicit TTL (time-to-live)
|
|
143
|
+
const response2 = await client.messages.create({
|
|
144
|
+
model: "claude-opus-4-6",
|
|
145
|
+
max_tokens: 16000,
|
|
146
|
+
system: [
|
|
147
|
+
{
|
|
148
|
+
type: "text",
|
|
149
|
+
text: "You are an expert on this large document...",
|
|
150
|
+
cache_control: { type: "ephemeral", ttl: "1h" }, // 1 hour TTL
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
messages: [{ role: "user", content: "Summarize the key points" }],
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Verifying Cache Hits
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
console.log(response.usage.cache_creation_input_tokens); // tokens written to cache (~1.25x cost)
|
|
161
|
+
console.log(response.usage.cache_read_input_tokens); // tokens served from cache (~0.1x cost)
|
|
162
|
+
console.log(response.usage.input_tokens); // uncached tokens (full cost)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
If `cache_read_input_tokens` is zero across repeated identical-prefix requests, a silent invalidator is at work — `Date.now()` or a UUID in the system prompt, non-deterministic key ordering, or a varying tool set. See `shared/prompt-caching.md` for the full audit table.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Extended Thinking
|
|
170
|
+
|
|
171
|
+
> **Opus 4.6 and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is deprecated on both Opus 4.6 and Sonnet 4.6.
|
|
172
|
+
> **Older models:** Use `thinking: {type: "enabled", budget_tokens: N}` (must be < `max_tokens`, min 1024).
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
// Opus 4.6: adaptive thinking (recommended)
|
|
176
|
+
const response = await client.messages.create({
|
|
177
|
+
model: "claude-opus-4-6",
|
|
178
|
+
max_tokens: 16000,
|
|
179
|
+
thinking: { type: "adaptive" },
|
|
180
|
+
output_config: { effort: "high" }, // low | medium | high | max
|
|
181
|
+
messages: [
|
|
182
|
+
{ role: "user", content: "Solve this math problem step by step..." },
|
|
183
|
+
],
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
for (const block of response.content) {
|
|
187
|
+
if (block.type === "thinking") {
|
|
188
|
+
console.log("Thinking:", block.thinking);
|
|
189
|
+
} else if (block.type === "text") {
|
|
190
|
+
console.log("Response:", block.text);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Error Handling
|
|
198
|
+
|
|
199
|
+
Use the SDK's typed exception classes — never check error messages with string matching:
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
203
|
+
|
|
204
|
+
try {
|
|
205
|
+
const response = await client.messages.create({...});
|
|
206
|
+
} catch (error) {
|
|
207
|
+
if (error instanceof Anthropic.BadRequestError) {
|
|
208
|
+
console.error("Bad request:", error.message);
|
|
209
|
+
} else if (error instanceof Anthropic.AuthenticationError) {
|
|
210
|
+
console.error("Invalid API key");
|
|
211
|
+
} else if (error instanceof Anthropic.RateLimitError) {
|
|
212
|
+
console.error("Rate limited - retry later");
|
|
213
|
+
} else if (error instanceof Anthropic.APIError) {
|
|
214
|
+
console.error(`API error ${error.status}:`, error.message);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
All classes extend `Anthropic.APIError` with a typed `status` field. Check from most specific to least specific. See [shared/error-codes.md](../../shared/error-codes.md) for the full error code reference.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Multi-Turn Conversations
|
|
224
|
+
|
|
225
|
+
The API is stateless — send the full conversation history each time. Use `Anthropic.MessageParam[]` to type the messages array:
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
const messages: Anthropic.MessageParam[] = [
|
|
229
|
+
{ role: "user", content: "My name is Alice." },
|
|
230
|
+
{ role: "assistant", content: "Hello Alice! Nice to meet you." },
|
|
231
|
+
{ role: "user", content: "What's my name?" },
|
|
232
|
+
];
|
|
233
|
+
|
|
234
|
+
const response = await client.messages.create({
|
|
235
|
+
model: "claude-opus-4-6",
|
|
236
|
+
max_tokens: 16000,
|
|
237
|
+
messages: messages,
|
|
238
|
+
});
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Rules:**
|
|
242
|
+
|
|
243
|
+
- Consecutive same-role messages are allowed — the API combines them into a single turn
|
|
244
|
+
- First message must be `user`
|
|
245
|
+
- Use SDK types (`Anthropic.MessageParam`, `Anthropic.Message`, `Anthropic.Tool`, etc.) for all API data structures — don't redefine equivalent interfaces
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### Compaction (long conversations)
|
|
250
|
+
|
|
251
|
+
> **Beta, Opus 4.6 and Sonnet 4.6.** When conversations approach the 200K context window, compaction automatically summarizes earlier context server-side. The API returns a `compaction` block; you must pass it back on subsequent requests — append `response.content`, not just the text.
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
255
|
+
|
|
256
|
+
const client = new Anthropic();
|
|
257
|
+
const messages: Anthropic.Beta.BetaMessageParam[] = [];
|
|
258
|
+
|
|
259
|
+
async function chat(userMessage: string): Promise<string> {
|
|
260
|
+
messages.push({ role: "user", content: userMessage });
|
|
261
|
+
|
|
262
|
+
const response = await client.beta.messages.create({
|
|
263
|
+
betas: ["compact-2026-01-12"],
|
|
264
|
+
model: "claude-opus-4-6",
|
|
265
|
+
max_tokens: 16000,
|
|
266
|
+
messages,
|
|
267
|
+
context_management: {
|
|
268
|
+
edits: [{ type: "compact_20260112" }],
|
|
269
|
+
},
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// Append full content — compaction blocks must be preserved
|
|
273
|
+
messages.push({ role: "assistant", content: response.content });
|
|
274
|
+
|
|
275
|
+
const textBlock = response.content.find(
|
|
276
|
+
(b): b is Anthropic.Beta.BetaTextBlock => b.type === "text",
|
|
277
|
+
);
|
|
278
|
+
return textBlock?.text ?? "";
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Compaction triggers automatically when context grows large
|
|
282
|
+
console.log(await chat("Help me build a Python web scraper"));
|
|
283
|
+
console.log(await chat("Add support for JavaScript-rendered pages"));
|
|
284
|
+
console.log(await chat("Now add rate limiting and error handling"));
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Stop Reasons
|
|
290
|
+
|
|
291
|
+
The `stop_reason` field in the response indicates why the model stopped generating:
|
|
292
|
+
|
|
293
|
+
| Value | Meaning |
|
|
294
|
+
| --------------- | --------------------------------------------------------------- |
|
|
295
|
+
| `end_turn` | Claude finished its response naturally |
|
|
296
|
+
| `max_tokens` | Hit the `max_tokens` limit — increase it or use streaming |
|
|
297
|
+
| `stop_sequence` | Hit a custom stop sequence |
|
|
298
|
+
| `tool_use` | Claude wants to call a tool — execute it and continue |
|
|
299
|
+
| `pause_turn` | Model paused and can be resumed (agentic flows) |
|
|
300
|
+
| `refusal` | Claude refused for safety reasons — output may not match schema |
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Cost Optimization Strategies
|
|
305
|
+
|
|
306
|
+
### 1. Use Prompt Caching for Repeated Context
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
// Automatic caching (simplest — caches the last cacheable block)
|
|
310
|
+
const response = await client.messages.create({
|
|
311
|
+
model: "claude-opus-4-6",
|
|
312
|
+
max_tokens: 16000,
|
|
313
|
+
cache_control: { type: "ephemeral" },
|
|
314
|
+
system: largeDocumentText, // e.g., 50KB of context
|
|
315
|
+
messages: [{ role: "user", content: "Summarize the key points" }],
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
// First request: full cost
|
|
319
|
+
// Subsequent requests: ~90% cheaper for cached portion
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### 2. Use Token Counting Before Requests
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
const countResponse = await client.messages.countTokens({
|
|
326
|
+
model: "claude-opus-4-6",
|
|
327
|
+
messages: messages,
|
|
328
|
+
system: system,
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
const estimatedInputCost = countResponse.input_tokens * 0.000005; // $5/1M tokens
|
|
332
|
+
console.log(`Estimated input cost: $${estimatedInputCost.toFixed(4)}`);
|
|
333
|
+
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Message Batches API — TypeScript
|
|
2
|
+
|
|
3
|
+
The Batches API (`POST /v1/messages/batches`) processes Messages API requests asynchronously at 50% of standard prices.
|
|
4
|
+
|
|
5
|
+
## Key Facts
|
|
6
|
+
|
|
7
|
+
- Up to 100,000 requests or 256 MB per batch
|
|
8
|
+
- Most batches complete within 1 hour; maximum 24 hours
|
|
9
|
+
- Results available for 29 days after creation
|
|
10
|
+
- 50% cost reduction on all token usage
|
|
11
|
+
- All Messages API features supported (vision, tools, caching, etc.)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Create a Batch
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
19
|
+
|
|
20
|
+
const client = new Anthropic();
|
|
21
|
+
|
|
22
|
+
const messageBatch = await client.messages.batches.create({
|
|
23
|
+
requests: [
|
|
24
|
+
{
|
|
25
|
+
custom_id: "request-1",
|
|
26
|
+
params: {
|
|
27
|
+
model: "claude-opus-4-6",
|
|
28
|
+
max_tokens: 16000,
|
|
29
|
+
messages: [
|
|
30
|
+
{ role: "user", content: "Summarize climate change impacts" },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
custom_id: "request-2",
|
|
36
|
+
params: {
|
|
37
|
+
model: "claude-opus-4-6",
|
|
38
|
+
max_tokens: 16000,
|
|
39
|
+
messages: [
|
|
40
|
+
{ role: "user", content: "Explain quantum computing basics" },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
console.log(`Batch ID: ${messageBatch.id}`);
|
|
48
|
+
console.log(`Status: ${messageBatch.processing_status}`);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Poll for Completion
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
let batch;
|
|
57
|
+
while (true) {
|
|
58
|
+
batch = await client.messages.batches.retrieve(messageBatch.id);
|
|
59
|
+
if (batch.processing_status === "ended") break;
|
|
60
|
+
console.log(
|
|
61
|
+
`Status: ${batch.processing_status}, processing: ${batch.request_counts.processing}`,
|
|
62
|
+
);
|
|
63
|
+
await new Promise((resolve) => setTimeout(resolve, 60_000));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
console.log("Batch complete!");
|
|
67
|
+
console.log(`Succeeded: ${batch.request_counts.succeeded}`);
|
|
68
|
+
console.log(`Errored: ${batch.request_counts.errored}`);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Retrieve Results
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
for await (const result of await client.messages.batches.results(
|
|
77
|
+
messageBatch.id,
|
|
78
|
+
)) {
|
|
79
|
+
switch (result.result.type) {
|
|
80
|
+
case "succeeded":
|
|
81
|
+
console.log(
|
|
82
|
+
`[${result.custom_id}] ${result.result.message.content[0].text.slice(0, 100)}`,
|
|
83
|
+
);
|
|
84
|
+
break;
|
|
85
|
+
case "errored":
|
|
86
|
+
if (result.result.error.type === "invalid_request") {
|
|
87
|
+
console.log(`[${result.custom_id}] Validation error - fix and retry`);
|
|
88
|
+
} else {
|
|
89
|
+
console.log(`[${result.custom_id}] Server error - safe to retry`);
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
case "expired":
|
|
93
|
+
console.log(`[${result.custom_id}] Expired - resubmit`);
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Cancel a Batch
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
const cancelled = await client.messages.batches.cancel(messageBatch.id);
|
|
105
|
+
console.log(`Status: ${cancelled.processing_status}`); // "canceling"
|
|
106
|
+
```
|