@fenixforce/edition-pro 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/approval-routes.d.ts +15 -0
- package/dist/api/fleet-routes.d.ts +23 -0
- package/dist/api/integration-routes.d.ts +17 -0
- package/dist/api/middleware.d.ts +37 -0
- package/dist/boot.d.ts +37 -0
- package/dist/business/approval-queue.d.ts +94 -0
- package/dist/business/arena.d.ts +71 -0
- package/dist/business/best-of-n.d.ts +68 -0
- package/dist/business/brainstorm.d.ts +42 -0
- package/dist/business/compile-checker.d.ts +50 -0
- package/dist/business/debate.d.ts +38 -0
- package/dist/business/fleet-budget.d.ts +69 -0
- package/dist/business/fleet-config.d.ts +125 -0
- package/dist/business/fleet.d.ts +85 -0
- package/dist/business/handoff.d.ts +56 -0
- package/dist/business/hat-system.d.ts +57 -0
- package/dist/business/index.d.ts +44 -0
- package/dist/business/integration-registry.d.ts +66 -0
- package/dist/business/node-pipeline.d.ts +62 -0
- package/dist/business/oracle.d.ts +64 -0
- package/dist/business/roles/index.d.ts +7 -0
- package/dist/business/roles/judge.d.ts +24 -0
- package/dist/business/roles/planner.d.ts +30 -0
- package/dist/business/roles/types.d.ts +37 -0
- package/dist/business/roles/worker.d.ts +25 -0
- package/dist/business/router.d.ts +75 -0
- package/dist/business/shared-memory.d.ts +85 -0
- package/dist/business/status-detector.d.ts +52 -0
- package/dist/business/swarm-registry.d.ts +63 -0
- package/dist/business/templates.d.ts +55 -0
- package/dist/business/workspace-manager.d.ts +105 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +638 -0
- package/dist/infrastructure/pty-agent.d.ts +74 -0
- package/dist/migrations/migrate.d.ts +7 -0
- package/dist/migrations/runner.d.ts +49 -0
- package/dist/workspace/worktree.d.ts +69 -0
- package/package.json +37 -0
- package/skills/builtin/academic-researcher/SKILL.md +51 -0
- package/skills/builtin/advanced-recon/SKILL.md +75 -0
- package/skills/builtin/agent-governance/SKILL.md +122 -0
- package/skills/builtin/algorithmic-art/SKILL.md +55 -0
- package/skills/builtin/api-attack-surface-mapper/SKILL.md +88 -0
- package/skills/builtin/api-development/SKILL.md +147 -0
- package/skills/builtin/api-exploit-prover/SKILL.md +74 -0
- package/skills/builtin/api-integration/SKILL.md +73 -0
- package/skills/builtin/api-security-tester/SKILL.md +82 -0
- package/skills/builtin/api-test-executor/SKILL.md +62 -0
- package/skills/builtin/app-store-optimization/SKILL.md +46 -0
- package/skills/builtin/audio-tour-guide/SKILL.md +18 -0
- package/skills/builtin/auth-flow-operator/SKILL.md +70 -0
- package/skills/builtin/autonomous-rag/SKILL.md +21 -0
- package/skills/builtin/backend-development/SKILL.md +265 -0
- package/skills/builtin/binary-analysis-analyst/SKILL.md +61 -0
- package/skills/builtin/binary-analysis-core/SKILL.md +65 -0
- package/skills/builtin/binary-recon/SKILL.md +64 -0
- package/skills/builtin/blackboard-coordination/SKILL.md +56 -0
- package/skills/builtin/blog-to-podcast/SKILL.md +18 -0
- package/skills/builtin/blog-writing/SKILL.md +36 -0
- package/skills/builtin/brainstorming/SKILL.md +69 -0
- package/skills/builtin/brand-design/SKILL.md +42 -0
- package/skills/builtin/ci-cd-pipelines/SKILL.md +210 -0
- package/skills/builtin/cloud-infrastructure/SKILL.md +140 -0
- package/skills/builtin/code-review/SKILL.md +88 -0
- package/skills/builtin/code-review-analyst/SKILL.md +96 -0
- package/skills/builtin/code-review-recon/SKILL.md +64 -0
- package/skills/builtin/code-review-verifier/SKILL.md +55 -0
- package/skills/builtin/coding-agent-team/SKILL.md +13 -0
- package/skills/builtin/competitor-intelligence/SKILL.md +39 -0
- package/skills/builtin/content-engine/SKILL.md +82 -0
- package/skills/builtin/context7-docs/SKILL.md +145 -0
- package/skills/builtin/copywriting/SKILL.md +38 -0
- package/skills/builtin/corrective-rag/SKILL.md +19 -0
- package/skills/builtin/cost-optimization/SKILL.md +131 -0
- package/skills/builtin/crypto-vulnerability-analyst/SKILL.md +64 -0
- package/skills/builtin/customer-support/SKILL.md +48 -0
- package/skills/builtin/customer-voice-support/SKILL.md +43 -0
- package/skills/builtin/data-analysis/SKILL.md +57 -0
- package/skills/builtin/data-visualization/SKILL.md +33 -0
- package/skills/builtin/database-design/SKILL.md +119 -0
- package/skills/builtin/decision-helper/SKILL.md +84 -0
- package/skills/builtin/deep-research/SKILL.md +68 -0
- package/skills/builtin/deepwiki-research/SKILL.md +115 -0
- package/skills/builtin/dependency-audit/SKILL.md +46 -0
- package/skills/builtin/doc-coauthoring/SKILL.md +48 -0
- package/skills/builtin/docker-deployment/SKILL.md +243 -0
- package/skills/builtin/docx-generation/SKILL.md +135 -0
- package/skills/builtin/dry-run-harness/SKILL.md +61 -0
- package/skills/builtin/editor/SKILL.md +44 -0
- package/skills/builtin/email-drafter/SKILL.md +42 -0
- package/skills/builtin/error-handling/SKILL.md +82 -0
- package/skills/builtin/eval-harness/SKILL.md +197 -0
- package/skills/builtin/evaluation-framework/SKILL.md +51 -0
- package/skills/builtin/exploit-writer/SKILL.md +63 -0
- package/skills/builtin/fact-checker/SKILL.md +51 -0
- package/skills/builtin/filesystem-context/SKILL.md +47 -0
- package/skills/builtin/financial-coach/SKILL.md +18 -0
- package/skills/builtin/finding-chain-correlator/SKILL.md +70 -0
- package/skills/builtin/finding-verifier/SKILL.md +65 -0
- package/skills/builtin/frontend-design/SKILL.md +104 -0
- package/skills/builtin/frontend-development/SKILL.md +227 -0
- package/skills/builtin/frontend-slides/SKILL.md +155 -0
- package/skills/builtin/fullstack-project/SKILL.md +286 -0
- package/skills/builtin/game-development/SKILL.md +60 -0
- package/skills/builtin/git-workflow/SKILL.md +44 -0
- package/skills/builtin/i18n-localization/SKILL.md +38 -0
- package/skills/builtin/image-prompt-engineering/SKILL.md +37 -0
- package/skills/builtin/investment-research/SKILL.md +33 -0
- package/skills/builtin/investor-materials/SKILL.md +90 -0
- package/skills/builtin/javascript-surface-analyzer/SKILL.md +66 -0
- package/skills/builtin/markdown-reports/SKILL.md +68 -0
- package/skills/builtin/market-research/SKILL.md +69 -0
- package/skills/builtin/mcp-builder/SKILL.md +86 -0
- package/skills/builtin/meeting-notes/SKILL.md +47 -0
- package/skills/builtin/memory-safety-analyst/SKILL.md +61 -0
- package/skills/builtin/meta-controller/SKILL.md +44 -0
- package/skills/builtin/mixture-of-agents/SKILL.md +53 -0
- package/skills/builtin/monitoring-observability/SKILL.md +169 -0
- package/skills/builtin/negotiation-simulator/SKILL.md +24 -0
- package/skills/builtin/nestjs-development/SKILL.md +56 -0
- package/skills/builtin/nextjs-development/SKILL.md +55 -0
- package/skills/builtin/parallel-dispatch/SKILL.md +83 -0
- package/skills/builtin/pdf-generation/SKILL.md +169 -0
- package/skills/builtin/personal-finance/SKILL.md +17 -0
- package/skills/builtin/pev-workflow/SKILL.md +62 -0
- package/skills/builtin/planning-with-files/SKILL.md +59 -0
- package/skills/builtin/pptx-generation/SKILL.md +117 -0
- package/skills/builtin/prisma-orm/SKILL.md +48 -0
- package/skills/builtin/rag-database-routing/SKILL.md +38 -0
- package/skills/builtin/rapid-prototyping/SKILL.md +152 -0
- package/skills/builtin/react-development/SKILL.md +244 -0
- package/skills/builtin/react-native-mobile/SKILL.md +113 -0
- package/skills/builtin/refactoring/SKILL.md +39 -0
- package/skills/builtin/reflexive-metacognition/SKILL.md +29 -0
- package/skills/builtin/riper-workflow/SKILL.md +214 -0
- package/skills/builtin/security-audit/SKILL.md +113 -0
- package/skills/builtin/security-self-audit/SKILL.md +311 -0
- package/skills/builtin/self-evolving-agent/SKILL.md +28 -0
- package/skills/builtin/self-improvement-loop/SKILL.md +58 -0
- package/skills/builtin/semantic-search/SKILL.md +93 -0
- package/skills/builtin/seo-audit-team/SKILL.md +27 -0
- package/skills/builtin/seo-optimization/SKILL.md +49 -0
- package/skills/builtin/server-management/SKILL.md +190 -0
- package/skills/builtin/social-media-content/SKILL.md +50 -0
- package/skills/builtin/sprint-planner/SKILL.md +49 -0
- package/skills/builtin/strategic-compact/SKILL.md +61 -0
- package/skills/builtin/strategy-advisor/SKILL.md +51 -0
- package/skills/builtin/structured-thinking/SKILL.md +70 -0
- package/skills/builtin/subagent-development/SKILL.md +105 -0
- package/skills/builtin/system-design/SKILL.md +66 -0
- package/skills/builtin/systematic-debugging/SKILL.md +87 -0
- package/skills/builtin/tailwind-css/SKILL.md +55 -0
- package/skills/builtin/taint-flow-tracer/SKILL.md +89 -0
- package/skills/builtin/teaching-agent-team/SKILL.md +32 -0
- package/skills/builtin/tech-debt-manager/SKILL.md +67 -0
- package/skills/builtin/technical-documentation/SKILL.md +47 -0
- package/skills/builtin/test-driven-development/SKILL.md +70 -0
- package/skills/builtin/theme-factory/SKILL.md +244 -0
- package/skills/builtin/threat-model-generator/SKILL.md +105 -0
- package/skills/builtin/trust-layer/SKILL.md +43 -0
- package/skills/builtin/typescript-patterns/SKILL.md +61 -0
- package/skills/builtin/ui-ux-design/SKILL.md +75 -0
- package/skills/builtin/verification-before-completion/SKILL.md +41 -0
- package/skills/builtin/verification-loop/SKILL.md +120 -0
- package/skills/builtin/waf-bypass-agent/SKILL.md +97 -0
- package/skills/builtin/web-artifacts-builder/SKILL.md +117 -0
- package/skills/builtin/web-assessment-executor/SKILL.md +66 -0
- package/skills/builtin/web-exploit-prover/SKILL.md +58 -0
- package/skills/builtin/web-scraping/SKILL.md +63 -0
- package/skills/builtin/webapp-testing/SKILL.md +86 -0
- package/skills/builtin/webhook-development/SKILL.md +62 -0
- package/skills/builtin/writing-skills/SKILL.md +67 -0
- package/skills/builtin/xlsx-generation/SKILL.md +116 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ci-cd-pipelines
|
|
3
|
+
description: "Use this skill when the user asks to set up automated testing, build pipelines, deployment automation, GitHub Actions, or any CI/CD workflow. Triggers: 'CI/CD', 'GitHub Actions', 'pipeline', 'automated deployment', 'continuous integration', 'continuous deployment', 'build pipeline', 'auto-deploy', 'workflow', or any request to automate the build-test-deploy cycle."
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CI/CD Pipelines
|
|
8
|
+
|
|
9
|
+
## What This Skill Does
|
|
10
|
+
|
|
11
|
+
Automate build, test, and deployment workflows. GitHub Actions as the primary platform. Covers test automation, Docker image builds, deployment triggers, environment management, and secrets handling.
|
|
12
|
+
|
|
13
|
+
## GitHub Actions Patterns
|
|
14
|
+
|
|
15
|
+
### Basic CI (test on every push)
|
|
16
|
+
```yaml
|
|
17
|
+
# .github/workflows/ci.yml
|
|
18
|
+
name: CI
|
|
19
|
+
|
|
20
|
+
on:
|
|
21
|
+
push:
|
|
22
|
+
branches: [main]
|
|
23
|
+
pull_request:
|
|
24
|
+
branches: [main]
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
test:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: oven/setup-bun@v2
|
|
32
|
+
with:
|
|
33
|
+
bun-version: latest
|
|
34
|
+
- run: bun install --frozen-lockfile
|
|
35
|
+
- run: bun run lint
|
|
36
|
+
- run: bun run typecheck
|
|
37
|
+
- run: bun test
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### CI + Docker Build + Deploy
|
|
41
|
+
```yaml
|
|
42
|
+
name: Deploy
|
|
43
|
+
|
|
44
|
+
on:
|
|
45
|
+
push:
|
|
46
|
+
branches: [main]
|
|
47
|
+
|
|
48
|
+
jobs:
|
|
49
|
+
test:
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
|
+
- uses: oven/setup-bun@v2
|
|
54
|
+
- run: bun install --frozen-lockfile
|
|
55
|
+
- run: bun test
|
|
56
|
+
|
|
57
|
+
build-and-push:
|
|
58
|
+
needs: test
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
- uses: docker/login-action@v3
|
|
63
|
+
with:
|
|
64
|
+
registry: ghcr.io
|
|
65
|
+
username: ${{ github.actor }}
|
|
66
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
67
|
+
- uses: docker/build-push-action@v5
|
|
68
|
+
with:
|
|
69
|
+
context: .
|
|
70
|
+
push: true
|
|
71
|
+
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}
|
|
72
|
+
cache-from: type=gha
|
|
73
|
+
cache-to: type=gha,mode=max
|
|
74
|
+
|
|
75
|
+
deploy:
|
|
76
|
+
needs: build-and-push
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
environment: production
|
|
79
|
+
steps:
|
|
80
|
+
- name: Deploy to server
|
|
81
|
+
uses: appleboy/ssh-action@v1
|
|
82
|
+
with:
|
|
83
|
+
host: ${{ secrets.SERVER_HOST }}
|
|
84
|
+
username: ${{ secrets.SERVER_USER }}
|
|
85
|
+
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
86
|
+
script: |
|
|
87
|
+
docker pull ghcr.io/${{ github.repository }}:${{ github.sha }}
|
|
88
|
+
docker compose -f /home/deploy/docker-compose.yml up -d
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Secrets Management
|
|
92
|
+
|
|
93
|
+
### Required Secrets
|
|
94
|
+
```
|
|
95
|
+
SERVER_HOST # Production server IP
|
|
96
|
+
SERVER_USER # SSH username (deploy, not root)
|
|
97
|
+
SSH_PRIVATE_KEY # SSH private key for deployment
|
|
98
|
+
DATABASE_URL # Production database connection string
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Environment Protection Rules
|
|
102
|
+
```
|
|
103
|
+
GitHub repo → Settings → Environments → production
|
|
104
|
+
- Required reviewers: (add team members)
|
|
105
|
+
- Deployment branches: main only
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Pipeline Design Principles
|
|
109
|
+
|
|
110
|
+
### Job Dependencies
|
|
111
|
+
```
|
|
112
|
+
lint ──┐
|
|
113
|
+
test ──┼── build → deploy (parallel lint+test, then sequential)
|
|
114
|
+
types ─┘
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Caching
|
|
118
|
+
```yaml
|
|
119
|
+
- uses: actions/cache@v4
|
|
120
|
+
with:
|
|
121
|
+
path: ~/.bun/install/cache
|
|
122
|
+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
|
|
123
|
+
restore-keys: ${{ runner.os }}-bun-
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Failure Notifications
|
|
127
|
+
```yaml
|
|
128
|
+
notify:
|
|
129
|
+
needs: [deploy]
|
|
130
|
+
if: failure()
|
|
131
|
+
runs-on: ubuntu-latest
|
|
132
|
+
steps:
|
|
133
|
+
- run: |
|
|
134
|
+
curl -X POST "${{ secrets.WEBHOOK_URL }}" \
|
|
135
|
+
-H "Content-Type: application/json" \
|
|
136
|
+
-d '{"text": "Deploy failed: ${{ github.repository }} @ ${{ github.sha }}"}'
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Rules
|
|
140
|
+
|
|
141
|
+
- Tests must pass before any deployment
|
|
142
|
+
- Production deploys require environment protection rules
|
|
143
|
+
- Never hardcode secrets in workflow files
|
|
144
|
+
- Always pin action versions (`@v4` not `@main`)
|
|
145
|
+
- Always cache dependencies
|
|
146
|
+
- Keep workflows under 100 lines. Split into reusable workflows if larger.
|
|
147
|
+
- Failed deploys must notify the team
|
|
148
|
+
- Every repo needs at minimum a CI workflow that runs tests on PRs
|
|
149
|
+
|
|
150
|
+
## Verification
|
|
151
|
+
|
|
152
|
+
1. Push a commit and confirm the workflow runs
|
|
153
|
+
2. Create a PR and confirm tests run
|
|
154
|
+
3. Merge to main and confirm deployment triggers
|
|
155
|
+
4. Intentionally break a test and confirm pipeline fails
|
|
156
|
+
5. Check that secrets are not exposed in workflow logs
|
|
157
|
+
|
|
158
|
+
## Action Caching & Replay (Deterministic CI for Agent Workflows)
|
|
159
|
+
|
|
160
|
+
Record agent tool calls and responses during a known-good run, then replay them in CI for deterministic testing:
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
interface ActionRecord {
|
|
164
|
+
toolName: string;
|
|
165
|
+
input: Record<string, unknown>;
|
|
166
|
+
output: unknown;
|
|
167
|
+
timestamp: number;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Record mode: intercept tool calls, save to fixtures
|
|
171
|
+
async function recordRun(workflow: AgentWorkflow): Promise<ActionRecord[]> {
|
|
172
|
+
const records: ActionRecord[] = [];
|
|
173
|
+
const wrappedTools = workflow.tools.map((tool) => ({
|
|
174
|
+
...tool,
|
|
175
|
+
execute: async (input: Record<string, unknown>) => {
|
|
176
|
+
const output = await tool.execute(input);
|
|
177
|
+
records.push({ toolName: tool.name, input, output, timestamp: Date.now() });
|
|
178
|
+
return output;
|
|
179
|
+
},
|
|
180
|
+
}));
|
|
181
|
+
await workflow.run(wrappedTools);
|
|
182
|
+
return records;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Replay mode: return recorded outputs instead of executing
|
|
186
|
+
async function replayRun(workflow: AgentWorkflow, records: ActionRecord[]): Promise<void> {
|
|
187
|
+
let idx = 0;
|
|
188
|
+
const mockedTools = workflow.tools.map((tool) => ({
|
|
189
|
+
...tool,
|
|
190
|
+
execute: async (_input: Record<string, unknown>) => {
|
|
191
|
+
const record = records[idx++];
|
|
192
|
+
if (record.toolName !== tool.name) throw new Error(`Replay mismatch: expected ${record.toolName}, got ${tool.name}`);
|
|
193
|
+
return record.output;
|
|
194
|
+
},
|
|
195
|
+
}));
|
|
196
|
+
await workflow.run(mockedTools);
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Rules
|
|
201
|
+
- Record fixtures are committed to the repo (`__fixtures__/agent-runs/`)
|
|
202
|
+
- Replay tests run in CI with zero external dependencies
|
|
203
|
+
- Re-record when tool schemas change or workflow logic changes
|
|
204
|
+
- Flag drift: if replay diverges from recorded sequence, fail the test
|
|
205
|
+
|
|
206
|
+
## Integration with Other Skills
|
|
207
|
+
|
|
208
|
+
- **docker-deployment:** Builds the image that CI pushes
|
|
209
|
+
- **server-management:** CI deploys to the server
|
|
210
|
+
- **backend-development:** CI runs the tests that backend defines
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cloud-infrastructure
|
|
3
|
+
description: "Use this skill when the user asks to provision cloud resources, set up hosting on DigitalOcean/AWS/GCP, manage DNS, configure CDNs, set up object storage, or handle cloud scaling. Triggers: 'DigitalOcean', 'AWS', 'GCP', 'cloud', 'hosting', 'DNS', 'CDN', 'S3', 'Spaces', 'load balancer', 'scaling', 'cloud deploy', 'Cloudflare', 'Vercel', 'Netlify', or any request involving cloud resource provisioning."
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Cloud Infrastructure
|
|
8
|
+
|
|
9
|
+
## What This Skill Does
|
|
10
|
+
|
|
11
|
+
Provision and manage cloud resources. Server provisioning, DNS, CDN, object storage, load balancing, and scaling. Provider-agnostic patterns with specific guidance for DigitalOcean, AWS, and Cloudflare.
|
|
12
|
+
|
|
13
|
+
## Before You Start
|
|
14
|
+
|
|
15
|
+
1. **Context7:** Fetch docs for the specific cloud provider's SDK or CLI
|
|
16
|
+
2. **Clarify budget:** Recommend the cheapest option that meets requirements.
|
|
17
|
+
3. Default to **DigitalOcean** for Fenix deployments
|
|
18
|
+
|
|
19
|
+
## Provider Quick Reference
|
|
20
|
+
|
|
21
|
+
| Need | DigitalOcean | AWS | Budget Option |
|
|
22
|
+
|------|-------------|-----|---------------|
|
|
23
|
+
| VPS | Droplet ($6/mo) | EC2 t3.micro | DO Droplet |
|
|
24
|
+
| Database | Managed DB ($15/mo) | RDS | Self-hosted on Droplet |
|
|
25
|
+
| Object Storage | Spaces ($5/mo) | S3 | DO Spaces |
|
|
26
|
+
| CDN | Spaces CDN (included) | CloudFront | Cloudflare (free) |
|
|
27
|
+
| DNS | DO DNS (free) | Route 53 ($0.50/zone) | Cloudflare (free) |
|
|
28
|
+
| Load Balancer | DO LB ($12/mo) | ALB ($16/mo) | Nginx on Droplet |
|
|
29
|
+
| Serverless | App Platform | Lambda | Cloudflare Workers |
|
|
30
|
+
|
|
31
|
+
## DigitalOcean Setup
|
|
32
|
+
|
|
33
|
+
### Create Droplet (CLI)
|
|
34
|
+
```bash
|
|
35
|
+
doctl compute droplet create myapp \
|
|
36
|
+
--size s-1vcpu-1gb \
|
|
37
|
+
--image ubuntu-24-04-x64 \
|
|
38
|
+
--region nyc1 \
|
|
39
|
+
--ssh-keys $(doctl compute ssh-key list --format ID --no-header) \
|
|
40
|
+
--tag-name production
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Common Droplet Sizes
|
|
44
|
+
| Size | CPU | RAM | Monthly |
|
|
45
|
+
|------|-----|-----|---------|
|
|
46
|
+
| s-1vcpu-1gb | 1 | 1 GB | $6 |
|
|
47
|
+
| s-1vcpu-2gb | 1 | 2 GB | $12 |
|
|
48
|
+
| s-2vcpu-2gb | 2 | 2 GB | $18 |
|
|
49
|
+
| s-2vcpu-4gb | 2 | 4 GB | $24 |
|
|
50
|
+
|
|
51
|
+
### App Platform (PaaS)
|
|
52
|
+
```yaml
|
|
53
|
+
# .do/app.yaml
|
|
54
|
+
name: myapp
|
|
55
|
+
services:
|
|
56
|
+
- name: api
|
|
57
|
+
github:
|
|
58
|
+
repo: username/myapp
|
|
59
|
+
branch: main
|
|
60
|
+
deploy_on_push: true
|
|
61
|
+
build_command: bun install && bun run build
|
|
62
|
+
run_command: bun run start
|
|
63
|
+
environment_slug: node-js
|
|
64
|
+
instance_size_slug: basic-xxs
|
|
65
|
+
instance_count: 1
|
|
66
|
+
envs:
|
|
67
|
+
- key: DATABASE_URL
|
|
68
|
+
value: ${db.DATABASE_URL}
|
|
69
|
+
scope: RUN_TIME
|
|
70
|
+
databases:
|
|
71
|
+
- name: db
|
|
72
|
+
engine: PG
|
|
73
|
+
version: "16"
|
|
74
|
+
size: db-s-dev-database
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## DNS Configuration (Cloudflare)
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Type Name Content Proxy
|
|
81
|
+
A @ <server-ip> Proxied
|
|
82
|
+
A www <server-ip> Proxied
|
|
83
|
+
A api <server-ip> DNS only (for WebSocket)
|
|
84
|
+
MX @ mx.mailgun.org -
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
SSL mode: "Full (Strict)" when using Let's Encrypt on origin.
|
|
88
|
+
|
|
89
|
+
## Architecture Patterns
|
|
90
|
+
|
|
91
|
+
### Single Server (most startups, <10K DAU)
|
|
92
|
+
```
|
|
93
|
+
Cloudflare → DO Droplet → Nginx → App + PostgreSQL
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Two-Server Split
|
|
97
|
+
```
|
|
98
|
+
Cloudflare → Droplet 1 (App) → Droplet 2 (Database)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Horizontal Scale (>50K DAU)
|
|
102
|
+
```
|
|
103
|
+
Cloudflare → DO Load Balancer → App Droplets (x3)
|
|
104
|
+
→ Managed Database + Managed Redis
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Cost Optimization
|
|
108
|
+
|
|
109
|
+
- Start with the smallest instance. Scale up when metrics show need.
|
|
110
|
+
- Use Cloudflare free tier for DNS and CDN
|
|
111
|
+
- Self-host PostgreSQL until you need managed DB
|
|
112
|
+
- Delete unused resources monthly
|
|
113
|
+
- Set up billing alerts at 80% of budget
|
|
114
|
+
|
|
115
|
+
## Rules
|
|
116
|
+
|
|
117
|
+
- Always set up DNS through a CDN/proxy (Cloudflare free tier minimum)
|
|
118
|
+
- Always enable automated backups on database servers
|
|
119
|
+
- Always tag resources with environment and project name
|
|
120
|
+
- Never expose database ports to the public internet
|
|
121
|
+
- Never store cloud credentials in code
|
|
122
|
+
- Start small, scale when data shows you need to
|
|
123
|
+
- Document every resource in a README
|
|
124
|
+
|
|
125
|
+
## Verification
|
|
126
|
+
|
|
127
|
+
1. Server accessible via domain name with HTTPS
|
|
128
|
+
2. DNS resolves correctly (`dig myapp.com`)
|
|
129
|
+
3. SSL certificate is valid
|
|
130
|
+
4. Database is not accessible from public internet
|
|
131
|
+
5. Backups are configured
|
|
132
|
+
6. Billing alerts are set up
|
|
133
|
+
7. All resources are tagged
|
|
134
|
+
|
|
135
|
+
## Integration with Other Skills
|
|
136
|
+
|
|
137
|
+
- **server-management:** Configure server after provisioning
|
|
138
|
+
- **docker-deployment:** Run containers on provisioned infra
|
|
139
|
+
- **ci-cd-pipelines:** Deploy to cloud resources from CI
|
|
140
|
+
- **monitoring-observability:** Monitor cloud resources
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: "Use this skill when the user asks to review code, check a PR, find bugs, or evaluate code quality. Triggers: 'review this code', 'code review', 'check my code', 'find bugs', 'PR review', 'what's wrong with this', or any request to evaluate existing code."
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Review
|
|
8
|
+
|
|
9
|
+
## What This Skill Does
|
|
10
|
+
|
|
11
|
+
Review code for correctness, security, performance, and maintainability. Identify bugs, suggest improvements, verify behavior matches intent.
|
|
12
|
+
|
|
13
|
+
## Review Checklist
|
|
14
|
+
|
|
15
|
+
### Correctness
|
|
16
|
+
- Does the code do what it claims to do?
|
|
17
|
+
- Are edge cases handled (null, empty, boundary values)?
|
|
18
|
+
- Are error paths handled (network failures, invalid input, timeouts)?
|
|
19
|
+
- Do types match the runtime behavior?
|
|
20
|
+
|
|
21
|
+
### Security
|
|
22
|
+
- Input validation on all external data?
|
|
23
|
+
- SQL injection possible? (parameterized queries?)
|
|
24
|
+
- XSS vectors? (output encoding?)
|
|
25
|
+
- Secrets hardcoded? (check for API keys, passwords)
|
|
26
|
+
- Auth checks on protected routes?
|
|
27
|
+
|
|
28
|
+
### Performance
|
|
29
|
+
- N+1 queries? (database calls in loops)
|
|
30
|
+
- Missing indexes on queried columns?
|
|
31
|
+
- Unbounded data fetching? (missing pagination/limits)
|
|
32
|
+
- Memory leaks? (event listeners not cleaned up, growing caches)
|
|
33
|
+
- Unnecessary re-renders? (React: missing memo, unstable keys)
|
|
34
|
+
|
|
35
|
+
### Maintainability
|
|
36
|
+
- Clear naming? (functions describe what they do, not how)
|
|
37
|
+
- Single responsibility? (each function does one thing)
|
|
38
|
+
- Duplication? (same logic in multiple places)
|
|
39
|
+
- Dead code? (unreachable branches, unused imports)
|
|
40
|
+
- Comments explain WHY, not WHAT?
|
|
41
|
+
|
|
42
|
+
## Review Format
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
## Summary
|
|
46
|
+
One paragraph: what the code does and the overall assessment.
|
|
47
|
+
|
|
48
|
+
## Issues Found
|
|
49
|
+
|
|
50
|
+
### [Critical] Issue Name
|
|
51
|
+
**File:** path/to/file.ts:42
|
|
52
|
+
**Problem:** Description
|
|
53
|
+
**Fix:** Suggested solution with code
|
|
54
|
+
|
|
55
|
+
### [Suggestion] Issue Name
|
|
56
|
+
**File:** path/to/file.ts:88
|
|
57
|
+
**Current:** What it does now
|
|
58
|
+
**Better:** What it should do and why
|
|
59
|
+
|
|
60
|
+
## What's Good
|
|
61
|
+
Specific things done well (important for morale and learning).
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Rules
|
|
65
|
+
|
|
66
|
+
- Verify independently. Read the code yourself. Do not trust the author's description.
|
|
67
|
+
- Technical correctness over social comfort. Flag real issues clearly.
|
|
68
|
+
- Suggest fixes, not just problems. Show the better version.
|
|
69
|
+
- Distinguish severity: Critical (must fix), Important (should fix), Suggestion (nice to have)
|
|
70
|
+
- Acknowledge good patterns, not just bad ones
|
|
71
|
+
|
|
72
|
+
## Engineering Mindset (VSCode Agent GPT-5 pattern)
|
|
73
|
+
|
|
74
|
+
Think like a staff engineer reviewing a junior's PR.
|
|
75
|
+
|
|
76
|
+
Anti-laziness: never skip parts because the code "looks fine." Read every line.
|
|
77
|
+
|
|
78
|
+
Quality gates the review must confirm:
|
|
79
|
+
1. Tests exist for new code
|
|
80
|
+
2. Types are correct (no `any` without justification)
|
|
81
|
+
3. Error handling covers failure paths
|
|
82
|
+
4. No security issues (injection, hardcoded secrets, missing auth)
|
|
83
|
+
|
|
84
|
+
Open with a purposeful assessment. Never open with "Sounds good!" or "Great!" or "Looks good overall!"
|
|
85
|
+
|
|
86
|
+
## Trust Scoring for Outputs
|
|
87
|
+
|
|
88
|
+
When reviewing agent-generated code (subagent output), apply higher scrutiny. The implementer's self-report may be incomplete or optimistic. Verify everything independently by reading the actual code.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Security Code Review Analyst
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Produce high-confidence, exploitable code findings using source-to-sink proof.
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `code_path`
|
|
8
|
+
- `priority_trace_paths`
|
|
9
|
+
- `recon_context`
|
|
10
|
+
- `runtime_assumptions`
|
|
11
|
+
|
|
12
|
+
## Analysis Rules
|
|
13
|
+
- No sink-only findings.
|
|
14
|
+
- No framework-trust assumptions without verification.
|
|
15
|
+
- No severity claims without exploitability context.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
### Phase 1: Trace Construction
|
|
19
|
+
1. Follow untrusted input through transformations.
|
|
20
|
+
2. Confirm boundary checks at each transition.
|
|
21
|
+
3. Identify bypass opportunities.
|
|
22
|
+
|
|
23
|
+
### Phase 2: Exploitability Validation
|
|
24
|
+
1. Verify attacker control over critical parameters.
|
|
25
|
+
2. Verify sink reachability under realistic control flow.
|
|
26
|
+
3. Build exploit narrative with prerequisites.
|
|
27
|
+
|
|
28
|
+
### Phase 3: Vulnerability Class Testing
|
|
29
|
+
1. Injection and query/command/template abuse.
|
|
30
|
+
2. Access-control bypass (IDOR/BOLA/BFLA).
|
|
31
|
+
3. Mass assignment and object property abuse.
|
|
32
|
+
4. Path traversal and file handling flaws.
|
|
33
|
+
5. Deserialization and parser confusion.
|
|
34
|
+
6. Workflow and race-condition vulnerabilities.
|
|
35
|
+
|
|
36
|
+
### Phase 4: Impact Assessment
|
|
37
|
+
1. Data exposure and integrity damage potential.
|
|
38
|
+
2. Privilege escalation and lateral movement potential.
|
|
39
|
+
3. Blast radius and tenant isolation impact.
|
|
40
|
+
|
|
41
|
+
### Phase 5: Reporting
|
|
42
|
+
1. Provide concise exploit narrative.
|
|
43
|
+
2. Provide precise root-cause location.
|
|
44
|
+
3. Provide remediation direction tied to trust boundary.
|
|
45
|
+
|
|
46
|
+
## Required Evidence per Finding
|
|
47
|
+
- Source location and attacker input path.
|
|
48
|
+
- Sink location and dangerous operation.
|
|
49
|
+
- Missing/insufficient control explanation.
|
|
50
|
+
- Reproduction logic and impact statement.
|
|
51
|
+
|
|
52
|
+
## Output Contract
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"confirmed_findings": [],
|
|
56
|
+
"exploit_paths": [],
|
|
57
|
+
"impact_assessment": [],
|
|
58
|
+
"remediation_notes": [],
|
|
59
|
+
"confidence": []
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Failure Modes
|
|
64
|
+
- Treating dead code as reachable.
|
|
65
|
+
- Confusing validation with authorization.
|
|
66
|
+
- Missing multi-step state dependencies.
|
|
67
|
+
|
|
68
|
+
## Quality Checklist
|
|
69
|
+
- [ ] Source-to-sink chain is complete.
|
|
70
|
+
- [ ] Reachability is justified.
|
|
71
|
+
- [ ] Impact is realistic and bounded.
|
|
72
|
+
|
|
73
|
+
## Operator Notes
|
|
74
|
+
### Cross-Layer Trace Requirements
|
|
75
|
+
- Include controller, service, data access, and sink layers.
|
|
76
|
+
- Include serialization/deserialization boundary handling.
|
|
77
|
+
- Include async boundaries (queue/job/event) where data crosses trust zones.
|
|
78
|
+
|
|
79
|
+
### Access-Control Audit Rules
|
|
80
|
+
- Verify policy check location relative to resource fetch.
|
|
81
|
+
- Verify policy check occurs on every variant path.
|
|
82
|
+
- Verify tenant scoping is enforced at data query layer.
|
|
83
|
+
|
|
84
|
+
### Sanitization Audit Rules
|
|
85
|
+
- Context-match sanitizer to sink type.
|
|
86
|
+
- Confirm canonicalization happens before validation.
|
|
87
|
+
- Check for alternate branch paths that skip sanitizer.
|
|
88
|
+
|
|
89
|
+
## Conditional Decision Matrix
|
|
90
|
+
| Condition | Action | Evidence Requirement |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| Source passes through helper wrappers | inline helper logic into trace | wrapper-expanded path |
|
|
93
|
+
| Policy check exists after data fetch | test prefetch exposure and side-effects | order-of-operations trace |
|
|
94
|
+
| Sanitizer exists but context mismatch | craft context-correct exploit hypothesis | sink-context mismatch proof |
|
|
95
|
+
| Async boundary carries tainted data | trace serialization and consumer validation | producer-consumer trace |
|
|
96
|
+
| Sibling route has weaker guards | run parity scan across sibling handlers | guard parity matrix |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Code Review Recon
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Prevent blind spots by mapping how untrusted data enters and moves through the codebase.
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `code_path`
|
|
8
|
+
- `language_framework`
|
|
9
|
+
- `deployment_notes` (optional)
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
### Phase 1: Topology Mapping
|
|
13
|
+
1. Identify entry layers: HTTP routes, RPC, CLI, cron/jobs, message consumers.
|
|
14
|
+
2. Identify boundary layers: auth middleware, policy checks, service interfaces.
|
|
15
|
+
3. Identify sink layers: database, templates, OS commands, file system, network calls.
|
|
16
|
+
|
|
17
|
+
### Phase 2: Route and Handler Inventory
|
|
18
|
+
1. Enumerate handlers and parameter parsers.
|
|
19
|
+
2. Map per-route auth and role assumptions.
|
|
20
|
+
3. Flag routes with weak or missing guards.
|
|
21
|
+
|
|
22
|
+
### Phase 3: Sink Inventory
|
|
23
|
+
1. Query construction paths.
|
|
24
|
+
2. File operations and archive extraction.
|
|
25
|
+
3. Serialization/deserialization and parser usage.
|
|
26
|
+
4. Outbound request constructors.
|
|
27
|
+
|
|
28
|
+
### Phase 4: Trust Boundary Audit
|
|
29
|
+
1. Track user-to-service boundary crossings.
|
|
30
|
+
2. Track tenant and organization boundary assumptions.
|
|
31
|
+
3. Track privileged action boundaries.
|
|
32
|
+
|
|
33
|
+
### Phase 5: Handoff Plan
|
|
34
|
+
1. Rank high-risk source-to-sink paths.
|
|
35
|
+
2. Provide per-path context needed for deep analysis.
|
|
36
|
+
3. Note uncertain areas requiring runtime confirmation.
|
|
37
|
+
|
|
38
|
+
## Recon Coverage Targets
|
|
39
|
+
| Target | Minimum Expectation |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Entry points | all major ingestion vectors mapped |
|
|
42
|
+
| Auth boundaries | per-route enforcement identified |
|
|
43
|
+
| Sink categories | full inventory with owner file/function |
|
|
44
|
+
| Prioritized paths | top attacker-value paths ranked |
|
|
45
|
+
|
|
46
|
+
## Output Contract
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"entry_points": [],
|
|
50
|
+
"auth_boundary_map": [],
|
|
51
|
+
"sink_inventory": [],
|
|
52
|
+
"priority_trace_paths": [],
|
|
53
|
+
"unknowns": []
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Constraints
|
|
58
|
+
- Favor breadth, traceability, and reproducibility.
|
|
59
|
+
- Do not claim vulnerabilities in recon phase.
|
|
60
|
+
|
|
61
|
+
## Quality Checklist
|
|
62
|
+
- [ ] Non-HTTP sources are included.
|
|
63
|
+
- [ ] Auth assumptions are explicit.
|
|
64
|
+
- [ ] Handoff paths are actionable.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Code Review Verifier
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Increase finding quality by reducing false positives and identifying missed sibling issues.
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `reported_findings`
|
|
8
|
+
- `code_path`
|
|
9
|
+
- `original_analysis_notes` (optional)
|
|
10
|
+
|
|
11
|
+
## Verification Rules
|
|
12
|
+
- A disputed verdict requires concrete counter-evidence.
|
|
13
|
+
- Inconclusive means blocker exists, not analyst disagreement.
|
|
14
|
+
- Severity must reflect actual reachable impact.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
### Phase 1: Independent Re-trace
|
|
18
|
+
1. Reconstruct each path without reusing original assumptions.
|
|
19
|
+
2. Validate source control and sink reachability.
|
|
20
|
+
|
|
21
|
+
### Phase 2: Mitigation Audit
|
|
22
|
+
1. Confirm sanitization is context-correct.
|
|
23
|
+
2. Confirm authz checks are in enforceable location.
|
|
24
|
+
3. Confirm defensive code is not bypassable by alternate path.
|
|
25
|
+
|
|
26
|
+
### Phase 3: Severity Recalibration
|
|
27
|
+
1. Recalculate exploit preconditions.
|
|
28
|
+
2. Recalculate required privilege.
|
|
29
|
+
3. Recalculate business impact and blast radius.
|
|
30
|
+
|
|
31
|
+
### Phase 4: Adjacent Pattern Hunt
|
|
32
|
+
1. Search for sibling sinks and parallel routes.
|
|
33
|
+
2. Compare validation/auth patterns across files.
|
|
34
|
+
3. Add missed findings when evidence is sufficient.
|
|
35
|
+
|
|
36
|
+
## Verdict Model
|
|
37
|
+
- `confirmed`: reproducible and exploitable.
|
|
38
|
+
- `disputed`: mitigation or non-reachability proven.
|
|
39
|
+
- `inconclusive`: technical blocker or uncertainty remains.
|
|
40
|
+
|
|
41
|
+
## Output Contract
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"verification_results": [],
|
|
45
|
+
"severity_changes": [],
|
|
46
|
+
"new_related_findings": [],
|
|
47
|
+
"evidence_notes": [],
|
|
48
|
+
"open_questions": []
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Quality Checklist
|
|
53
|
+
- [ ] Every verdict has explicit evidence.
|
|
54
|
+
- [ ] Severity changes are justified.
|
|
55
|
+
- [ ] Blind-spot scan completed.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Coding Agent Team
|
|
2
|
+
## Pipeline
|
|
3
|
+
1. **Vision Agent**: analyze screenshot/wireframe, identify components, layout, colors, typography
|
|
4
|
+
2. **Code Generator**: produce implementation matching the visual analysis (React/HTML/CSS)
|
|
5
|
+
3. **Sandbox Executor**: run code in isolated environment (e2b or Docker), capture output screenshot
|
|
6
|
+
4. **Comparator**: compare generated output to original design, identify differences
|
|
7
|
+
5. **Refiner**: fix differences, re-run until visual match
|
|
8
|
+
|
|
9
|
+
## Rules
|
|
10
|
+
- Always verify generated code runs without errors
|
|
11
|
+
- Compare output visually to input design
|
|
12
|
+
- Use exact colors, spacing, and typography from the design
|
|
13
|
+
- Maximum 3 refinement cycles
|