@olegkoval/agent-skills 1.6.0 → 1.8.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/.claude-plugin/plugin.json +1 -1
- package/.kiro/steering/add-to-my-skills.md +78 -0
- package/.kiro/steering/ai-tools-setup.md +263 -0
- package/.kiro/steering/changelog-generator.md +106 -0
- package/.kiro/steering/cloudflare-block-countries.md +167 -0
- package/.kiro/steering/docs-index-keeper.md +53 -0
- package/.kiro/steering/fill-music-player.md +101 -0
- package/.kiro/steering/gallery.md +228 -0
- package/.kiro/steering/gh-cli.md +2190 -0
- package/.kiro/steering/git-commit.md +125 -0
- package/.kiro/steering/open-source-publisher.md +427 -0
- package/.kiro/steering/product-builder.md +213 -0
- package/.kiro/steering/promptctl.md +81 -0
- package/.kiro/steering/search-console-indexing-audit.md +57 -0
- package/.kiro/steering/semantic-release-beta.md +48 -0
- package/.kiro/steering/starter-rules.md +62 -0
- package/.kiro/steering/viral-launch.md +92 -0
- package/.windsurf/rules/add-to-my-skills.md +77 -0
- package/.windsurf/rules/ai-tools-setup.md +262 -0
- package/.windsurf/rules/changelog-generator.md +105 -0
- package/.windsurf/rules/cloudflare-block-countries.md +166 -0
- package/.windsurf/rules/docs-index-keeper.md +52 -0
- package/.windsurf/rules/fill-music-player.md +100 -0
- package/.windsurf/rules/gallery.md +227 -0
- package/.windsurf/rules/gh-cli.md +2189 -0
- package/.windsurf/rules/git-commit.md +124 -0
- package/.windsurf/rules/open-source-publisher.md +426 -0
- package/.windsurf/rules/product-builder.md +212 -0
- package/.windsurf/rules/promptctl.md +80 -0
- package/.windsurf/rules/search-console-indexing-audit.md +56 -0
- package/.windsurf/rules/semantic-release-beta.md +47 -0
- package/.windsurf/rules/starter-rules.md +61 -0
- package/.windsurf/rules/viral-launch.md +91 -0
- package/README.md +67 -14
- package/catalog/skills.json +48 -16
- package/docs/skill-anatomy.md +10 -6
- package/package.json +3 -1
- package/packages/marketing/search-console-indexing-audit/SKILL.md +3 -0
- package/packages/marketing/search-console-indexing-audit/adapters/claude/skills/search-console-indexing-audit/SKILL.md +3 -0
- package/packages/marketing/search-console-indexing-audit/adapters/cursor/plugin.json +1 -1
- package/packages/marketing/search-console-indexing-audit/adapters/cursor/skills/search-console-indexing-audit/SKILL.md +3 -0
- package/packages/marketing/search-console-indexing-audit/adapters/kiro/steering/search-console-indexing-audit.md +57 -0
- package/packages/marketing/search-console-indexing-audit/adapters/windsurf/rules/search-console-indexing-audit.md +56 -0
- package/packages/marketing/viral-launch/SKILL.md +3 -1
- package/packages/marketing/viral-launch/adapters/claude/skills/viral-launch/SKILL.md +3 -1
- package/packages/marketing/viral-launch/adapters/cursor/skills/viral-launch/SKILL.md +3 -1
- package/packages/marketing/viral-launch/adapters/kiro/steering/viral-launch.md +92 -0
- package/packages/marketing/viral-launch/adapters/windsurf/rules/viral-launch.md +91 -0
- package/packages/music/fill-music-player/SKILL.md +2 -1
- package/packages/music/fill-music-player/adapters/claude/skills/fill-music-player/SKILL.md +2 -1
- package/packages/music/fill-music-player/adapters/cursor/plugin.json +1 -1
- package/packages/music/fill-music-player/adapters/cursor/skills/fill-music-player/SKILL.md +2 -1
- package/packages/music/fill-music-player/adapters/kiro/steering/fill-music-player.md +101 -0
- package/packages/music/fill-music-player/adapters/windsurf/rules/fill-music-player.md +100 -0
- package/packages/photography/gallery/SKILL.md +3 -1
- package/packages/photography/gallery/adapters/claude/skills/gallery/SKILL.md +3 -1
- package/packages/photography/gallery/adapters/cursor/skills/gallery/SKILL.md +3 -1
- package/packages/photography/gallery/adapters/kiro/steering/gallery.md +228 -0
- package/packages/photography/gallery/adapters/windsurf/rules/gallery.md +227 -0
- package/packages/software-development/add-to-my-skills/SKILL.md +2 -1
- package/packages/software-development/add-to-my-skills/adapters/claude/skills/add-to-my-skills/SKILL.md +2 -1
- package/packages/software-development/add-to-my-skills/adapters/cursor/skills/add-to-my-skills/SKILL.md +2 -1
- package/packages/software-development/add-to-my-skills/adapters/kiro/steering/add-to-my-skills.md +78 -0
- package/packages/software-development/add-to-my-skills/adapters/windsurf/rules/add-to-my-skills.md +77 -0
- package/packages/software-development/ai-tools-setup/adapters/kiro/steering/ai-tools-setup.md +263 -0
- package/packages/software-development/ai-tools-setup/adapters/windsurf/rules/ai-tools-setup.md +262 -0
- package/packages/software-development/changelog-generator/SKILL.md +3 -1
- package/packages/software-development/changelog-generator/adapters/claude/skills/changelog-generator/SKILL.md +3 -1
- package/packages/software-development/changelog-generator/adapters/cursor/skills/changelog-generator/SKILL.md +3 -1
- package/packages/software-development/changelog-generator/adapters/kiro/steering/changelog-generator.md +106 -0
- package/packages/software-development/changelog-generator/adapters/windsurf/rules/changelog-generator.md +105 -0
- package/packages/software-development/cloudflare-block-countries/SKILL.md +1 -1
- package/packages/software-development/cloudflare-block-countries/adapters/claude/skills/cloudflare-block-countries/SKILL.md +1 -1
- package/packages/software-development/cloudflare-block-countries/adapters/cursor/skills/cloudflare-block-countries/SKILL.md +1 -1
- package/packages/software-development/cloudflare-block-countries/adapters/kiro/steering/cloudflare-block-countries.md +167 -0
- package/packages/software-development/cloudflare-block-countries/adapters/windsurf/rules/cloudflare-block-countries.md +166 -0
- package/packages/software-development/docs-index-keeper/SKILL.md +2 -1
- package/packages/software-development/docs-index-keeper/adapters/claude/skills/docs-index-keeper/SKILL.md +2 -1
- package/packages/software-development/docs-index-keeper/adapters/cursor/plugin.json +1 -1
- package/packages/software-development/docs-index-keeper/adapters/cursor/skills/docs-index-keeper/SKILL.md +2 -1
- package/packages/software-development/docs-index-keeper/adapters/kiro/steering/docs-index-keeper.md +53 -0
- package/packages/software-development/docs-index-keeper/adapters/windsurf/rules/docs-index-keeper.md +52 -0
- package/packages/software-development/gh-cli/SKILL.md +3 -1
- package/packages/software-development/gh-cli/adapters/claude/skills/gh-cli/SKILL.md +3 -1
- package/packages/software-development/gh-cli/adapters/cursor/skills/gh-cli/SKILL.md +3 -1
- package/packages/software-development/gh-cli/adapters/kiro/steering/gh-cli.md +2190 -0
- package/packages/software-development/gh-cli/adapters/windsurf/rules/gh-cli.md +2189 -0
- package/packages/software-development/git-commit/SKILL.md +1 -1
- package/packages/software-development/git-commit/adapters/claude/skills/git-commit/SKILL.md +1 -1
- package/packages/software-development/git-commit/adapters/cursor/skills/git-commit/SKILL.md +1 -1
- package/packages/software-development/git-commit/adapters/kiro/steering/git-commit.md +125 -0
- package/packages/software-development/git-commit/adapters/windsurf/rules/git-commit.md +124 -0
- package/packages/software-development/open-source-publisher/SKILL.md +2 -1
- package/packages/software-development/open-source-publisher/adapters/claude/skills/open-source-publisher/SKILL.md +2 -1
- package/packages/software-development/open-source-publisher/adapters/cursor/skills/open-source-publisher/SKILL.md +2 -1
- package/packages/software-development/open-source-publisher/adapters/kiro/steering/open-source-publisher.md +427 -0
- package/packages/software-development/open-source-publisher/adapters/windsurf/rules/open-source-publisher.md +426 -0
- package/packages/software-development/product-builder/SKILL.md +2 -1
- package/packages/software-development/product-builder/adapters/claude/skills/product-builder/SKILL.md +2 -1
- package/packages/software-development/product-builder/adapters/cursor/plugin.json +1 -1
- package/packages/software-development/product-builder/adapters/cursor/skills/product-builder/SKILL.md +2 -1
- package/packages/software-development/product-builder/adapters/kiro/steering/product-builder.md +213 -0
- package/packages/software-development/product-builder/adapters/windsurf/rules/product-builder.md +212 -0
- package/packages/software-development/promptctl/SKILL.md +3 -1
- package/packages/software-development/promptctl/adapters/claude/skills/promptctl/SKILL.md +3 -1
- package/packages/software-development/promptctl/adapters/cursor/skills/promptctl/SKILL.md +3 -1
- package/packages/software-development/promptctl/adapters/kiro/steering/promptctl.md +81 -0
- package/packages/software-development/promptctl/adapters/windsurf/rules/promptctl.md +80 -0
- package/packages/software-development/semantic-release-beta/SKILL.md +3 -1
- package/packages/software-development/semantic-release-beta/adapters/claude/skills/semantic-release-beta/SKILL.md +3 -1
- package/packages/software-development/semantic-release-beta/adapters/cursor/skills/semantic-release-beta/SKILL.md +3 -1
- package/packages/software-development/semantic-release-beta/adapters/kiro/steering/semantic-release-beta.md +48 -0
- package/packages/software-development/semantic-release-beta/adapters/windsurf/rules/semantic-release-beta.md +47 -0
- package/packages/software-development/starter-rules/SKILL.md +2 -1
- package/packages/software-development/starter-rules/adapters/claude/skills/starter-rules/SKILL.md +2 -1
- package/packages/software-development/starter-rules/adapters/cursor/plugin.json +3 -2
- package/packages/software-development/starter-rules/adapters/cursor/skills/starter-rules/SKILL.md +2 -1
- package/packages/software-development/starter-rules/adapters/kiro/steering/starter-rules.md +62 -0
- package/packages/software-development/starter-rules/adapters/windsurf/rules/starter-rules.md +61 -0
- package/scripts/build-adapters.sh +97 -8
- package/scripts/validate-catalog.sh +4 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
inclusion: manual
|
|
5
|
+
description: "Block specific countries via Cloudflare WAF Custom Rules using the Cloudflare API. Handles creating new rulesets and updating existing ones across single or multiple zones."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Cloudflare Country Block via WAF Custom Rules
|
|
10
|
+
|
|
11
|
+
Block traffic from specific countries using Cloudflare WAF Custom Rules and the Cloudflare API.
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
- Cloudflare API Token with `Zone:Rulesets:Edit` permission
|
|
16
|
+
- Zone ID for the target domain
|
|
17
|
+
- `curl` and `jq` installed
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
### 1. Get Zone IDs
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -s -X GET \
|
|
25
|
+
"https://api.cloudflare.com/client/v4/zones?account.id=YOUR_ACCOUNT_ID&status=active" \
|
|
26
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
27
|
+
-H "Content-Type: application/json" | jq '.result[] | {name: .name, id: .id}'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. Check Existing Custom Firewall Rulesets
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
curl -s -X GET \
|
|
34
|
+
"https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/rulesets" \
|
|
35
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
36
|
+
-H "Content-Type: application/json" | \
|
|
37
|
+
jq '.result[] | select(.phase == "http_request_firewall_custom")'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If the output is empty — no existing ruleset. Go to **3a**. If a ruleset exists, note its `id` and go to **3b**.
|
|
41
|
+
|
|
42
|
+
### 3a. Create NEW Ruleset with Block Rule
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
curl -s -X POST \
|
|
46
|
+
"https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/rulesets" \
|
|
47
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
48
|
+
-H "Content-Type: application/json" \
|
|
49
|
+
--data '{
|
|
50
|
+
"name": "default",
|
|
51
|
+
"description": "WAF Custom Rules",
|
|
52
|
+
"kind": "zone",
|
|
53
|
+
"phase": "http_request_firewall_custom",
|
|
54
|
+
"rules": [
|
|
55
|
+
{
|
|
56
|
+
"action": "block",
|
|
57
|
+
"description": "Block traffic from sanctioned countries",
|
|
58
|
+
"enabled": true,
|
|
59
|
+
"expression": "(ip.src.country in {\"RU\" \"BY\" \"IR\" \"KP\"})"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}' | jq '.success'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 3b. Update EXISTING Ruleset
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
curl -s -X PUT \
|
|
69
|
+
"https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/rulesets/RULESET_ID" \
|
|
70
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
71
|
+
-H "Content-Type: application/json" \
|
|
72
|
+
--data '{
|
|
73
|
+
"description": "WAF Custom Rules",
|
|
74
|
+
"rules": [
|
|
75
|
+
{
|
|
76
|
+
"action": "block",
|
|
77
|
+
"description": "Block traffic from sanctioned countries",
|
|
78
|
+
"enabled": true,
|
|
79
|
+
"expression": "(ip.src.country in {\"RU\" \"BY\" \"IR\" \"KP\"})"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}' | jq '.success'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 4. Verify the Rule is Active
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
curl -s -X GET \
|
|
89
|
+
"https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/rulesets/RULESET_ID" \
|
|
90
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
91
|
+
-H "Content-Type: application/json" | jq '.result.rules'
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Country Codes Reference
|
|
95
|
+
|
|
96
|
+
| Code | Country |
|
|
97
|
+
|------|---------|
|
|
98
|
+
| `RU` | Russia |
|
|
99
|
+
| `BY` | Belarus |
|
|
100
|
+
| `IR` | Iran |
|
|
101
|
+
| `KP` | North Korea |
|
|
102
|
+
| `CN` | China |
|
|
103
|
+
| `CU` | Cuba |
|
|
104
|
+
| `SY` | Syria |
|
|
105
|
+
| `VE` | Venezuela |
|
|
106
|
+
|
|
107
|
+
## WAF Expression Examples
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
# Block multiple countries
|
|
111
|
+
(ip.src.country in {"RU" "BY" "IR" "KP"})
|
|
112
|
+
|
|
113
|
+
# Block country + specific ASN
|
|
114
|
+
(ip.src.country eq "RU") or (ip.geoip.asnum eq 12345)
|
|
115
|
+
|
|
116
|
+
# Block all except allowlisted IPs
|
|
117
|
+
(ip.src.country in {"RU" "BY"}) and not (ip.src in {1.2.3.4/32})
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Multi-Zone Script
|
|
121
|
+
|
|
122
|
+
To apply the same block rule across multiple zones:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
#!/usr/bin/env bash
|
|
126
|
+
API_TOKEN="YOUR_API_TOKEN"
|
|
127
|
+
ZONES=("ZONE_ID_1" "ZONE_ID_2" "ZONE_ID_3")
|
|
128
|
+
EXPRESSION='(ip.src.country in {"RU" "BY" "IR" "KP"})'
|
|
129
|
+
|
|
130
|
+
for ZONE_ID in "${ZONES[@]}"; do
|
|
131
|
+
EXISTING=$(curl -s -X GET \
|
|
132
|
+
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets" \
|
|
133
|
+
-H "Authorization: Bearer $API_TOKEN" \
|
|
134
|
+
-H "Content-Type: application/json" | \
|
|
135
|
+
jq -r '.result[] | select(.phase == "http_request_firewall_custom") | .id')
|
|
136
|
+
|
|
137
|
+
if [ -z "$EXISTING" ]; then
|
|
138
|
+
METHOD="POST"
|
|
139
|
+
URL="https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets"
|
|
140
|
+
DATA=$(jq -n --arg expr "$EXPRESSION" '{
|
|
141
|
+
name: "default", description: "WAF Custom Rules",
|
|
142
|
+
kind: "zone", phase: "http_request_firewall_custom",
|
|
143
|
+
rules: [{action: "block", description: "Block sanctioned countries", enabled: true, expression: $expr}]
|
|
144
|
+
}')
|
|
145
|
+
else
|
|
146
|
+
METHOD="PUT"
|
|
147
|
+
URL="https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets/$EXISTING"
|
|
148
|
+
DATA=$(jq -n --arg expr "$EXPRESSION" '{
|
|
149
|
+
description: "WAF Custom Rules",
|
|
150
|
+
rules: [{action: "block", description: "Block sanctioned countries", enabled: true, expression: $expr}]
|
|
151
|
+
}')
|
|
152
|
+
fi
|
|
153
|
+
|
|
154
|
+
RESULT=$(curl -s -X "$METHOD" "$URL" \
|
|
155
|
+
-H "Authorization: Bearer $API_TOKEN" \
|
|
156
|
+
-H "Content-Type: application/json" \
|
|
157
|
+
--data "$DATA" | jq '.success')
|
|
158
|
+
|
|
159
|
+
echo "Zone $ZONE_ID: $RESULT"
|
|
160
|
+
done
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Notes
|
|
164
|
+
|
|
165
|
+
- `PUT` on an existing ruleset **replaces all rules** in it. Include all rules in the payload if the ruleset already has other rules.
|
|
166
|
+
- WAF Custom Rules require a Cloudflare plan that supports rulesets (Free includes basic WAF; Pro/Business/Enterprise for full custom rules).
|
|
167
|
+
- Changes are applied globally within seconds; no cache purge needed.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
description: "Block specific countries via Cloudflare WAF Custom Rules using the Cloudflare API. Handles creating new rulesets and updating existing ones across single or multiple zones."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Cloudflare Country Block via WAF Custom Rules
|
|
9
|
+
|
|
10
|
+
Block traffic from specific countries using Cloudflare WAF Custom Rules and the Cloudflare API.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Cloudflare API Token with `Zone:Rulesets:Edit` permission
|
|
15
|
+
- Zone ID for the target domain
|
|
16
|
+
- `curl` and `jq` installed
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### 1. Get Zone IDs
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
curl -s -X GET \
|
|
24
|
+
"https://api.cloudflare.com/client/v4/zones?account.id=YOUR_ACCOUNT_ID&status=active" \
|
|
25
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
26
|
+
-H "Content-Type: application/json" | jq '.result[] | {name: .name, id: .id}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 2. Check Existing Custom Firewall Rulesets
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
curl -s -X GET \
|
|
33
|
+
"https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/rulesets" \
|
|
34
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
35
|
+
-H "Content-Type: application/json" | \
|
|
36
|
+
jq '.result[] | select(.phase == "http_request_firewall_custom")'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If the output is empty — no existing ruleset. Go to **3a**. If a ruleset exists, note its `id` and go to **3b**.
|
|
40
|
+
|
|
41
|
+
### 3a. Create NEW Ruleset with Block Rule
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
curl -s -X POST \
|
|
45
|
+
"https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/rulesets" \
|
|
46
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
47
|
+
-H "Content-Type: application/json" \
|
|
48
|
+
--data '{
|
|
49
|
+
"name": "default",
|
|
50
|
+
"description": "WAF Custom Rules",
|
|
51
|
+
"kind": "zone",
|
|
52
|
+
"phase": "http_request_firewall_custom",
|
|
53
|
+
"rules": [
|
|
54
|
+
{
|
|
55
|
+
"action": "block",
|
|
56
|
+
"description": "Block traffic from sanctioned countries",
|
|
57
|
+
"enabled": true,
|
|
58
|
+
"expression": "(ip.src.country in {\"RU\" \"BY\" \"IR\" \"KP\"})"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}' | jq '.success'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3b. Update EXISTING Ruleset
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
curl -s -X PUT \
|
|
68
|
+
"https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/rulesets/RULESET_ID" \
|
|
69
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
70
|
+
-H "Content-Type: application/json" \
|
|
71
|
+
--data '{
|
|
72
|
+
"description": "WAF Custom Rules",
|
|
73
|
+
"rules": [
|
|
74
|
+
{
|
|
75
|
+
"action": "block",
|
|
76
|
+
"description": "Block traffic from sanctioned countries",
|
|
77
|
+
"enabled": true,
|
|
78
|
+
"expression": "(ip.src.country in {\"RU\" \"BY\" \"IR\" \"KP\"})"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}' | jq '.success'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 4. Verify the Rule is Active
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
curl -s -X GET \
|
|
88
|
+
"https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/rulesets/RULESET_ID" \
|
|
89
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
90
|
+
-H "Content-Type: application/json" | jq '.result.rules'
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Country Codes Reference
|
|
94
|
+
|
|
95
|
+
| Code | Country |
|
|
96
|
+
|------|---------|
|
|
97
|
+
| `RU` | Russia |
|
|
98
|
+
| `BY` | Belarus |
|
|
99
|
+
| `IR` | Iran |
|
|
100
|
+
| `KP` | North Korea |
|
|
101
|
+
| `CN` | China |
|
|
102
|
+
| `CU` | Cuba |
|
|
103
|
+
| `SY` | Syria |
|
|
104
|
+
| `VE` | Venezuela |
|
|
105
|
+
|
|
106
|
+
## WAF Expression Examples
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
# Block multiple countries
|
|
110
|
+
(ip.src.country in {"RU" "BY" "IR" "KP"})
|
|
111
|
+
|
|
112
|
+
# Block country + specific ASN
|
|
113
|
+
(ip.src.country eq "RU") or (ip.geoip.asnum eq 12345)
|
|
114
|
+
|
|
115
|
+
# Block all except allowlisted IPs
|
|
116
|
+
(ip.src.country in {"RU" "BY"}) and not (ip.src in {1.2.3.4/32})
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Multi-Zone Script
|
|
120
|
+
|
|
121
|
+
To apply the same block rule across multiple zones:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
#!/usr/bin/env bash
|
|
125
|
+
API_TOKEN="YOUR_API_TOKEN"
|
|
126
|
+
ZONES=("ZONE_ID_1" "ZONE_ID_2" "ZONE_ID_3")
|
|
127
|
+
EXPRESSION='(ip.src.country in {"RU" "BY" "IR" "KP"})'
|
|
128
|
+
|
|
129
|
+
for ZONE_ID in "${ZONES[@]}"; do
|
|
130
|
+
EXISTING=$(curl -s -X GET \
|
|
131
|
+
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets" \
|
|
132
|
+
-H "Authorization: Bearer $API_TOKEN" \
|
|
133
|
+
-H "Content-Type: application/json" | \
|
|
134
|
+
jq -r '.result[] | select(.phase == "http_request_firewall_custom") | .id')
|
|
135
|
+
|
|
136
|
+
if [ -z "$EXISTING" ]; then
|
|
137
|
+
METHOD="POST"
|
|
138
|
+
URL="https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets"
|
|
139
|
+
DATA=$(jq -n --arg expr "$EXPRESSION" '{
|
|
140
|
+
name: "default", description: "WAF Custom Rules",
|
|
141
|
+
kind: "zone", phase: "http_request_firewall_custom",
|
|
142
|
+
rules: [{action: "block", description: "Block sanctioned countries", enabled: true, expression: $expr}]
|
|
143
|
+
}')
|
|
144
|
+
else
|
|
145
|
+
METHOD="PUT"
|
|
146
|
+
URL="https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets/$EXISTING"
|
|
147
|
+
DATA=$(jq -n --arg expr "$EXPRESSION" '{
|
|
148
|
+
description: "WAF Custom Rules",
|
|
149
|
+
rules: [{action: "block", description: "Block sanctioned countries", enabled: true, expression: $expr}]
|
|
150
|
+
}')
|
|
151
|
+
fi
|
|
152
|
+
|
|
153
|
+
RESULT=$(curl -s -X "$METHOD" "$URL" \
|
|
154
|
+
-H "Authorization: Bearer $API_TOKEN" \
|
|
155
|
+
-H "Content-Type: application/json" \
|
|
156
|
+
--data "$DATA" | jq '.success')
|
|
157
|
+
|
|
158
|
+
echo "Zone $ZONE_ID: $RESULT"
|
|
159
|
+
done
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Notes
|
|
163
|
+
|
|
164
|
+
- `PUT` on an existing ruleset **replaces all rules** in it. Include all rules in the payload if the ruleset already has other rules.
|
|
165
|
+
- WAF Custom Rules require a Cloudflare plan that supports rulesets (Free includes basic WAF; Pro/Business/Enterprise for full custom rules).
|
|
166
|
+
- Changes are applied globally within seconds; no cache purge needed.
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
name: docs-index-keeper
|
|
3
3
|
description: Keep a repository's Markdown docs index in sync by installing and running docs-index-keeper in pre-commit hooks, CI, or one-off maintenance flows.
|
|
4
4
|
license: MIT
|
|
5
|
-
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, Grep, Glob
|
|
6
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires shell access and Node.js 18+ when installing from npm.
|
|
6
7
|
metadata:
|
|
7
8
|
author: Oleg Koval
|
|
8
9
|
package: docs-index-keeper
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
name: docs-index-keeper
|
|
5
5
|
description: Keep a repository's Markdown docs index in sync by installing and running docs-index-keeper in pre-commit hooks, CI, or one-off maintenance flows.
|
|
6
6
|
license: MIT
|
|
7
|
-
|
|
7
|
+
allowed-tools: Bash, Read, Write, Edit, Grep, Glob
|
|
8
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires shell access and Node.js 18+ when installing from npm.
|
|
8
9
|
metadata:
|
|
9
10
|
author: Oleg Koval
|
|
10
11
|
package: docs-index-keeper
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "olko:docs-index-keeper",
|
|
3
3
|
"version": "0.1.0",
|
|
4
|
-
"description": "Keep Markdown docs
|
|
4
|
+
"description": "Keep a Markdown docs index in sync through pre-commit, CI, or one-off maintenance flows.",
|
|
5
5
|
"skills": "skills/"
|
|
6
6
|
}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
name: docs-index-keeper
|
|
5
5
|
description: Keep a repository's Markdown docs index in sync by installing and running docs-index-keeper in pre-commit hooks, CI, or one-off maintenance flows.
|
|
6
6
|
license: MIT
|
|
7
|
-
|
|
7
|
+
allowed-tools: Bash, Read, Write, Edit, Grep, Glob
|
|
8
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires shell access and Node.js 18+ when installing from npm.
|
|
8
9
|
metadata:
|
|
9
10
|
author: Oleg Koval
|
|
10
11
|
package: docs-index-keeper
|
package/packages/software-development/docs-index-keeper/adapters/kiro/steering/docs-index-keeper.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
inclusion: manual
|
|
5
|
+
description: "Keep a Markdown docs index in sync through pre-commit, CI, or one-off maintenance flows."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# docs-index-keeper
|
|
10
|
+
|
|
11
|
+
Use this skill when a repository keeps docs under `docs/` and needs a Markdown index table updated automatically as docs are added or changed.
|
|
12
|
+
|
|
13
|
+
## Trigger phrases
|
|
14
|
+
|
|
15
|
+
- keep a docs index up to date
|
|
16
|
+
- auto-update `docs/README.md`
|
|
17
|
+
- add a pre-commit hook for docs indexing
|
|
18
|
+
- enforce docs index freshness in CI
|
|
19
|
+
- add a specific `docs/*.md` file into a Markdown index table
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
1. Confirm the repo has a docs directory and an index table such as `| Doc | Purpose |`.
|
|
24
|
+
2. Install the package if it is not already present:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -D docs-index-keeper
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. Initialize the hook:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx docs-index-keeper init
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
4. For CI enforcement, run:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx docs-index-keeper check
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
5. For one-off staged maintenance, run:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx docs-index-keeper update
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Notes
|
|
49
|
+
|
|
50
|
+
- `update` operates on staged Markdown files.
|
|
51
|
+
- `check` exits non-zero when the index is missing entries for staged docs.
|
|
52
|
+
- Purpose text comes from the first Markdown heading when available.
|
|
53
|
+
- New rows are inserted before an archive sentinel row when present.
|
package/packages/software-development/docs-index-keeper/adapters/windsurf/rules/docs-index-keeper.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
description: "Keep a Markdown docs index in sync through pre-commit, CI, or one-off maintenance flows."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# docs-index-keeper
|
|
9
|
+
|
|
10
|
+
Use this skill when a repository keeps docs under `docs/` and needs a Markdown index table updated automatically as docs are added or changed.
|
|
11
|
+
|
|
12
|
+
## Trigger phrases
|
|
13
|
+
|
|
14
|
+
- keep a docs index up to date
|
|
15
|
+
- auto-update `docs/README.md`
|
|
16
|
+
- add a pre-commit hook for docs indexing
|
|
17
|
+
- enforce docs index freshness in CI
|
|
18
|
+
- add a specific `docs/*.md` file into a Markdown index table
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
1. Confirm the repo has a docs directory and an index table such as `| Doc | Purpose |`.
|
|
23
|
+
2. Install the package if it is not already present:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -D docs-index-keeper
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. Initialize the hook:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx docs-index-keeper init
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
4. For CI enforcement, run:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx docs-index-keeper check
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
5. For one-off staged maintenance, run:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx docs-index-keeper update
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
- `update` operates on staged Markdown files.
|
|
50
|
+
- `check` exits non-zero when the index is missing entries for staged docs.
|
|
51
|
+
- Purpose text comes from the first Markdown heading when available.
|
|
52
|
+
- New rows are inserted before an archive sentinel row when present.
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gh-cli
|
|
3
3
|
description: GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.
|
|
4
|
-
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: Bash
|
|
6
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires the GitHub CLI and valid GitHub authentication.
|
|
5
7
|
metadata:
|
|
6
8
|
author: Oleg Koval
|
|
7
9
|
tags:
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
---
|
|
4
4
|
name: gh-cli
|
|
5
5
|
description: GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.
|
|
6
|
-
|
|
6
|
+
license: MIT
|
|
7
|
+
allowed-tools: Bash
|
|
8
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires the GitHub CLI and valid GitHub authentication.
|
|
7
9
|
metadata:
|
|
8
10
|
author: Oleg Koval
|
|
9
11
|
tags:
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
---
|
|
4
4
|
name: gh-cli
|
|
5
5
|
description: GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.
|
|
6
|
-
|
|
6
|
+
license: MIT
|
|
7
|
+
allowed-tools: Bash
|
|
8
|
+
compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires the GitHub CLI and valid GitHub authentication.
|
|
7
9
|
metadata:
|
|
8
10
|
author: Oleg Koval
|
|
9
11
|
tags:
|