tribunal-kit 2.4.6 → 3.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/.agent/ARCHITECTURE.md +99 -99
- package/.agent/GEMINI.md +52 -52
- package/.agent/agents/accessibility-reviewer.md +139 -86
- package/.agent/agents/ai-code-reviewer.md +160 -90
- package/.agent/agents/backend-specialist.md +164 -127
- package/.agent/agents/code-archaeologist.md +115 -73
- package/.agent/agents/database-architect.md +130 -110
- package/.agent/agents/debugger.md +137 -97
- package/.agent/agents/dependency-reviewer.md +78 -30
- package/.agent/agents/devops-engineer.md +161 -118
- package/.agent/agents/documentation-writer.md +151 -87
- package/.agent/agents/explorer-agent.md +117 -99
- package/.agent/agents/frontend-reviewer.md +127 -47
- package/.agent/agents/frontend-specialist.md +169 -109
- package/.agent/agents/game-developer.md +28 -164
- package/.agent/agents/logic-reviewer.md +87 -49
- package/.agent/agents/mobile-developer.md +151 -103
- package/.agent/agents/mobile-reviewer.md +133 -50
- package/.agent/agents/orchestrator.md +121 -110
- package/.agent/agents/penetration-tester.md +103 -77
- package/.agent/agents/performance-optimizer.md +136 -92
- package/.agent/agents/performance-reviewer.md +139 -69
- package/.agent/agents/product-manager.md +104 -70
- package/.agent/agents/product-owner.md +6 -25
- package/.agent/agents/project-planner.md +95 -95
- package/.agent/agents/qa-automation-engineer.md +174 -87
- package/.agent/agents/security-auditor.md +133 -129
- package/.agent/agents/seo-specialist.md +160 -99
- package/.agent/agents/sql-reviewer.md +132 -44
- package/.agent/agents/supervisor-agent.md +137 -109
- package/.agent/agents/swarm-worker-contracts.md +17 -17
- package/.agent/agents/swarm-worker-registry.md +46 -46
- package/.agent/agents/test-coverage-reviewer.md +132 -53
- package/.agent/agents/test-engineer.md +0 -21
- package/.agent/agents/type-safety-reviewer.md +143 -33
- package/.agent/patterns/generator.md +9 -9
- package/.agent/patterns/inversion.md +12 -12
- package/.agent/patterns/pipeline.md +9 -9
- package/.agent/patterns/reviewer.md +13 -13
- package/.agent/patterns/tool-wrapper.md +9 -9
- package/.agent/rules/GEMINI.md +63 -63
- package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
- package/.agent/scripts/compress_skills.py +167 -0
- package/.agent/scripts/consolidate_skills.py +173 -0
- package/.agent/scripts/deep_compress.py +202 -0
- package/.agent/scripts/minify_context.py +80 -0
- package/.agent/scripts/security_scan.py +1 -1
- package/.agent/scripts/strip_tribunal.py +41 -0
- package/.agent/skills/agent-organizer/SKILL.md +60 -100
- package/.agent/skills/agentic-patterns/SKILL.md +0 -70
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +108 -53
- package/.agent/skills/api-patterns/SKILL.md +197 -257
- package/.agent/skills/api-security-auditor/SKILL.md +125 -57
- package/.agent/skills/app-builder/SKILL.md +326 -50
- package/.agent/skills/app-builder/templates/SKILL.md +13 -15
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
- package/.agent/skills/appflow-wireframe/SKILL.md +71 -98
- package/.agent/skills/architecture/SKILL.md +161 -200
- package/.agent/skills/authentication-best-practices/SKILL.md +121 -54
- package/.agent/skills/bash-linux/SKILL.md +71 -166
- package/.agent/skills/behavioral-modes/SKILL.md +8 -69
- package/.agent/skills/brainstorming/SKILL.md +345 -127
- package/.agent/skills/building-native-ui/SKILL.md +125 -57
- package/.agent/skills/clean-code/SKILL.md +266 -149
- package/.agent/skills/code-review-checklist/SKILL.md +0 -62
- package/.agent/skills/config-validator/SKILL.md +73 -131
- package/.agent/skills/csharp-developer/SKILL.md +434 -73
- package/.agent/skills/database-design/SKILL.md +190 -275
- package/.agent/skills/deployment-procedures/SKILL.md +81 -158
- package/.agent/skills/devops-engineer/SKILL.md +255 -94
- package/.agent/skills/devops-incident-responder/SKILL.md +50 -69
- package/.agent/skills/doc.md +5 -5
- package/.agent/skills/documentation-templates/SKILL.md +19 -63
- package/.agent/skills/edge-computing/SKILL.md +75 -165
- package/.agent/skills/extract-design-system/SKILL.md +84 -58
- package/.agent/skills/framer-motion-expert/SKILL.md +195 -0
- package/.agent/skills/frontend-design/SKILL.md +151 -499
- package/.agent/skills/game-design-expert/SKILL.md +71 -0
- package/.agent/skills/game-engineering-expert/SKILL.md +88 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +52 -178
- package/.agent/skills/github-operations/SKILL.md +197 -272
- package/.agent/skills/gsap-expert/SKILL.md +194 -0
- package/.agent/skills/i18n-localization/SKILL.md +60 -172
- package/.agent/skills/intelligent-routing/SKILL.md +123 -103
- package/.agent/skills/lint-and-validate/SKILL.md +8 -52
- package/.agent/skills/llm-engineering/SKILL.md +281 -195
- package/.agent/skills/local-first/SKILL.md +76 -159
- package/.agent/skills/mcp-builder/SKILL.md +48 -188
- package/.agent/skills/mobile-design/SKILL.md +213 -219
- package/.agent/skills/motion-engineering/SKILL.md +184 -0
- package/.agent/skills/nextjs-react-expert/SKILL.md +184 -203
- package/.agent/skills/nodejs-best-practices/SKILL.md +403 -185
- package/.agent/skills/observability/SKILL.md +211 -203
- package/.agent/skills/parallel-agents/SKILL.md +53 -146
- package/.agent/skills/performance-profiling/SKILL.md +171 -151
- package/.agent/skills/plan-writing/SKILL.md +49 -153
- package/.agent/skills/platform-engineer/SKILL.md +57 -103
- package/.agent/skills/playwright-best-practices/SKILL.md +110 -63
- package/.agent/skills/powershell-windows/SKILL.md +61 -179
- package/.agent/skills/python-patterns/SKILL.md +7 -35
- package/.agent/skills/python-pro/SKILL.md +273 -114
- package/.agent/skills/react-specialist/SKILL.md +227 -108
- package/.agent/skills/readme-builder/SKILL.md +15 -85
- package/.agent/skills/realtime-patterns/SKILL.md +216 -243
- package/.agent/skills/red-team-tactics/SKILL.md +10 -51
- package/.agent/skills/rust-pro/SKILL.md +525 -142
- package/.agent/skills/seo-fundamentals/SKILL.md +92 -153
- package/.agent/skills/server-management/SKILL.md +110 -166
- package/.agent/skills/shadcn-ui-expert/SKILL.md +154 -55
- package/.agent/skills/skill-creator/SKILL.md +18 -58
- package/.agent/skills/sql-pro/SKILL.md +543 -68
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +28 -68
- package/.agent/skills/swiftui-expert/SKILL.md +124 -57
- package/.agent/skills/systematic-debugging/SKILL.md +49 -151
- package/.agent/skills/tailwind-patterns/SKILL.md +433 -149
- package/.agent/skills/tdd-workflow/SKILL.md +63 -169
- package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
- package/.agent/skills/testing-patterns/SKILL.md +437 -130
- package/.agent/skills/trend-researcher/SKILL.md +30 -71
- package/.agent/skills/ui-ux-pro-max/SKILL.md +0 -41
- package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
- package/.agent/skills/vue-expert/SKILL.md +225 -119
- package/.agent/skills/vulnerability-scanner/SKILL.md +264 -226
- package/.agent/skills/web-accessibility-auditor/SKILL.md +141 -58
- package/.agent/skills/web-design-guidelines/SKILL.md +17 -61
- package/.agent/skills/webapp-testing/SKILL.md +71 -196
- package/.agent/skills/whimsy-injector/SKILL.md +58 -132
- package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
- package/.agent/workflows/api-tester.md +96 -224
- package/.agent/workflows/audit.md +81 -122
- package/.agent/workflows/brainstorm.md +69 -105
- package/.agent/workflows/changelog.md +65 -97
- package/.agent/workflows/create.md +73 -88
- package/.agent/workflows/debug.md +80 -111
- package/.agent/workflows/deploy.md +119 -92
- package/.agent/workflows/enhance.md +80 -91
- package/.agent/workflows/fix.md +68 -97
- package/.agent/workflows/generate.md +165 -164
- package/.agent/workflows/migrate.md +106 -109
- package/.agent/workflows/orchestrate.md +103 -86
- package/.agent/workflows/performance-benchmarker.md +77 -268
- package/.agent/workflows/plan.md +120 -98
- package/.agent/workflows/preview.md +39 -96
- package/.agent/workflows/refactor.md +105 -97
- package/.agent/workflows/review-ai.md +63 -102
- package/.agent/workflows/review.md +71 -110
- package/.agent/workflows/session.md +53 -113
- package/.agent/workflows/status.md +42 -88
- package/.agent/workflows/strengthen-skills.md +90 -51
- package/.agent/workflows/swarm.md +114 -129
- package/.agent/workflows/test.md +125 -102
- package/.agent/workflows/tribunal-backend.md +60 -78
- package/.agent/workflows/tribunal-database.md +62 -100
- package/.agent/workflows/tribunal-frontend.md +62 -82
- package/.agent/workflows/tribunal-full.md +56 -100
- package/.agent/workflows/tribunal-mobile.md +65 -94
- package/.agent/workflows/tribunal-performance.md +62 -105
- package/.agent/workflows/ui-ux-pro-max.md +72 -121
- package/README.md +11 -15
- package/package.json +1 -1
- package/.agent/skills/api-patterns/api-style.md +0 -42
- package/.agent/skills/api-patterns/auth.md +0 -24
- package/.agent/skills/api-patterns/documentation.md +0 -26
- package/.agent/skills/api-patterns/graphql.md +0 -41
- package/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/.agent/skills/api-patterns/response.md +0 -37
- package/.agent/skills/api-patterns/rest.md +0 -40
- package/.agent/skills/api-patterns/security-testing.md +0 -122
- package/.agent/skills/api-patterns/trpc.md +0 -41
- package/.agent/skills/api-patterns/versioning.md +0 -22
- package/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/.agent/skills/app-builder/feature-building.md +0 -53
- package/.agent/skills/app-builder/project-detection.md +0 -34
- package/.agent/skills/app-builder/scaffolding.md +0 -118
- package/.agent/skills/app-builder/tech-stack.md +0 -40
- package/.agent/skills/architecture/context-discovery.md +0 -43
- package/.agent/skills/architecture/examples.md +0 -94
- package/.agent/skills/architecture/pattern-selection.md +0 -68
- package/.agent/skills/architecture/patterns-reference.md +0 -50
- package/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
- package/.agent/skills/database-design/database-selection.md +0 -43
- package/.agent/skills/database-design/indexing.md +0 -39
- package/.agent/skills/database-design/migrations.md +0 -48
- package/.agent/skills/database-design/optimization.md +0 -36
- package/.agent/skills/database-design/orm-selection.md +0 -30
- package/.agent/skills/database-design/schema-design.md +0 -56
- package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
- package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
- package/.agent/skills/frontend-design/animation-guide.md +0 -331
- package/.agent/skills/frontend-design/color-system.md +0 -329
- package/.agent/skills/frontend-design/decision-trees.md +0 -418
- package/.agent/skills/frontend-design/motion-graphics.md +0 -306
- package/.agent/skills/frontend-design/typography-system.md +0 -363
- package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
- package/.agent/skills/frontend-design/visual-effects.md +0 -383
- package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
- package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
- package/.agent/skills/game-development/SKILL.md +0 -236
- package/.agent/skills/game-development/game-art/SKILL.md +0 -185
- package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
- package/.agent/skills/game-development/game-design/SKILL.md +0 -129
- package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
- package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
- package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
- package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
- package/.agent/skills/game-development/web-games/SKILL.md +0 -150
- package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
- package/.agent/skills/mobile-design/decision-trees.md +0 -516
- package/.agent/skills/mobile-design/mobile-backend.md +0 -491
- package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
- package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
- package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
- package/.agent/skills/mobile-design/mobile-performance.md +0 -767
- package/.agent/skills/mobile-design/mobile-testing.md +0 -356
- package/.agent/skills/mobile-design/mobile-typography.md +0 -433
- package/.agent/skills/mobile-design/platform-android.md +0 -666
- package/.agent/skills/mobile-design/platform-ios.md +0 -561
- package/.agent/skills/mobile-design/touch-psychology.md +0 -537
- package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
|
@@ -1,181 +1,120 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: seo-fundamentals
|
|
3
|
-
description: SEO
|
|
3
|
+
description: Search Engine Optimization (SEO) mastery. Metadata implementation, Open Graph (OG) social card rendering, semantic HTML5 structuring, canonicalization, Core Web Vitals performance mapping, Sitemap/Robots configurations, structured data (JSON-LD), and Next.js SSR SEO implementations. Use when auditing site visibility or building consumer-facing web architectures.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version:
|
|
6
|
-
last-updated: 2026-
|
|
5
|
+
version: 2.0.0
|
|
6
|
+
last-updated: 2026-04-02
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# SEO Fundamentals
|
|
11
|
-
|
|
12
|
-
> SEO is not a trick. It is the practice of making content genuinely useful
|
|
13
|
-
> for the people searching for it, and technically accessible to the crawlers that index it.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## What Search Engines Actually Rank
|
|
18
|
-
|
|
19
|
-
Google's stated ranking factors, simplified:
|
|
20
|
-
|
|
21
|
-
1. **Relevance** — does the content match the search intent?
|
|
22
|
-
2. **Quality** — is it accurate, original, and valuable?
|
|
23
|
-
3. **Authority** — do other credible sources link to it?
|
|
24
|
-
4. **Experience** — is the page fast and easy to use?
|
|
25
|
-
|
|
26
|
-
The manipulation era is over. Keyword stuffing gets pages penalized. Thin AI-generated content is actively filtered. The only reliable long-term SEO is making something worth ranking.
|
|
10
|
+
# SEO Fundamentals — Visibility & Discoverability Mastery
|
|
27
11
|
|
|
28
12
|
---
|
|
29
13
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
## 1. Core Meta Architecture (The Next.js 15 Standard)
|
|
15
|
+
|
|
16
|
+
Do not use legacy `next/head` tags scattered across components. Use the built-in Metadata API explicitly.
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
// app/blog/[slug]/page.tsx
|
|
20
|
+
import { Metadata } from 'next';
|
|
21
|
+
|
|
22
|
+
export async function generateMetadata({ params }): Promise<Metadata> {
|
|
23
|
+
const post = await fetchPost(params.slug);
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
title: `${post.title} | MyBrand`,
|
|
27
|
+
description: post.excerpt,
|
|
28
|
+
keywords: post.tags,
|
|
29
|
+
alternates: {
|
|
30
|
+
canonical: `https://www.example.com/blog/${params.slug}`
|
|
31
|
+
},
|
|
32
|
+
openGraph: {
|
|
33
|
+
title: post.title,
|
|
34
|
+
description: post.excerpt,
|
|
35
|
+
type: 'article',
|
|
36
|
+
url: `https://example.com/blog/${params.slug}`,
|
|
37
|
+
images: [{ url: post.coverImageUrl, width: 1200, height: 630 }],
|
|
38
|
+
},
|
|
39
|
+
twitter: {
|
|
40
|
+
card: 'summary_large_image', // Critical for big Twitter link previews
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
```
|
|
42
45
|
|
|
43
46
|
---
|
|
44
47
|
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
### Page-Level Requirements
|
|
48
|
-
|
|
49
|
-
```html
|
|
50
|
-
<!-- Title: 50–60 chars, includes primary keyword -->
|
|
51
|
-
<title>Tribunal Agent Kit — Anti-Hallucination AI Tools</title>
|
|
52
|
-
|
|
53
|
-
<!-- Description: 120–160 chars, actionable, includes keyword -->
|
|
54
|
-
<meta name="description" content="Install the Tribunal Kit with npx tribunal-kit init.
|
|
55
|
-
27 specialist agents and 17 slash commands for Cursor, Windsurf, and Antigravity.">
|
|
48
|
+
## 2. Semantic HTML & Heading Hierarchy
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
<h1>Anti-Hallucination Agent Kit for AI IDEs</h1>
|
|
50
|
+
Google establishes context by parsing the DOM outline. A massive application constructed purely of `<div className="text-xl font-bold">` tags will be heavily penalized.
|
|
59
51
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<!-- Open Graph (social sharing) -->
|
|
64
|
-
<meta property="og:title" content="...">
|
|
65
|
-
<meta property="og:description" content="...">
|
|
66
|
-
<meta property="og:image" content="https://yoursite.com/og-image.jpg">
|
|
67
|
-
```
|
|
52
|
+
1. **The H1 Law:** Exactly ONE `<h1>` per page. This is the primary subject.
|
|
53
|
+
2. **Hierarchy Integrity:** Never skip heading levels. An `<h2>` MUST precede an `<h3>`. Do not use heading tags for visual sizing; use them purely for document structure.
|
|
54
|
+
3. **Semantic Tags:** Wrap headers in `<header>`, menus in `<nav>`, main content in `<main>`, and sidebars in `<aside>`.
|
|
68
55
|
|
|
69
|
-
### Core Web Vitals (2025 Targets)
|
|
70
|
-
|
|
71
|
-
| Metric | Good | Needs Work | Poor |
|
|
72
|
-
|---|---|---|---|
|
|
73
|
-
| LCP (Largest Contentful Paint) | < 2.5s | 2.5–4s | > 4s |
|
|
74
|
-
| INP (Interaction to Next Paint) | < 200ms | 200–500ms | > 500ms |
|
|
75
|
-
| CLS (Cumulative Layout Shift) | < 0.1 | 0.1–0.25 | > 0.25 |
|
|
76
|
-
|
|
77
|
-
**Most common LCP fix:** The hero image or heading is the LCP element. Preload it:
|
|
78
56
|
```html
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
57
|
+
<!-- ✅ GOOD: Perfect SEO Document Outline -->
|
|
58
|
+
<main>
|
|
59
|
+
<article>
|
|
60
|
+
<h1>The Future of AI Agents</h1>
|
|
61
|
+
<p>Introduction...</p>
|
|
62
|
+
|
|
63
|
+
<h2>Architectural Patterns</h2>
|
|
64
|
+
<section>
|
|
65
|
+
<h3>The Supervisor Pattern</h3>
|
|
66
|
+
<p>Content regarding supervisors...</p>
|
|
67
|
+
</section>
|
|
68
|
+
</article>
|
|
69
|
+
</main>
|
|
85
70
|
```
|
|
86
71
|
|
|
87
72
|
---
|
|
88
73
|
|
|
89
|
-
##
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
74
|
+
## 3. Structured Data (JSON-LD)
|
|
75
|
+
|
|
76
|
+
Help search engines understand exact data graphs (Products, Reviews, Articles, Jobs) bypassingly standard text crawling. Inject standard `Schema.org` JSON-LD.
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
// Injecting JSON-LD structurally into a React/Next component
|
|
80
|
+
export default function ProductPage({ product }) {
|
|
81
|
+
const jsonLd = {
|
|
82
|
+
'@context': 'https://schema.org',
|
|
83
|
+
'@type': 'Product',
|
|
84
|
+
name: product.name,
|
|
85
|
+
image: product.image,
|
|
86
|
+
description: product.description,
|
|
87
|
+
offers: {
|
|
88
|
+
'@type': 'Offer',
|
|
89
|
+
price: product.price,
|
|
90
|
+
priceCurrency: 'USD',
|
|
91
|
+
availability: product.inStock ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<section>
|
|
97
|
+
{/* Script injected cleanly into DOM */}
|
|
98
|
+
<script
|
|
99
|
+
type="application/ld+json"
|
|
100
|
+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
<h1>{product.name}</h1>
|
|
104
|
+
{/* ... rest of UI ... */}
|
|
105
|
+
</section>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
103
108
|
```
|
|
104
109
|
|
|
105
110
|
---
|
|
106
111
|
|
|
107
|
-
##
|
|
108
|
-
|
|
109
|
-
- **Keyword stuffing** — unreadable text written for bots; penalized
|
|
110
|
-
- **Thin content** — pages with nothing to say; filtered
|
|
111
|
-
- **Duplicate content** — same content on multiple URLs without canonical; splits authority
|
|
112
|
-
- **Hidden text** — same color as background, `display:none` with keywords; penalized
|
|
113
|
-
- **Link schemes** — buying links; can result in manual penalty
|
|
112
|
+
## 4. Robots & Sitemaps
|
|
114
113
|
|
|
115
|
-
|
|
114
|
+
If a page shouldn't be indexed (e.g., dynamic search result matrices, user profiles), you must explicitly block it, otherwise Googlebot wastes "Crawl Budget" on infinite URLs.
|
|
116
115
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|---|---|---|
|
|
121
|
-
| `scripts/seo_checker.py` | Audits page-level technical SEO | `python scripts/seo_checker.py <url>` |
|
|
116
|
+
- **`robots.txt`**: Denies crawling of specific directories.
|
|
117
|
+
- **`<meta name="robots" content="noindex, nofollow">`**: Denies indexing of a specific page instance.
|
|
118
|
+
- **`sitemap.xml`**: A programmatic manifest mapped to root guiding crawlers mathematically through all valid indexable paths.
|
|
122
119
|
|
|
123
120
|
---
|
|
124
|
-
|
|
125
|
-
## Output Format
|
|
126
|
-
|
|
127
|
-
When this skill produces a recommendation or design decision, structure your output as:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
━━━ Seo Fundamentals Recommendation ━━━━━━━━━━━━━━━━
|
|
131
|
-
Decision: [what was chosen / proposed]
|
|
132
|
-
Rationale: [why — one concise line]
|
|
133
|
-
Trade-offs: [what is consciously accepted]
|
|
134
|
-
Next action: [concrete next step for the user]
|
|
135
|
-
─────────────────────────────────────────────────
|
|
136
|
-
Pre-Flight: ✅ All checks passed
|
|
137
|
-
or ❌ [blocking item that must be resolved first]
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## 🤖 LLM-Specific Traps
|
|
145
|
-
|
|
146
|
-
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
147
|
-
|
|
148
|
-
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
149
|
-
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
150
|
-
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
151
|
-
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
152
|
-
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
157
|
-
|
|
158
|
-
**Slash command: `/review` or `/tribunal-full`**
|
|
159
|
-
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
160
|
-
|
|
161
|
-
### ❌ Forbidden AI Tropes
|
|
162
|
-
|
|
163
|
-
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
164
|
-
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
165
|
-
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
166
|
-
|
|
167
|
-
### ✅ Pre-Flight Self-Audit
|
|
168
|
-
|
|
169
|
-
Review these questions before confirming output:
|
|
170
|
-
```
|
|
171
|
-
✅ Did I rely ONLY on real, verified tools and methods?
|
|
172
|
-
✅ Is this solution appropriately scoped to the user's constraints?
|
|
173
|
-
✅ Did I handle potential failure modes and edge cases?
|
|
174
|
-
✅ Have I avoided generic boilerplate that doesn't add value?
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
178
|
-
|
|
179
|
-
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
180
|
-
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
181
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -1,212 +1,156 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: server-management
|
|
3
|
-
description:
|
|
3
|
+
description: Production Linux server administration mastery. Systemd services, Nginx reverse proxy architecture, UFW firewalls, SSH key security, cron scheduling, log rotation, and server hardening. Use when configuring bare-metal, VPS instances, or reviewing deployment architecture.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version:
|
|
6
|
-
last-updated: 2026-
|
|
5
|
+
version: 2.0.0
|
|
6
|
+
last-updated: 2026-04-02
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# Server Management
|
|
11
|
-
|
|
12
|
-
> A server you can't observe is a server you can't operate.
|
|
13
|
-
> Monitoring is not optional — it is how you find out about problems before your users do.
|
|
10
|
+
# Server Management — Production Linux Mastery
|
|
14
11
|
|
|
15
12
|
---
|
|
16
13
|
|
|
17
|
-
## Process
|
|
18
|
-
|
|
19
|
-
Never run Node.js or Python processes directly in production with `node app.js`. Use a process manager.
|
|
14
|
+
## 1. Systemd Service Architecture (Process Guard)
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|---|---|---|
|
|
23
|
-
| PM2 | Single-server Node.js | Auto-restart, log rotation, cluster mode |
|
|
24
|
-
| systemd | Linux servers, any language | Native to most Linux distros, reliable |
|
|
25
|
-
| Supervisor | Python, Ruby, any language | Simple config, battle-tested |
|
|
26
|
-
| Docker (+restart policy) | Containerized apps | Portable, consistent across environments |
|
|
16
|
+
Do not use `pm2`, `forever`, or custom `screen` sessions attached to SSH panels for server orchestration. Linux provides an enterprise-grade init system natively: systemd.
|
|
27
17
|
|
|
28
|
-
|
|
18
|
+
```ini
|
|
19
|
+
# /etc/systemd/system/myapp.service
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
pm2 startup # generates the command to run at boot
|
|
35
|
-
```
|
|
21
|
+
[Unit]
|
|
22
|
+
Description=My Application Node.js Server
|
|
23
|
+
Documentation=https://example.com/docs
|
|
24
|
+
After=network.target postgresql.service # Ensure DB and Network start first
|
|
36
25
|
|
|
37
|
-
|
|
26
|
+
[Service]
|
|
27
|
+
Type=simple
|
|
28
|
+
User=appuser # NEVER run as root
|
|
29
|
+
Group=appuser
|
|
30
|
+
WorkingDirectory=/var/www/myapp
|
|
38
31
|
|
|
39
|
-
|
|
32
|
+
# Explicitly declare environment limits and variables
|
|
33
|
+
Environment=NODE_ENV=production
|
|
34
|
+
Environment=PORT=3000
|
|
35
|
+
EnvironmentFile=/var/www/myapp/.env
|
|
40
36
|
|
|
41
|
-
The
|
|
37
|
+
# The execution target
|
|
38
|
+
ExecStart=/usr/bin/node /var/www/myapp/build/index.js
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
| Response time | P95 latency > SLA threshold |
|
|
47
|
-
| Error rate | Error rate > 2x baseline |
|
|
48
|
-
| Disk usage | > 80% full |
|
|
49
|
-
| Memory | Growing without bound (memory leak) |
|
|
50
|
-
| CPU | Sustained > 80% for more than 5 minutes |
|
|
40
|
+
# Immortal behavior: Restart strictly on failure
|
|
41
|
+
Restart=on-failure
|
|
42
|
+
RestartSec=5
|
|
51
43
|
|
|
52
|
-
|
|
44
|
+
# Security Hardening
|
|
45
|
+
NoNewPrivileges=yes
|
|
46
|
+
PrivateTmp=yes
|
|
47
|
+
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
## Log Management
|
|
57
|
-
|
|
58
|
-
Logs are useless without structure. Structured logs can be queried and aggregated.
|
|
59
|
-
|
|
60
|
-
```ts
|
|
61
|
-
// ❌ Unstructured — hard to query
|
|
62
|
-
console.log(`User ${userId} failed to login at ${new Date()}`);
|
|
63
|
-
|
|
64
|
-
// ✅ Structured — can be filtered, aggregated, alerted on
|
|
65
|
-
logger.warn('login_failed', {
|
|
66
|
-
userId,
|
|
67
|
-
ip: req.ip,
|
|
68
|
-
reason: 'invalid_password',
|
|
69
|
-
timestamp: new Date().toISOString(),
|
|
70
|
-
});
|
|
49
|
+
[Install]
|
|
50
|
+
WantedBy=multi-user.target
|
|
71
51
|
```
|
|
72
52
|
|
|
73
|
-
**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
**Never log:**
|
|
80
|
-
- Passwords, tokens, or full credit card numbers
|
|
81
|
-
- PII without a documented retention policy
|
|
82
|
-
- Full request bodies on auth endpoints
|
|
53
|
+
**Commands:**
|
|
54
|
+
`sudo systemctl daemon-reload`
|
|
55
|
+
`sudo systemctl enable myapp`
|
|
56
|
+
`sudo systemctl start myapp`
|
|
57
|
+
`journalctl -u myapp -f` (Follow logs seamlessly)
|
|
83
58
|
|
|
84
59
|
---
|
|
85
60
|
|
|
86
|
-
##
|
|
61
|
+
## 2. Nginx Reverse Proxy Architecture
|
|
87
62
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
**Is the bottleneck identified?**
|
|
91
|
-
- Profile first. Is it CPU, memory, database, or network?
|
|
92
|
-
- Scaling horizontally when the bottleneck is a single database query helps nothing.
|
|
93
|
-
|
|
94
|
-
| Bottleneck | Scaling Approach |
|
|
95
|
-
|---|---|
|
|
96
|
-
| CPU-bound app logic | Horizontal scale (more instances) |
|
|
97
|
-
| Memory limit | Vertical scale (more RAM per instance) |
|
|
98
|
-
| I/O-bound (DB, external calls) | Connection pooling, caching, async patterns |
|
|
99
|
-
| Database reads | Read replicas, query optimization, caching |
|
|
100
|
-
| Database writes | Sharding, write queuing, schema redesign |
|
|
101
|
-
|
|
102
|
-
**Cached responses don't need scaling.** Add caching before adding instances.
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Nginx Configuration Essentials
|
|
63
|
+
You must shield your internal application framework (Node/Python/Ruby) behind Nginx. Nginx handles SSL termination, static file caching, and DDOS mitigation.
|
|
107
64
|
|
|
108
65
|
```nginx
|
|
66
|
+
# /etc/nginx/sites-available/myapp.com
|
|
67
|
+
|
|
109
68
|
server {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
69
|
+
listen 80;
|
|
70
|
+
server_name api.myapp.com;
|
|
71
|
+
|
|
72
|
+
# Force SSL Redirect
|
|
73
|
+
return 301 https://$host$request_uri;
|
|
115
74
|
}
|
|
116
75
|
|
|
117
76
|
server {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
77
|
+
listen 443 ssl http2;
|
|
78
|
+
server_name api.myapp.com;
|
|
79
|
+
|
|
80
|
+
# SSL Certs (Let's Encrypt / Certbot)
|
|
81
|
+
ssl_certificate /etc/letsencrypt/live/api.myapp.com/fullchain.pem;
|
|
82
|
+
ssl_certificate_key /etc/letsencrypt/live/api.myapp.com/privkey.pem;
|
|
83
|
+
|
|
84
|
+
# Modern Security Headers
|
|
85
|
+
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
86
|
+
add_header X-Content-Type-Options nosniff;
|
|
87
|
+
add_header X-Frame-Options DENY;
|
|
88
|
+
|
|
89
|
+
# GZIP Compression
|
|
90
|
+
gzip on;
|
|
91
|
+
gzip_types text/plain application/json;
|
|
92
|
+
|
|
93
|
+
location / {
|
|
94
|
+
# Proxy traffic to internal local process
|
|
95
|
+
proxy_pass http://127.0.0.1:3000;
|
|
96
|
+
|
|
97
|
+
# Forward original IP and Protocol for rate limiters
|
|
98
|
+
proxy_set_header Host $host;
|
|
99
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
100
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
101
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
102
|
+
|
|
103
|
+
# WebSocket support (Required for GraphQL subscriptions, TRPC, Socket.io)
|
|
104
|
+
proxy_http_version 1.1;
|
|
105
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
106
|
+
proxy_set_header Connection "upgrade";
|
|
107
|
+
}
|
|
140
108
|
}
|
|
141
109
|
```
|
|
142
110
|
|
|
143
111
|
---
|
|
144
112
|
|
|
145
|
-
##
|
|
146
|
-
|
|
147
|
-
The 3-2-1 rule:
|
|
148
|
-
- **3** copies of data
|
|
149
|
-
- **2** on different storage media
|
|
150
|
-
- **1** offsite (different data center, cloud region)
|
|
113
|
+
## 3. Server Hardening Fundamentals
|
|
151
114
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
When this skill produces a recommendation or design decision, structure your output as:
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
━━━ Server Management Recommendation ━━━━━━━━━━━━━━━━
|
|
162
|
-
Decision: [what was chosen / proposed]
|
|
163
|
-
Rationale: [why — one concise line]
|
|
164
|
-
Trade-offs: [what is consciously accepted]
|
|
165
|
-
Next action: [concrete next step for the user]
|
|
166
|
-
─────────────────────────────────────────────────
|
|
167
|
-
Pre-Flight: ✅ All checks passed
|
|
168
|
-
or ❌ [blocking item that must be resolved first]
|
|
115
|
+
### SSH Security (`/etc/ssh/sshd_config`)
|
|
116
|
+
```bash
|
|
117
|
+
PermitRootLogin no # Kill direct root login attacks immediately
|
|
118
|
+
PasswordAuthentication no # Enforce SSH key-based login ONLY
|
|
119
|
+
Port 2022 # (Optional) Obscurity defense against automated script-kiddie scanners
|
|
169
120
|
```
|
|
170
121
|
|
|
122
|
+
### Uncomplicated Firewall (UFW)
|
|
123
|
+
A naked server with all ports open is a honeypot.
|
|
124
|
+
```bash
|
|
125
|
+
sudo ufw default deny incoming
|
|
126
|
+
sudo ufw default allow outgoing
|
|
127
|
+
sudo ufw allow 22/tcp # Allow SSH
|
|
128
|
+
sudo ufw allow 80/tcp # Allow HTTP
|
|
129
|
+
sudo ufw allow 443/tcp # Allow HTTPS
|
|
130
|
+
sudo ufw enable
|
|
131
|
+
```
|
|
171
132
|
|
|
133
|
+
### Fail2Ban
|
|
134
|
+
Automatically bans IPs attempting brute force credential filling after 5 bad attempts.
|
|
172
135
|
|
|
173
136
|
---
|
|
174
137
|
|
|
175
|
-
##
|
|
176
|
-
|
|
177
|
-
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
178
|
-
|
|
179
|
-
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
180
|
-
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
181
|
-
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
182
|
-
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
183
|
-
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
188
|
-
|
|
189
|
-
**Slash command: `/review` or `/tribunal-full`**
|
|
190
|
-
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
191
|
-
|
|
192
|
-
### ❌ Forbidden AI Tropes
|
|
193
|
-
|
|
194
|
-
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
195
|
-
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
196
|
-
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
138
|
+
## 4. Log Rotation (Prevent Disk Full Outages)
|
|
197
139
|
|
|
198
|
-
|
|
140
|
+
A server will inevitably crash when `/var/log` consumes 100% of the disk.
|
|
199
141
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
142
|
+
```bash
|
|
143
|
+
# /etc/logrotate.d/myapp
|
|
144
|
+
|
|
145
|
+
/var/www/myapp/logs/*.log {
|
|
146
|
+
daily # Rotate every day
|
|
147
|
+
missingok # Ignore if file is missing
|
|
148
|
+
rotate 14 # Keep 14 days of history
|
|
149
|
+
compress # Gzip old logs
|
|
150
|
+
delaycompress # Don't compress the one created yesterday
|
|
151
|
+
notifempty # Do nothing if log is empty
|
|
152
|
+
copytruncate # Copy then clear (avoids disrupting Node's open file handles)
|
|
153
|
+
}
|
|
206
154
|
```
|
|
207
155
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
211
|
-
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
212
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
156
|
+
---
|