@flitzrrr/agent-skills 1.0.2 → 1.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 (32) hide show
  1. package/.cursorrules +2 -2
  2. package/.github/copilot-instructions.md +59 -0
  3. package/.lovable +1 -1
  4. package/AGENTS.md +2 -2
  5. package/CHEATSHEET.md +84 -86
  6. package/CLAUDE.md +2 -2
  7. package/LICENSE +27 -0
  8. package/README.md +147 -100
  9. package/bin/build-catalog.js +208 -0
  10. package/bin/cli.js +7 -3
  11. package/bin/sync-docs.js +147 -0
  12. package/bin/sync-skills.sh +17 -0
  13. package/bin/test-cli.js +115 -0
  14. package/bin/update-wiki.js +102 -0
  15. package/package.json +9 -2
  16. package/skills/dispatch-parallel-agents/skill.md +95 -0
  17. package/skills/execute-work-package/SKILL.md +279 -0
  18. package/skills/execute-work-package/tpl-execution-blueprint.md +39 -0
  19. package/skills/execute-work-package/tpl-execution-digest.md +24 -0
  20. package/skills/execute-work-package/tpl-implementer-execute-prompt.md +57 -0
  21. package/skills/execute-work-package/tpl-implementer-preflight-prompt.md +66 -0
  22. package/skills/product-description-seo/CROSS-SELL.md +31 -0
  23. package/skills/product-description-seo/KEYWORDS.md +35 -0
  24. package/skills/product-description-seo/SKILL.md +361 -0
  25. package/skills/product-description-seo/scripts/analyze_catalog.py +136 -0
  26. package/skills/product-description-seo/scripts/check_quality.py +204 -0
  27. package/skills/product-description-seo/scripts/extract_category.py +88 -0
  28. package/skills/product-description-seo/scripts/track_progress.py +140 -0
  29. package/skills/product-description-seo/scripts/update_catalog.py +80 -0
  30. package/skills/product-description-seo/scripts/validate_json.py +87 -0
  31. package/skills/systematic-debugging/skill.md +87 -0
  32. package/skills/tob-gh-cli/SKILL.md +71 -0
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env python3
2
+ """Validate catalog JSON structure after description updates.
3
+
4
+ Usage:
5
+ python validate_json.py <catalog.json>
6
+
7
+ Checks: valid JSON, required fields, no duplicate SKUs,
8
+ no HTML in descriptions, valid slug format.
9
+ """
10
+
11
+ import json
12
+ import sys
13
+ import re
14
+ from collections import Counter
15
+
16
+ REQUIRED_FIELDS = ["sku", "name", "slug"]
17
+
18
+
19
+ def main():
20
+ if len(sys.argv) < 2:
21
+ print("Usage: python validate_json.py <catalog.json>")
22
+ sys.exit(1)
23
+
24
+ path = sys.argv[1]
25
+ errors = []
26
+ warnings = []
27
+
28
+ try:
29
+ with open(path, "r", encoding="utf-8") as f:
30
+ data = json.load(f)
31
+ except json.JSONDecodeError as e:
32
+ print(f"[-] FATAL: Invalid JSON: {e}")
33
+ sys.exit(1)
34
+
35
+ products = data.get("products", [])
36
+ print(f"Validating {len(products)} products in {path}...")
37
+
38
+ # Required fields
39
+ for i, p in enumerate(products):
40
+ for field in REQUIRED_FIELDS:
41
+ if field not in p:
42
+ errors.append(f"Product #{i} (SKU {p.get('sku', '?')}): missing field '{field}'")
43
+
44
+ # Duplicate SKUs
45
+ skus = [p.get("sku", "") for p in products]
46
+ dupes = [sku for sku, count in Counter(skus).items() if count > 1]
47
+ if dupes:
48
+ errors.append(f"Duplicate SKUs: {', '.join(dupes)}")
49
+
50
+ # Empty descriptions
51
+ desc_field = "beschreibung" if any("beschreibung" in p for p in products[:5]) else "description"
52
+ for p in products:
53
+ if not p.get(desc_field, "").strip():
54
+ warnings.append(f"SKU {p.get('sku', '?')}: empty description")
55
+
56
+ # HTML in descriptions
57
+ for p in products:
58
+ desc = p.get(desc_field, "")
59
+ if re.search(r'<[^>]+>', desc):
60
+ errors.append(f"SKU {p.get('sku', '?')}: HTML tags found in description")
61
+
62
+ # Slug format
63
+ for p in products:
64
+ slug = p.get("slug", "")
65
+ if slug and not re.match(r'^[a-z0-9\-_\.]+$', slug):
66
+ warnings.append(f"SKU {p.get('sku', '?')}: slug '{slug}' contains invalid characters")
67
+
68
+ # Report
69
+ print(f"\n{'=' * 50}")
70
+ if errors:
71
+ print(f"[-] {len(errors)} errors found:")
72
+ for e in errors:
73
+ print(f" [-] {e}")
74
+ if warnings:
75
+ print(f"[!] {len(warnings)} warnings:")
76
+ for w in warnings:
77
+ print(f" [!] {w}")
78
+ if not errors and not warnings:
79
+ print("[+] All validations passed!")
80
+ elif not errors:
81
+ print(f"\n[+] No critical errors. {len(warnings)} warnings.")
82
+
83
+ sys.exit(1 if errors else 0)
84
+
85
+
86
+ if __name__ == "__main__":
87
+ main()
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: systematic-debugging
3
+ description: Investigate bugs, test failures, and unexpected behavior through root-cause analysis before proposing fixes. Use when encountering any technical issue.
4
+ license: MIT
5
+ compatibility:
6
+ opencode: ">=0.1"
7
+ metadata:
8
+ category: debugging
9
+ phase: investigation
10
+ ---
11
+
12
+ # Skill: Systematic Debugging
13
+
14
+ This skill enforces root-cause investigation before any fix attempt. Random fixes waste time and create new bugs.
15
+
16
+ ---
17
+
18
+ ## When to Use
19
+
20
+ Use for any technical issue:
21
+
22
+ - Test failures
23
+ - Bugs in production or development
24
+ - Unexpected behavior
25
+ - Performance problems
26
+ - Build failures
27
+ - Integration issues
28
+
29
+ Do **not** skip this skill when:
30
+
31
+ - The issue seems simple (simple bugs have root causes too)
32
+ - You are under time pressure (systematic debugging is faster than thrashing)
33
+ - A fix seems obvious (obvious fixes often mask the real problem)
34
+
35
+ ---
36
+
37
+ ## Execution Model
38
+
39
+ - **Primary agent** runs this skill directly.
40
+ - **Rationale**: Debugging requires iterative investigation in the same context. Delegating to a subagent loses the accumulated understanding.
41
+ - **Exception**: For multi-component issues spanning independent subsystems, delegate per-subsystem investigation to separate agents via the `dispatch-parallel-agents` skill.
42
+
43
+ ---
44
+
45
+ ## Workflow
46
+
47
+ ### Phase 1: Root Cause Investigation
48
+
49
+ **No fixes are allowed until this phase is complete.**
50
+
51
+ 1. **Read error messages carefully** -- stack traces, line numbers, error codes. Do not skip past them.
52
+ 2. **Reproduce consistently** -- determine the exact steps. If not reproducible, gather more data instead of guessing.
53
+ 3. **Check recent changes** -- `git diff`, recent commits, new dependencies, config changes, environmental differences.
54
+ 4. **Gather evidence at component boundaries** -- for multi-layer systems (CI -> build -> deploy, API -> service -> database), add diagnostic logging at each boundary to identify where the failure occurs.
55
+ 5. **Trace data flow** -- follow the bad value backward through the call stack to its origin. Fix at the source, not at the symptom.
56
+
57
+ ### Phase 2: Pattern Analysis
58
+
59
+ 1. **Find working examples** -- locate similar working code in the same codebase.
60
+ 2. **Compare against references** -- if implementing a pattern, read the reference implementation completely. Do not skim.
61
+ 3. **Identify differences** -- list every difference between working and broken code, however small.
62
+ 4. **Understand dependencies** -- what components, settings, config, and environment does this code need?
63
+
64
+ ### Phase 3: Hypothesis and Testing
65
+
66
+ 1. **Form a single hypothesis** -- state clearly: "I think X is the root cause because Y."
67
+ 2. **Test minimally** -- make the smallest possible change to test the hypothesis. One variable at a time.
68
+ 3. **Verify before continuing** -- if the hypothesis is wrong, form a new one. Do not stack fixes.
69
+ 4. **Acknowledge unknowns** -- if you do not understand something, say so. Do not pretend.
70
+
71
+ ### Phase 4: Implementation
72
+
73
+ 1. **Fix the root cause, not the symptom.**
74
+ 2. **One change at a time** -- no "while I'm here" improvements, no bundled refactoring.
75
+ 3. **Verify the fix** -- run the relevant tests, confirm the issue is resolved, confirm no regressions.
76
+ 4. **If 3+ fixes have failed** -- stop. The issue is likely architectural, not a bug. Discuss with the user before attempting more fixes.
77
+
78
+ ---
79
+
80
+ ## Rules
81
+
82
+ 1. **No fixes without investigation**: Phase 1 must be complete before proposing any fix.
83
+ 2. **One hypothesis at a time**: Do not apply multiple changes simultaneously.
84
+ 3. **Evidence over intuition**: Every fix must be justified by evidence from the investigation, not by "it might work."
85
+ 4. **Escalate after 3 failed attempts**: Three failed fixes indicate an architectural problem. Stop fixing and discuss with the user.
86
+ 5. **Do not increase timeouts as a fix**: Find the real timing issue instead.
87
+ 6. **Read error messages completely**: Stack traces contain the answer more often than not.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: gh-cli
3
+ description: Intercepts GitHub URL fetches and redirects to the authenticated `gh` CLI. Use when Claude tries to access GitHub via WebFetch or curl/wget, when you see 404 errors on private repos, when hitting GitHub API rate limits, or when GitHub API responses are incomplete. Provides hooks that automatically suggest the correct `gh` CLI command for any GitHub URL access pattern.
4
+ ---
5
+
6
+ # GitHub CLI Integration
7
+
8
+ A plugin that intercepts GitHub URL fetches and redirects Claude to use the authenticated `gh` CLI instead.
9
+
10
+ ## Problem
11
+
12
+ Claude Code's `WebFetch` tool and Bash `curl`/`wget` commands don't use the user's GitHub authentication. This means:
13
+
14
+ - **Private repos**: Fetches fail with 404 errors
15
+ - **Rate limits**: Unauthenticated requests are limited to 60/hour (vs 5,000/hour authenticated)
16
+ - **Missing data**: Some API responses are incomplete without authentication
17
+
18
+ ## Solution
19
+
20
+ This plugin provides PreToolUse hooks that intercept GitHub URL access via `WebFetch` or `curl`/`wget`, and suggest the correct `gh` CLI command.
21
+
22
+ ### What Gets Intercepted
23
+
24
+ | Tool | Pattern | Suggestion |
25
+ |------|---------|------------|
26
+ | `WebFetch` | `github.com/{owner}/{repo}` | `gh repo view owner/repo` |
27
+ | `WebFetch` | `github.com/.../blob/...` | `gh repo clone` + Read |
28
+ | `WebFetch` | `github.com/.../tree/...` | `gh repo clone` + Read/Glob/Grep |
29
+ | `WebFetch` | `api.github.com/repos/.../pulls` | `gh pr list` / `gh pr view` |
30
+ | `WebFetch` | `api.github.com/repos/.../issues` | `gh issue list` / `gh issue view` |
31
+ | `WebFetch` | `api.github.com/...` | `gh api <endpoint>` |
32
+ | `WebFetch` | `raw.githubusercontent.com/...` | `gh repo clone` + Read |
33
+ | `Bash` | `curl https://api.github.com/...` | `gh api <endpoint>` |
34
+ | `Bash` | `curl https://raw.githubusercontent.com/...` | `gh repo clone` + Read |
35
+ | `Bash` | `wget https://github.com/...` | `gh release download` |
36
+
37
+ ### What Passes Through
38
+
39
+ - Non-GitHub URLs
40
+ - GitHub Pages sites (`*.github.io`)
41
+ - Commands already using `gh` (except anti-patterns)
42
+ - Git commands (`git clone`, `git push`, etc.)
43
+ - Search commands that mention GitHub URLs (`grep`, `rg`, etc.)
44
+
45
+ ## Prerequisites
46
+
47
+ - [GitHub CLI (`gh`)](https://cli.github.com/) must be installed and authenticated (`gh auth login`)
48
+ - If `gh` is not installed, the hooks pass through without disruption
49
+
50
+ ## Usage
51
+
52
+ This skill operates automatically via hooks. No manual invocation required. When you attempt to access GitHub URLs, the hooks will intercept and suggest the authenticated alternative.
53
+
54
+ ### Common gh CLI Commands
55
+
56
+ ```bash
57
+ # View repo info
58
+ gh repo view owner/repo
59
+
60
+ # List PRs
61
+ gh pr list --repo owner/repo
62
+
63
+ # View a specific PR
64
+ gh pr view 123 --repo owner/repo
65
+
66
+ # API access
67
+ gh api repos/owner/repo/pulls
68
+
69
+ # Clone a repo
70
+ gh repo clone owner/repo
71
+ ```