@dtt_siye/atool 1.1.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/LICENSE +21 -0
- package/README.md +235 -0
- package/VERSION +1 -0
- package/agents/code-reviewer.md +29 -0
- package/bin/atool.js +235 -0
- package/bin/postinstall.js +23 -0
- package/hooks/doc-sync-reminder +155 -0
- package/hooks/hooks-cursor.json +37 -0
- package/hooks/hooks.json +37 -0
- package/hooks/prompt-guard +135 -0
- package/hooks/session-start +286 -0
- package/install.sh +603 -0
- package/lib/analyze-source.sh +1265 -0
- package/lib/common.sh +1041 -0
- package/lib/compute-importance.sh +598 -0
- package/lib/detect-stack.sh +354 -0
- package/lib/generate-visualization.sh +266 -0
- package/lib/install-claude.sh +43 -0
- package/lib/install-cursor.sh +281 -0
- package/lib/install-hooks.sh +285 -0
- package/lib/install-kiro.sh +543 -0
- package/lib/install-mcp.sh +99 -0
- package/lib/install-skills.sh +129 -0
- package/lib/knowledge-graph.sh +1014 -0
- package/lib/multi-dimensional-analysis.sh +413 -0
- package/lib/pre-scan.sh +1045 -0
- package/lib/project-init.sh +552 -0
- package/lib/visualization-template.html +545 -0
- package/mcp/recommended.json +24 -0
- package/package.json +39 -0
- package/skills/_superpowers/.claude-plugin/marketplace.json +20 -0
- package/skills/_superpowers/.claude-plugin/plugin.json +20 -0
- package/skills/_superpowers/.codex/INSTALL.md +67 -0
- package/skills/_superpowers/.cursor-plugin/plugin.json +25 -0
- package/skills/_superpowers/.gitattributes +18 -0
- package/skills/_superpowers/.github/FUNDING.yml +3 -0
- package/skills/_superpowers/.github/ISSUE_TEMPLATE/bug_report.md +52 -0
- package/skills/_superpowers/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/skills/_superpowers/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
- package/skills/_superpowers/.github/ISSUE_TEMPLATE/platform_support.md +23 -0
- package/skills/_superpowers/.github/PULL_REQUEST_TEMPLATE.md +87 -0
- package/skills/_superpowers/.opencode/INSTALL.md +83 -0
- package/skills/_superpowers/.opencode/plugins/superpowers.js +107 -0
- package/skills/_superpowers/CHANGELOG.md +13 -0
- package/skills/_superpowers/CODE_OF_CONDUCT.md +128 -0
- package/skills/_superpowers/GEMINI.md +2 -0
- package/skills/_superpowers/LICENSE +21 -0
- package/skills/_superpowers/README.md +187 -0
- package/skills/_superpowers/RELEASE-NOTES.md +1083 -0
- package/skills/_superpowers/agents/code-reviewer.md +48 -0
- package/skills/_superpowers/commands/brainstorm.md +5 -0
- package/skills/_superpowers/commands/execute-plan.md +5 -0
- package/skills/_superpowers/commands/write-plan.md +5 -0
- package/skills/_superpowers/docs/README.codex.md +126 -0
- package/skills/_superpowers/docs/README.opencode.md +130 -0
- package/skills/_superpowers/docs/plans/2025-11-22-opencode-support-design.md +294 -0
- package/skills/_superpowers/docs/plans/2025-11-22-opencode-support-implementation.md +1095 -0
- package/skills/_superpowers/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +711 -0
- package/skills/_superpowers/docs/plans/2026-01-17-visual-brainstorming.md +571 -0
- package/skills/_superpowers/docs/superpowers/plans/2026-01-22-document-review-system.md +301 -0
- package/skills/_superpowers/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +523 -0
- package/skills/_superpowers/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +479 -0
- package/skills/_superpowers/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +564 -0
- package/skills/_superpowers/docs/superpowers/specs/2026-01-22-document-review-system-design.md +136 -0
- package/skills/_superpowers/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +162 -0
- package/skills/_superpowers/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +118 -0
- package/skills/_superpowers/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +244 -0
- package/skills/_superpowers/docs/testing.md +303 -0
- package/skills/_superpowers/docs/windows/polyglot-hooks.md +212 -0
- package/skills/_superpowers/gemini-extension.json +6 -0
- package/skills/_superpowers/hooks/hooks-cursor.json +10 -0
- package/skills/_superpowers/hooks/hooks.json +16 -0
- package/skills/_superpowers/hooks/run-hook.cmd +46 -0
- package/skills/_superpowers/hooks/session-start +57 -0
- package/skills/_superpowers/package.json +6 -0
- package/skills/_superpowers/skills/brainstorming/SKILL.md +164 -0
- package/skills/_superpowers/skills/brainstorming/scripts/frame-template.html +214 -0
- package/skills/_superpowers/skills/brainstorming/scripts/helper.js +88 -0
- package/skills/_superpowers/skills/brainstorming/scripts/server.cjs +354 -0
- package/skills/_superpowers/skills/brainstorming/scripts/start-server.sh +148 -0
- package/skills/_superpowers/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/skills/_superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/_superpowers/skills/brainstorming/visual-companion.md +287 -0
- package/skills/_superpowers/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/skills/_superpowers/skills/executing-plans/SKILL.md +70 -0
- package/skills/_superpowers/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/_superpowers/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/_superpowers/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/_superpowers/skills/requesting-code-review/code-reviewer.md +146 -0
- package/skills/_superpowers/skills/subagent-driven-development/SKILL.md +277 -0
- package/skills/_superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/skills/_superpowers/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/skills/_superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/_superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/_superpowers/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/_superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/_superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/_superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/_superpowers/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/_superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/_superpowers/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/_superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/_superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/_superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/_superpowers/skills/test-driven-development/SKILL.md +371 -0
- package/skills/_superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/_superpowers/skills/using-git-worktrees/SKILL.md +218 -0
- package/skills/_superpowers/skills/using-superpowers/SKILL.md +115 -0
- package/skills/_superpowers/skills/using-superpowers/references/codex-tools.md +100 -0
- package/skills/_superpowers/skills/using-superpowers/references/gemini-tools.md +33 -0
- package/skills/_superpowers/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/_superpowers/skills/writing-plans/SKILL.md +152 -0
- package/skills/_superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/skills/_superpowers/skills/writing-skills/SKILL.md +655 -0
- package/skills/_superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/_superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/_superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/_superpowers/skills/writing-skills/persuasion-principles.md +187 -0
- package/skills/_superpowers/skills/writing-skills/render-graphs.js +168 -0
- package/skills/_superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/skills/_superpowers/tests/brainstorm-server/package-lock.json +36 -0
- package/skills/_superpowers/tests/brainstorm-server/package.json +10 -0
- package/skills/_superpowers/tests/brainstorm-server/server.test.js +427 -0
- package/skills/_superpowers/tests/brainstorm-server/windows-lifecycle.test.sh +351 -0
- package/skills/_superpowers/tests/brainstorm-server/ws-protocol.test.js +392 -0
- package/skills/_superpowers/tests/claude-code/README.md +158 -0
- package/skills/_superpowers/tests/claude-code/analyze-token-usage.py +168 -0
- package/skills/_superpowers/tests/claude-code/run-skill-tests.sh +187 -0
- package/skills/_superpowers/tests/claude-code/test-document-review-system.sh +177 -0
- package/skills/_superpowers/tests/claude-code/test-helpers.sh +202 -0
- package/skills/_superpowers/tests/claude-code/test-subagent-driven-development-integration.sh +314 -0
- package/skills/_superpowers/tests/claude-code/test-subagent-driven-development.sh +165 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/action-oriented.txt +3 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/after-planning-flow.txt +17 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +11 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +8 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +3 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +1 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/skip-formalities.txt +3 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +1 -0
- package/skills/_superpowers/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +1 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-all.sh +70 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-claude-describes-sdd.sh +100 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-extended-multiturn-test.sh +113 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-haiku-test.sh +144 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-multiturn-test.sh +143 -0
- package/skills/_superpowers/tests/explicit-skill-requests/run-test.sh +136 -0
- package/skills/_superpowers/tests/opencode/run-tests.sh +163 -0
- package/skills/_superpowers/tests/opencode/setup.sh +73 -0
- package/skills/_superpowers/tests/opencode/test-plugin-loading.sh +72 -0
- package/skills/_superpowers/tests/opencode/test-priority.sh +198 -0
- package/skills/_superpowers/tests/opencode/test-tools.sh +104 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +8 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/executing-plans.txt +1 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/requesting-code-review.txt +3 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/systematic-debugging.txt +11 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/test-driven-development.txt +7 -0
- package/skills/_superpowers/tests/skill-triggering/prompts/writing-plans.txt +10 -0
- package/skills/_superpowers/tests/skill-triggering/run-all.sh +60 -0
- package/skills/_superpowers/tests/skill-triggering/run-test.sh +88 -0
- package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/design.md +81 -0
- package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/plan.md +172 -0
- package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/scaffold.sh +45 -0
- package/skills/_superpowers/tests/subagent-driven-dev/run-test.sh +106 -0
- package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/design.md +70 -0
- package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/plan.md +222 -0
- package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/scaffold.sh +46 -0
- package/skills/ai-project-architecture/SKILL.md +632 -0
- package/skills/ai-project-architecture/reference/structure-rules.md +406 -0
- package/skills/ai-project-architecture/templates/compliance-report.md +300 -0
- package/skills/ai-project-architecture/templates/migration-plan.md +433 -0
- package/skills/ai-project-architecture/templates/verification-checklist.md +408 -0
- package/skills/android-conventions/SKILL.md +125 -0
- package/skills/atool-init/SKILL.md +141 -0
- package/skills/clarify-before-build/SKILL.md +107 -0
- package/skills/code-review/SKILL.md +406 -0
- package/skills/code-review/rules/architecture.md +285 -0
- package/skills/code-review/rules/coupling-cohesion.md +309 -0
- package/skills/code-review/rules/dead-code.md +115 -0
- package/skills/code-review/rules/deprecation-debt.md +279 -0
- package/skills/code-review/rules/duplication.md +104 -0
- package/skills/code-review/rules/error-security.md +143 -0
- package/skills/code-review/rules/maintainability.md +203 -0
- package/skills/code-review/rules/quality.md +158 -0
- package/skills/devops-conventions/SKILL.md +205 -0
- package/skills/doc-coauthoring/SKILL.md +392 -0
- package/skills/doc-standards-enforcer/SKILL.md +290 -0
- package/skills/doc-standards-enforcer/examples/valid-document-example.md +67 -0
- package/skills/doc-standards-enforcer/references/101-standards-summary.md +318 -0
- package/skills/doc-standards-enforcer/scripts/check_references.py +175 -0
- package/skills/doc-standards-enforcer/scripts/fix_common_issues.py +303 -0
- package/skills/doc-standards-enforcer/scripts/validate_doc_standards.py +332 -0
- package/skills/docx/LICENSE.txt +30 -0
- package/skills/docx/SKILL.md +200 -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/flutter-conventions/SKILL.md +70 -0
- package/skills/go-conventions/SKILL.md +230 -0
- package/skills/harmony-conventions/SKILL.md +156 -0
- package/skills/java-conventions/SKILL.md +277 -0
- package/skills/pdf/LICENSE.txt +30 -0
- package/skills/pdf/SKILL.md +297 -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/pptx/LICENSE.txt +30 -0
- package/skills/pptx/SKILL.md +487 -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/project-analyze/SKILL.md +270 -0
- package/skills/project-analyze/phases/phase0-discovery.md +278 -0
- package/skills/project-analyze/phases/phase0.5-prescan.md +139 -0
- package/skills/project-analyze/phases/phase1-inventory.md +94 -0
- package/skills/project-analyze/phases/phase2-deep-analysis.md +249 -0
- package/skills/project-analyze/phases/phase2a-l4-analysis.md +94 -0
- package/skills/project-analyze/phases/phase2b-l5-analysis.md +97 -0
- package/skills/project-analyze/phases/phase3-knowledge-graph.md +120 -0
- package/skills/project-analyze/phases/phase3a-multi-dimensional.md +61 -0
- package/skills/project-analyze/phases/phase4-code-quality.md +81 -0
- package/skills/project-analyze/phases/phase5-synthesis.md +284 -0
- package/skills/project-analyze/phases/phase6-validation.md +179 -0
- package/skills/project-analyze/prompts/code-review-agent.md +122 -0
- package/skills/project-analyze/prompts/deep-analysis-agent.md +107 -0
- package/skills/project-analyze/prompts/inventory-agent.md +67 -0
- package/skills/project-analyze/prompts/l4-analysis-agent.md +98 -0
- package/skills/project-analyze/rules/android.md +282 -0
- package/skills/project-analyze/rules/devops.md +443 -0
- package/skills/project-analyze/rules/generic.md +243 -0
- package/skills/project-analyze/rules/go.md +289 -0
- package/skills/project-analyze/rules/harmony.md +257 -0
- package/skills/project-analyze/rules/java.md +507 -0
- package/skills/project-analyze/rules/mobile-flutter.md +315 -0
- package/skills/project-analyze/rules/mobile-react-native.md +283 -0
- package/skills/project-analyze/rules/mobile-swift.md +323 -0
- package/skills/project-analyze/rules/python.md +317 -0
- package/skills/project-analyze/rules/rust-tauri.md +243 -0
- package/skills/project-analyze/rules/rust.md +296 -0
- package/skills/project-analyze/rules/web-nextjs.md +364 -0
- package/skills/project-analyze/rules/web-react.md +298 -0
- package/skills/project-analyze/rules/web-vue.md +378 -0
- package/skills/project-analyze/rules/web.md +390 -0
- package/skills/project-query/SKILL.md +224 -0
- package/skills/project-query/rules/query-templates.md +212 -0
- package/skills/python-conventions/SKILL.md +169 -0
- package/skills/react-native-conventions/SKILL.md +73 -0
- package/skills/requirements-writer/README.md +153 -0
- package/skills/requirements-writer/SKILL.md +341 -0
- package/skills/requirements-writer/examples/prd-outline-example.md +217 -0
- package/skills/requirements-writer/templates/module-prd-template.md +362 -0
- package/skills/requirements-writer/templates/prd-outline-template.md +185 -0
- package/skills/requirements-writer/templates/user-story-template.md +1125 -0
- package/skills/rust-conventions/SKILL.md +361 -0
- package/skills/smart-dispatch/SKILL.md +296 -0
- package/skills/smart-dispatch/implementer-prompt.md +146 -0
- package/skills/smart-dispatch/reviewer-prompt.md +199 -0
- package/skills/software-architecture/SKILL.md +278 -0
- package/skills/swift-conventions/SKILL.md +72 -0
- package/skills/ui-ux-pro/SKILL.md +140 -0
- package/skills/verification-before-completion/SKILL.md +119 -0
- package/skills/web-conventions/SKILL.md +259 -0
- package/skills/webapp-testing/LICENSE.txt +202 -0
- package/skills/webapp-testing/SKILL.md +97 -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/writing-plans/SKILL.md +144 -0
- package/skills/xlsx/LICENSE.txt +30 -0
- package/skills/xlsx/SKILL.md +292 -0
- package/skills/xlsx/recalc.py +178 -0
- package/templates/CLAUDE.md.android +57 -0
- package/templates/CLAUDE.md.devops +50 -0
- package/templates/CLAUDE.md.generic +34 -0
- package/templates/CLAUDE.md.go +67 -0
- package/templates/CLAUDE.md.harmony +54 -0
- package/templates/CLAUDE.md.java +56 -0
- package/templates/CLAUDE.md.mobile-flutter +38 -0
- package/templates/CLAUDE.md.mobile-react-native +37 -0
- package/templates/CLAUDE.md.mobile-swift +40 -0
- package/templates/CLAUDE.md.python +65 -0
- package/templates/CLAUDE.md.rust +68 -0
- package/templates/CLAUDE.md.rust-tauri +120 -0
- package/templates/CLAUDE.md.web +63 -0
- package/templates/COMPONENT.md.android +58 -0
- package/templates/COMPONENT.md.devops +54 -0
- package/templates/COMPONENT.md.generic +35 -0
- package/templates/COMPONENT.md.go +59 -0
- package/templates/COMPONENT.md.harmony +63 -0
- package/templates/COMPONENT.md.java +69 -0
- package/templates/COMPONENT.md.mobile-flutter +56 -0
- package/templates/COMPONENT.md.mobile-react-native +55 -0
- package/templates/COMPONENT.md.mobile-swift +56 -0
- package/templates/COMPONENT.md.python +67 -0
- package/templates/COMPONENT.md.rust +57 -0
- package/templates/COMPONENT.md.rust-tauri +66 -0
- package/templates/COMPONENT.md.web +39 -0
- package/templates/README.md.android +71 -0
- package/templates/README.md.devops +68 -0
- package/templates/README.md.generic +39 -0
- package/templates/README.md.go +70 -0
- package/templates/README.md.harmony +72 -0
- package/templates/README.md.java +73 -0
- package/templates/README.md.mobile-flutter +69 -0
- package/templates/README.md.mobile-react-native +65 -0
- package/templates/README.md.mobile-swift +69 -0
- package/templates/README.md.monorepo +59 -0
- package/templates/README.md.python +66 -0
- package/templates/README.md.rust +69 -0
- package/templates/README.md.rust-tauri +149 -0
- package/templates/README.md.web +94 -0
- package/templates/UI_STYLE.md.android +74 -0
- package/templates/UI_STYLE.md.devops +50 -0
- package/templates/UI_STYLE.md.generic +31 -0
- package/templates/UI_STYLE.md.go +49 -0
- package/templates/UI_STYLE.md.harmony +71 -0
- package/templates/UI_STYLE.md.java +61 -0
- package/templates/UI_STYLE.md.mobile-flutter +70 -0
- package/templates/UI_STYLE.md.mobile-react-native +71 -0
- package/templates/UI_STYLE.md.mobile-swift +71 -0
- package/templates/UI_STYLE.md.python +58 -0
- package/templates/UI_STYLE.md.rust +52 -0
- package/templates/UI_STYLE.md.rust-tauri +102 -0
- package/templates/UI_STYLE.md.web +92 -0
- package/templates/cursor-rules.android.mdc +33 -0
- package/templates/cursor-rules.devops.mdc +32 -0
- package/templates/cursor-rules.generic.mdc +25 -0
- package/templates/cursor-rules.go.mdc +34 -0
- package/templates/cursor-rules.harmony.mdc +30 -0
- package/templates/cursor-rules.java.mdc +30 -0
- package/templates/cursor-rules.mobile-flutter.mdc +42 -0
- package/templates/cursor-rules.mobile-react-native.mdc +43 -0
- package/templates/cursor-rules.mobile-swift.mdc +42 -0
- package/templates/cursor-rules.python.mdc +33 -0
- package/templates/cursor-rules.rust-tauri.mdc +67 -0
- package/templates/cursor-rules.rust.mdc +30 -0
- package/templates/cursor-rules.web.mdc +30 -0
- package/templates/kiro-steering.android.md +39 -0
- package/templates/kiro-steering.devops.md +32 -0
- package/templates/kiro-steering.generic.md +28 -0
- package/templates/kiro-steering.go.md +41 -0
- package/templates/kiro-steering.harmony.md +36 -0
- package/templates/kiro-steering.java.md +37 -0
- package/templates/kiro-steering.mobile-flutter.md +73 -0
- package/templates/kiro-steering.mobile-react-native.md +71 -0
- package/templates/kiro-steering.mobile-swift.md +62 -0
- package/templates/kiro-steering.python.md +34 -0
- package/templates/kiro-steering.rust-tauri.md +50 -0
- package/templates/kiro-steering.rust.md +36 -0
- package/templates/kiro-steering.web.md +41 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: go-conventions
|
|
3
|
+
description: Go development conventions and best practices
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Go Conventions
|
|
8
|
+
|
|
9
|
+
Use this skill when working on Go projects.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
- Detected Go project (go.mod)
|
|
13
|
+
- User asks about Go best practices
|
|
14
|
+
- Writing or reviewing Go code
|
|
15
|
+
|
|
16
|
+
## Code Style
|
|
17
|
+
|
|
18
|
+
### General
|
|
19
|
+
- Follow Effective Go and Go Code Review Comments
|
|
20
|
+
- Run `gofmt` or `goimports` for formatting
|
|
21
|
+
- Use `golangci-lint` for linting
|
|
22
|
+
- Tabs for indentation (Go standard)
|
|
23
|
+
- Keep functions short and focused
|
|
24
|
+
|
|
25
|
+
### Naming
|
|
26
|
+
- Packages: lowercase, short, no underscores (`user`, `httputil`)
|
|
27
|
+
- Functions: PascalCase if exported, camelCase if unexported
|
|
28
|
+
- Interfaces: PascalCase with `-er` suffix (`Reader`, `Writer`, `Closer`)
|
|
29
|
+
- Variables: camelCase, short names in small scope
|
|
30
|
+
- Constants: PascalCase if exported, camelCase if unexported
|
|
31
|
+
|
|
32
|
+
### Idioms
|
|
33
|
+
- Accept interfaces, return structs
|
|
34
|
+
- Keep interfaces small (1-3 methods)
|
|
35
|
+
- Use `errors.New` for simple errors, `fmt.Errorf` for wrapping
|
|
36
|
+
- Use `context.Context` as first parameter in public methods
|
|
37
|
+
- Use table-driven tests
|
|
38
|
+
- Handle errors immediately (don't defer)
|
|
39
|
+
|
|
40
|
+
## Error Handling
|
|
41
|
+
|
|
42
|
+
### Wrapping Errors
|
|
43
|
+
```go
|
|
44
|
+
func GetUser(ctx context.Context, id int) (*User, error) {
|
|
45
|
+
user, err := repo.FindByID(ctx, id)
|
|
46
|
+
if err != nil {
|
|
47
|
+
return nil, fmt.Errorf("GetUser(%d): %w", id, err)
|
|
48
|
+
}
|
|
49
|
+
return user, nil
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Custom Error Types
|
|
54
|
+
```go
|
|
55
|
+
type AppError struct {
|
|
56
|
+
Code string
|
|
57
|
+
Message string
|
|
58
|
+
Err error
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
func (e *AppError) Error() string {
|
|
62
|
+
return fmt.Sprintf("%s: %s: %v", e.Code, e.Message, e.Err)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
func (e *AppError) Unwrap() error {
|
|
66
|
+
return e.Err
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Error Inspection
|
|
71
|
+
```go
|
|
72
|
+
var NotFoundErr = errors.New("not found")
|
|
73
|
+
|
|
74
|
+
if errors.Is(err, NotFoundErr) {
|
|
75
|
+
// handle not found
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Project Layout
|
|
80
|
+
|
|
81
|
+
### Standard Structure
|
|
82
|
+
```
|
|
83
|
+
myapp/
|
|
84
|
+
├── cmd/
|
|
85
|
+
│ └── myapp/
|
|
86
|
+
│ └── main.go
|
|
87
|
+
├── internal/
|
|
88
|
+
│ ├── user/
|
|
89
|
+
│ │ ├── handler.go
|
|
90
|
+
│ │ ├── service.go
|
|
91
|
+
│ │ ├── repository.go
|
|
92
|
+
│ │ └── model.go
|
|
93
|
+
│ └── config/
|
|
94
|
+
│ └── config.go
|
|
95
|
+
├── pkg/
|
|
96
|
+
│ └── middleware/
|
|
97
|
+
│ └── auth.go
|
|
98
|
+
├── go.mod
|
|
99
|
+
├── go.sum
|
|
100
|
+
└── Makefile
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Architecture
|
|
104
|
+
|
|
105
|
+
### Dependency Injection via Interfaces
|
|
106
|
+
```go
|
|
107
|
+
type UserRepository interface {
|
|
108
|
+
FindByID(ctx context.Context, id int) (*User, error)
|
|
109
|
+
Save(ctx context.Context, user *User) error
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type UserService struct {
|
|
113
|
+
repo UserRepository
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
func NewUserService(repo UserRepository) *UserService {
|
|
117
|
+
return &UserService{repo: repo}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Handler Pattern
|
|
122
|
+
```go
|
|
123
|
+
func (s *UserService) HandleGetUser(w http.ResponseWriter, r *http.Request) {
|
|
124
|
+
id, err := strconv.Atoi(chi.URLParam(r, "id"))
|
|
125
|
+
if err != nil {
|
|
126
|
+
http.Error(w, "invalid id", http.StatusBadRequest)
|
|
127
|
+
return
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
user, err := s.Get(r.Context(), id)
|
|
131
|
+
if err != nil {
|
|
132
|
+
if errors.Is(err, NotFoundErr) {
|
|
133
|
+
http.Error(w, "not found", http.StatusNotFound)
|
|
134
|
+
return
|
|
135
|
+
}
|
|
136
|
+
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
137
|
+
return
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
json.NewEncoder(w).Encode(user)
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Concurrency
|
|
145
|
+
|
|
146
|
+
### Goroutines
|
|
147
|
+
```go
|
|
148
|
+
func ProcessItems(ctx context.Context, items []Item) []Result {
|
|
149
|
+
results := make([]Result, len(items))
|
|
150
|
+
var wg sync.WaitGroup
|
|
151
|
+
|
|
152
|
+
for i, item := range items {
|
|
153
|
+
wg.Add(1)
|
|
154
|
+
go func(idx int, it Item) {
|
|
155
|
+
defer wg.Done()
|
|
156
|
+
results[idx] = process(ctx, it)
|
|
157
|
+
}(i, item)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
wg.Wait()
|
|
161
|
+
return results
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Channels
|
|
166
|
+
```go
|
|
167
|
+
func StreamResults(ctx context.Context, in <-chan Item) <-chan Result {
|
|
168
|
+
out := make(chan Result)
|
|
169
|
+
go func() {
|
|
170
|
+
defer close(out)
|
|
171
|
+
for item := range in {
|
|
172
|
+
select {
|
|
173
|
+
case out <- process(ctx, item):
|
|
174
|
+
case <-ctx.Done():
|
|
175
|
+
return
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}()
|
|
179
|
+
return out
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Testing
|
|
184
|
+
|
|
185
|
+
### Table-Driven Tests
|
|
186
|
+
```go
|
|
187
|
+
func TestAdd(t *testing.T) {
|
|
188
|
+
tests := []struct {
|
|
189
|
+
name string
|
|
190
|
+
a, b int
|
|
191
|
+
want int
|
|
192
|
+
}{
|
|
193
|
+
{"positive", 1, 2, 3},
|
|
194
|
+
{"negative", -1, -2, -3},
|
|
195
|
+
{"zero", 0, 0, 0},
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
for _, tt := range tests {
|
|
199
|
+
t.Run(tt.name, func(t *testing.T) {
|
|
200
|
+
got := Add(tt.a, tt.b)
|
|
201
|
+
if got != tt.want {
|
|
202
|
+
t.Errorf("Add(%d, %d) = %d, want %d", tt.a, tt.b, got, tt.want)
|
|
203
|
+
}
|
|
204
|
+
})
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Mocking with Interfaces
|
|
210
|
+
```go
|
|
211
|
+
type MockUserRepo struct {
|
|
212
|
+
FindByIDFn func(ctx context.Context, id int) (*User, error)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
func (m *MockUserRepo) FindByID(ctx context.Context, id int) (*User, error) {
|
|
216
|
+
return m.FindByIDFn(ctx, id)
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Common Commands
|
|
221
|
+
```bash
|
|
222
|
+
go build ./... # Build
|
|
223
|
+
go test ./... # Test
|
|
224
|
+
go test -race ./... # Race detection
|
|
225
|
+
go vet ./... # Static analysis
|
|
226
|
+
golangci-lint run # Lint
|
|
227
|
+
gofmt -w . # Format
|
|
228
|
+
go mod tidy # Clean dependencies
|
|
229
|
+
go mod download # Download dependencies
|
|
230
|
+
```
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harmony-conventions
|
|
3
|
+
description: HarmonyOS/ArkTS/ArkUI development conventions and best practices
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# HarmonyOS / ArkTS Conventions
|
|
8
|
+
|
|
9
|
+
Use this skill when working on HarmonyOS applications with ArkTS and ArkUI.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
- Detected HarmonyOS project (oh-package.json5, build-profile.json5)
|
|
13
|
+
- User asks about HarmonyOS/ArkTS best practices
|
|
14
|
+
- Writing or reviewing HarmonyOS code
|
|
15
|
+
|
|
16
|
+
## Code Style
|
|
17
|
+
|
|
18
|
+
### ArkTS
|
|
19
|
+
- Follow ArkTS coding conventions (based on TypeScript with restrictions)
|
|
20
|
+
- Use `@Component` decorator for UI components
|
|
21
|
+
- Use `@Entry` decorator for page entry components
|
|
22
|
+
- Use `@Builder` for reusable UI builders
|
|
23
|
+
- Use `@Extend` for style extensions
|
|
24
|
+
- Prefer `let` and `const` over `var`
|
|
25
|
+
- Use arrow functions for callbacks
|
|
26
|
+
|
|
27
|
+
### Naming
|
|
28
|
+
- Components: PascalCase (`UserList`)
|
|
29
|
+
- Functions/Variables: camelCase (`loadData`)
|
|
30
|
+
- Constants: UPPER_SNAKE_CASE (`MAX_COUNT`)
|
|
31
|
+
- Resources: snake_case (`user_name_text`)
|
|
32
|
+
|
|
33
|
+
## Architecture (MVVM)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
UI (@Component)
|
|
37
|
+
↓
|
|
38
|
+
ViewModel (@Observed)
|
|
39
|
+
↓
|
|
40
|
+
Model / Repository
|
|
41
|
+
↓
|
|
42
|
+
Data Source (Network / Database)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Component Pattern
|
|
46
|
+
```typescript
|
|
47
|
+
@Entry
|
|
48
|
+
@Component
|
|
49
|
+
struct UserPage {
|
|
50
|
+
@State message: string = 'Hello'
|
|
51
|
+
private viewModel: UserViewModel = new UserViewModel()
|
|
52
|
+
|
|
53
|
+
aboutToAppear() {
|
|
54
|
+
this.viewModel.loadData()
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
build() {
|
|
58
|
+
Column() {
|
|
59
|
+
Text(this.message)
|
|
60
|
+
.fontSize(20)
|
|
61
|
+
.fontWeight(FontWeight.Bold)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## State Management
|
|
68
|
+
|
|
69
|
+
### Decorators
|
|
70
|
+
- `@State`: Component-level state (triggers re-render)
|
|
71
|
+
- `@Prop`: Parent-to-child state (one-way)
|
|
72
|
+
- `@Link`: Two-way binding between parent and child
|
|
73
|
+
- `@Provide` / `@Consume`: Cross-component state sharing
|
|
74
|
+
- `@Observed` / `@ObjectLink`: Nested object state
|
|
75
|
+
- `@Watch`: Callback when state changes
|
|
76
|
+
- `AppStorage`: Application-level state
|
|
77
|
+
- `LocalStorage`: Page-level state
|
|
78
|
+
|
|
79
|
+
### State Strategy
|
|
80
|
+
- Use `@State` for simple component state
|
|
81
|
+
- Use `@Provide`/`@Consume` for shared state across component tree
|
|
82
|
+
- Use `AppStorage` for app-wide settings
|
|
83
|
+
- Use `LocalStorage` for page-specific state
|
|
84
|
+
|
|
85
|
+
## Navigation
|
|
86
|
+
|
|
87
|
+
### Navigation Component
|
|
88
|
+
```typescript
|
|
89
|
+
@Entry
|
|
90
|
+
@Component
|
|
91
|
+
struct Index {
|
|
92
|
+
private navPathStack: NavPathStack = new NavPathStack()
|
|
93
|
+
|
|
94
|
+
build() {
|
|
95
|
+
Navigation(this.navPathStack) {
|
|
96
|
+
// Home content
|
|
97
|
+
}
|
|
98
|
+
.navDestination(this.onDestination)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@Builder
|
|
102
|
+
onDestination(name: string, param: Object) {
|
|
103
|
+
if (name === 'userDetail') {
|
|
104
|
+
UserDetail({ userId: param as string })
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Define routes in `main_pages.json`:
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"src": [
|
|
114
|
+
"pages/Index",
|
|
115
|
+
"pages/UserDetail",
|
|
116
|
+
"pages/Settings"
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Resource Management
|
|
122
|
+
- Use `resources/base/element/` for string resources
|
|
123
|
+
- Use `resources/base/media/` for media resources
|
|
124
|
+
- Reference with `$r('app.string.name')` or `$r('app.media.icon')`
|
|
125
|
+
- Support multiple languages with qualifiers (`en_US/`, `zh_CN/`)
|
|
126
|
+
|
|
127
|
+
## UI Components (ArkUI)
|
|
128
|
+
- Use built-in components: `Text`, `Image`, `Button`, `List`, `Grid`, `Tabs`
|
|
129
|
+
- Use `Row` and `Column` for layout
|
|
130
|
+
- Use `Scroll` and `List` for scrollable content
|
|
131
|
+
- Apply modifiers chain for styling (`.fontSize()`, `.fontWeight()`, `.padding()`)
|
|
132
|
+
- Use `@Styles` for reusable style definitions
|
|
133
|
+
- Use `@Extend` to extend built-in component styles
|
|
134
|
+
|
|
135
|
+
## Data Persistence
|
|
136
|
+
- Preferences: `@ohos.data.preferences` for key-value storage
|
|
137
|
+
- Relational Store: `@ohos.data.relationalStore` for SQLite
|
|
138
|
+
- Distributed Data: `@ohos.data.distributedDataObject` for cross-device sync
|
|
139
|
+
|
|
140
|
+
## Testing
|
|
141
|
+
- Unit tests with `@ohos/hypium`
|
|
142
|
+
- UI tests with `UiDriver`
|
|
143
|
+
- Mock external dependencies
|
|
144
|
+
- Test ViewModel logic independently
|
|
145
|
+
|
|
146
|
+
## Build Commands
|
|
147
|
+
```bash
|
|
148
|
+
# Build HAP
|
|
149
|
+
hvigorw assembleHap
|
|
150
|
+
|
|
151
|
+
# Clean
|
|
152
|
+
hvigorw clean
|
|
153
|
+
|
|
154
|
+
# Run tests
|
|
155
|
+
hvigorw test
|
|
156
|
+
```
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: java-conventions
|
|
3
|
+
description: Use when writing, reviewing, or refactoring Java or Spring Boot code — applies naming, layering, concurrency, logging, collections, OOP, and security rules.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: conventions
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Java / Spring Boot Conventions
|
|
9
|
+
|
|
10
|
+
Use this skill when working on Java or Spring Boot projects to ensure code follows established conventions.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
- Detected Java project (pom.xml, build.gradle)
|
|
14
|
+
- Writing, reviewing, or refactoring Java/Spring code
|
|
15
|
+
- Asking about Java/Spring best practices
|
|
16
|
+
|
|
17
|
+
If the repository already has stricter local conventions, follow the stricter rule.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Core Behavior
|
|
22
|
+
|
|
23
|
+
Before writing code:
|
|
24
|
+
1. Infer the target layer: controller / service / manager / dao / model / util.
|
|
25
|
+
2. Keep dependencies flowing from upper layer to lower layer only.
|
|
26
|
+
3. Prefer small, readable, maintainable changes over clever code.
|
|
27
|
+
|
|
28
|
+
After writing code, run a mental lint pass against the self-check checklist at the end of this skill.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Naming
|
|
33
|
+
|
|
34
|
+
### General
|
|
35
|
+
- Classes: `PascalCase` — abstract classes start with `Abstract` or `Base`, exceptions end with `Exception`, test classes end with `Test`
|
|
36
|
+
- Methods / variables / parameters / fields: `camelCase`
|
|
37
|
+
- Constants: `UPPER_SNAKE_CASE`
|
|
38
|
+
- Packages: lowercase, dot-separated, generally singular (`com.example.service`)
|
|
39
|
+
- Never start or end identifiers with `_` or `$`
|
|
40
|
+
- No pinyin mixed with English; no Chinese identifiers
|
|
41
|
+
- Avoid unclear abbreviations (`AbsClass`, `condi`)
|
|
42
|
+
|
|
43
|
+
### Domain Model Naming
|
|
44
|
+
| Suffix | Usage |
|
|
45
|
+
|--------|-------|
|
|
46
|
+
| `xxxDO` | Data object (maps to DB table) |
|
|
47
|
+
| `xxxDTO` | Transfer object (crosses service/layer boundaries) |
|
|
48
|
+
| `xxxVO` | View object (returned to caller/UI) |
|
|
49
|
+
| `xxxBO` | Business object (internal computation) |
|
|
50
|
+
| Never name a class `xxxPOJO` | |
|
|
51
|
+
|
|
52
|
+
### Service / DAO Method Prefixes
|
|
53
|
+
| Prefix | Meaning |
|
|
54
|
+
|--------|---------|
|
|
55
|
+
| `get` | Single object |
|
|
56
|
+
| `list` | Multiple objects |
|
|
57
|
+
| `count` | Numeric count |
|
|
58
|
+
| `save` / `insert` | Create |
|
|
59
|
+
| `remove` / `delete` | Delete |
|
|
60
|
+
| `update` | Update |
|
|
61
|
+
|
|
62
|
+
### Spring Boot Specific
|
|
63
|
+
- Expose interfaces for services and DAOs; use `Impl` for implementation classes
|
|
64
|
+
- Keep controllers thin — delegate to services
|
|
65
|
+
- Use `@Service`, `@Repository`, `@Controller` stereotypes consistently
|
|
66
|
+
- Prefer constructor injection; use `@RequiredArgsConstructor` from Lombok
|
|
67
|
+
- Use `@ConfigurationProperties` over `@Value` for grouped config
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Architecture & Layering
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Controller (REST endpoints — thin, no business logic)
|
|
75
|
+
↓
|
|
76
|
+
Service (Business logic)
|
|
77
|
+
↓
|
|
78
|
+
Manager/ (Optional orchestration layer)
|
|
79
|
+
↓
|
|
80
|
+
Repository (Data access)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Package Structure (Package-by-Feature)
|
|
84
|
+
```
|
|
85
|
+
com.example.user/
|
|
86
|
+
├── UserController.java
|
|
87
|
+
├── UserService.java / UserServiceImpl.java
|
|
88
|
+
├── UserRepository.java
|
|
89
|
+
├── UserDO.java / UserDTO.java / UserVO.java
|
|
90
|
+
├── UserMapper.java
|
|
91
|
+
└── UserException.java
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- Do not leak persistence details into service contracts
|
|
95
|
+
- DTO/VO/DO boundaries must stay clear across layers
|
|
96
|
+
- Shared constants, utilities, and clients go at the correct reuse level — not scattered
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Constants and Enums
|
|
101
|
+
|
|
102
|
+
- Never hardcode magic values in business logic; extract constants or enums
|
|
103
|
+
- Group constants by domain — do not create one giant constants class
|
|
104
|
+
- Use uppercase `L` for `Long` literals (`100L`)
|
|
105
|
+
- Use `Enum` when values are bounded or carry semantic meaning
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## OOP Rules
|
|
110
|
+
|
|
111
|
+
- Always add `@Override` on overridden methods
|
|
112
|
+
- Do not change externally exposed interface signatures without strong reason; mark obsolete APIs `@Deprecated` with a replacement pointer
|
|
113
|
+
- Use `Objects.equals` or constant-first comparison to avoid NPE
|
|
114
|
+
- Compare boxed types with `equals`, not `==`
|
|
115
|
+
- POJO / DTO / VO fields must use **wrapper types**, not primitives; RPC input/output types also use wrapper types; local variables prefer primitives
|
|
116
|
+
- Do not assign default values to DO/DTO/VO fields
|
|
117
|
+
- POJO classes must implement `toString()`
|
|
118
|
+
- Constructors must not contain business logic
|
|
119
|
+
- Class method order: public/protected → private → getters/setters
|
|
120
|
+
- Getter/setter methods must stay lightweight — no business logic inside
|
|
121
|
+
- Use `StringBuilder` in loops, not repeated string concatenation
|
|
122
|
+
- Apply narrowest possible visibility: `private` first, then `protected`, then `public`
|
|
123
|
+
- Use `final` where it meaningfully improves safety or readability
|
|
124
|
+
- Be cautious with `clone`; shallow copy is the default
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Collections
|
|
129
|
+
|
|
130
|
+
- If you override `equals`, you must also override `hashCode`
|
|
131
|
+
- Do not cast `subList` results to `ArrayList`
|
|
132
|
+
- Do not modify a list's structure while using a `subList` view
|
|
133
|
+
- Use `toArray(new T[list.size()])` to convert collections to arrays
|
|
134
|
+
- Do not call mutating methods on `Arrays.asList(...)` results
|
|
135
|
+
- Do not remove/add elements inside `foreach`; use `Iterator` for removal
|
|
136
|
+
- Prefer specifying initial capacity for `HashMap`/`ArrayList`
|
|
137
|
+
- Prefer `entrySet()` over `keySet()` when both key and value are needed
|
|
138
|
+
- Know null rules: `ConcurrentHashMap` does not allow null keys or values
|
|
139
|
+
- Use `Set` for deduplication instead of repeated `List.contains` scans
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Concurrency
|
|
144
|
+
|
|
145
|
+
- Singleton access and singleton internals must be thread-safe
|
|
146
|
+
- Thread and thread-pool names must be meaningful
|
|
147
|
+
- Do not create threads manually in application code — use thread pools
|
|
148
|
+
- **Do not use `Executors` factory methods** for production thread pools; use `ThreadPoolExecutor` with explicit parameters
|
|
149
|
+
- Do not keep `SimpleDateFormat` as a shared static field; prefer `DateTimeFormatter` or thread-local safe alternatives
|
|
150
|
+
- In high-concurrency scenarios, minimize lock scope; prefer lock-free or finer-grained strategies
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Exception Handling
|
|
155
|
+
|
|
156
|
+
- Never swallow exceptions silently
|
|
157
|
+
- Either handle meaningfully or rethrow
|
|
158
|
+
- Exception messages and logs must include: context / input / scenario + the original stack trace
|
|
159
|
+
- For parameter or input validation issues, prefer `warn` over `error` unless it is a real system fault
|
|
160
|
+
- Use `@ControllerAdvice` for global exception handling in Spring
|
|
161
|
+
- Create custom exception classes extending `RuntimeException`; return proper HTTP status codes with meaningful messages
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Logging
|
|
166
|
+
|
|
167
|
+
- Use **SLF4J API** — never direct Log4j/Logback API
|
|
168
|
+
- Use placeholders for all log messages — **never concatenate strings** inside log statements:
|
|
169
|
+
```java
|
|
170
|
+
// ✓ correct
|
|
171
|
+
log.info("Processing order={}, userId={}", orderId, userId);
|
|
172
|
+
// ✗ wrong
|
|
173
|
+
log.info("Processing order=" + orderId + ", userId=" + userId);
|
|
174
|
+
```
|
|
175
|
+
- Wrap debug/trace with guard or rely on placeholder-based lazy evaluation
|
|
176
|
+
- Do not emit debug logs in production
|
|
177
|
+
- Use `info` selectively; be careful with `warn` for temporary observation
|
|
178
|
+
- Avoid duplicated logs from configuration; keep `additivity` under control
|
|
179
|
+
- Avoid logging sensitive data (passwords, tokens, PII)
|
|
180
|
+
- Extension log file naming: `appName_logType_logName.log`
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Formatting
|
|
185
|
+
|
|
186
|
+
- 4-space indentation, never tabs
|
|
187
|
+
- Operators must have spaces on both sides
|
|
188
|
+
- Keywords (`if`, `for`, `while`, `switch`, `catch`) require a space before `(`
|
|
189
|
+
- Opening brace on same line; body on next line; closing brace on its own line
|
|
190
|
+
- Keep lines within 120 characters
|
|
191
|
+
- File encoding: UTF-8 with Unix line endings
|
|
192
|
+
- Use blank lines only to separate meaningful logical sections
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Security Defaults
|
|
197
|
+
|
|
198
|
+
- Do not trust external input — validate and sanitize all request parameters
|
|
199
|
+
- Avoid logging sensitive data
|
|
200
|
+
- Use safe defaults and explicit permission checks
|
|
201
|
+
- Do not introduce insecure reflection, deserialization, or dynamic execution unless required and risk is controlled
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Testing
|
|
206
|
+
|
|
207
|
+
- Unit tests: JUnit 5 + Mockito
|
|
208
|
+
- Integration tests: `@SpringBootTest`
|
|
209
|
+
- Slice tests: `@WebMvcTest`, `@DataJpaTest`
|
|
210
|
+
- Minimum 70% coverage for business logic
|
|
211
|
+
- Use `@TempDir` for file system tests
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Common Patterns
|
|
216
|
+
|
|
217
|
+
### Service Layer
|
|
218
|
+
```java
|
|
219
|
+
@Service
|
|
220
|
+
@RequiredArgsConstructor
|
|
221
|
+
public class UserService {
|
|
222
|
+
private final UserRepository userRepository;
|
|
223
|
+
private final UserMapper userMapper;
|
|
224
|
+
|
|
225
|
+
public UserVO getUserById(Long id) {
|
|
226
|
+
UserDO user = userRepository.findById(id)
|
|
227
|
+
.orElseThrow(() -> new UserNotFoundException(id));
|
|
228
|
+
return userMapper.toVO(user);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### REST Controller
|
|
234
|
+
```java
|
|
235
|
+
@RestController
|
|
236
|
+
@RequestMapping("/api/v1/users")
|
|
237
|
+
@RequiredArgsConstructor
|
|
238
|
+
public class UserController {
|
|
239
|
+
private final UserService userService;
|
|
240
|
+
|
|
241
|
+
@GetMapping("/{id}")
|
|
242
|
+
public ResponseEntity<UserVO> getUser(@PathVariable Long id) {
|
|
243
|
+
return ResponseEntity.ok(userService.getUserById(id));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Self-Check Before Finalizing
|
|
251
|
+
|
|
252
|
+
1. Are all names English, clear, and cased correctly?
|
|
253
|
+
2. Any magic values left in the code?
|
|
254
|
+
3. Any boxed type comparison done with `==`?
|
|
255
|
+
4. Any possible NPE from `object.equals(...)`?
|
|
256
|
+
5. Any mutable operation inside `foreach`?
|
|
257
|
+
6. Any `Executors.*` usage introduced?
|
|
258
|
+
7. Any unsafe shared `SimpleDateFormat`?
|
|
259
|
+
8. Any direct Log4j/Logback API usage?
|
|
260
|
+
9. Any string concatenation inside debug/info log statements?
|
|
261
|
+
10. Any POJO/DTO/VO field using primitive where wrapper is required?
|
|
262
|
+
11. Any public API signature changed unnecessarily?
|
|
263
|
+
12. Any constructor containing business logic?
|
|
264
|
+
13. Any line excessively long or formatting inconsistent?
|
|
265
|
+
14. Any exception logged without stack trace or context?
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Review Output Format
|
|
270
|
+
|
|
271
|
+
When reviewing Java code, group findings as:
|
|
272
|
+
|
|
273
|
+
- **Blocking violations** — mandatory rule violations that must be fixed
|
|
274
|
+
- **Recommended improvements** — best practices not yet followed
|
|
275
|
+
- **Optional refactors** — style or readability improvements
|
|
276
|
+
|
|
277
|
+
Prioritize blocking violations first.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
© 2025 Anthropic, PBC. All rights reserved.
|
|
2
|
+
|
|
3
|
+
LICENSE: Use of these materials (including all code, prompts, assets, files,
|
|
4
|
+
and other components of this Skill) is governed by your agreement with
|
|
5
|
+
Anthropic regarding use of Anthropic's services. If no separate agreement
|
|
6
|
+
exists, use is governed by Anthropic's Consumer Terms of Service or
|
|
7
|
+
Commercial Terms of Service, as applicable:
|
|
8
|
+
https://www.anthropic.com/legal/consumer-terms
|
|
9
|
+
https://www.anthropic.com/legal/commercial-terms
|
|
10
|
+
Your applicable agreement is referred to as the "Agreement." "Services" are
|
|
11
|
+
as defined in the Agreement.
|
|
12
|
+
|
|
13
|
+
ADDITIONAL RESTRICTIONS: Notwithstanding anything in the Agreement to the
|
|
14
|
+
contrary, users may not:
|
|
15
|
+
|
|
16
|
+
- Extract these materials from the Services or retain copies of these
|
|
17
|
+
materials outside the Services
|
|
18
|
+
- Reproduce or copy these materials, except for temporary copies created
|
|
19
|
+
automatically during authorized use of the Services
|
|
20
|
+
- Create derivative works based on these materials
|
|
21
|
+
- Distribute, sublicense, or transfer these materials to any third party
|
|
22
|
+
- Make, offer to sell, sell, or import any inventions embodied in these
|
|
23
|
+
materials
|
|
24
|
+
- Reverse engineer, decompile, or disassemble these materials
|
|
25
|
+
|
|
26
|
+
The receipt, viewing, or possession of these materials does not convey or
|
|
27
|
+
imply any license or right beyond those expressly granted above.
|
|
28
|
+
|
|
29
|
+
Anthropic retains all right, title, and interest in these materials,
|
|
30
|
+
including all copyrights, patents, and other intellectual property rights.
|