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.
Files changed (250) hide show
  1. package/.agent/ARCHITECTURE.md +99 -99
  2. package/.agent/GEMINI.md +52 -52
  3. package/.agent/agents/accessibility-reviewer.md +139 -86
  4. package/.agent/agents/ai-code-reviewer.md +160 -90
  5. package/.agent/agents/backend-specialist.md +164 -127
  6. package/.agent/agents/code-archaeologist.md +115 -73
  7. package/.agent/agents/database-architect.md +130 -110
  8. package/.agent/agents/debugger.md +137 -97
  9. package/.agent/agents/dependency-reviewer.md +78 -30
  10. package/.agent/agents/devops-engineer.md +161 -118
  11. package/.agent/agents/documentation-writer.md +151 -87
  12. package/.agent/agents/explorer-agent.md +117 -99
  13. package/.agent/agents/frontend-reviewer.md +127 -47
  14. package/.agent/agents/frontend-specialist.md +169 -109
  15. package/.agent/agents/game-developer.md +28 -164
  16. package/.agent/agents/logic-reviewer.md +87 -49
  17. package/.agent/agents/mobile-developer.md +151 -103
  18. package/.agent/agents/mobile-reviewer.md +133 -50
  19. package/.agent/agents/orchestrator.md +121 -110
  20. package/.agent/agents/penetration-tester.md +103 -77
  21. package/.agent/agents/performance-optimizer.md +136 -92
  22. package/.agent/agents/performance-reviewer.md +139 -69
  23. package/.agent/agents/product-manager.md +104 -70
  24. package/.agent/agents/product-owner.md +6 -25
  25. package/.agent/agents/project-planner.md +95 -95
  26. package/.agent/agents/qa-automation-engineer.md +174 -87
  27. package/.agent/agents/security-auditor.md +133 -129
  28. package/.agent/agents/seo-specialist.md +160 -99
  29. package/.agent/agents/sql-reviewer.md +132 -44
  30. package/.agent/agents/supervisor-agent.md +137 -109
  31. package/.agent/agents/swarm-worker-contracts.md +17 -17
  32. package/.agent/agents/swarm-worker-registry.md +46 -46
  33. package/.agent/agents/test-coverage-reviewer.md +132 -53
  34. package/.agent/agents/test-engineer.md +0 -21
  35. package/.agent/agents/type-safety-reviewer.md +143 -33
  36. package/.agent/patterns/generator.md +9 -9
  37. package/.agent/patterns/inversion.md +12 -12
  38. package/.agent/patterns/pipeline.md +9 -9
  39. package/.agent/patterns/reviewer.md +13 -13
  40. package/.agent/patterns/tool-wrapper.md +9 -9
  41. package/.agent/rules/GEMINI.md +63 -63
  42. package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
  43. package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
  44. package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
  45. package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
  46. package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
  47. package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
  48. package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
  49. package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
  50. package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
  51. package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
  52. package/.agent/scripts/compress_skills.py +167 -0
  53. package/.agent/scripts/consolidate_skills.py +173 -0
  54. package/.agent/scripts/deep_compress.py +202 -0
  55. package/.agent/scripts/minify_context.py +80 -0
  56. package/.agent/scripts/security_scan.py +1 -1
  57. package/.agent/scripts/strip_tribunal.py +41 -0
  58. package/.agent/skills/agent-organizer/SKILL.md +60 -100
  59. package/.agent/skills/agentic-patterns/SKILL.md +0 -70
  60. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +108 -53
  61. package/.agent/skills/api-patterns/SKILL.md +197 -257
  62. package/.agent/skills/api-security-auditor/SKILL.md +125 -57
  63. package/.agent/skills/app-builder/SKILL.md +326 -50
  64. package/.agent/skills/app-builder/templates/SKILL.md +13 -15
  65. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
  66. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
  67. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
  68. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
  69. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
  70. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
  71. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
  72. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
  73. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
  74. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
  75. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
  76. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
  77. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
  78. package/.agent/skills/appflow-wireframe/SKILL.md +71 -98
  79. package/.agent/skills/architecture/SKILL.md +161 -200
  80. package/.agent/skills/authentication-best-practices/SKILL.md +121 -54
  81. package/.agent/skills/bash-linux/SKILL.md +71 -166
  82. package/.agent/skills/behavioral-modes/SKILL.md +8 -69
  83. package/.agent/skills/brainstorming/SKILL.md +345 -127
  84. package/.agent/skills/building-native-ui/SKILL.md +125 -57
  85. package/.agent/skills/clean-code/SKILL.md +266 -149
  86. package/.agent/skills/code-review-checklist/SKILL.md +0 -62
  87. package/.agent/skills/config-validator/SKILL.md +73 -131
  88. package/.agent/skills/csharp-developer/SKILL.md +434 -73
  89. package/.agent/skills/database-design/SKILL.md +190 -275
  90. package/.agent/skills/deployment-procedures/SKILL.md +81 -158
  91. package/.agent/skills/devops-engineer/SKILL.md +255 -94
  92. package/.agent/skills/devops-incident-responder/SKILL.md +50 -69
  93. package/.agent/skills/doc.md +5 -5
  94. package/.agent/skills/documentation-templates/SKILL.md +19 -63
  95. package/.agent/skills/edge-computing/SKILL.md +75 -165
  96. package/.agent/skills/extract-design-system/SKILL.md +84 -58
  97. package/.agent/skills/framer-motion-expert/SKILL.md +195 -0
  98. package/.agent/skills/frontend-design/SKILL.md +151 -499
  99. package/.agent/skills/game-design-expert/SKILL.md +71 -0
  100. package/.agent/skills/game-engineering-expert/SKILL.md +88 -0
  101. package/.agent/skills/geo-fundamentals/SKILL.md +52 -178
  102. package/.agent/skills/github-operations/SKILL.md +197 -272
  103. package/.agent/skills/gsap-expert/SKILL.md +194 -0
  104. package/.agent/skills/i18n-localization/SKILL.md +60 -172
  105. package/.agent/skills/intelligent-routing/SKILL.md +123 -103
  106. package/.agent/skills/lint-and-validate/SKILL.md +8 -52
  107. package/.agent/skills/llm-engineering/SKILL.md +281 -195
  108. package/.agent/skills/local-first/SKILL.md +76 -159
  109. package/.agent/skills/mcp-builder/SKILL.md +48 -188
  110. package/.agent/skills/mobile-design/SKILL.md +213 -219
  111. package/.agent/skills/motion-engineering/SKILL.md +184 -0
  112. package/.agent/skills/nextjs-react-expert/SKILL.md +184 -203
  113. package/.agent/skills/nodejs-best-practices/SKILL.md +403 -185
  114. package/.agent/skills/observability/SKILL.md +211 -203
  115. package/.agent/skills/parallel-agents/SKILL.md +53 -146
  116. package/.agent/skills/performance-profiling/SKILL.md +171 -151
  117. package/.agent/skills/plan-writing/SKILL.md +49 -153
  118. package/.agent/skills/platform-engineer/SKILL.md +57 -103
  119. package/.agent/skills/playwright-best-practices/SKILL.md +110 -63
  120. package/.agent/skills/powershell-windows/SKILL.md +61 -179
  121. package/.agent/skills/python-patterns/SKILL.md +7 -35
  122. package/.agent/skills/python-pro/SKILL.md +273 -114
  123. package/.agent/skills/react-specialist/SKILL.md +227 -108
  124. package/.agent/skills/readme-builder/SKILL.md +15 -85
  125. package/.agent/skills/realtime-patterns/SKILL.md +216 -243
  126. package/.agent/skills/red-team-tactics/SKILL.md +10 -51
  127. package/.agent/skills/rust-pro/SKILL.md +525 -142
  128. package/.agent/skills/seo-fundamentals/SKILL.md +92 -153
  129. package/.agent/skills/server-management/SKILL.md +110 -166
  130. package/.agent/skills/shadcn-ui-expert/SKILL.md +154 -55
  131. package/.agent/skills/skill-creator/SKILL.md +18 -58
  132. package/.agent/skills/sql-pro/SKILL.md +543 -68
  133. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +28 -68
  134. package/.agent/skills/swiftui-expert/SKILL.md +124 -57
  135. package/.agent/skills/systematic-debugging/SKILL.md +49 -151
  136. package/.agent/skills/tailwind-patterns/SKILL.md +433 -149
  137. package/.agent/skills/tdd-workflow/SKILL.md +63 -169
  138. package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
  139. package/.agent/skills/testing-patterns/SKILL.md +437 -130
  140. package/.agent/skills/trend-researcher/SKILL.md +30 -71
  141. package/.agent/skills/ui-ux-pro-max/SKILL.md +0 -41
  142. package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
  143. package/.agent/skills/vue-expert/SKILL.md +225 -119
  144. package/.agent/skills/vulnerability-scanner/SKILL.md +264 -226
  145. package/.agent/skills/web-accessibility-auditor/SKILL.md +141 -58
  146. package/.agent/skills/web-design-guidelines/SKILL.md +17 -61
  147. package/.agent/skills/webapp-testing/SKILL.md +71 -196
  148. package/.agent/skills/whimsy-injector/SKILL.md +58 -132
  149. package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
  150. package/.agent/workflows/api-tester.md +96 -224
  151. package/.agent/workflows/audit.md +81 -122
  152. package/.agent/workflows/brainstorm.md +69 -105
  153. package/.agent/workflows/changelog.md +65 -97
  154. package/.agent/workflows/create.md +73 -88
  155. package/.agent/workflows/debug.md +80 -111
  156. package/.agent/workflows/deploy.md +119 -92
  157. package/.agent/workflows/enhance.md +80 -91
  158. package/.agent/workflows/fix.md +68 -97
  159. package/.agent/workflows/generate.md +165 -164
  160. package/.agent/workflows/migrate.md +106 -109
  161. package/.agent/workflows/orchestrate.md +103 -86
  162. package/.agent/workflows/performance-benchmarker.md +77 -268
  163. package/.agent/workflows/plan.md +120 -98
  164. package/.agent/workflows/preview.md +39 -96
  165. package/.agent/workflows/refactor.md +105 -97
  166. package/.agent/workflows/review-ai.md +63 -102
  167. package/.agent/workflows/review.md +71 -110
  168. package/.agent/workflows/session.md +53 -113
  169. package/.agent/workflows/status.md +42 -88
  170. package/.agent/workflows/strengthen-skills.md +90 -51
  171. package/.agent/workflows/swarm.md +114 -129
  172. package/.agent/workflows/test.md +125 -102
  173. package/.agent/workflows/tribunal-backend.md +60 -78
  174. package/.agent/workflows/tribunal-database.md +62 -100
  175. package/.agent/workflows/tribunal-frontend.md +62 -82
  176. package/.agent/workflows/tribunal-full.md +56 -100
  177. package/.agent/workflows/tribunal-mobile.md +65 -94
  178. package/.agent/workflows/tribunal-performance.md +62 -105
  179. package/.agent/workflows/ui-ux-pro-max.md +72 -121
  180. package/README.md +11 -15
  181. package/package.json +1 -1
  182. package/.agent/skills/api-patterns/api-style.md +0 -42
  183. package/.agent/skills/api-patterns/auth.md +0 -24
  184. package/.agent/skills/api-patterns/documentation.md +0 -26
  185. package/.agent/skills/api-patterns/graphql.md +0 -41
  186. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  187. package/.agent/skills/api-patterns/response.md +0 -37
  188. package/.agent/skills/api-patterns/rest.md +0 -40
  189. package/.agent/skills/api-patterns/security-testing.md +0 -122
  190. package/.agent/skills/api-patterns/trpc.md +0 -41
  191. package/.agent/skills/api-patterns/versioning.md +0 -22
  192. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  193. package/.agent/skills/app-builder/feature-building.md +0 -53
  194. package/.agent/skills/app-builder/project-detection.md +0 -34
  195. package/.agent/skills/app-builder/scaffolding.md +0 -118
  196. package/.agent/skills/app-builder/tech-stack.md +0 -40
  197. package/.agent/skills/architecture/context-discovery.md +0 -43
  198. package/.agent/skills/architecture/examples.md +0 -94
  199. package/.agent/skills/architecture/pattern-selection.md +0 -68
  200. package/.agent/skills/architecture/patterns-reference.md +0 -50
  201. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  202. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
  203. package/.agent/skills/database-design/database-selection.md +0 -43
  204. package/.agent/skills/database-design/indexing.md +0 -39
  205. package/.agent/skills/database-design/migrations.md +0 -48
  206. package/.agent/skills/database-design/optimization.md +0 -36
  207. package/.agent/skills/database-design/orm-selection.md +0 -30
  208. package/.agent/skills/database-design/schema-design.md +0 -56
  209. package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
  210. package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
  211. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  212. package/.agent/skills/frontend-design/color-system.md +0 -329
  213. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  214. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  215. package/.agent/skills/frontend-design/typography-system.md +0 -363
  216. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  217. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  218. package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  219. package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  220. package/.agent/skills/game-development/SKILL.md +0 -236
  221. package/.agent/skills/game-development/game-art/SKILL.md +0 -185
  222. package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  223. package/.agent/skills/game-development/game-design/SKILL.md +0 -129
  224. package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  225. package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  226. package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  227. package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  228. package/.agent/skills/game-development/web-games/SKILL.md +0 -150
  229. package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
  230. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  231. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  232. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  233. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  234. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  235. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  236. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  237. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  238. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  239. package/.agent/skills/mobile-design/platform-android.md +0 -666
  240. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  241. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  242. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  243. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  244. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  245. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  246. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  247. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  248. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  249. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  250. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
@@ -1,181 +1,120 @@
1
1
  ---
2
2
  name: seo-fundamentals
3
- description: SEO fundamentals, E-E-A-T, Core Web Vitals, and Google algorithm principles.
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: 1.0.0
6
- last-updated: 2026-03-12
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
- ## E-E-A-T Framework
31
-
32
- Google evaluates content on Experience, Expertise, Authoritativeness, and Trustworthiness.
33
-
34
- | Signal | What It Means | How to Demonstrate |
35
- |---|---|---|
36
- | Experience | First-hand use of the topic | Case studies, screenshots, real examples |
37
- | Expertise | Deep knowledge of the domain | Accurate detail, citations, author credentials |
38
- | Authoritativeness | Recognized by others in the field | External links, mentions, speaking/publishing |
39
- | Trustworthiness | Safe and reliable site | HTTPS, privacy policy, correct contact info |
40
-
41
- E-E-A-T matters most for YMYL content (health, finance, legal, safety).
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
- ## Technical SEO Checklist
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
- <!-- One H1 per page matches the title intent -->
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
- <!-- Canonical prevent duplicate content -->
61
- <link rel="canonical" href="https://yoursite.com/page">
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
- <link rel="preload" href="/hero.webp" as="image" fetchpriority="high">
80
- ```
81
-
82
- **Most common CLS fix:** Images without explicit width/height cause layout shifts:
83
- ```html
84
- <img src="..." width="800" height="450" alt="...">
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
- ## Content Structure
90
-
91
- ```
92
- Page structure that works:
93
- H1: Primary topic (one per page)
94
- H2: Major sections
95
- H3: Subsections
96
-
97
- Content patterns that help:
98
- - Answer the question in the first paragraph
99
- - Use tables and lists for comparative or step-by-step info
100
- - Add FAQ sections for long-tail queries
101
- - Internal links to related content
102
- - External links to authoritative sources
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
- ## What Not to Do
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
- ## Scripts
118
-
119
- | Script | Purpose | Run With |
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: Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.
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: 1.0.0
6
- last-updated: 2026-03-12
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 Principles
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 Management
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
- | Tool | Best For | Why |
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
- **Core requirement:** If the process crashes, it restarts automatically. If it can't restart, you are alerted.
18
+ ```ini
19
+ # /etc/systemd/system/myapp.service
29
20
 
30
- ```bash
31
- # PM2 example — stays running, auto-restarts, survives reboots
32
- pm2 start app.js --name "api" --instances max
33
- pm2 save
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
- ## What to Monitor
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 minimum viable monitoring stack:
37
+ # The execution target
38
+ ExecStart=/usr/bin/node /var/www/myapp/build/index.js
42
39
 
43
- | Signal | What To Alert On |
44
- |---|---|
45
- | Process health | Process is not running |
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
- **Alert on symptoms, not just causes.** "Error rate spiked" is a better alert than "CPU is high" — users don't feel CPU, they feel slow responses and errors.
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
- **Log levels, used correctly:**
74
- - `ERROR` something failed that requires attention
75
- - `WARN` something unexpected but non-fatal happened
76
- - `INFO` key business events (user registered, payment processed)
77
- - `DEBUG` useful for troubleshooting, never on in production by default
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
- ## Scaling Decision Framework
61
+ ## 2. Nginx Reverse Proxy Architecture
87
62
 
88
- Before scaling, answer:
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
- listen 80;
111
- server_name example.com;
112
-
113
- # Redirect HTTP → HTTPS
114
- return 301 https://$host$request_uri;
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
- listen 443 ssl;
119
- server_name example.com;
120
-
121
- # Security headers
122
- add_header X-Frame-Options DENY;
123
- add_header X-Content-Type-Options nosniff;
124
- add_header Strict-Transport-Security "max-age=31536000" always;
125
-
126
- # Proxy to Node.js app
127
- location / {
128
- proxy_pass http://127.0.0.1:3000;
129
- proxy_set_header Host $host;
130
- proxy_set_header X-Real-IP $remote_addr;
131
- proxy_set_header X-Forwarded-Proto https;
132
- }
133
-
134
- # Serve static files directly (don't proxy to Node)
135
- location /static/ {
136
- root /var/www/myapp;
137
- expires 1y;
138
- add_header Cache-Control "public, immutable";
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
- ## Backup Strategy
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
- Test restores on a schedule — a backup you've never restored is a backup you don't know works.
153
-
154
- ---
155
-
156
- ## Output Format
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
- ## 🤖 LLM-Specific Traps
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
- ### Pre-Flight Self-Audit
140
+ A server will inevitably crash when `/var/log` consumes 100% of the disk.
199
141
 
200
- Review these questions before confirming output:
201
- ```
202
- ✅ Did I rely ONLY on real, verified tools and methods?
203
- Is this solution appropriately scoped to the user's constraints?
204
- Did I handle potential failure modes and edge cases?
205
- Have I avoided generic boilerplate that doesn't add value?
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
- ### 🛑 Verification-Before-Completion (VBC) Protocol
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
+ ---