@elizaos/skills 2.0.0-alpha.3
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 +126 -0
- package/package.json +53 -0
- package/skills/1password/SKILL.md +70 -0
- package/skills/1password/references/cli-examples.md +29 -0
- package/skills/1password/references/get-started.md +17 -0
- package/skills/apple-notes/SKILL.md +77 -0
- package/skills/apple-reminders/SKILL.md +96 -0
- package/skills/bear-notes/SKILL.md +107 -0
- package/skills/bird/SKILL.md +224 -0
- package/skills/blogwatcher/SKILL.md +69 -0
- package/skills/blucli/SKILL.md +47 -0
- package/skills/bluebubbles/SKILL.md +131 -0
- package/skills/camsnap/SKILL.md +45 -0
- package/skills/canvas/SKILL.md +203 -0
- package/skills/clawhub/SKILL.md +77 -0
- package/skills/coding-agent/SKILL.md +284 -0
- package/skills/discord/SKILL.md +578 -0
- package/skills/eightctl/SKILL.md +50 -0
- package/skills/food-order/SKILL.md +48 -0
- package/skills/gemini/SKILL.md +43 -0
- package/skills/gifgrep/SKILL.md +79 -0
- package/skills/github/SKILL.md +77 -0
- package/skills/gog/SKILL.md +116 -0
- package/skills/goplaces/SKILL.md +52 -0
- package/skills/healthcheck/SKILL.md +245 -0
- package/skills/himalaya/SKILL.md +257 -0
- package/skills/himalaya/references/configuration.md +184 -0
- package/skills/himalaya/references/message-composition.md +199 -0
- package/skills/imsg/SKILL.md +74 -0
- package/skills/local-places/SERVER_README.md +101 -0
- package/skills/local-places/SKILL.md +102 -0
- package/skills/local-places/pyproject.toml +21 -0
- package/skills/local-places/src/local_places/__init__.py +2 -0
- package/skills/local-places/src/local_places/google_places.py +314 -0
- package/skills/local-places/src/local_places/main.py +65 -0
- package/skills/local-places/src/local_places/schemas.py +107 -0
- package/skills/mcporter/SKILL.md +61 -0
- package/skills/model-usage/SKILL.md +69 -0
- package/skills/model-usage/references/codexbar-cli.md +33 -0
- package/skills/model-usage/scripts/model_usage.py +310 -0
- package/skills/nano-banana-pro/SKILL.md +58 -0
- package/skills/nano-banana-pro/scripts/generate_image.py +184 -0
- package/skills/nano-pdf/SKILL.md +38 -0
- package/skills/notion/SKILL.md +172 -0
- package/skills/obsidian/SKILL.md +81 -0
- package/skills/openai-image-gen/SKILL.md +89 -0
- package/skills/openai-image-gen/scripts/gen.py +240 -0
- package/skills/openai-whisper/SKILL.md +38 -0
- package/skills/openai-whisper-api/SKILL.md +52 -0
- package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
- package/skills/openhue/SKILL.md +51 -0
- package/skills/oracle/SKILL.md +125 -0
- package/skills/ordercli/SKILL.md +78 -0
- package/skills/peekaboo/SKILL.md +190 -0
- package/skills/sag/SKILL.md +87 -0
- package/skills/security-ask-questions-if-underspecified/.claude-plugin/plugin.json +10 -0
- package/skills/security-ask-questions-if-underspecified/README.md +24 -0
- package/skills/security-ask-questions-if-underspecified/skills/ask-questions-if-underspecified/SKILL.md +85 -0
- package/skills/security-audit-context-building/.claude-plugin/plugin.json +10 -0
- package/skills/security-audit-context-building/README.md +58 -0
- package/skills/security-audit-context-building/commands/audit-context.md +21 -0
- package/skills/security-audit-context-building/skills/audit-context-building/SKILL.md +297 -0
- package/skills/security-audit-context-building/skills/audit-context-building/resources/COMPLETENESS_CHECKLIST.md +47 -0
- package/skills/security-audit-context-building/skills/audit-context-building/resources/FUNCTION_MICRO_ANALYSIS_EXAMPLE.md +355 -0
- package/skills/security-audit-context-building/skills/audit-context-building/resources/OUTPUT_REQUIREMENTS.md +71 -0
- package/skills/security-building-secure-contracts/.claude-plugin/plugin.json +10 -0
- package/skills/security-building-secure-contracts/README.md +241 -0
- package/skills/security-building-secure-contracts/skills/algorand-vulnerability-scanner/SKILL.md +284 -0
- package/skills/security-building-secure-contracts/skills/algorand-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +405 -0
- package/skills/security-building-secure-contracts/skills/audit-prep-assistant/SKILL.md +409 -0
- package/skills/security-building-secure-contracts/skills/cairo-vulnerability-scanner/SKILL.md +329 -0
- package/skills/security-building-secure-contracts/skills/cairo-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +722 -0
- package/skills/security-building-secure-contracts/skills/code-maturity-assessor/SKILL.md +218 -0
- package/skills/security-building-secure-contracts/skills/code-maturity-assessor/resources/ASSESSMENT_CRITERIA.md +355 -0
- package/skills/security-building-secure-contracts/skills/code-maturity-assessor/resources/EXAMPLE_REPORT.md +248 -0
- package/skills/security-building-secure-contracts/skills/code-maturity-assessor/resources/REPORT_FORMAT.md +33 -0
- package/skills/security-building-secure-contracts/skills/cosmos-vulnerability-scanner/SKILL.md +334 -0
- package/skills/security-building-secure-contracts/skills/cosmos-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +740 -0
- package/skills/security-building-secure-contracts/skills/guidelines-advisor/SKILL.md +252 -0
- package/skills/security-building-secure-contracts/skills/guidelines-advisor/resources/ASSESSMENT_AREAS.md +329 -0
- package/skills/security-building-secure-contracts/skills/guidelines-advisor/resources/DELIVERABLES.md +118 -0
- package/skills/security-building-secure-contracts/skills/guidelines-advisor/resources/EXAMPLE_REPORT.md +298 -0
- package/skills/security-building-secure-contracts/skills/secure-workflow-guide/SKILL.md +161 -0
- package/skills/security-building-secure-contracts/skills/secure-workflow-guide/resources/EXAMPLE_REPORT.md +279 -0
- package/skills/security-building-secure-contracts/skills/secure-workflow-guide/resources/WORKFLOW_STEPS.md +132 -0
- package/skills/security-building-secure-contracts/skills/solana-vulnerability-scanner/SKILL.md +389 -0
- package/skills/security-building-secure-contracts/skills/solana-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +669 -0
- package/skills/security-building-secure-contracts/skills/substrate-vulnerability-scanner/SKILL.md +298 -0
- package/skills/security-building-secure-contracts/skills/substrate-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +791 -0
- package/skills/security-building-secure-contracts/skills/token-integration-analyzer/SKILL.md +362 -0
- package/skills/security-building-secure-contracts/skills/token-integration-analyzer/resources/ASSESSMENT_CATEGORIES.md +571 -0
- package/skills/security-building-secure-contracts/skills/token-integration-analyzer/resources/REPORT_TEMPLATES.md +141 -0
- package/skills/security-building-secure-contracts/skills/ton-vulnerability-scanner/SKILL.md +388 -0
- package/skills/security-building-secure-contracts/skills/ton-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +595 -0
- package/skills/security-burpsuite-project-parser/.claude-plugin/plugin.json +10 -0
- package/skills/security-burpsuite-project-parser/README.md +103 -0
- package/skills/security-burpsuite-project-parser/commands/burp-search.md +18 -0
- package/skills/security-burpsuite-project-parser/skills/SKILL.md +358 -0
- package/skills/security-burpsuite-project-parser/skills/scripts/burp-search.sh +99 -0
- package/skills/security-claude-in-chrome-troubleshooting/.claude-plugin/plugin.json +8 -0
- package/skills/security-claude-in-chrome-troubleshooting/README.md +31 -0
- package/skills/security-claude-in-chrome-troubleshooting/skills/claude-in-chrome-troubleshooting/SKILL.md +251 -0
- package/skills/security-constant-time-analysis/.claude-plugin/plugin.json +9 -0
- package/skills/security-constant-time-analysis/README.md +381 -0
- package/skills/security-constant-time-analysis/commands/ct-check.md +20 -0
- package/skills/security-constant-time-analysis/ct_analyzer/__init__.py +49 -0
- package/skills/security-constant-time-analysis/ct_analyzer/analyzer.py +1284 -0
- package/skills/security-constant-time-analysis/ct_analyzer/script_analyzers.py +3081 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/__init__.py +1 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_analyzer.py +1397 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/bn_excerpt.js +205 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/decompose_constant_time.c +181 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/decompose_vulnerable.c +74 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/decompose_vulnerable.go +78 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/decompose_vulnerable.rs +92 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/vulnerable.cs +174 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/vulnerable.java +161 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/vulnerable.kt +181 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/vulnerable.php +140 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/vulnerable.py +252 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/vulnerable.rb +188 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/vulnerable.swift +199 -0
- package/skills/security-constant-time-analysis/ct_analyzer/tests/test_samples/vulnerable.ts +154 -0
- package/skills/security-constant-time-analysis/pyproject.toml +52 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/README.md +90 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/SKILL.md +219 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/references/compiled.md +129 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/references/javascript.md +136 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/references/kotlin.md +252 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/references/php.md +172 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/references/python.md +179 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/references/ruby.md +198 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/references/swift.md +288 -0
- package/skills/security-constant-time-analysis/skills/constant-time-analysis/references/vm-compiled.md +354 -0
- package/skills/security-constant-time-analysis/uv.lock +8 -0
- package/skills/security-culture-index/.claude-plugin/plugin.json +8 -0
- package/skills/security-culture-index/README.md +79 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/SKILL.md +293 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/references/anti-patterns.md +255 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/references/conversation-starters.md +408 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/references/interview-trait-signals.md +253 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/references/motivators.md +158 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/references/patterns-archetypes.md +147 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/references/primary-traits.md +307 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/references/secondary-traits.md +228 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/references/team-composition.md +148 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/scripts/check_deps.py +108 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/scripts/culture_index/__init__.py +20 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/scripts/culture_index/constants.py +122 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/scripts/culture_index/extract.py +187 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/scripts/culture_index/models.py +16 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/scripts/culture_index/opencv_extractor.py +520 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/scripts/extract_pdf.py +237 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/scripts/pyproject.toml +18 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/templates/burnout-report.md +113 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/templates/comparison-report.md +103 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/templates/hiring-profile.md +127 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/templates/individual-report.md +85 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/templates/predicted-profile.md +165 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/templates/team-report.md +109 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/analyze-team.md +188 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/coach-manager.md +267 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/compare-profiles.md +188 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/define-hiring-profile.md +220 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/detect-burnout.md +206 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/extract-from-pdf.md +121 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/interpret-individual.md +183 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/interview-debrief.md +234 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/mediate-conflict.md +306 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/plan-onboarding.md +322 -0
- package/skills/security-culture-index/skills/interpreting-culture-index/workflows/predict-from-interview.md +250 -0
- package/skills/security-differential-review/.claude-plugin/plugin.json +10 -0
- package/skills/security-differential-review/README.md +109 -0
- package/skills/security-differential-review/commands/diff-review.md +21 -0
- package/skills/security-differential-review/skills/differential-review/SKILL.md +220 -0
- package/skills/security-differential-review/skills/differential-review/adversarial.md +203 -0
- package/skills/security-differential-review/skills/differential-review/methodology.md +234 -0
- package/skills/security-differential-review/skills/differential-review/patterns.md +300 -0
- package/skills/security-differential-review/skills/differential-review/reporting.md +369 -0
- package/skills/security-dwarf-expert/.claude-plugin/plugin.json +10 -0
- package/skills/security-dwarf-expert/README.md +38 -0
- package/skills/security-dwarf-expert/skills/dwarf-expert/SKILL.md +93 -0
- package/skills/security-dwarf-expert/skills/dwarf-expert/reference/coding.md +31 -0
- package/skills/security-dwarf-expert/skills/dwarf-expert/reference/dwarfdump.md +50 -0
- package/skills/security-dwarf-expert/skills/dwarf-expert/reference/readelf.md +8 -0
- package/skills/security-entry-point-analyzer/.claude-plugin/plugin.json +10 -0
- package/skills/security-entry-point-analyzer/README.md +74 -0
- package/skills/security-entry-point-analyzer/commands/entry-points.md +18 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/SKILL.md +251 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/cosmwasm.md +182 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/move-aptos.md +107 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/move-sui.md +87 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/solana.md +155 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/solidity.md +135 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/ton.md +185 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/vyper.md +141 -0
- package/skills/security-firebase-apk-scanner/.claude-plugin/plugin.json +10 -0
- package/skills/security-firebase-apk-scanner/README.md +85 -0
- package/skills/security-firebase-apk-scanner/commands/scan-apk.md +18 -0
- package/skills/security-firebase-apk-scanner/scanner.sh +1408 -0
- package/skills/security-firebase-apk-scanner/skills/firebase-apk-scanner/SKILL.md +197 -0
- package/skills/security-firebase-apk-scanner/skills/firebase-apk-scanner/references/vulnerabilities.md +803 -0
- package/skills/security-fix-review/.claude-plugin/plugin.json +13 -0
- package/skills/security-fix-review/README.md +118 -0
- package/skills/security-fix-review/commands/fix-review.md +24 -0
- package/skills/security-fix-review/skills/fix-review/SKILL.md +264 -0
- package/skills/security-fix-review/skills/fix-review/references/bug-detection.md +408 -0
- package/skills/security-fix-review/skills/fix-review/references/finding-matching.md +298 -0
- package/skills/security-fix-review/skills/fix-review/references/report-parsing.md +398 -0
- package/skills/security-insecure-defaults/.claude-plugin/plugin.json +10 -0
- package/skills/security-insecure-defaults/README.md +45 -0
- package/skills/security-insecure-defaults/skills/insecure-defaults/SKILL.md +117 -0
- package/skills/security-insecure-defaults/skills/insecure-defaults/references/examples.md +409 -0
- package/skills/security-modern-python/.claude-plugin/plugin.json +10 -0
- package/skills/security-modern-python/README.md +58 -0
- package/skills/security-modern-python/hooks/hooks.json +16 -0
- package/skills/security-modern-python/hooks/intercept-legacy-python.bats +388 -0
- package/skills/security-modern-python/hooks/intercept-legacy-python.sh +109 -0
- package/skills/security-modern-python/hooks/test_helper.bash +75 -0
- package/skills/security-modern-python/skills/modern-python/SKILL.md +333 -0
- package/skills/security-modern-python/skills/modern-python/references/dependabot.md +43 -0
- package/skills/security-modern-python/skills/modern-python/references/migration-checklist.md +141 -0
- package/skills/security-modern-python/skills/modern-python/references/pep723-scripts.md +259 -0
- package/skills/security-modern-python/skills/modern-python/references/prek.md +211 -0
- package/skills/security-modern-python/skills/modern-python/references/pyproject.md +254 -0
- package/skills/security-modern-python/skills/modern-python/references/ruff-config.md +240 -0
- package/skills/security-modern-python/skills/modern-python/references/security-setup.md +255 -0
- package/skills/security-modern-python/skills/modern-python/references/testing.md +284 -0
- package/skills/security-modern-python/skills/modern-python/references/uv-commands.md +200 -0
- package/skills/security-modern-python/skills/modern-python/templates/dependabot.yml +36 -0
- package/skills/security-modern-python/skills/modern-python/templates/pre-commit-config.yaml +66 -0
- package/skills/security-property-based-testing/.claude-plugin/plugin.json +9 -0
- package/skills/security-property-based-testing/README.md +47 -0
- package/skills/security-property-based-testing/skills/property-based-testing/README.md +88 -0
- package/skills/security-property-based-testing/skills/property-based-testing/SKILL.md +109 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/design.md +191 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/generating.md +200 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/libraries.md +130 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/refactoring.md +181 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/reviewing.md +209 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/strategies.md +124 -0
- package/skills/semgrep-rule-creator/.claude-plugin/plugin.json +8 -0
- package/skills/semgrep-rule-creator/README.md +43 -0
- package/skills/semgrep-rule-creator/commands/semgrep-rule.md +26 -0
- package/skills/semgrep-rule-creator/skills/semgrep-rule-creator/SKILL.md +168 -0
- package/skills/semgrep-rule-creator/skills/semgrep-rule-creator/references/quick-reference.md +203 -0
- package/skills/semgrep-rule-creator/skills/semgrep-rule-creator/references/workflow.md +240 -0
- package/skills/semgrep-rule-variant-creator/.claude-plugin/plugin.json +9 -0
- package/skills/semgrep-rule-variant-creator/README.md +86 -0
- package/skills/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/SKILL.md +205 -0
- package/skills/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/references/applicability-analysis.md +250 -0
- package/skills/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/references/language-syntax-guide.md +324 -0
- package/skills/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/references/workflow.md +518 -0
- package/skills/session-logs/SKILL.md +115 -0
- package/skills/sharp-edges/.claude-plugin/plugin.json +10 -0
- package/skills/sharp-edges/README.md +48 -0
- package/skills/sharp-edges/skills/sharp-edges/SKILL.md +292 -0
- package/skills/sharp-edges/skills/sharp-edges/references/auth-patterns.md +252 -0
- package/skills/sharp-edges/skills/sharp-edges/references/case-studies.md +274 -0
- package/skills/sharp-edges/skills/sharp-edges/references/config-patterns.md +333 -0
- package/skills/sharp-edges/skills/sharp-edges/references/crypto-apis.md +190 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-c.md +205 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-csharp.md +285 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-go.md +270 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-java.md +263 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-javascript.md +269 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-kotlin.md +265 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-php.md +245 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-python.md +274 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-ruby.md +273 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-rust.md +272 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-swift.md +287 -0
- package/skills/sharp-edges/skills/sharp-edges/references/language-specific.md +588 -0
- package/skills/sherpa-onnx-tts/SKILL.md +103 -0
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
- package/skills/skill-creator/SKILL.md +370 -0
- package/skills/skill-creator/license.txt +202 -0
- package/skills/skill-creator/scripts/init_skill.py +378 -0
- package/skills/skill-creator/scripts/package_skill.py +111 -0
- package/skills/skill-creator/scripts/quick_validate.py +101 -0
- package/skills/slack/SKILL.md +144 -0
- package/skills/songsee/SKILL.md +49 -0
- package/skills/sonoscli/SKILL.md +46 -0
- package/skills/spec-to-code-compliance/.claude-plugin/plugin.json +10 -0
- package/skills/spec-to-code-compliance/README.md +67 -0
- package/skills/spec-to-code-compliance/commands/spec-compliance.md +22 -0
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/SKILL.md +349 -0
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/COMPLETENESS_CHECKLIST.md +69 -0
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/IR_EXAMPLES.md +417 -0
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/OUTPUT_REQUIREMENTS.md +105 -0
- package/skills/spotify-player/SKILL.md +64 -0
- package/skills/static-analysis/.claude-plugin/plugin.json +8 -0
- package/skills/static-analysis/README.md +59 -0
- package/skills/static-analysis/skills/codeql/SKILL.md +315 -0
- package/skills/static-analysis/skills/sarif-parsing/SKILL.md +479 -0
- package/skills/static-analysis/skills/sarif-parsing/resources/jq-queries.md +162 -0
- package/skills/static-analysis/skills/sarif-parsing/resources/sarif_helpers.py +331 -0
- package/skills/static-analysis/skills/semgrep/SKILL.md +337 -0
- package/skills/summarize/SKILL.md +87 -0
- package/skills/testing-handbook-skills/.claude-plugin/plugin.json +8 -0
- package/skills/testing-handbook-skills/README.md +241 -0
- package/skills/testing-handbook-skills/scripts/pyproject.toml +8 -0
- package/skills/testing-handbook-skills/scripts/validate-skills.py +657 -0
- package/skills/testing-handbook-skills/skills/address-sanitizer/SKILL.md +341 -0
- package/skills/testing-handbook-skills/skills/aflpp/SKILL.md +640 -0
- package/skills/testing-handbook-skills/skills/atheris/SKILL.md +515 -0
- package/skills/testing-handbook-skills/skills/cargo-fuzz/SKILL.md +454 -0
- package/skills/testing-handbook-skills/skills/codeql/SKILL.md +549 -0
- package/skills/testing-handbook-skills/skills/constant-time-testing/SKILL.md +507 -0
- package/skills/testing-handbook-skills/skills/coverage-analysis/SKILL.md +607 -0
- package/skills/testing-handbook-skills/skills/fuzzing-dictionary/SKILL.md +297 -0
- package/skills/testing-handbook-skills/skills/fuzzing-obstacles/SKILL.md +426 -0
- package/skills/testing-handbook-skills/skills/harness-writing/SKILL.md +614 -0
- package/skills/testing-handbook-skills/skills/libafl/SKILL.md +625 -0
- package/skills/testing-handbook-skills/skills/libfuzzer/SKILL.md +795 -0
- package/skills/testing-handbook-skills/skills/ossfuzz/SKILL.md +426 -0
- package/skills/testing-handbook-skills/skills/ruzzy/SKILL.md +443 -0
- package/skills/testing-handbook-skills/skills/semgrep/SKILL.md +601 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/SKILL.md +372 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/agent-prompt.md +280 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/discovery.md +452 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/domain-skill.md +504 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/fuzzer-skill.md +454 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/technique-skill.md +527 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/tool-skill.md +366 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/testing.md +482 -0
- package/skills/testing-handbook-skills/skills/wycheproof/SKILL.md +533 -0
- package/skills/things-mac/SKILL.md +86 -0
- package/skills/tmux/SKILL.md +135 -0
- package/skills/tmux/scripts/find-sessions.sh +112 -0
- package/skills/tmux/scripts/wait-for-text.sh +83 -0
- package/skills/trello/SKILL.md +95 -0
- package/skills/variant-analysis/.claude-plugin/plugin.json +8 -0
- package/skills/variant-analysis/README.md +41 -0
- package/skills/variant-analysis/commands/variants.md +23 -0
- package/skills/variant-analysis/skills/variant-analysis/METHODOLOGY.md +327 -0
- package/skills/variant-analysis/skills/variant-analysis/SKILL.md +142 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/cpp.ql +119 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/go.ql +69 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/java.ql +71 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/javascript.ql +63 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/python.ql +80 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/cpp.yaml +98 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/go.yaml +63 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/java.yaml +61 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/javascript.yaml +60 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/python.yaml +72 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/variant-report-template.md +75 -0
- package/skills/video-frames/SKILL.md +46 -0
- package/skills/video-frames/scripts/frame.sh +81 -0
- package/skills/voice-call/SKILL.md +45 -0
- package/skills/wacli/SKILL.md +72 -0
- package/skills/weather/SKILL.md +54 -0
- package/skills/yara-authoring/.claude-plugin/plugin.json +9 -0
- package/skills/yara-authoring/README.md +131 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/SKILL.md +645 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/examples/MAL_Mac_ProtonRAT_Jan25.yar +99 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/examples/MAL_NPM_SupplyChain_Jan25.yar +170 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/examples/MAL_Win_Remcos_Jan25.yar +103 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/examples/SUSP_CRX_SuspiciousPermissions.yar +134 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/examples/SUSP_JS_Obfuscation_Jan25.yar +185 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/references/crx-module.md +214 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/references/dex-module.md +383 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/references/performance.md +333 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/references/strings.md +433 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/references/style-guide.md +257 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/references/testing.md +399 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/scripts/atom_analyzer.py +526 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/scripts/pyproject.toml +25 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/scripts/yara_lint.py +631 -0
- package/skills/yara-authoring/skills/yara-rule-authoring/workflows/rule-development.md +493 -0
package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/IR_EXAMPLES.md
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
# Intermediate Representation Examples
|
|
2
|
+
|
|
3
|
+
The following examples demonstrate the complete IR workflow using realistic DEX swap patterns.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Example 1: Spec-IR Record
|
|
8
|
+
|
|
9
|
+
**Scenario:** Extracting a security requirement from a DEX protocol whitepaper.
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
id: SPEC-001
|
|
13
|
+
spec_excerpt: "All swaps MUST enforce maximum slippage of 1% to protect users from sandwich attacks"
|
|
14
|
+
source_section: "Whitepaper §4.1 - Trading Mechanism & User Protection"
|
|
15
|
+
source_document: "dex-protocol-whitepaper-v3.pdf"
|
|
16
|
+
semantic_type: invariant
|
|
17
|
+
normalized_form:
|
|
18
|
+
type: constraint
|
|
19
|
+
entity: swap_transaction
|
|
20
|
+
operation: token_exchange
|
|
21
|
+
condition: "abs((actual_output - expected_output) / expected_output) <= 0.01"
|
|
22
|
+
enforcement: MUST (mandatory)
|
|
23
|
+
rationale: "sandwich_attack_prevention"
|
|
24
|
+
confidence: 1.0
|
|
25
|
+
notes: "Slippage measured as percentage deviation from expected output at transaction submission time"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**What this shows:**
|
|
29
|
+
- Extraction of trading protection requirement with full traceability
|
|
30
|
+
- Normalized form makes slippage calculation explicit and machine-verifiable
|
|
31
|
+
- High confidence (1.0) because requirement is stated explicitly with specific percentage
|
|
32
|
+
- Notes clarify measurement methodology
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Example 2: Code-IR Record
|
|
37
|
+
|
|
38
|
+
**Scenario:** Analyzing the `swap()` function in a DEX router contract.
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
id: CODE-001
|
|
42
|
+
file: "contracts/Router.sol"
|
|
43
|
+
function: "swap(address tokenIn, address tokenOut, uint256 amountIn, uint256 minAmountOut, uint256 deadline)"
|
|
44
|
+
lines: 89-135
|
|
45
|
+
visibility: external
|
|
46
|
+
modifiers: [nonReentrant, ensure(deadline)]
|
|
47
|
+
|
|
48
|
+
behavior:
|
|
49
|
+
preconditions:
|
|
50
|
+
- condition: "block.timestamp <= deadline"
|
|
51
|
+
line: 90
|
|
52
|
+
enforcement: modifier (ensure)
|
|
53
|
+
purpose: "prevent stale transactions"
|
|
54
|
+
- condition: "amountIn > 0"
|
|
55
|
+
line: 92
|
|
56
|
+
enforcement: require
|
|
57
|
+
- condition: "minAmountOut > 0"
|
|
58
|
+
line: 93
|
|
59
|
+
enforcement: require
|
|
60
|
+
- condition: "tokenIn != tokenOut"
|
|
61
|
+
line: 94
|
|
62
|
+
enforcement: require
|
|
63
|
+
|
|
64
|
+
state_reads:
|
|
65
|
+
- variable: "pairs[tokenIn][tokenOut]"
|
|
66
|
+
line: 98
|
|
67
|
+
purpose: "get liquidity pool address"
|
|
68
|
+
- variable: "reserves[pair]"
|
|
69
|
+
line: 102
|
|
70
|
+
purpose: "get current pool reserves"
|
|
71
|
+
- variable: "feeRate"
|
|
72
|
+
line: 108
|
|
73
|
+
purpose: "calculate trading fee"
|
|
74
|
+
|
|
75
|
+
state_writes:
|
|
76
|
+
- variable: "reserves[pair].reserve0"
|
|
77
|
+
line: 125
|
|
78
|
+
operation: "update after swap"
|
|
79
|
+
- variable: "reserves[pair].reserve1"
|
|
80
|
+
line: 126
|
|
81
|
+
operation: "update after swap"
|
|
82
|
+
|
|
83
|
+
computations:
|
|
84
|
+
- operation: "amountInWithFee = amountIn * 997"
|
|
85
|
+
line: 108
|
|
86
|
+
purpose: "apply 0.3% fee (997/1000)"
|
|
87
|
+
- operation: "amountOut = (amountInWithFee * reserveOut) / (reserveIn * 1000 + amountInWithFee)"
|
|
88
|
+
line: 110-111
|
|
89
|
+
purpose: "constant product formula (x * y = k)"
|
|
90
|
+
- operation: "slippageCheck = amountOut >= minAmountOut"
|
|
91
|
+
line: 115
|
|
92
|
+
purpose: "enforce user-specified minimum output"
|
|
93
|
+
|
|
94
|
+
external_calls:
|
|
95
|
+
- target: "IERC20(tokenIn).transferFrom(msg.sender, pair, amountIn)"
|
|
96
|
+
line: 118
|
|
97
|
+
type: "ERC20 transfer"
|
|
98
|
+
return_handling: "require success"
|
|
99
|
+
- target: "IERC20(tokenOut).transfer(msg.sender, amountOut)"
|
|
100
|
+
line: 122
|
|
101
|
+
type: "ERC20 transfer"
|
|
102
|
+
return_handling: "require success"
|
|
103
|
+
|
|
104
|
+
events:
|
|
105
|
+
- name: "Swap"
|
|
106
|
+
line: 130
|
|
107
|
+
parameters: "msg.sender, tokenIn, tokenOut, amountIn, amountOut"
|
|
108
|
+
|
|
109
|
+
postconditions:
|
|
110
|
+
- "amountOut >= minAmountOut (slippage protection enforced)"
|
|
111
|
+
- "reserves updated to maintain K=xy invariant"
|
|
112
|
+
- "tokenIn transferred from user to pool"
|
|
113
|
+
- "tokenOut transferred from pool to user"
|
|
114
|
+
|
|
115
|
+
invariants_enforced:
|
|
116
|
+
- "slippage_protection: amountOut >= minAmountOut (line 115)"
|
|
117
|
+
- "constant_product: reserveIn * reserveOut >= k_before (line 125-126)"
|
|
118
|
+
- "fee_application: effective_rate = 0.3% (line 108)"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**What this shows:**
|
|
122
|
+
- Complete DEX swap function analysis with line-level precision
|
|
123
|
+
- Captures AMM constant product formula and fee mechanics
|
|
124
|
+
- Documents slippage protection enforcement at line 115
|
|
125
|
+
- Shows state transitions (reserve updates) and external interactions
|
|
126
|
+
- All claims reference specific line numbers for traceability
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Example 3: Alignment Record (Positive Case)
|
|
131
|
+
|
|
132
|
+
**Scenario:** Verifying that the swap function correctly implements the 0.3% fee requirement.
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
id: ALIGN-001
|
|
136
|
+
spec_ref: SPEC-002
|
|
137
|
+
code_ref: CODE-001
|
|
138
|
+
|
|
139
|
+
spec_claim: "Protocol MUST charge exactly 0.3% fee on all swaps"
|
|
140
|
+
spec_source: "Whitepaper §4.2 - Fee Structure"
|
|
141
|
+
|
|
142
|
+
code_behavior: "amountInWithFee = amountIn * 997 (line 108), effective fee = (1000-997)/1000 = 0.3%"
|
|
143
|
+
code_location: "Router.sol:L108"
|
|
144
|
+
|
|
145
|
+
match_type: full_match
|
|
146
|
+
confidence: 1.0
|
|
147
|
+
|
|
148
|
+
reasoning: |
|
|
149
|
+
Spec requires: 0.3% fee on all swaps
|
|
150
|
+
Code implements: amountIn * 997 / 1000
|
|
151
|
+
|
|
152
|
+
Mathematical verification:
|
|
153
|
+
- Fee deduction: 1000 - 997 = 3
|
|
154
|
+
- Fee percentage: 3 / 1000 = 0.003 = 0.3% ✓
|
|
155
|
+
|
|
156
|
+
The code uses numerator 997 instead of explicit fee subtraction,
|
|
157
|
+
but this is mathematically equivalent and gas-optimized.
|
|
158
|
+
|
|
159
|
+
Enforcement: Fee is applied before price calculation (line 108-111),
|
|
160
|
+
ensuring it affects the swap output. Cannot be bypassed.
|
|
161
|
+
|
|
162
|
+
evidence:
|
|
163
|
+
spec_quote: "The protocol charges a fixed 0.3% fee on the input amount for every swap transaction"
|
|
164
|
+
spec_location: "Whitepaper §4.2, page 8, paragraph 1"
|
|
165
|
+
code_quote: "uint256 amountInWithFee = amountIn * 997; // 0.3% fee: (1000-997)/1000"
|
|
166
|
+
code_location: "Router.sol:L108"
|
|
167
|
+
|
|
168
|
+
verification_steps:
|
|
169
|
+
- "Checked numerator 997 is used consistently"
|
|
170
|
+
- "Verified denominator 1000 matches in formula at L110-111"
|
|
171
|
+
- "Confirmed fee applies to all swap paths (no conditional logic)"
|
|
172
|
+
- "Validated fee is not configurable (hardcoded = guaranteed)"
|
|
173
|
+
|
|
174
|
+
ambiguity_notes: null
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**What this shows:**
|
|
178
|
+
- Successful alignment between spec requirement and code implementation
|
|
179
|
+
- Mathematical proof that 997/1000 = 0.3% fee
|
|
180
|
+
- Reasoning explains WHY implementation is correct (gas optimization via numerator)
|
|
181
|
+
- Evidence provides exact quotes and line numbers
|
|
182
|
+
- High confidence (1.0) due to clear mathematical equivalence
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Example 4: Divergence Finding (Critical Issue)
|
|
187
|
+
|
|
188
|
+
**Scenario:** Identifying that the critical slippage protection requirement is completely missing.
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
id: DIV-001
|
|
192
|
+
severity: CRITICAL
|
|
193
|
+
title: "Missing slippage protection enables unlimited sandwich attacks"
|
|
194
|
+
|
|
195
|
+
spec_claim:
|
|
196
|
+
excerpt: "All swaps MUST enforce maximum slippage of 1% to protect users from sandwich attacks"
|
|
197
|
+
source: "Whitepaper §4.1 - Trading Mechanism & User Protection"
|
|
198
|
+
source_location: "Page 7, paragraph 3"
|
|
199
|
+
semantic_type: security_constraint
|
|
200
|
+
enforcement_level: MUST (mandatory)
|
|
201
|
+
|
|
202
|
+
code_finding:
|
|
203
|
+
file: "contracts/RouterV1.sol"
|
|
204
|
+
function: "swap(address tokenIn, address tokenOut, uint256 amountIn)"
|
|
205
|
+
lines: 45-78
|
|
206
|
+
observation: "Function signature lacks minAmountOut parameter; no slippage validation exists"
|
|
207
|
+
|
|
208
|
+
match_type: missing_in_code
|
|
209
|
+
confidence: 1.0
|
|
210
|
+
|
|
211
|
+
reasoning: |
|
|
212
|
+
Specification Analysis:
|
|
213
|
+
- Spec explicitly requires: "MUST enforce maximum slippage of 1%"
|
|
214
|
+
- Requirement scope: "All swaps" (no exceptions)
|
|
215
|
+
- Purpose stated: "protect users from sandwich attacks"
|
|
216
|
+
|
|
217
|
+
Code Analysis:
|
|
218
|
+
- Function signature: swap(tokenIn, tokenOut, amountIn)
|
|
219
|
+
- Missing parameter: minAmountOut (required for slippage check)
|
|
220
|
+
- Line-by-line review of function body (L45-L78):
|
|
221
|
+
* L50-55: Price calculation from reserves
|
|
222
|
+
* L58-60: Fee deduction (0.3%)
|
|
223
|
+
* L62-65: Output amount calculation
|
|
224
|
+
* L68: Transfer tokenIn from user
|
|
225
|
+
* L72: Transfer tokenOut to user
|
|
226
|
+
* L75: Emit Swap event
|
|
227
|
+
- NO slippage validation found anywhere in function
|
|
228
|
+
|
|
229
|
+
Gap: Spec requires slippage protection → Code provides zero protection
|
|
230
|
+
|
|
231
|
+
Additional verification:
|
|
232
|
+
- Searched entire RouterV1.sol for "slippage", "minAmount", "minOutput": 0 results
|
|
233
|
+
- Checked if validation exists in called functions: None found
|
|
234
|
+
- Verified no modifiers perform slippage check: Confirmed absent
|
|
235
|
+
|
|
236
|
+
evidence:
|
|
237
|
+
spec_evidence:
|
|
238
|
+
quote: "To protect users from front-running and sandwich attacks, all swap operations MUST enforce a maximum slippage of 1% between the expected and actual output amounts"
|
|
239
|
+
location: "Whitepaper §4.1, page 7, paragraph 3"
|
|
240
|
+
emphasis: "MUST" indicates mandatory requirement
|
|
241
|
+
|
|
242
|
+
code_evidence:
|
|
243
|
+
function_signature: "function swap(address tokenIn, address tokenOut, uint256 amountIn) external"
|
|
244
|
+
signature_location: "RouterV1.sol:L45"
|
|
245
|
+
missing_parameter: "uint256 minAmountOut"
|
|
246
|
+
|
|
247
|
+
function_body_summary: |
|
|
248
|
+
L50: uint256 amountOut = calculateSwapOutput(tokenIn, tokenOut, amountIn);
|
|
249
|
+
L68: IERC20(tokenIn).transferFrom(msg.sender, pair, amountIn);
|
|
250
|
+
L72: IERC20(tokenOut).transfer(msg.sender, amountOut);
|
|
251
|
+
|
|
252
|
+
CRITICAL ISSUE: No validation that amountOut meets user expectations
|
|
253
|
+
|
|
254
|
+
search_results:
|
|
255
|
+
- pattern: "minAmountOut" → 0 occurrences in RouterV1.sol
|
|
256
|
+
- pattern: "slippage" → 0 occurrences in RouterV1.sol
|
|
257
|
+
- pattern: "require.*amountOut" → 0 occurrences in RouterV1.sol
|
|
258
|
+
- pattern: "amountOut >=" → 0 occurrences in RouterV1.sol
|
|
259
|
+
|
|
260
|
+
exploitability: |
|
|
261
|
+
Attack Vector: Classic Sandwich Attack
|
|
262
|
+
|
|
263
|
+
Prerequisites:
|
|
264
|
+
- Attacker monitors public mempool for pending swap transactions
|
|
265
|
+
- Attacker has capital to move market price (typically 10-50x target trade size)
|
|
266
|
+
- Target trade is on-chain (not private mempool)
|
|
267
|
+
|
|
268
|
+
Attack Sequence:
|
|
269
|
+
|
|
270
|
+
1. Detection Phase
|
|
271
|
+
- Victim submits swap: 100 ETH → USDC
|
|
272
|
+
- Expected output at current price: 200,000 USDC (price = $2,000/ETH)
|
|
273
|
+
- Transaction appears in mempool with no slippage protection
|
|
274
|
+
|
|
275
|
+
2. Front-Run Transaction
|
|
276
|
+
- Attacker submits swap: 500 ETH → USDC (higher gas to execute first)
|
|
277
|
+
- Large buy moves price: $2,000 → $2,100 (+5%)
|
|
278
|
+
- Pool reserves now imbalanced
|
|
279
|
+
|
|
280
|
+
3. Victim Transaction Executes
|
|
281
|
+
- Victim's 100 ETH swap executes at manipulated price
|
|
282
|
+
- Actual output: 195,122 USDC (effective price $1,951/ETH)
|
|
283
|
+
- Victim loses: 4,878 USDC vs expected 200,000
|
|
284
|
+
- Loss percentage: 2.4% of trade value
|
|
285
|
+
- NO PROTECTION: Transaction succeeds despite 2.4% slippage (exceeds 1% spec limit)
|
|
286
|
+
|
|
287
|
+
4. Back-Run Transaction
|
|
288
|
+
- Attacker sells USDC → ETH at inflated price
|
|
289
|
+
- Profits from price impact: ~$4,500
|
|
290
|
+
- Price returns toward equilibrium
|
|
291
|
+
|
|
292
|
+
Economic Analysis:
|
|
293
|
+
- Victim trade size: $200,000
|
|
294
|
+
- Attacker cost: Gas fees (~$50-100)
|
|
295
|
+
- Attacker profit: ~$4,500 (net ~$4,400)
|
|
296
|
+
- Victim loss: $4,878 (2.4% slippage)
|
|
297
|
+
- Attack ROI: 4400% in single block
|
|
298
|
+
|
|
299
|
+
Impact Scale:
|
|
300
|
+
- Per transaction: $500 - $10,000 extractable (depending on trade size)
|
|
301
|
+
- Daily volume: $10M → potential $100K-500K daily extraction
|
|
302
|
+
- Unlimited because: No slippage check = no upper bound on extraction
|
|
303
|
+
|
|
304
|
+
Real-World Precedent:
|
|
305
|
+
- SushiSwap (2020): Suffered sandwich attacks before slippage protection
|
|
306
|
+
- Average loss per victim: 1-5% of trade value
|
|
307
|
+
- Specification exists specifically to prevent this attack class
|
|
308
|
+
|
|
309
|
+
remediation:
|
|
310
|
+
immediate_fix: |
|
|
311
|
+
Add minAmountOut parameter and enforce slippage protection:
|
|
312
|
+
|
|
313
|
+
```solidity
|
|
314
|
+
function swap(
|
|
315
|
+
address tokenIn,
|
|
316
|
+
address tokenOut,
|
|
317
|
+
uint256 amountIn,
|
|
318
|
+
uint256 minAmountOut, // NEW: User-specified minimum output
|
|
319
|
+
uint256 deadline // NEW: Prevent stale transactions
|
|
320
|
+
) external ensure(deadline) nonReentrant {
|
|
321
|
+
require(amountIn > 0, "Invalid input amount");
|
|
322
|
+
require(minAmountOut > 0, "Invalid minimum output"); // NEW
|
|
323
|
+
|
|
324
|
+
// Existing price calculation
|
|
325
|
+
uint256 amountOut = calculateSwapOutput(tokenIn, tokenOut, amountIn);
|
|
326
|
+
|
|
327
|
+
// NEW: Enforce slippage protection
|
|
328
|
+
require(amountOut >= minAmountOut, "Slippage exceeded");
|
|
329
|
+
|
|
330
|
+
// Rest of swap logic...
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
This allows users to specify maximum acceptable slippage:
|
|
335
|
+
- User calculates expected output: 200,000 USDC
|
|
336
|
+
- User sets minAmountOut: 198,000 USDC (1% slippage tolerance)
|
|
337
|
+
- Sandwich attack moves price 2.4% → transaction reverts
|
|
338
|
+
- User protected from excessive value extraction
|
|
339
|
+
|
|
340
|
+
long_term_improvements: |
|
|
341
|
+
1. Add helper function for slippage calculation:
|
|
342
|
+
```solidity
|
|
343
|
+
function calculateMinOutput(
|
|
344
|
+
uint256 expectedOutput,
|
|
345
|
+
uint256 slippageBps // basis points, e.g., 100 = 1%
|
|
346
|
+
) public pure returns (uint256) {
|
|
347
|
+
return expectedOutput * (10000 - slippageBps) / 10000;
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
2. Implement deadline parameter (as shown in immediate fix)
|
|
352
|
+
- Prevents stale transactions from executing at unexpected prices
|
|
353
|
+
- Standard in Uniswap V2/V3
|
|
354
|
+
|
|
355
|
+
3. Add price impact warnings in UI:
|
|
356
|
+
- Show estimated price impact before transaction
|
|
357
|
+
- Warn if impact exceeds 1% (spec threshold)
|
|
358
|
+
- Suggest splitting large trades
|
|
359
|
+
|
|
360
|
+
4. Consider TWAP (Time-Weighted Average Price) validation:
|
|
361
|
+
- Compare spot price vs 30-min TWAP
|
|
362
|
+
- Reject if deviation exceeds threshold
|
|
363
|
+
- Prevents oracle manipulation attacks
|
|
364
|
+
|
|
365
|
+
5. Add events for slippage monitoring:
|
|
366
|
+
```solidity
|
|
367
|
+
event SlippageApplied(
|
|
368
|
+
address indexed user,
|
|
369
|
+
uint256 expectedOutput,
|
|
370
|
+
uint256 actualOutput,
|
|
371
|
+
uint256 slippageBps
|
|
372
|
+
);
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
testing_requirements: |
|
|
376
|
+
1. Unit test: Swap with 0.5% slippage succeeds
|
|
377
|
+
2. Unit test: Swap with 1.5% slippage reverts
|
|
378
|
+
3. Integration test: Simulate sandwich attack, verify protection
|
|
379
|
+
4. Fuzz test: Random minAmountOut values, verify correct revert behavior
|
|
380
|
+
5. Mainnet fork test: Replay historical sandwich attacks, verify prevention
|
|
381
|
+
|
|
382
|
+
breaking_changes: |
|
|
383
|
+
YES - This is a breaking change to the swap() function signature.
|
|
384
|
+
|
|
385
|
+
Migration path:
|
|
386
|
+
1. Deploy RouterV2 with new signature
|
|
387
|
+
2. Update frontend to calculate and pass minAmountOut
|
|
388
|
+
3. Deprecate RouterV1 after 30-day migration period
|
|
389
|
+
4. Add wrapper function in RouterV1 for backward compatibility:
|
|
390
|
+
```solidity
|
|
391
|
+
function swapLegacy(address tokenIn, address tokenOut, uint256 amountIn) external {
|
|
392
|
+
uint256 expectedOutput = getExpectedOutput(tokenIn, tokenOut, amountIn);
|
|
393
|
+
uint256 minOutput = expectedOutput * 99 / 100; // 1% default slippage
|
|
394
|
+
swap(tokenIn, tokenOut, amountIn, minOutput, block.timestamp + 300);
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
specification_update: |
|
|
399
|
+
If slippage protection is intentionally omitted (NOT recommended):
|
|
400
|
+
|
|
401
|
+
Update whitepaper §4.1 to:
|
|
402
|
+
"Swaps execute at current market price without slippage protection.
|
|
403
|
+
Users are responsible for sandwich attack mitigation via:
|
|
404
|
+
- Private transaction channels (Flashbots, MEV-Blocker)
|
|
405
|
+
- Off-chain price monitoring and transaction cancellation
|
|
406
|
+
- External slippage calculation and manual validation
|
|
407
|
+
|
|
408
|
+
WARNING: On-chain swaps are vulnerable to MEV extraction."
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**What this shows:**
|
|
412
|
+
- Complete divergence finding with CRITICAL severity
|
|
413
|
+
- Evidence-based: Shows exhaustive search for slippage protection (0 results)
|
|
414
|
+
- Detailed exploit scenario with concrete numbers ($200k trade → $4,878 loss)
|
|
415
|
+
- Economic impact quantification (ROI, daily volume, extraction potential)
|
|
416
|
+
- Comprehensive remediation with code examples, testing requirements, migration path
|
|
417
|
+
- Distinguishes between fixing code vs updating spec (if intentional)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Output Requirements & Quality Thresholds
|
|
2
|
+
|
|
3
|
+
When performing spec-to-code compliance analysis, Claude MUST produce structured IR following the formats demonstrated in [IR_EXAMPLES.md](IR_EXAMPLES.md).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Required IR Production
|
|
8
|
+
|
|
9
|
+
For EACH phase, output MUST include:
|
|
10
|
+
|
|
11
|
+
### Phase 2 - Spec-IR (mandatory)
|
|
12
|
+
- MUST extract ALL intended behavior into Spec-IR records
|
|
13
|
+
- Each record MUST include: `id`, `spec_excerpt`, `source_section`, `source_document`, `semantic_type`, `normalized_form`, `confidence`
|
|
14
|
+
- MUST use YAML format matching Example 1
|
|
15
|
+
- MUST extract minimum 10 Spec-IR items for any non-trivial specification (5+ pages of documentation)
|
|
16
|
+
- MUST include confidence scores (0-1) for all extractions
|
|
17
|
+
- MUST document both explicit and implicit invariants
|
|
18
|
+
|
|
19
|
+
### Phase 3 - Code-IR (mandatory)
|
|
20
|
+
- MUST analyze EVERY function with structured extraction
|
|
21
|
+
- Each record MUST include: `id`, `file`, `function`, `lines`, `visibility`, `modifiers`, `behavior` (preconditions, state_reads, state_writes, computations, external_calls, events, postconditions), `invariants_enforced`
|
|
22
|
+
- MUST use YAML format matching Example 2
|
|
23
|
+
- MUST document line numbers for ALL claims (every precondition, state read/write, computation, external call)
|
|
24
|
+
- MUST capture full control flow (all conditional branches, revert paths)
|
|
25
|
+
- MUST identify all external interactions with risk analysis
|
|
26
|
+
|
|
27
|
+
### Phase 4 - Alignment-IR (mandatory)
|
|
28
|
+
- MUST compare EVERY Spec-IR item against Code-IR
|
|
29
|
+
- Each record MUST include: `id`, `spec_ref`, `code_ref`, `spec_claim`, `code_behavior`, `match_type`, `confidence`, `reasoning`, `evidence`
|
|
30
|
+
- MUST classify using exactly one of: `full_match`, `partial_match`, `mismatch`, `missing_in_code`, `code_stronger_than_spec`, `code_weaker_than_spec`
|
|
31
|
+
- MUST use YAML format matching Example 3
|
|
32
|
+
- MUST provide reasoning trace explaining WHY classification was chosen
|
|
33
|
+
- MUST include evidence with exact quotes and locations from both spec and code
|
|
34
|
+
- Every Spec-IR item MUST have corresponding Alignment record (no gaps)
|
|
35
|
+
|
|
36
|
+
### Phase 5 - Divergence Findings (when applicable)
|
|
37
|
+
- MUST create detailed finding for EVERY `mismatch`, `missing_in_code`, or `code_weaker_than_spec`
|
|
38
|
+
- Each finding MUST include: `id`, `severity`, `title`, `spec_claim`, `code_finding`, `match_type`, `confidence`, `reasoning`, `evidence`, `exploitability`, `remediation`
|
|
39
|
+
- MUST use YAML format matching Example 4
|
|
40
|
+
- MUST quantify impact with concrete numbers (not "could be exploited" but "attacker gains $X, victim loses $Y")
|
|
41
|
+
- MUST provide exploitability analysis with attack scenarios (prerequisites, sequence, impact)
|
|
42
|
+
- MUST include remediation with code examples and testing requirements
|
|
43
|
+
|
|
44
|
+
### Phase 6 - Final Report (mandatory)
|
|
45
|
+
- MUST produce structured report following 16-section format defined in Phase 6
|
|
46
|
+
- MUST include all IR artifacts (Spec-IR, Code-IR, Alignment-IR, Divergence Findings)
|
|
47
|
+
- MUST provide Full Alignment Matrix showing all spec→code mappings
|
|
48
|
+
- MUST quantify risk and prioritize remediations
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Quality Thresholds
|
|
53
|
+
|
|
54
|
+
A complete spec-to-code compliance analysis MUST achieve:
|
|
55
|
+
|
|
56
|
+
### Spec-IR minimum standards:
|
|
57
|
+
- Minimum 10 Spec-IR items for non-trivial specifications
|
|
58
|
+
- At least 3 invariants extracted (explicit or implicit)
|
|
59
|
+
- At least 2 security requirements identified (MUST/NEVER/ALWAYS keywords)
|
|
60
|
+
- At least 1 math formula or economic assumption documented
|
|
61
|
+
- Confidence scores for all extractions (no missing scores)
|
|
62
|
+
|
|
63
|
+
### Code-IR minimum standards:
|
|
64
|
+
- EVERY public/external function analyzed (no gaps in coverage)
|
|
65
|
+
- Minimum 3 invariants documented per analyzed function
|
|
66
|
+
- ALL external calls identified with return handling documented
|
|
67
|
+
- ALL state modifications tracked (reads and writes)
|
|
68
|
+
- Line number citations for ALL claims (100% traceability)
|
|
69
|
+
|
|
70
|
+
### Alignment-IR minimum standards:
|
|
71
|
+
- EVERY Spec-IR item has corresponding Alignment record (complete matrix)
|
|
72
|
+
- Reasoning provided for all match_type classifications
|
|
73
|
+
- Evidence includes exact quotes from both spec and code
|
|
74
|
+
- Ambiguities explicitly flagged (never guessed or inferred)
|
|
75
|
+
- Confidence scores reflect actual certainty (not placeholder 1.0 for everything)
|
|
76
|
+
|
|
77
|
+
### Divergence Finding minimum standards:
|
|
78
|
+
- EVERY CRITICAL/HIGH finding has exploit scenario with concrete attack sequence
|
|
79
|
+
- Economic impact quantified with dollar amounts or percentages
|
|
80
|
+
- Remediation includes code examples (not just "add validation")
|
|
81
|
+
- Testing requirements specified (unit tests, integration tests, fuzz tests)
|
|
82
|
+
- Breaking changes documented with migration path
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Format Consistency
|
|
87
|
+
|
|
88
|
+
- MUST use YAML for all IR records (Spec-IR, Code-IR, Alignment-IR, Divergence)
|
|
89
|
+
- MUST use consistent field names across all records (e.g., `spec_excerpt` not `specification_text`)
|
|
90
|
+
- MUST reference line numbers in format: `L45`, `lines: 89-135`, `line 108`
|
|
91
|
+
- MUST cite spec locations: `"Section §4.1"`, `"Page 7, paragraph 3"`, `"Whitepaper section 2.3"`
|
|
92
|
+
- MUST use markdown code blocks with language tags: ` ```yaml `, ` ```solidity `
|
|
93
|
+
- MUST separate major sections with `---` horizontal rules
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Anti-Hallucination Requirements
|
|
98
|
+
|
|
99
|
+
- NEVER infer behavior not present in spec or code
|
|
100
|
+
- ALWAYS quote exact text (spec_quote, code_quote in evidence)
|
|
101
|
+
- ALWAYS provide line numbers for code claims
|
|
102
|
+
- ALWAYS provide section/page for spec claims
|
|
103
|
+
- If uncertain: Set confidence < 0.8 and document ambiguity
|
|
104
|
+
- If spec is silent: Classify as `UNDOCUMENTED`, never guess
|
|
105
|
+
- If code adds behavior: Classify as `code_stronger_than_spec`, document in Alignment-IR
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spotify-player
|
|
3
|
+
description: Terminal Spotify playback/search via spogo (preferred) or spotify_player.
|
|
4
|
+
homepage: https://www.spotify.com
|
|
5
|
+
metadata:
|
|
6
|
+
{
|
|
7
|
+
"otto":
|
|
8
|
+
{
|
|
9
|
+
"emoji": "🎵",
|
|
10
|
+
"requires": { "anyBins": ["spogo", "spotify_player"] },
|
|
11
|
+
"install":
|
|
12
|
+
[
|
|
13
|
+
{
|
|
14
|
+
"id": "brew",
|
|
15
|
+
"kind": "brew",
|
|
16
|
+
"formula": "spogo",
|
|
17
|
+
"tap": "steipete/tap",
|
|
18
|
+
"bins": ["spogo"],
|
|
19
|
+
"label": "Install spogo (brew)",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "brew",
|
|
23
|
+
"kind": "brew",
|
|
24
|
+
"formula": "spotify_player",
|
|
25
|
+
"bins": ["spotify_player"],
|
|
26
|
+
"label": "Install spotify_player (brew)",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# spogo / spotify_player
|
|
34
|
+
|
|
35
|
+
Use `spogo` **(preferred)** for Spotify playback/search. Fall back to `spotify_player` if needed.
|
|
36
|
+
|
|
37
|
+
Requirements
|
|
38
|
+
|
|
39
|
+
- Spotify Premium account.
|
|
40
|
+
- Either `spogo` or `spotify_player` installed.
|
|
41
|
+
|
|
42
|
+
spogo setup
|
|
43
|
+
|
|
44
|
+
- Import cookies: `spogo auth import --browser chrome`
|
|
45
|
+
|
|
46
|
+
Common CLI commands
|
|
47
|
+
|
|
48
|
+
- Search: `spogo search track "query"`
|
|
49
|
+
- Playback: `spogo play|pause|next|prev`
|
|
50
|
+
- Devices: `spogo device list`, `spogo device set "<name|id>"`
|
|
51
|
+
- Status: `spogo status`
|
|
52
|
+
|
|
53
|
+
spotify_player commands (fallback)
|
|
54
|
+
|
|
55
|
+
- Search: `spotify_player search "query"`
|
|
56
|
+
- Playback: `spotify_player playback play|pause|next|previous`
|
|
57
|
+
- Connect device: `spotify_player connect`
|
|
58
|
+
- Like track: `spotify_player like`
|
|
59
|
+
|
|
60
|
+
Notes
|
|
61
|
+
|
|
62
|
+
- Config folder: `~/.config/spotify-player` (e.g., `app.toml`).
|
|
63
|
+
- For Spotify Connect integration, set a user `client_id` in config.
|
|
64
|
+
- TUI shortcuts are available via `?` in the app.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Static Analysis
|
|
2
|
+
|
|
3
|
+
A comprehensive static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection.
|
|
4
|
+
|
|
5
|
+
CodeQL and Semgrep skills are based on the Trail of Bits Testing Handbook:
|
|
6
|
+
|
|
7
|
+
- [CodeQL Testing Handbook](https://appsec.guide/docs/static-analysis/codeql/)
|
|
8
|
+
- [Semgrep Testing Handbook](https://appsec.guide/docs/static-analysis/semgrep/)
|
|
9
|
+
|
|
10
|
+
**Author:** Axel Mierczuk
|
|
11
|
+
|
|
12
|
+
## Skills Included
|
|
13
|
+
|
|
14
|
+
| Skill | Purpose |
|
|
15
|
+
|-----------------|----------------------------------------------------------|
|
|
16
|
+
| `codeql` | Deep security analysis with taint tracking and data flow |
|
|
17
|
+
| `semgrep` | Fast pattern-based security scanning |
|
|
18
|
+
| `sarif-parsing` | Parse and process results from static analysis tools |
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
Use this plugin when you need to:
|
|
23
|
+
- Perform security vulnerability detection on codebases
|
|
24
|
+
- Run CodeQL for interprocedural taint tracking and data flow analysis
|
|
25
|
+
- Use Semgrep for fast pattern-based bug detection
|
|
26
|
+
- Parse SARIF output from security scanners
|
|
27
|
+
- Set up static analysis in CI/CD pipelines
|
|
28
|
+
- Aggregate and deduplicate findings from multiple tools
|
|
29
|
+
|
|
30
|
+
## What It Does
|
|
31
|
+
|
|
32
|
+
### CodeQL
|
|
33
|
+
- Create databases for Python, JavaScript, Go, Java, C/C++, and more
|
|
34
|
+
- Run security queries with SARIF/CSV output
|
|
35
|
+
- Write custom QL queries with taint tracking
|
|
36
|
+
- Integrate with GitHub Actions
|
|
37
|
+
|
|
38
|
+
### Semgrep
|
|
39
|
+
- Quick security scans using built-in rulesets (OWASP, CWE, Trail of Bits)
|
|
40
|
+
- Write custom YAML rules with pattern matching
|
|
41
|
+
- Taint mode for tracking data flow from sources to sinks
|
|
42
|
+
- CI/CD integration with baseline scanning
|
|
43
|
+
|
|
44
|
+
### SARIF Parsing
|
|
45
|
+
- Understand SARIF 2.1.0 structure
|
|
46
|
+
- Quick analysis using jq for CLI queries
|
|
47
|
+
- Python scripting with pysarif and sarif-tools
|
|
48
|
+
- Aggregate and deduplicate results from multiple files
|
|
49
|
+
- CI/CD integration patterns
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
/plugin install trailofbits/skills/plugins/static-analysis
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Related Skills
|
|
58
|
+
|
|
59
|
+
- `variant-analysis` - Use CodeQL/Semgrep patterns to find bug variants
|