@waoooo/claude-skills 1.0.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/README.md +48 -0
- package/package.json +28 -0
- package/registry.json +431 -0
- package/skills/acceptance-review/SKILL.md +537 -0
- package/skills/all-plan/SKILL.md +19 -0
- package/skills/all-plan/references/flow.md +750 -0
- package/skills/api-docs-generate/SKILL.md +204 -0
- package/skills/api-docs-generate/assets/templates/api.mdx +140 -0
- package/skills/api-docs-generate/scripts/generate-api-docs.ts +308 -0
- package/skills/ask/SKILL.md +42 -0
- package/skills/autonew/SKILL.md +34 -0
- package/skills/capability-analyze/SKILL.md +300 -0
- package/skills/capability-analyze/scripts/analyze-capabilities.ts +531 -0
- package/skills/capability-docs-generate/SKILL.md +155 -0
- package/skills/capability-docs-generate/assets/templates/capability.mdx +271 -0
- package/skills/capability-docs-generate/scripts/generate-capability-docs.ts +358 -0
- package/skills/capability-tree-query/SKILL.md +112 -0
- package/skills/capability-tree-query/scripts/build-capability-tree.ts +402 -0
- package/skills/changelog-generator/SKILL.md +104 -0
- package/skills/continue/SKILL.md +39 -0
- package/skills/continue/agents/openai.yaml +3 -0
- package/skills/creating-skills/SKILL.md +158 -0
- package/skills/creating-skills/references/official_best_practices.md +128 -0
- package/skills/creating-skills/references/skill_examples.md +199 -0
- package/skills/docx/LICENSE.txt +30 -0
- package/skills/docx/SKILL.md +197 -0
- package/skills/docx/docx-js.md +350 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/docx/ooxml/scripts/pack.py +159 -0
- package/skills/docx/ooxml/scripts/unpack.py +29 -0
- package/skills/docx/ooxml/scripts/validate.py +69 -0
- package/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/docx/ooxml.md +610 -0
- package/skills/docx/scripts/__init__.py +1 -0
- package/skills/docx/scripts/document.py +1276 -0
- package/skills/docx/scripts/templates/comments.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/skills/docx/scripts/templates/people.xml +3 -0
- package/skills/docx/scripts/utilities.py +374 -0
- package/skills/git-branch-create/SKILL.md +170 -0
- package/skills/git-branch-merge/SKILL.md +176 -0
- package/skills/git-commit/SKILL.md +56 -0
- package/skills/git-commit/references/commit_examples.md +311 -0
- package/skills/github-actions-trigger/SKILL.md +367 -0
- package/skills/github-issue-create/SKILL.md +294 -0
- package/skills/github-pr-creation/SKILL.md +137 -0
- package/skills/github-pr-creation/references/pr_templates.md +187 -0
- package/skills/github-pr-merge/SKILL.md +112 -0
- package/skills/github-pr-review/SKILL.md +110 -0
- package/skills/github-pr-review/references/severity_guide.md +168 -0
- package/skills/job-create/SKILL.md +294 -0
- package/skills/job-create/scripts/create-job.ts +105 -0
- package/skills/job-workflow/SKILL.md +212 -0
- package/skills/keyword-extract/SKILL.md +229 -0
- package/skills/mcp-builder/LICENSE.txt +202 -0
- package/skills/mcp-builder/SKILL.md +236 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/mdx-to-openspec/SKILL.md +827 -0
- package/skills/mdx-to-openspec/scripts/mdx-to-openspec.ts +320 -0
- package/skills/mounted/SKILL.md +20 -0
- package/skills/multi-model-review/SKILL.md +459 -0
- package/skills/notion-automation/SKILL.md +215 -0
- package/skills/openspec-review/SKILL.md +513 -0
- package/skills/pdf/LICENSE.txt +30 -0
- package/skills/pdf/SKILL.md +294 -0
- package/skills/pdf/forms.md +205 -0
- package/skills/pdf/reference.md +612 -0
- package/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/skills/pdf/scripts/create_validation_image.py +41 -0
- package/skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/skills/pend/SKILL.md +33 -0
- package/skills/ping/SKILL.md +39 -0
- package/skills/pptx/LICENSE.txt +30 -0
- package/skills/pptx/SKILL.md +484 -0
- package/skills/pptx/html2pptx.md +625 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/pptx/ooxml/scripts/pack.py +159 -0
- package/skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/skills/pptx/ooxml/scripts/validate.py +69 -0
- package/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/pptx/ooxml.md +427 -0
- package/skills/pptx/scripts/html2pptx.js +979 -0
- package/skills/pptx/scripts/inventory.py +1020 -0
- package/skills/pptx/scripts/rearrange.py +231 -0
- package/skills/pptx/scripts/replace.py +385 -0
- package/skills/pptx/scripts/thumbnail.py +450 -0
- package/skills/progress-update/SKILL.md +394 -0
- package/skills/progress-update/scripts/update-progress.ts +221 -0
- package/skills/release-automation/SKILL.md +306 -0
- package/skills/requirement-parse/SKILL.md +212 -0
- package/skills/requirement-parse/scripts/infer-builder-config.ts +346 -0
- package/skills/requirement-parse/scripts/merge-requirements.ts +228 -0
- package/skills/requirement-parse/scripts/parse-docs.ts +206 -0
- package/skills/requirement-parse/scripts/parse-openspec.ts +168 -0
- package/skills/roadmap-docs-generate/SKILL.md +483 -0
- package/skills/roadmap-docs-generate/assets/templates/ROADMAP.mdx +75 -0
- package/skills/roadmap-docs-generate/assets/templates/ROADMAP.mdx.template +330 -0
- package/skills/roadmap-docs-generate/assets/templates/TODO.mdx +56 -0
- package/skills/roadmap-docs-generate/assets/templates/TODO.mdx.template +363 -0
- package/skills/roadmap-docs-generate/scripts/json-to-mdx.ts +445 -0
- package/skills/roadmap-docs-generate/scripts/json-to-mdx.ts.backup +411 -0
- package/skills/roadmap-generate/SKILL.md +396 -0
- package/skills/roadmap-generate/scripts/generate-roadmap.ts +496 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +356 -0
- package/skills/skill-creator/references/output-patterns.md +82 -0
- package/skills/skill-creator/references/workflows.md +28 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/package_skill.py +110 -0
- package/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/skills/spec-generate/SKILL.md +408 -0
- package/skills/spec-generate/scripts/generate-specs.ts +538 -0
- package/skills/spec-generate/scripts/generate-tasks.ts +174 -0
- package/skills/specs-review/SKILL.md +370 -0
- package/skills/task-execute/SKILL.md +399 -0
- package/skills/task-update-status/SKILL.md +349 -0
- package/skills/task-update-status/scripts/update-task-status.ts +192 -0
- package/skills/task-verify/SKILL.md +407 -0
- package/skills/ui-ux-pro-max/SKILL.md +386 -0
- package/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/skills/vercel-automation/SKILL.md +226 -0
- package/skills/webapp-testing/LICENSE.txt +202 -0
- package/skills/webapp-testing/SKILL.md +96 -0
- package/skills/webapp-testing/examples/console_logging.py +35 -0
- package/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/skills/webapp-testing/scripts/with_server.py +106 -0
- package/skills/worktree-manager/SKILL.md +725 -0
- package/skills/worktree-manager/config.json +15 -0
- package/skills/worktree-manager/scripts/allocate-ports.sh +100 -0
- package/skills/worktree-manager/scripts/cleanup.sh +185 -0
- package/skills/worktree-manager/scripts/launch-agent.sh +155 -0
- package/skills/worktree-manager/scripts/register.sh +125 -0
- package/skills/worktree-manager/scripts/release-ports.sh +48 -0
- package/skills/worktree-manager/scripts/status.sh +169 -0
- package/skills/worktree-manager/scripts/sync.sh +168 -0
- package/skills/worktree-manager/templates/worktree.json +23 -0
- package/skills/xlsx/LICENSE.txt +30 -0
- package/skills/xlsx/SKILL.md +289 -0
- package/skills/xlsx/recalc.py +178 -0
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-model-review
|
|
3
|
+
description: Generic multi-model review framework. Use when you need to review content with multiple AI models (Claude, Gemini, Codex) and aggregate results with automatic decision-making. Supports OpenSpec review, Specs review, and Acceptance review.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Multi-Model Review
|
|
7
|
+
|
|
8
|
+
Generic framework for reviewing content with multiple AI models and aggregating results.
|
|
9
|
+
|
|
10
|
+
## Core workflow
|
|
11
|
+
|
|
12
|
+
### 1. Prepare review
|
|
13
|
+
|
|
14
|
+
**Required inputs**:
|
|
15
|
+
- `reviewType`: "openspec" | "specs" | "acceptance"
|
|
16
|
+
- `contentPath`: Path to content being reviewed
|
|
17
|
+
- `models`: Array of models to use (e.g., ["gemini", "codex"])
|
|
18
|
+
- `thresholds`: Decision thresholds
|
|
19
|
+
|
|
20
|
+
**Optional inputs**:
|
|
21
|
+
- `reviewPrompt`: Custom prompt template
|
|
22
|
+
- `maxRetries`: Maximum auto-fix retries (default: 3)
|
|
23
|
+
|
|
24
|
+
### 2. Call multiple models in parallel
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Call Gemini
|
|
28
|
+
ask gemini "Review this OpenSpec: $(cat openspec/changes/001/proposal.md)"
|
|
29
|
+
|
|
30
|
+
# Call Codex
|
|
31
|
+
ask codex "Review this OpenSpec: $(cat openspec/changes/001/proposal.md)"
|
|
32
|
+
|
|
33
|
+
# Wait for responses
|
|
34
|
+
sleep 30
|
|
35
|
+
|
|
36
|
+
# Get responses
|
|
37
|
+
GEMINI_RESPONSE=$(pend gemini)
|
|
38
|
+
CODEX_RESPONSE=$(pend codex)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 3. Aggregate results
|
|
42
|
+
|
|
43
|
+
**Parse each model's response**:
|
|
44
|
+
- Extract: pass/fail, score, issues, suggestions
|
|
45
|
+
- Categorize issues: CRITICAL, HIGH, MEDIUM, LOW
|
|
46
|
+
|
|
47
|
+
**Calculate metrics**:
|
|
48
|
+
```bash
|
|
49
|
+
# Pass rate
|
|
50
|
+
PASS_COUNT=0
|
|
51
|
+
TOTAL_COUNT=2
|
|
52
|
+
|
|
53
|
+
if echo "$GEMINI_RESPONSE" | grep -q "PASS"; then
|
|
54
|
+
PASS_COUNT=$((PASS_COUNT + 1))
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
if echo "$CODEX_RESPONSE" | grep -q "PASS"; then
|
|
58
|
+
PASS_COUNT=$((PASS_COUNT + 1))
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
PASS_RATE=$((PASS_COUNT * 100 / TOTAL_COUNT))
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Aggregate issues**:
|
|
65
|
+
```bash
|
|
66
|
+
# Count issues by severity
|
|
67
|
+
CRITICAL_ISSUES=$(echo "$GEMINI_RESPONSE $CODEX_RESPONSE" | grep -c "CRITICAL")
|
|
68
|
+
HIGH_ISSUES=$(echo "$GEMINI_RESPONSE $CODEX_RESPONSE" | grep -c "HIGH")
|
|
69
|
+
MEDIUM_ISSUES=$(echo "$GEMINI_RESPONSE $CODEX_RESPONSE" | grep -c "MEDIUM")
|
|
70
|
+
LOW_ISSUES=$(echo "$GEMINI_RESPONSE $CODEX_RESPONSE" | grep -c "LOW")
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 4. Make decision based on thresholds
|
|
74
|
+
|
|
75
|
+
**Default thresholds**:
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"passRate": 75,
|
|
79
|
+
"criticalIssues": 0,
|
|
80
|
+
"mediumIssues": 2
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Decision logic**:
|
|
85
|
+
```bash
|
|
86
|
+
if [ $PASS_RATE -ge 75 ] && [ $CRITICAL_ISSUES -eq 0 ] && [ $MEDIUM_ISSUES -le 2 ]; then
|
|
87
|
+
DECISION="PASS"
|
|
88
|
+
elif [ $RETRY_COUNT -lt 3 ]; then
|
|
89
|
+
DECISION="FIX_AND_RETRY"
|
|
90
|
+
else
|
|
91
|
+
DECISION="ASK_USER"
|
|
92
|
+
fi
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 5. Auto-fix and retry (if needed)
|
|
96
|
+
|
|
97
|
+
**If decision is FIX_AND_RETRY**:
|
|
98
|
+
1. Analyze issues
|
|
99
|
+
2. Modify files to fix issues
|
|
100
|
+
3. Increment retry count
|
|
101
|
+
4. Re-run review (go to step 2)
|
|
102
|
+
|
|
103
|
+
**If decision is ASK_USER**:
|
|
104
|
+
1. Show summary to user
|
|
105
|
+
2. Ask: "Continue fixing or stop?"
|
|
106
|
+
3. If continue: go to step 5
|
|
107
|
+
4. If stop: exit
|
|
108
|
+
|
|
109
|
+
### 6. Save results
|
|
110
|
+
|
|
111
|
+
**Directory structure**:
|
|
112
|
+
```
|
|
113
|
+
exports/jobs/<job-id>/reviews/<review-type>/
|
|
114
|
+
├── gemini/
|
|
115
|
+
│ └── review.md
|
|
116
|
+
├── codex/
|
|
117
|
+
│ └── review.md
|
|
118
|
+
└── summary.md
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Summary format**:
|
|
122
|
+
```markdown
|
|
123
|
+
# Review Summary
|
|
124
|
+
|
|
125
|
+
## Decision
|
|
126
|
+
✅ PASS / ❌ FAIL / 🔄 FIX_AND_RETRY
|
|
127
|
+
|
|
128
|
+
## Metrics
|
|
129
|
+
- Pass Rate: 75%
|
|
130
|
+
- Critical Issues: 0
|
|
131
|
+
- High Issues: 1
|
|
132
|
+
- Medium Issues: 2
|
|
133
|
+
- Low Issues: 5
|
|
134
|
+
|
|
135
|
+
## Models
|
|
136
|
+
- Gemini: PASS (Score: 8/10)
|
|
137
|
+
- Codex: PASS (Score: 7/10)
|
|
138
|
+
|
|
139
|
+
## Issues
|
|
140
|
+
### Critical
|
|
141
|
+
(none)
|
|
142
|
+
|
|
143
|
+
### High
|
|
144
|
+
1. Missing validation for user input
|
|
145
|
+
|
|
146
|
+
### Medium
|
|
147
|
+
1. No error handling for API timeout
|
|
148
|
+
2. Unclear description in section 3
|
|
149
|
+
|
|
150
|
+
### Low
|
|
151
|
+
1. Typo in line 45
|
|
152
|
+
2. ...
|
|
153
|
+
|
|
154
|
+
## Next Action
|
|
155
|
+
- [x] Auto-fixed and retried
|
|
156
|
+
- [ ] Manual fix required
|
|
157
|
+
- [ ] Approved
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Review types
|
|
161
|
+
|
|
162
|
+
### OpenSpec Review
|
|
163
|
+
|
|
164
|
+
**Content**: `openspec/changes/<id>/proposal.md`
|
|
165
|
+
|
|
166
|
+
**Prompt template**:
|
|
167
|
+
```
|
|
168
|
+
Review this OpenSpec proposal:
|
|
169
|
+
|
|
170
|
+
{content}
|
|
171
|
+
|
|
172
|
+
Check for:
|
|
173
|
+
1. Clear problem statement
|
|
174
|
+
2. Well-defined goals
|
|
175
|
+
3. Feasible solution
|
|
176
|
+
4. Complete requirements
|
|
177
|
+
5. Risk assessment
|
|
178
|
+
|
|
179
|
+
Rate: PASS/FAIL
|
|
180
|
+
Score: 0-10
|
|
181
|
+
Issues: List with severity (CRITICAL/HIGH/MEDIUM/LOW)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Specs Review
|
|
185
|
+
|
|
186
|
+
**Content**: `exports/jobs/<job-id>/specs/*.json`
|
|
187
|
+
|
|
188
|
+
**Prompt template**:
|
|
189
|
+
```
|
|
190
|
+
Review these development specs:
|
|
191
|
+
|
|
192
|
+
{content}
|
|
193
|
+
|
|
194
|
+
Check for:
|
|
195
|
+
1. Complete API definitions
|
|
196
|
+
2. Clear data models
|
|
197
|
+
3. Validation rules
|
|
198
|
+
4. Error handling
|
|
199
|
+
5. Test coverage
|
|
200
|
+
|
|
201
|
+
Rate: PASS/FAIL
|
|
202
|
+
Score: 0-10
|
|
203
|
+
Issues: List with severity
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Acceptance Review
|
|
207
|
+
|
|
208
|
+
**Content**: `exports/jobs/<job-id>/verification.json`
|
|
209
|
+
|
|
210
|
+
**Prompt template**:
|
|
211
|
+
```
|
|
212
|
+
Review this acceptance verification:
|
|
213
|
+
|
|
214
|
+
{content}
|
|
215
|
+
|
|
216
|
+
Check for:
|
|
217
|
+
1. All tasks completed
|
|
218
|
+
2. All tests passed
|
|
219
|
+
3. Documentation updated
|
|
220
|
+
4. No critical issues
|
|
221
|
+
5. Ready for production
|
|
222
|
+
|
|
223
|
+
Rate: PASS/FAIL
|
|
224
|
+
Score: 0-10
|
|
225
|
+
Issues: List with severity
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Usage examples
|
|
229
|
+
|
|
230
|
+
### Example 1: OpenSpec Review
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Step 1: Prepare
|
|
234
|
+
REVIEW_TYPE="openspec"
|
|
235
|
+
CONTENT_PATH="openspec/changes/001-pricing-system/proposal.md"
|
|
236
|
+
MODELS=("gemini" "codex")
|
|
237
|
+
|
|
238
|
+
# Step 2: Call models
|
|
239
|
+
for model in "${MODELS[@]}"; do
|
|
240
|
+
ask $model "Review this OpenSpec: $(cat $CONTENT_PATH)"
|
|
241
|
+
done
|
|
242
|
+
|
|
243
|
+
sleep 30
|
|
244
|
+
|
|
245
|
+
# Step 3: Get responses
|
|
246
|
+
GEMINI_RESPONSE=$(pend gemini)
|
|
247
|
+
CODEX_RESPONSE=$(pend codex)
|
|
248
|
+
|
|
249
|
+
# Step 4: Aggregate
|
|
250
|
+
# ... (parse and calculate metrics)
|
|
251
|
+
|
|
252
|
+
# Step 5: Make decision
|
|
253
|
+
if [ $PASS_RATE -ge 75 ]; then
|
|
254
|
+
echo "✅ Review PASSED"
|
|
255
|
+
else
|
|
256
|
+
echo "❌ Review FAILED"
|
|
257
|
+
# Auto-fix or ask user
|
|
258
|
+
fi
|
|
259
|
+
|
|
260
|
+
# Step 6: Save results
|
|
261
|
+
mkdir -p exports/jobs/2026-02-11-pricing-system/reviews/openspec/gemini
|
|
262
|
+
echo "$GEMINI_RESPONSE" > exports/jobs/2026-02-11-pricing-system/reviews/openspec/gemini/review.md
|
|
263
|
+
|
|
264
|
+
mkdir -p exports/jobs/2026-02-11-pricing-system/reviews/openspec/codex
|
|
265
|
+
echo "$CODEX_RESPONSE" > exports/jobs/2026-02-11-pricing-system/reviews/openspec/codex/review.md
|
|
266
|
+
|
|
267
|
+
# Generate summary
|
|
268
|
+
cat > exports/jobs/2026-02-11-pricing-system/reviews/openspec/summary.md << EOF
|
|
269
|
+
# OpenSpec Review Summary
|
|
270
|
+
|
|
271
|
+
## Decision
|
|
272
|
+
✅ PASS
|
|
273
|
+
|
|
274
|
+
## Metrics
|
|
275
|
+
- Pass Rate: 100%
|
|
276
|
+
- Critical Issues: 0
|
|
277
|
+
- Medium Issues: 1
|
|
278
|
+
|
|
279
|
+
## Models
|
|
280
|
+
- Gemini: PASS (8/10)
|
|
281
|
+
- Codex: PASS (7/10)
|
|
282
|
+
EOF
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Example 2: With auto-fix retry
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
RETRY_COUNT=0
|
|
289
|
+
MAX_RETRIES=3
|
|
290
|
+
|
|
291
|
+
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
|
292
|
+
# Run review
|
|
293
|
+
# ... (steps 2-4)
|
|
294
|
+
|
|
295
|
+
if [ "$DECISION" = "PASS" ]; then
|
|
296
|
+
echo "✅ Review passed"
|
|
297
|
+
break
|
|
298
|
+
elif [ "$DECISION" = "FIX_AND_RETRY" ]; then
|
|
299
|
+
echo "🔄 Auto-fixing issues (retry $((RETRY_COUNT + 1))/$MAX_RETRIES)"
|
|
300
|
+
|
|
301
|
+
# Analyze issues and fix
|
|
302
|
+
# ... (modify files)
|
|
303
|
+
|
|
304
|
+
RETRY_COUNT=$((RETRY_COUNT + 1))
|
|
305
|
+
else
|
|
306
|
+
echo "❌ Review failed after $RETRY_COUNT retries"
|
|
307
|
+
|
|
308
|
+
# Ask user
|
|
309
|
+
read -p "Continue fixing? (y/n) " CONTINUE
|
|
310
|
+
if [ "$CONTINUE" != "y" ]; then
|
|
311
|
+
break
|
|
312
|
+
fi
|
|
313
|
+
fi
|
|
314
|
+
done
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Example 3: Create Issue if failed
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
if [ "$DECISION" != "PASS" ]; then
|
|
321
|
+
# Create GitHub Issue
|
|
322
|
+
gh issue create \
|
|
323
|
+
--title "Review failed: $REVIEW_TYPE" \
|
|
324
|
+
--body "$(cat <<EOF
|
|
325
|
+
## Review Type
|
|
326
|
+
$REVIEW_TYPE
|
|
327
|
+
|
|
328
|
+
## Metrics
|
|
329
|
+
- Pass Rate: $PASS_RATE%
|
|
330
|
+
- Critical Issues: $CRITICAL_ISSUES
|
|
331
|
+
- Medium Issues: $MEDIUM_ISSUES
|
|
332
|
+
|
|
333
|
+
## Context
|
|
334
|
+
- Job: $(basename $(pwd))
|
|
335
|
+
- Content: $CONTENT_PATH
|
|
336
|
+
|
|
337
|
+
## Action Required
|
|
338
|
+
Review the issues and fix them.
|
|
339
|
+
|
|
340
|
+
See full review: exports/jobs/.../reviews/$REVIEW_TYPE/summary.md
|
|
341
|
+
EOF
|
|
342
|
+
)" \
|
|
343
|
+
--label "review-feedback,$REVIEW_TYPE,priority:high" \
|
|
344
|
+
--assignee "@me"
|
|
345
|
+
fi
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## Integration with Product Builder
|
|
349
|
+
|
|
350
|
+
### Step 5: OpenSpec Review
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
skill(
|
|
354
|
+
name="multi-model-review",
|
|
355
|
+
params={
|
|
356
|
+
"reviewType": "openspec",
|
|
357
|
+
"contentPath": "openspec/changes/001-pricing-system/",
|
|
358
|
+
"models": ["gemini", "codex"],
|
|
359
|
+
"thresholds": {
|
|
360
|
+
"passRate": 75,
|
|
361
|
+
"criticalIssues": 0,
|
|
362
|
+
"mediumIssues": 2
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
)
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Step 9: Specs Review
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
skill(
|
|
372
|
+
name="multi-model-review",
|
|
373
|
+
params={
|
|
374
|
+
"reviewType": "specs",
|
|
375
|
+
"contentPath": "exports/jobs/2026-02-11-pricing-system/specs/",
|
|
376
|
+
"models": ["gemini", "codex"],
|
|
377
|
+
"thresholds": {
|
|
378
|
+
"passRate": 75,
|
|
379
|
+
"criticalIssues": 0,
|
|
380
|
+
"mediumIssues": 2
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
)
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Step 20: Acceptance Review
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
skill(
|
|
390
|
+
name="multi-model-review",
|
|
391
|
+
params={
|
|
392
|
+
"reviewType": "acceptance",
|
|
393
|
+
"contentPath": "exports/jobs/2026-02-11-pricing-system/verification.json",
|
|
394
|
+
"models": ["gemini", "codex"],
|
|
395
|
+
"thresholds": {
|
|
396
|
+
"passRate": 75,
|
|
397
|
+
"criticalIssues": 0,
|
|
398
|
+
"mediumIssues": 0
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
)
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
## Important rules
|
|
405
|
+
|
|
406
|
+
- **ALWAYS** call models in parallel for speed
|
|
407
|
+
- **ALWAYS** wait sufficient time for responses (30+ seconds)
|
|
408
|
+
- **ALWAYS** save individual model responses
|
|
409
|
+
- **ALWAYS** generate summary.md
|
|
410
|
+
- **ALWAYS** create Issue if review fails after max retries
|
|
411
|
+
- **NEVER** skip aggregation step
|
|
412
|
+
- **NEVER** ignore critical issues
|
|
413
|
+
- Use auto-fix for simple issues
|
|
414
|
+
- Ask user for complex issues
|
|
415
|
+
|
|
416
|
+
## Error handling
|
|
417
|
+
|
|
418
|
+
### Model timeout
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
# Wait with timeout
|
|
422
|
+
timeout 60 bash -c 'while ! pend gemini 2>/dev/null; do sleep 5; done'
|
|
423
|
+
|
|
424
|
+
if [ $? -eq 124 ]; then
|
|
425
|
+
echo "⚠️ Gemini timeout, skipping"
|
|
426
|
+
# Continue with other models
|
|
427
|
+
fi
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### Model error
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
RESPONSE=$(pend gemini)
|
|
434
|
+
|
|
435
|
+
if echo "$RESPONSE" | grep -q "ERROR"; then
|
|
436
|
+
echo "⚠️ Gemini error: $RESPONSE"
|
|
437
|
+
# Continue with other models
|
|
438
|
+
fi
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### No models available
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
if [ ${#MODELS[@]} -eq 0 ]; then
|
|
445
|
+
echo "❌ No models available for review"
|
|
446
|
+
exit 1
|
|
447
|
+
fi
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
## Notes
|
|
451
|
+
|
|
452
|
+
- Works in **current directory**
|
|
453
|
+
- Uses CCB (ask/pend commands)
|
|
454
|
+
- Requires CCB to be configured
|
|
455
|
+
- Supports any number of models
|
|
456
|
+
- Customizable thresholds
|
|
457
|
+
- Automatic retry with fix
|
|
458
|
+
- Creates GitHub Issues for failures
|
|
459
|
+
- Compatible with Product Builder workflow
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notion-automation
|
|
3
|
+
description: "Automate Notion tasks via Rube MCP (Composio): pages, databases, blocks, comments, users. Always search tools first for current schemas."
|
|
4
|
+
requires:
|
|
5
|
+
mcp: [rube]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Notion Automation via Rube MCP
|
|
9
|
+
|
|
10
|
+
Automate Notion operations through Composio's Notion toolkit via Rube MCP.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
|
|
15
|
+
- Active Notion connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `notion`
|
|
16
|
+
- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas
|
|
17
|
+
|
|
18
|
+
## Setup
|
|
19
|
+
|
|
20
|
+
**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds
|
|
24
|
+
2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `notion`
|
|
25
|
+
3. If connection is not ACTIVE, follow the returned auth link to complete Notion OAuth
|
|
26
|
+
4. Confirm connection status shows ACTIVE before running any workflows
|
|
27
|
+
|
|
28
|
+
## Core Workflows
|
|
29
|
+
|
|
30
|
+
### 1. Create and Manage Pages
|
|
31
|
+
|
|
32
|
+
**When to use**: User wants to create, update, or archive Notion pages
|
|
33
|
+
|
|
34
|
+
**Tool sequence**:
|
|
35
|
+
1. `NOTION_SEARCH_NOTION_PAGE` - Find parent page or existing page [Prerequisite]
|
|
36
|
+
2. `NOTION_CREATE_NOTION_PAGE` - Create a new page under a parent [Optional]
|
|
37
|
+
3. `NOTION_RETRIEVE_PAGE` - Get page metadata/properties [Optional]
|
|
38
|
+
4. `NOTION_UPDATE_PAGE` - Update page properties, title, icon, cover [Optional]
|
|
39
|
+
5. `NOTION_ARCHIVE_NOTION_PAGE` - Soft-delete (archive) a page [Optional]
|
|
40
|
+
|
|
41
|
+
**Key parameters**:
|
|
42
|
+
- `query`: Search text for SEARCH_NOTION_PAGE
|
|
43
|
+
- `parent_id`: Parent page or database ID
|
|
44
|
+
- `page_id`: Page ID for retrieval/update/archive
|
|
45
|
+
- `properties`: Page property values matching parent schema
|
|
46
|
+
|
|
47
|
+
**Pitfalls**:
|
|
48
|
+
- RETRIEVE_PAGE returns only metadata/properties, NOT body content; use FETCH_BLOCK_CONTENTS for page body
|
|
49
|
+
- ARCHIVE_NOTION_PAGE is a soft-delete (sets archived=true), not permanent deletion
|
|
50
|
+
- Broad searches can look incomplete unless has_more/next_cursor is fully paginated
|
|
51
|
+
|
|
52
|
+
### 2. Query and Manage Databases
|
|
53
|
+
|
|
54
|
+
**When to use**: User wants to query database rows, insert entries, or update records
|
|
55
|
+
|
|
56
|
+
**Tool sequence**:
|
|
57
|
+
1. `NOTION_SEARCH_NOTION_PAGE` - Find the database by name [Prerequisite]
|
|
58
|
+
2. `NOTION_FETCH_DATABASE` - Inspect schema and properties [Prerequisite]
|
|
59
|
+
3. `NOTION_QUERY_DATABASE` / `NOTION_QUERY_DATABASE_WITH_FILTER` - Query rows [Required]
|
|
60
|
+
4. `NOTION_INSERT_ROW_DATABASE` - Add new entries [Optional]
|
|
61
|
+
5. `NOTION_UPDATE_ROW_DATABASE` - Update existing entries [Optional]
|
|
62
|
+
|
|
63
|
+
**Key parameters**:
|
|
64
|
+
- `database_id`: Database ID (from search or URL)
|
|
65
|
+
- `filter`: Filter object matching Notion filter syntax
|
|
66
|
+
- `sorts`: Array of sort objects
|
|
67
|
+
- `start_cursor`: Pagination cursor from previous response
|
|
68
|
+
- `properties`: Property values matching database schema for inserts/updates
|
|
69
|
+
|
|
70
|
+
**Pitfalls**:
|
|
71
|
+
- 404 object_not_found usually means wrong database_id or the database is not shared with the integration
|
|
72
|
+
- Results are paginated; ignoring has_more/next_cursor silently truncates reads
|
|
73
|
+
- Schema mismatches or missing required properties cause 400 validation_error
|
|
74
|
+
- Formula and read-only fields cannot be set via INSERT_ROW_DATABASE
|
|
75
|
+
- Property names in filters must match schema exactly (case-sensitive)
|
|
76
|
+
|
|
77
|
+
### 3. Manage Blocks and Page Content
|
|
78
|
+
|
|
79
|
+
**When to use**: User wants to read, append, or modify content blocks in a page
|
|
80
|
+
|
|
81
|
+
**Tool sequence**:
|
|
82
|
+
1. `NOTION_FETCH_BLOCK_CONTENTS` - Read child blocks of a page [Required]
|
|
83
|
+
2. `NOTION_ADD_MULTIPLE_PAGE_CONTENT` - Append blocks to a page [Optional]
|
|
84
|
+
3. `NOTION_APPEND_TEXT_BLOCKS` - Append text-only blocks [Optional]
|
|
85
|
+
4. `NOTION_REPLACE_PAGE_CONTENT` - Replace all page content [Optional]
|
|
86
|
+
5. `NOTION_DELETE_BLOCK` - Remove a specific block [Optional]
|
|
87
|
+
|
|
88
|
+
**Key parameters**:
|
|
89
|
+
- `block_id` / `page_id`: Target page or block ID
|
|
90
|
+
- `content_blocks`: Array of block objects (NOT child_blocks)
|
|
91
|
+
- `text`: Plain text content for APPEND_TEXT_BLOCKS
|
|
92
|
+
|
|
93
|
+
**Pitfalls**:
|
|
94
|
+
- Use `content_blocks` parameter, NOT `child_blocks` -- the latter fails validation
|
|
95
|
+
- ADD_MULTIPLE_PAGE_CONTENT fails on archived pages; unarchive via UPDATE_PAGE first
|
|
96
|
+
- Created blocks are in response.data.results; persist block IDs for later edits
|
|
97
|
+
- DELETE_BLOCK is archival (archived=true), not permanent deletion
|
|
98
|
+
|
|
99
|
+
### 4. Manage Database Schema
|
|
100
|
+
|
|
101
|
+
**When to use**: User wants to create databases or modify their structure
|
|
102
|
+
|
|
103
|
+
**Tool sequence**:
|
|
104
|
+
1. `NOTION_FETCH_DATABASE` - Inspect current schema [Prerequisite]
|
|
105
|
+
2. `NOTION_CREATE_DATABASE` - Create a new database [Optional]
|
|
106
|
+
3. `NOTION_UPDATE_SCHEMA_DATABASE` - Modify database properties [Optional]
|
|
107
|
+
|
|
108
|
+
**Key parameters**:
|
|
109
|
+
- `parent_id`: Parent page ID for new databases
|
|
110
|
+
- `title`: Database title
|
|
111
|
+
- `properties`: Property definitions with types and options
|
|
112
|
+
- `database_id`: Database ID for schema updates
|
|
113
|
+
|
|
114
|
+
**Pitfalls**:
|
|
115
|
+
- Cannot change property types via UPDATE_SCHEMA; must create new property and migrate data
|
|
116
|
+
- Formula, rollup, and relation properties have complex configuration requirements
|
|
117
|
+
|
|
118
|
+
### 5. Manage Users and Comments
|
|
119
|
+
|
|
120
|
+
**When to use**: User wants to list workspace users or manage comments on pages
|
|
121
|
+
|
|
122
|
+
**Tool sequence**:
|
|
123
|
+
1. `NOTION_LIST_USERS` - List all workspace users [Optional]
|
|
124
|
+
2. `NOTION_GET_ABOUT_ME` - Get current authenticated user [Optional]
|
|
125
|
+
3. `NOTION_CREATE_COMMENT` - Add a comment to a page [Optional]
|
|
126
|
+
4. `NOTION_FETCH_COMMENTS` - List comments on a page [Optional]
|
|
127
|
+
|
|
128
|
+
**Key parameters**:
|
|
129
|
+
- `page_id`: Page ID for comments (also called `discussion_id`)
|
|
130
|
+
- `rich_text`: Comment content as rich text array
|
|
131
|
+
|
|
132
|
+
**Pitfalls**:
|
|
133
|
+
- Comments are linked to pages, not individual blocks
|
|
134
|
+
- User IDs from LIST_USERS are needed for people-type property filters
|
|
135
|
+
|
|
136
|
+
## Common Patterns
|
|
137
|
+
|
|
138
|
+
### ID Resolution
|
|
139
|
+
|
|
140
|
+
**Page/Database name -> ID**:
|
|
141
|
+
```
|
|
142
|
+
1. Call NOTION_SEARCH_NOTION_PAGE with query=name
|
|
143
|
+
2. Paginate with has_more/next_cursor until found
|
|
144
|
+
3. Extract id from matching result
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Database schema inspection**:
|
|
148
|
+
```
|
|
149
|
+
1. Call NOTION_FETCH_DATABASE with database_id
|
|
150
|
+
2. Extract properties object for field names and types
|
|
151
|
+
3. Use exact property names in queries and inserts
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Pagination
|
|
155
|
+
|
|
156
|
+
- Set `page_size` for results per page (max 100)
|
|
157
|
+
- Check response for `has_more` boolean
|
|
158
|
+
- Pass `start_cursor` or `next_cursor` in next request
|
|
159
|
+
- Continue until `has_more` is false
|
|
160
|
+
|
|
161
|
+
### Notion Filter Syntax
|
|
162
|
+
|
|
163
|
+
**Single filter**:
|
|
164
|
+
```json
|
|
165
|
+
{"property": "Status", "select": {"equals": "Done"}}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Compound filter**:
|
|
169
|
+
```json
|
|
170
|
+
{"and": [
|
|
171
|
+
{"property": "Status", "select": {"equals": "In Progress"}},
|
|
172
|
+
{"property": "Assignee", "people": {"contains": "user-id"}}
|
|
173
|
+
]}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Known Pitfalls
|
|
177
|
+
|
|
178
|
+
**Integration Sharing**:
|
|
179
|
+
- Pages and databases must be shared with the Notion integration to be accessible
|
|
180
|
+
- Title queries can return 0 when the item is not shared with the integration
|
|
181
|
+
|
|
182
|
+
**Property Types**:
|
|
183
|
+
- Property names are case-sensitive and must match schema exactly
|
|
184
|
+
- Formula, rollup, and created_time fields are read-only
|
|
185
|
+
- Select/multi-select values must match existing options unless creating new ones
|
|
186
|
+
|
|
187
|
+
**Response Parsing**:
|
|
188
|
+
- Response data may be nested under `data_preview` or `data.results`
|
|
189
|
+
- Parse defensively with fallbacks for different nesting levels
|
|
190
|
+
|
|
191
|
+
## Quick Reference
|
|
192
|
+
|
|
193
|
+
| Task | Tool Slug | Key Params |
|
|
194
|
+
|------|-----------|------------|
|
|
195
|
+
| Search pages/databases | NOTION_SEARCH_NOTION_PAGE | query |
|
|
196
|
+
| Create page | NOTION_CREATE_NOTION_PAGE | parent_id, properties |
|
|
197
|
+
| Get page metadata | NOTION_RETRIEVE_PAGE | page_id |
|
|
198
|
+
| Update page | NOTION_UPDATE_PAGE | page_id, properties |
|
|
199
|
+
| Archive page | NOTION_ARCHIVE_NOTION_PAGE | page_id |
|
|
200
|
+
| Duplicate page | NOTION_DUPLICATE_PAGE | page_id |
|
|
201
|
+
| Get page blocks | NOTION_FETCH_BLOCK_CONTENTS | block_id |
|
|
202
|
+
| Append blocks | NOTION_ADD_MULTIPLE_PAGE_CONTENT | page_id, content_blocks |
|
|
203
|
+
| Append text | NOTION_APPEND_TEXT_BLOCKS | page_id, text |
|
|
204
|
+
| Replace content | NOTION_REPLACE_PAGE_CONTENT | page_id, content_blocks |
|
|
205
|
+
| Delete block | NOTION_DELETE_BLOCK | block_id |
|
|
206
|
+
| Query database | NOTION_QUERY_DATABASE | database_id, filter, sorts |
|
|
207
|
+
| Query with filter | NOTION_QUERY_DATABASE_WITH_FILTER | database_id, filter |
|
|
208
|
+
| Insert row | NOTION_INSERT_ROW_DATABASE | database_id, properties |
|
|
209
|
+
| Update row | NOTION_UPDATE_ROW_DATABASE | page_id, properties |
|
|
210
|
+
| Get database schema | NOTION_FETCH_DATABASE | database_id |
|
|
211
|
+
| Create database | NOTION_CREATE_DATABASE | parent_id, title, properties |
|
|
212
|
+
| Update schema | NOTION_UPDATE_SCHEMA_DATABASE | database_id, properties |
|
|
213
|
+
| List users | NOTION_LIST_USERS | (none) |
|
|
214
|
+
| Create comment | NOTION_CREATE_COMMENT | page_id, rich_text |
|
|
215
|
+
| List comments | NOTION_FETCH_COMMENTS | page_id |
|