dsh-ecc-skills 0.4.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 +22 -0
- package/README.md +99 -0
- package/cordis.patch.yml +5 -0
- package/lib/index.js +195 -0
- package/package.json +46 -0
- package/skills/accessibility/SKILL.md +147 -0
- package/skills/agent-architecture-audit/SKILL.md +257 -0
- package/skills/agent-eval/SKILL.md +147 -0
- package/skills/agent-harness-construction/SKILL.md +74 -0
- package/skills/agent-introspection-debugging/SKILL.md +154 -0
- package/skills/agent-payment-x402/SKILL.md +225 -0
- package/skills/agent-self-evaluation/SKILL.md +182 -0
- package/skills/agent-sort/SKILL.md +216 -0
- package/skills/agentic-engineering/SKILL.md +64 -0
- package/skills/agentic-os/SKILL.md +388 -0
- package/skills/ai-first-engineering/SKILL.md +52 -0
- package/skills/ai-regression-testing/SKILL.md +386 -0
- package/skills/android-clean-architecture/SKILL.md +340 -0
- package/skills/angular-developer/SKILL.md +155 -0
- package/skills/api-connector-builder/SKILL.md +121 -0
- package/skills/api-design/SKILL.md +524 -0
- package/skills/architecture-decision-records/SKILL.md +180 -0
- package/skills/article-writing/SKILL.md +80 -0
- package/skills/automation-audit-ops/SKILL.md +143 -0
- package/skills/autonomous-agent-harness/SKILL.md +274 -0
- package/skills/autonomous-loops/SKILL.md +611 -0
- package/skills/backend-patterns/SKILL.md +562 -0
- package/skills/benchmark/SKILL.md +95 -0
- package/skills/benchmark-methodology/SKILL.md +191 -0
- package/skills/benchmark-optimization-loop/SKILL.md +71 -0
- package/skills/blender-motion-state-inspection/SKILL.md +165 -0
- package/skills/blueprint/SKILL.md +106 -0
- package/skills/brand-discovery/SKILL.md +145 -0
- package/skills/brand-voice/SKILL.md +98 -0
- package/skills/browser-qa/SKILL.md +105 -0
- package/skills/bun-runtime/SKILL.md +85 -0
- package/skills/canary-watch/SKILL.md +108 -0
- package/skills/carrier-relationship-management/SKILL.md +212 -0
- package/skills/cisco-ios-patterns/SKILL.md +164 -0
- package/skills/ck/SKILL.md +148 -0
- package/skills/claude-devfleet/SKILL.md +112 -0
- package/skills/click-path-audit/SKILL.md +245 -0
- package/skills/clickhouse-io/SKILL.md +445 -0
- package/skills/code-tour/SKILL.md +254 -0
- package/skills/codebase-onboarding/SKILL.md +234 -0
- package/skills/codehealth-mcp/SKILL.md +167 -0
- package/skills/coding-standards/SKILL.md +551 -0
- package/skills/competitive-platform-analysis/SKILL.md +214 -0
- package/skills/competitive-report-structure/SKILL.md +162 -0
- package/skills/compose-multiplatform-patterns/SKILL.md +300 -0
- package/skills/config-gc/SKILL.md +120 -0
- package/skills/configure-ecc/SKILL.md +206 -0
- package/skills/connections-optimizer/SKILL.md +190 -0
- package/skills/content-engine/SKILL.md +132 -0
- package/skills/content-hash-cache-pattern/SKILL.md +162 -0
- package/skills/context-budget/SKILL.md +136 -0
- package/skills/continuous-agent-loop/SKILL.md +46 -0
- package/skills/contract-first/SKILL.md +287 -0
- package/skills/cost-aware-llm-pipeline/SKILL.md +184 -0
- package/skills/cost-tracking/SKILL.md +97 -0
- package/skills/council/SKILL.md +204 -0
- package/skills/council-multi-model/SKILL.md +167 -0
- package/skills/cpp-coding-standards/SKILL.md +724 -0
- package/skills/cpp-testing/SKILL.md +325 -0
- package/skills/crosspost/SKILL.md +112 -0
- package/skills/csharp-testing/SKILL.md +322 -0
- package/skills/customer-billing-ops/SKILL.md +141 -0
- package/skills/customs-trade-compliance/SKILL.md +263 -0
- package/skills/dart-flutter-patterns/SKILL.md +564 -0
- package/skills/dashboard-builder/SKILL.md +109 -0
- package/skills/data-scraper-agent/SKILL.md +765 -0
- package/skills/data-throughput-accelerator/SKILL.md +74 -0
- package/skills/database-migrations/SKILL.md +430 -0
- package/skills/deep-research/SKILL.md +160 -0
- package/skills/defi-amm-security/SKILL.md +167 -0
- package/skills/delivery-gate/SKILL.md +126 -0
- package/skills/deployment-patterns/SKILL.md +428 -0
- package/skills/design-system/SKILL.md +83 -0
- package/skills/dev-team/SKILL.md +203 -0
- package/skills/django-celery/SKILL.md +458 -0
- package/skills/django-patterns/SKILL.md +735 -0
- package/skills/django-security/SKILL.md +644 -0
- package/skills/django-tdd/SKILL.md +730 -0
- package/skills/django-verification/SKILL.md +470 -0
- package/skills/dmux-workflows/SKILL.md +192 -0
- package/skills/docker-patterns/SKILL.md +520 -0
- package/skills/documentation-lookup/SKILL.md +91 -0
- package/skills/dotnet-patterns/SKILL.md +322 -0
- package/skills/dynamic-workflow-mode/SKILL.md +124 -0
- package/skills/e2e-testing/SKILL.md +327 -0
- package/skills/ecc-tools-cost-audit/SKILL.md +161 -0
- package/skills/email-ops/SKILL.md +122 -0
- package/skills/energy-procurement/SKILL.md +228 -0
- package/skills/enterprise-agent-ops/SKILL.md +51 -0
- package/skills/error-handling/SKILL.md +377 -0
- package/skills/eval-harness/SKILL.md +271 -0
- package/skills/evm-token-decimals/SKILL.md +131 -0
- package/skills/exa-search/SKILL.md +108 -0
- package/skills/fal-ai-media/SKILL.md +289 -0
- package/skills/fastapi-patterns/SKILL.md +514 -0
- package/skills/finance-billing-ops/SKILL.md +128 -0
- package/skills/flox-environments/SKILL.md +497 -0
- package/skills/flutter-dart-code-review/SKILL.md +436 -0
- package/skills/foundation-models-on-device/SKILL.md +243 -0
- package/skills/frontend-a11y/SKILL.md +446 -0
- package/skills/frontend-design-direction/SKILL.md +93 -0
- package/skills/frontend-patterns/SKILL.md +657 -0
- package/skills/fsharp-testing/SKILL.md +281 -0
- package/skills/gan-style-harness/SKILL.md +279 -0
- package/skills/generating-python-installer/SKILL.md +820 -0
- package/skills/git-workflow/SKILL.md +716 -0
- package/skills/github-ops/SKILL.md +145 -0
- package/skills/golang-patterns/SKILL.md +676 -0
- package/skills/golang-testing/SKILL.md +721 -0
- package/skills/google-workspace-ops/SKILL.md +96 -0
- package/skills/growth-log/SKILL.md +128 -0
- package/skills/healthcare-cdss-patterns/SKILL.md +246 -0
- package/skills/healthcare-emr-patterns/SKILL.md +160 -0
- package/skills/healthcare-eval-harness/SKILL.md +208 -0
- package/skills/healthcare-phi-compliance/SKILL.md +146 -0
- package/skills/hermes-imports/SKILL.md +89 -0
- package/skills/hexagonal-architecture/SKILL.md +277 -0
- package/skills/hipaa-compliance/SKILL.md +79 -0
- package/skills/homelab-network-readiness/SKILL.md +170 -0
- package/skills/homelab-network-setup/SKILL.md +130 -0
- package/skills/homelab-pihole-dns/SKILL.md +275 -0
- package/skills/homelab-vlan-segmentation/SKILL.md +312 -0
- package/skills/homelab-wireguard-vpn/SKILL.md +306 -0
- package/skills/hookify-rules/SKILL.md +128 -0
- package/skills/inherit-legacy-style/SKILL.md +157 -0
- package/skills/intent-driven-development/SKILL.md +360 -0
- package/skills/inventory-demand-planning/SKILL.md +247 -0
- package/skills/investor-materials/SKILL.md +97 -0
- package/skills/investor-outreach/SKILL.md +92 -0
- package/skills/ios-icon-gen/SKILL.md +158 -0
- package/skills/iterative-retrieval/SKILL.md +212 -0
- package/skills/ito-baskets/SKILL.md +263 -0
- package/skills/ito-compute/SKILL.md +151 -0
- package/skills/ito-inference/SKILL.md +119 -0
- package/skills/ito-training/SKILL.md +123 -0
- package/skills/java-coding-standards/SKILL.md +384 -0
- package/skills/jira-integration/SKILL.md +303 -0
- package/skills/jpa-patterns/SKILL.md +152 -0
- package/skills/knowledge-ops/SKILL.md +155 -0
- package/skills/kotlin-coroutines-flows/SKILL.md +285 -0
- package/skills/kotlin-exposed-patterns/SKILL.md +720 -0
- package/skills/kotlin-ktor-patterns/SKILL.md +690 -0
- package/skills/kotlin-patterns/SKILL.md +712 -0
- package/skills/kotlin-testing/SKILL.md +825 -0
- package/skills/kubernetes-patterns/SKILL.md +756 -0
- package/skills/laravel-patterns/SKILL.md +416 -0
- package/skills/laravel-plugin-discovery/SKILL.md +230 -0
- package/skills/laravel-security/SKILL.md +948 -0
- package/skills/laravel-tdd/SKILL.md +675 -0
- package/skills/laravel-verification/SKILL.md +180 -0
- package/skills/latency-critical-systems/SKILL.md +75 -0
- package/skills/lead-intelligence/SKILL.md +322 -0
- package/skills/liquid-glass-design/SKILL.md +279 -0
- package/skills/living-docs-governance/SKILL.md +137 -0
- package/skills/llm-trading-agent-security/SKILL.md +147 -0
- package/skills/logistics-exception-management/SKILL.md +222 -0
- package/skills/loop-design-check/SKILL.md +143 -0
- package/skills/mailtrap-email-integration/SKILL.md +77 -0
- package/skills/make-interfaces-feel-better/SKILL.md +152 -0
- package/skills/manim-video/SKILL.md +90 -0
- package/skills/market-research/SKILL.md +76 -0
- package/skills/marketing-campaign/SKILL.md +114 -0
- package/skills/mcp-server-patterns/SKILL.md +70 -0
- package/skills/messages-ops/SKILL.md +105 -0
- package/skills/ml-adoption-playbook/SKILL.md +57 -0
- package/skills/mle-workflow/SKILL.md +348 -0
- package/skills/motion-advanced/SKILL.md +597 -0
- package/skills/motion-foundations/SKILL.md +300 -0
- package/skills/motion-patterns/SKILL.md +435 -0
- package/skills/motion-ui/SKILL.md +576 -0
- package/skills/mysql-patterns/SKILL.md +413 -0
- package/skills/nanoclaw-repl/SKILL.md +34 -0
- package/skills/nasiko-control-plane/SKILL.md +49 -0
- package/skills/nestjs-patterns/SKILL.md +231 -0
- package/skills/netmiko-ssh-automation/SKILL.md +174 -0
- package/skills/network-bgp-diagnostics/SKILL.md +168 -0
- package/skills/network-config-validation/SKILL.md +211 -0
- package/skills/network-interface-health/SKILL.md +153 -0
- package/skills/nextjs-turbopack/SKILL.md +58 -0
- package/skills/nodejs-keccak256/SKILL.md +103 -0
- package/skills/nutrient-document-processing/SKILL.md +168 -0
- package/skills/nuxt4-patterns/SKILL.md +101 -0
- package/skills/opensource-pipeline/SKILL.md +256 -0
- package/skills/orch-add-feature/SKILL.md +45 -0
- package/skills/orch-build-mvp/SKILL.md +49 -0
- package/skills/orch-change-feature/SKILL.md +43 -0
- package/skills/orch-fix-defect/SKILL.md +43 -0
- package/skills/orch-pipeline/SKILL.md +121 -0
- package/skills/orch-refine-code/SKILL.md +44 -0
- package/skills/parallel-execution-optimizer/SKILL.md +74 -0
- package/skills/perl-patterns/SKILL.md +505 -0
- package/skills/perl-security/SKILL.md +504 -0
- package/skills/perl-testing/SKILL.md +476 -0
- package/skills/plan-canvas/SKILL.md +196 -0
- package/skills/plankton-code-quality/SKILL.md +237 -0
- package/skills/postgres-patterns/SKILL.md +148 -0
- package/skills/prediction-market-oracle-research/SKILL.md +64 -0
- package/skills/prediction-market-risk-review/SKILL.md +61 -0
- package/skills/prisma-patterns/SKILL.md +401 -0
- package/skills/product-capability/SKILL.md +142 -0
- package/skills/product-lens/SKILL.md +93 -0
- package/skills/production-audit/SKILL.md +207 -0
- package/skills/production-scheduling/SKILL.md +238 -0
- package/skills/project-flow-ops/SKILL.md +112 -0
- package/skills/prompt-optimizer/SKILL.md +398 -0
- package/skills/python-patterns/SKILL.md +751 -0
- package/skills/python-testing/SKILL.md +817 -0
- package/skills/pytorch-patterns/SKILL.md +397 -0
- package/skills/quality-nonconformance/SKILL.md +260 -0
- package/skills/quarkus-patterns/SKILL.md +723 -0
- package/skills/quarkus-security/SKILL.md +468 -0
- package/skills/quarkus-tdd/SKILL.md +812 -0
- package/skills/quarkus-verification/SKILL.md +481 -0
- package/skills/ralphinho-rfc-pipeline/SKILL.md +68 -0
- package/skills/react-native-patterns/SKILL.md +326 -0
- package/skills/react-patterns/SKILL.md +342 -0
- package/skills/react-performance/SKILL.md +575 -0
- package/skills/react-testing/SKILL.md +424 -0
- package/skills/recsys-pipeline-architect/SKILL.md +115 -0
- package/skills/recursive-decision-ledger/SKILL.md +81 -0
- package/skills/redis-patterns/SKILL.md +404 -0
- package/skills/regex-vs-llm-structured-text/SKILL.md +221 -0
- package/skills/remotion-video-creation/SKILL.md +43 -0
- package/skills/repo-scan/SKILL.md +170 -0
- package/skills/research-ops/SKILL.md +113 -0
- package/skills/returns-reverse-logistics/SKILL.md +240 -0
- package/skills/rules-distill/SKILL.md +265 -0
- package/skills/rust-patterns/SKILL.md +500 -0
- package/skills/rust-testing/SKILL.md +501 -0
- package/skills/safety-guard/SKILL.md +76 -0
- package/skills/santa-method/SKILL.md +307 -0
- package/skills/scientific-db-pubmed-database/SKILL.md +176 -0
- package/skills/scientific-db-uspto-database/SKILL.md +178 -0
- package/skills/scientific-pkg-gget/SKILL.md +167 -0
- package/skills/scientific-thinking-literature-review/SKILL.md +193 -0
- package/skills/scientific-thinking-scholar-evaluation/SKILL.md +161 -0
- package/skills/search-first/SKILL.md +183 -0
- package/skills/security-bounty-hunter/SKILL.md +100 -0
- package/skills/security-scan/SKILL.md +166 -0
- package/skills/seo/SKILL.md +155 -0
- package/skills/skill-scout/SKILL.md +141 -0
- package/skills/skill-stocktake/SKILL.md +195 -0
- package/skills/social-graph-ranker/SKILL.md +155 -0
- package/skills/social-publisher/SKILL.md +130 -0
- package/skills/springboot-patterns/SKILL.md +315 -0
- package/skills/springboot-security/SKILL.md +273 -0
- package/skills/springboot-tdd/SKILL.md +159 -0
- package/skills/springboot-verification/SKILL.md +232 -0
- package/skills/swift-actor-persistence/SKILL.md +144 -0
- package/skills/swift-concurrency-6-2/SKILL.md +216 -0
- package/skills/swift-protocol-di-testing/SKILL.md +191 -0
- package/skills/swiftui-patterns/SKILL.md +259 -0
- package/skills/taste/SKILL.md +264 -0
- package/skills/tdd-workflow/SKILL.md +583 -0
- package/skills/team-agent-orchestration/SKILL.md +111 -0
- package/skills/team-builder/SKILL.md +169 -0
- package/skills/terminal-opener/SKILL.md +55 -0
- package/skills/terminal-ops/SKILL.md +110 -0
- package/skills/tinystruct-patterns/SKILL.md +279 -0
- package/skills/token-budget-advisor/SKILL.md +134 -0
- package/skills/ui-demo/SKILL.md +466 -0
- package/skills/ui-to-vue/SKILL.md +135 -0
- package/skills/uncloud/SKILL.md +344 -0
- package/skills/unified-memory/SKILL.md +170 -0
- package/skills/unified-notifications-ops/SKILL.md +188 -0
- package/skills/verification-loop/SKILL.md +129 -0
- package/skills/video-editing/SKILL.md +311 -0
- package/skills/videodb/SKILL.md +375 -0
- package/skills/vite-patterns/SKILL.md +450 -0
- package/skills/vue-patterns/SKILL.md +471 -0
- package/skills/windows-desktop-e2e/SKILL.md +888 -0
- package/skills/workspace-surface-audit/SKILL.md +126 -0
- package/skills/x-api/SKILL.md +235 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plankton-code-quality
|
|
3
|
+
description: "Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks. Use when setting up write-time formatting, linting, or auto-fix hooks on file edits."
|
|
4
|
+
metadata:
|
|
5
|
+
origin: community
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Plankton Code Quality Skill
|
|
9
|
+
|
|
10
|
+
Integration reference for Plankton (credit: @alxfazio), a write-time code quality enforcement system for Claude Code. Plankton runs formatters and linters on every file edit via PostToolUse hooks, then spawns Claude subprocesses to fix violations the agent didn't catch.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- You want automatic formatting and linting on every file edit (not just at commit time)
|
|
15
|
+
- You need defense against agents modifying linter configs to pass instead of fixing code
|
|
16
|
+
- You want tiered model routing for fixes (Haiku for simple style, Sonnet for logic, Opus for types)
|
|
17
|
+
- You work with multiple languages (Python, TypeScript, Shell, YAML, JSON, TOML, Markdown, Dockerfile)
|
|
18
|
+
|
|
19
|
+
## How It Works
|
|
20
|
+
|
|
21
|
+
### Three-Phase Architecture
|
|
22
|
+
|
|
23
|
+
Every time Claude Code edits or writes a file, Plankton's `multi_linter.sh` PostToolUse hook runs:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Phase 1: Auto-Format (Silent)
|
|
27
|
+
├─ Runs formatters (ruff format, biome, shfmt, taplo, markdownlint)
|
|
28
|
+
├─ Fixes 40-50% of issues silently
|
|
29
|
+
└─ No output to main agent
|
|
30
|
+
|
|
31
|
+
Phase 2: Collect Violations (JSON)
|
|
32
|
+
├─ Runs linters and collects unfixable violations
|
|
33
|
+
├─ Returns structured JSON: {line, column, code, message, linter}
|
|
34
|
+
└─ Still no output to main agent
|
|
35
|
+
|
|
36
|
+
Phase 3: Delegate + Verify
|
|
37
|
+
├─ Spawns claude -p subprocess with violations JSON
|
|
38
|
+
├─ Routes to model tier based on violation complexity:
|
|
39
|
+
│ ├─ Haiku: formatting, imports, style (E/W/F codes) — 120s timeout
|
|
40
|
+
│ ├─ Sonnet: complexity, refactoring (C901, PLR codes) — 300s timeout
|
|
41
|
+
│ └─ Opus: type system, deep reasoning (unresolved-attribute) — 600s timeout
|
|
42
|
+
├─ Re-runs Phase 1+2 to verify fixes
|
|
43
|
+
└─ Exit 0 if clean, Exit 2 if violations remain (reported to main agent)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### What the Main Agent Sees
|
|
47
|
+
|
|
48
|
+
| Scenario | Agent sees | Hook exit |
|
|
49
|
+
|----------|-----------|-----------|
|
|
50
|
+
| No violations | Nothing | 0 |
|
|
51
|
+
| All fixed by subprocess | Nothing | 0 |
|
|
52
|
+
| Violations remain after subprocess | `[hook] N violation(s) remain` | 2 |
|
|
53
|
+
| Advisory (duplicates, old tooling) | `[hook:advisory] ...` | 0 |
|
|
54
|
+
|
|
55
|
+
The main agent only sees issues the subprocess couldn't fix. Most quality problems are resolved transparently.
|
|
56
|
+
|
|
57
|
+
### Config Protection (Defense Against Rule-Gaming)
|
|
58
|
+
|
|
59
|
+
LLMs will modify `.ruff.toml` or `biome.json` to disable rules rather than fix code. Plankton blocks this with three layers:
|
|
60
|
+
|
|
61
|
+
1. **PreToolUse hook** — `protect_linter_configs.sh` blocks edits to all linter configs before they happen
|
|
62
|
+
2. **Stop hook** — `stop_config_guardian.sh` detects config changes via `git diff` at session end
|
|
63
|
+
3. **Protected files list** — `.ruff.toml`, `biome.json`, `.shellcheckrc`, `.yamllint`, `.hadolint.yaml`, and more
|
|
64
|
+
|
|
65
|
+
### Package Manager Enforcement
|
|
66
|
+
|
|
67
|
+
A PreToolUse hook on Bash blocks legacy package managers:
|
|
68
|
+
- `pip`, `pip3`, `poetry`, `pipenv` → Blocked (use `uv`)
|
|
69
|
+
- `npm`, `yarn`, `pnpm` → Blocked (use `bun`)
|
|
70
|
+
- Allowed exceptions: `npm audit`, `npm view`, `npm publish`
|
|
71
|
+
|
|
72
|
+
## Setup
|
|
73
|
+
|
|
74
|
+
### Quick Start
|
|
75
|
+
|
|
76
|
+
> **Note:** Plankton requires manual installation from its repository. Review the code before installing.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Install core dependencies
|
|
80
|
+
brew install jaq ruff uv
|
|
81
|
+
|
|
82
|
+
# Install Python linters
|
|
83
|
+
uv sync --all-extras
|
|
84
|
+
|
|
85
|
+
# Start Claude Code — hooks activate automatically
|
|
86
|
+
claude
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
No install command, no plugin config. The hooks in `.claude/settings.json` are picked up automatically when you run Claude Code in the Plankton directory.
|
|
90
|
+
|
|
91
|
+
### Per-Project Integration
|
|
92
|
+
|
|
93
|
+
To use Plankton hooks in your own project:
|
|
94
|
+
|
|
95
|
+
1. Copy `.claude/hooks/` directory to your project
|
|
96
|
+
2. Copy `.claude/settings.json` hook configuration
|
|
97
|
+
3. Copy linter config files (`.ruff.toml`, `biome.json`, etc.)
|
|
98
|
+
4. Install the linters for your languages
|
|
99
|
+
|
|
100
|
+
### Language-Specific Dependencies
|
|
101
|
+
|
|
102
|
+
| Language | Required | Optional |
|
|
103
|
+
|----------|----------|----------|
|
|
104
|
+
| Python | `ruff`, `uv` | `ty` (types), `vulture` (dead code), `bandit` (security) |
|
|
105
|
+
| TypeScript/JS | `biome` | `oxlint`, `semgrep`, `knip` (dead exports) |
|
|
106
|
+
| Shell | `shellcheck`, `shfmt` | — |
|
|
107
|
+
| YAML | `yamllint` | — |
|
|
108
|
+
| Markdown | `markdownlint-cli2` | — |
|
|
109
|
+
| Dockerfile | `hadolint` (>= 2.12.0) | — |
|
|
110
|
+
| TOML | `taplo` | — |
|
|
111
|
+
| JSON | `jaq` | — |
|
|
112
|
+
|
|
113
|
+
## Pairing with ECC
|
|
114
|
+
|
|
115
|
+
### Complementary, Not Overlapping
|
|
116
|
+
|
|
117
|
+
| Concern | ECC | Plankton |
|
|
118
|
+
|---------|-----|----------|
|
|
119
|
+
| Code quality enforcement | PostToolUse hooks (Prettier, tsc) | PostToolUse hooks (20+ linters + subprocess fixes) |
|
|
120
|
+
| Security scanning | AgentShield, security-reviewer agent | Bandit (Python), Semgrep (TypeScript) |
|
|
121
|
+
| Config protection | — | PreToolUse blocks + Stop hook detection |
|
|
122
|
+
| Package manager | Detection + setup | Enforcement (blocks legacy PMs) |
|
|
123
|
+
| CI integration | — | Pre-commit hooks for git |
|
|
124
|
+
| Model routing | Manual (`/model opus`) | Automatic (violation complexity → tier) |
|
|
125
|
+
|
|
126
|
+
### Recommended Combination
|
|
127
|
+
|
|
128
|
+
1. Install ECC as your plugin (agents, skills, commands, rules)
|
|
129
|
+
2. Add Plankton hooks for write-time quality enforcement
|
|
130
|
+
3. Use AgentShield for security audits
|
|
131
|
+
4. Use ECC's verification-loop as a final gate before PRs
|
|
132
|
+
|
|
133
|
+
### Avoiding Hook Conflicts
|
|
134
|
+
|
|
135
|
+
If running both ECC and Plankton hooks:
|
|
136
|
+
- ECC's Prettier hook and Plankton's biome formatter may conflict on JS/TS files
|
|
137
|
+
- Resolution: disable ECC's Prettier PostToolUse hook when using Plankton (Plankton's biome is more comprehensive)
|
|
138
|
+
- Both can coexist on different file types (ECC handles what Plankton doesn't cover)
|
|
139
|
+
|
|
140
|
+
## Configuration Reference
|
|
141
|
+
|
|
142
|
+
Plankton's `.claude/hooks/config.json` controls all behavior:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"languages": {
|
|
147
|
+
"python": true,
|
|
148
|
+
"shell": true,
|
|
149
|
+
"yaml": true,
|
|
150
|
+
"json": true,
|
|
151
|
+
"toml": true,
|
|
152
|
+
"dockerfile": true,
|
|
153
|
+
"markdown": true,
|
|
154
|
+
"typescript": {
|
|
155
|
+
"enabled": true,
|
|
156
|
+
"js_runtime": "auto",
|
|
157
|
+
"biome_nursery": "warn",
|
|
158
|
+
"semgrep": true
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"phases": {
|
|
162
|
+
"auto_format": true,
|
|
163
|
+
"subprocess_delegation": true
|
|
164
|
+
},
|
|
165
|
+
"subprocess": {
|
|
166
|
+
"tiers": {
|
|
167
|
+
"haiku": { "timeout": 120, "max_turns": 10 },
|
|
168
|
+
"sonnet": { "timeout": 300, "max_turns": 10 },
|
|
169
|
+
"opus": { "timeout": 600, "max_turns": 15 }
|
|
170
|
+
},
|
|
171
|
+
"volume_threshold": 5
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Key settings:**
|
|
177
|
+
- Disable languages you don't use to speed up hooks
|
|
178
|
+
- `volume_threshold` — violations > this count auto-escalate to a higher model tier
|
|
179
|
+
- `subprocess_delegation: false` — skip Phase 3 entirely (just report violations)
|
|
180
|
+
|
|
181
|
+
## Environment Overrides
|
|
182
|
+
|
|
183
|
+
| Variable | Purpose |
|
|
184
|
+
|----------|---------|
|
|
185
|
+
| `HOOK_SKIP_SUBPROCESS=1` | Skip Phase 3, report violations directly |
|
|
186
|
+
| `HOOK_SUBPROCESS_TIMEOUT=N` | Override tier timeout |
|
|
187
|
+
| `HOOK_DEBUG_MODEL=1` | Log model selection decisions |
|
|
188
|
+
| `HOOK_SKIP_PM=1` | Bypass package manager enforcement |
|
|
189
|
+
|
|
190
|
+
## References
|
|
191
|
+
|
|
192
|
+
- Plankton (credit: @alxfazio)
|
|
193
|
+
- Plankton REFERENCE.md — Full architecture documentation (credit: @alxfazio)
|
|
194
|
+
- Plankton SETUP.md — Detailed installation guide (credit: @alxfazio)
|
|
195
|
+
|
|
196
|
+
## ECC v1.8 Additions
|
|
197
|
+
|
|
198
|
+
### Copyable Hook Profile
|
|
199
|
+
|
|
200
|
+
Set strict quality behavior:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
export ECC_HOOK_PROFILE=strict
|
|
204
|
+
export ECC_QUALITY_GATE_FIX=true
|
|
205
|
+
export ECC_QUALITY_GATE_STRICT=true
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Language Gate Table
|
|
209
|
+
|
|
210
|
+
- TypeScript/JavaScript: Biome preferred, Prettier fallback
|
|
211
|
+
- Python: Ruff format/check
|
|
212
|
+
- Go: gofmt
|
|
213
|
+
|
|
214
|
+
### Config Tamper Guard
|
|
215
|
+
|
|
216
|
+
During quality enforcement, flag changes to config files in same iteration:
|
|
217
|
+
|
|
218
|
+
- `biome.json`, `.eslintrc*`, `prettier.config*`, `tsconfig.json`, `pyproject.toml`
|
|
219
|
+
|
|
220
|
+
If config is changed to suppress violations, require explicit review before merge.
|
|
221
|
+
|
|
222
|
+
### CI Integration Pattern
|
|
223
|
+
|
|
224
|
+
Use the same commands in CI as local hooks:
|
|
225
|
+
|
|
226
|
+
1. run formatter checks
|
|
227
|
+
2. run lint/type checks
|
|
228
|
+
3. fail fast on strict mode
|
|
229
|
+
4. publish remediation summary
|
|
230
|
+
|
|
231
|
+
### Health Metrics
|
|
232
|
+
|
|
233
|
+
Track:
|
|
234
|
+
- edits flagged by gates
|
|
235
|
+
- average remediation time
|
|
236
|
+
- repeat violations by category
|
|
237
|
+
- merge blocks due to gate failures
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: postgres-patterns
|
|
3
|
+
description: PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices. Use when designing PostgreSQL schemas, indexes, or RLS policies, or when a query is too slow.
|
|
4
|
+
metadata:
|
|
5
|
+
origin: ECC
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# PostgreSQL Patterns
|
|
9
|
+
|
|
10
|
+
Quick reference for PostgreSQL best practices. For detailed guidance, use the `database-reviewer` agent.
|
|
11
|
+
|
|
12
|
+
## When to Activate
|
|
13
|
+
|
|
14
|
+
- Writing SQL queries or migrations
|
|
15
|
+
- Designing database schemas
|
|
16
|
+
- Troubleshooting slow queries
|
|
17
|
+
- Implementing Row Level Security
|
|
18
|
+
- Setting up connection pooling
|
|
19
|
+
|
|
20
|
+
## Quick Reference
|
|
21
|
+
|
|
22
|
+
### Index Cheat Sheet
|
|
23
|
+
|
|
24
|
+
| Query Pattern | Index Type | Example |
|
|
25
|
+
|--------------|------------|---------|
|
|
26
|
+
| `WHERE col = value` | B-tree (default) | `CREATE INDEX idx ON t (col)` |
|
|
27
|
+
| `WHERE col > value` | B-tree | `CREATE INDEX idx ON t (col)` |
|
|
28
|
+
| `WHERE a = x AND b > y` | Composite | `CREATE INDEX idx ON t (a, b)` |
|
|
29
|
+
| `WHERE jsonb @> '{}'` | GIN | `CREATE INDEX idx ON t USING gin (col)` |
|
|
30
|
+
| `WHERE tsv @@ query` | GIN | `CREATE INDEX idx ON t USING gin (col)` |
|
|
31
|
+
| Time-series ranges | BRIN | `CREATE INDEX idx ON t USING brin (col)` |
|
|
32
|
+
|
|
33
|
+
### Data Type Quick Reference
|
|
34
|
+
|
|
35
|
+
| Use Case | Correct Type | Avoid |
|
|
36
|
+
|----------|-------------|-------|
|
|
37
|
+
| IDs | `bigint` | `int`, random UUID |
|
|
38
|
+
| Strings | `text` | `varchar(255)` |
|
|
39
|
+
| Timestamps | `timestamptz` | `timestamp` |
|
|
40
|
+
| Money | `numeric(10,2)` | `float` |
|
|
41
|
+
| Flags | `boolean` | `varchar`, `int` |
|
|
42
|
+
|
|
43
|
+
### Common Patterns
|
|
44
|
+
|
|
45
|
+
**Composite Index Order:**
|
|
46
|
+
```sql
|
|
47
|
+
-- Equality columns first, then range columns
|
|
48
|
+
CREATE INDEX idx ON orders (status, created_at);
|
|
49
|
+
-- Works for: WHERE status = 'pending' AND created_at > '2024-01-01'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Covering Index:**
|
|
53
|
+
```sql
|
|
54
|
+
CREATE INDEX idx ON users (email) INCLUDE (name, created_at);
|
|
55
|
+
-- Avoids table lookup for SELECT email, name, created_at
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Partial Index:**
|
|
59
|
+
```sql
|
|
60
|
+
CREATE INDEX idx ON users (email) WHERE deleted_at IS NULL;
|
|
61
|
+
-- Smaller index, only includes active users
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**RLS Policy (Optimized):**
|
|
65
|
+
```sql
|
|
66
|
+
CREATE POLICY policy ON orders
|
|
67
|
+
USING ((SELECT auth.uid()) = user_id); -- Wrap in SELECT!
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**UPSERT:**
|
|
71
|
+
```sql
|
|
72
|
+
INSERT INTO settings (user_id, key, value)
|
|
73
|
+
VALUES (123, 'theme', 'dark')
|
|
74
|
+
ON CONFLICT (user_id, key)
|
|
75
|
+
DO UPDATE SET value = EXCLUDED.value;
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Cursor Pagination:**
|
|
79
|
+
```sql
|
|
80
|
+
SELECT * FROM products WHERE id > $last_id ORDER BY id LIMIT 20;
|
|
81
|
+
-- O(1) vs OFFSET which is O(n)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Queue Processing:**
|
|
85
|
+
```sql
|
|
86
|
+
UPDATE jobs SET status = 'processing'
|
|
87
|
+
WHERE id = (
|
|
88
|
+
SELECT id FROM jobs WHERE status = 'pending'
|
|
89
|
+
ORDER BY created_at LIMIT 1
|
|
90
|
+
FOR UPDATE SKIP LOCKED
|
|
91
|
+
) RETURNING *;
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Anti-Pattern Detection
|
|
95
|
+
|
|
96
|
+
```sql
|
|
97
|
+
-- Find unindexed foreign keys
|
|
98
|
+
SELECT conrelid::regclass, a.attname
|
|
99
|
+
FROM pg_constraint c
|
|
100
|
+
JOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = ANY(c.conkey)
|
|
101
|
+
WHERE c.contype = 'f'
|
|
102
|
+
AND NOT EXISTS (
|
|
103
|
+
SELECT 1 FROM pg_index i
|
|
104
|
+
WHERE i.indrelid = c.conrelid AND a.attnum = ANY(i.indkey)
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
-- Find slow queries
|
|
108
|
+
SELECT query, mean_exec_time, calls
|
|
109
|
+
FROM pg_stat_statements
|
|
110
|
+
WHERE mean_exec_time > 100
|
|
111
|
+
ORDER BY mean_exec_time DESC;
|
|
112
|
+
|
|
113
|
+
-- Check table bloat
|
|
114
|
+
SELECT relname, n_dead_tup, last_vacuum
|
|
115
|
+
FROM pg_stat_user_tables
|
|
116
|
+
WHERE n_dead_tup > 1000
|
|
117
|
+
ORDER BY n_dead_tup DESC;
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Configuration Template
|
|
121
|
+
|
|
122
|
+
```sql
|
|
123
|
+
-- Connection limits (adjust for RAM)
|
|
124
|
+
ALTER SYSTEM SET max_connections = 100;
|
|
125
|
+
ALTER SYSTEM SET work_mem = '8MB';
|
|
126
|
+
|
|
127
|
+
-- Timeouts
|
|
128
|
+
ALTER SYSTEM SET idle_in_transaction_session_timeout = '30s';
|
|
129
|
+
ALTER SYSTEM SET statement_timeout = '30s';
|
|
130
|
+
|
|
131
|
+
-- Monitoring
|
|
132
|
+
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
|
|
133
|
+
|
|
134
|
+
-- Security defaults
|
|
135
|
+
REVOKE ALL ON SCHEMA public FROM public;
|
|
136
|
+
|
|
137
|
+
SELECT pg_reload_conf();
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Related
|
|
141
|
+
|
|
142
|
+
- Agent: `database-reviewer` - Full database review workflow
|
|
143
|
+
- Skill: `clickhouse-io` - ClickHouse analytics patterns
|
|
144
|
+
- Skill: `backend-patterns` - API and backend patterns
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
*Based on Supabase Agent Skills (credit: Supabase team) (MIT License)*
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prediction-market-oracle-research
|
|
3
|
+
description: Research prediction markets as data sources or oracle signals for products, agents, dashboards, and corporate decision intelligence. Use for source-grounded analysis of market-implied probabilities, caveats, and integration patterns without investment advice. Use when evaluating prediction markets as a data source or oracle signal for a product, agent, or dashboard.
|
|
4
|
+
metadata:
|
|
5
|
+
origin: ECC
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Prediction Market Oracle Research
|
|
9
|
+
|
|
10
|
+
Use this skill when prediction markets are being considered as a data source,
|
|
11
|
+
forecasting input, oracle-like signal, or decision-intelligence layer.
|
|
12
|
+
|
|
13
|
+
## Guardrails
|
|
14
|
+
|
|
15
|
+
- Do not treat market prices as objective truth.
|
|
16
|
+
- Do not provide investment advice or trading recommendations.
|
|
17
|
+
- Separate venue mechanics, liquidity, incentives, and resolution rules from the
|
|
18
|
+
implied signal.
|
|
19
|
+
- Call out manipulation, thin liquidity, stale markets, and ambiguous outcomes.
|
|
20
|
+
- For on-chain or execution-linked systems, run `llm-trading-agent-security`
|
|
21
|
+
before granting any write authority.
|
|
22
|
+
|
|
23
|
+
## Research Workflow
|
|
24
|
+
|
|
25
|
+
1. Define the decision the signal is meant to inform.
|
|
26
|
+
2. Find relevant markets, events, tags, and venues.
|
|
27
|
+
3. Record market-implied probabilities with timestamps and source links.
|
|
28
|
+
4. Evaluate signal quality:
|
|
29
|
+
- liquidity
|
|
30
|
+
- spread
|
|
31
|
+
- market age
|
|
32
|
+
- trader/incentive concentration if known
|
|
33
|
+
- resolution authority
|
|
34
|
+
- geography or account restrictions
|
|
35
|
+
5. Compare against non-market sources such as filings, news, polls, research,
|
|
36
|
+
customer data, or internal KPIs.
|
|
37
|
+
6. Recommend whether the signal is usable, weak, or unsuitable for the stated
|
|
38
|
+
decision.
|
|
39
|
+
|
|
40
|
+
## Integration Patterns
|
|
41
|
+
|
|
42
|
+
- Research assistant: source-grounded context for a human analyst.
|
|
43
|
+
- Dashboard signal: market-implied probability alongside internal metrics.
|
|
44
|
+
- Agent memory input: a time-stamped signal that can be retrieved later.
|
|
45
|
+
- Alerting input: notify when probabilities, spreads, or liquidity cross a
|
|
46
|
+
threshold.
|
|
47
|
+
- Scenario planning: compare multiple event outcomes without automating trades.
|
|
48
|
+
|
|
49
|
+
## Output Contract
|
|
50
|
+
|
|
51
|
+
Use:
|
|
52
|
+
|
|
53
|
+
1. decision context
|
|
54
|
+
2. market sources
|
|
55
|
+
3. signal quality
|
|
56
|
+
4. comparison sources
|
|
57
|
+
5. integration recommendation
|
|
58
|
+
6. caveats
|
|
59
|
+
|
|
60
|
+
End with:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
Prediction-market signals are informational inputs, not investment advice.
|
|
64
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prediction-market-risk-review
|
|
3
|
+
description: Review prediction-market, basket, oracle, and trading-agent workflows for compliance, safety, data-quality, privacy, and execution risk. Use before any workflow handles venue auth, user portfolio data, API keys, or trade planning.
|
|
4
|
+
metadata:
|
|
5
|
+
origin: ECC
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Prediction Market Risk Review
|
|
9
|
+
|
|
10
|
+
Use this skill before a prediction-market workflow touches user financial
|
|
11
|
+
context, venue authentication, portfolio data, automation, or execution-capable
|
|
12
|
+
tools.
|
|
13
|
+
|
|
14
|
+
## Review Gates
|
|
15
|
+
|
|
16
|
+
### Advice Boundary
|
|
17
|
+
|
|
18
|
+
- Confirm the output is informational.
|
|
19
|
+
- Remove buy/sell/hold/size recommendations.
|
|
20
|
+
- Keep manual user decision points explicit.
|
|
21
|
+
|
|
22
|
+
### Venue And Regulatory Boundary
|
|
23
|
+
|
|
24
|
+
- Identify venue terms, geography restrictions, account limits, and API rules.
|
|
25
|
+
- Flag betting, derivatives, securities, or commodities ambiguity for legal
|
|
26
|
+
review when relevant.
|
|
27
|
+
- Do not bypass venue restrictions or rate limits.
|
|
28
|
+
|
|
29
|
+
### Data Quality
|
|
30
|
+
|
|
31
|
+
- Check market liquidity, spread, resolution rules, stale prices, and source
|
|
32
|
+
timestamps.
|
|
33
|
+
- Separate public venue data from Itô gated data.
|
|
34
|
+
- Do not mix public and private sources without labels.
|
|
35
|
+
|
|
36
|
+
### Security
|
|
37
|
+
|
|
38
|
+
- Do not request or store private keys, seed phrases, or passwords.
|
|
39
|
+
- Keep `ITO_API_KEY` and venue API keys out of logs and docs.
|
|
40
|
+
- Use read-only scopes by default.
|
|
41
|
+
- Require circuit breakers, spend limits, dry runs, and human approval before
|
|
42
|
+
any private implementation adds execution.
|
|
43
|
+
|
|
44
|
+
### Privacy
|
|
45
|
+
|
|
46
|
+
- Minimize user portfolio, financial, and knowledge-base data.
|
|
47
|
+
- Redact private sources in public artifacts.
|
|
48
|
+
- Preserve only the fields needed for the review.
|
|
49
|
+
|
|
50
|
+
## Output Contract
|
|
51
|
+
|
|
52
|
+
Return:
|
|
53
|
+
|
|
54
|
+
1. scope reviewed
|
|
55
|
+
2. pass/warn/fail findings
|
|
56
|
+
3. blocked actions
|
|
57
|
+
4. required mitigations
|
|
58
|
+
5. safe next step
|
|
59
|
+
|
|
60
|
+
If any execution-capable step is requested, require a separate implementation
|
|
61
|
+
plan and explicit user approval.
|