@ssheleg/sheleg-dev 0.4.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/CHANGELOG.md +172 -0
  2. package/LICENSE +21 -0
  3. package/README.md +132 -0
  4. package/SECURITY.md +63 -0
  5. package/bin/sheleg-dev.js +99 -0
  6. package/package.json +45 -0
  7. package/plugins/sheleg-dev/.claude-plugin/plugin.json +28 -0
  8. package/plugins/sheleg-dev/skills/ad-tracking/SKILL.md +442 -0
  9. package/plugins/sheleg-dev/skills/ad-tracking/references/consent-mode.md +257 -0
  10. package/plugins/sheleg-dev/skills/ad-tracking/references/event-tracking.md +201 -0
  11. package/plugins/sheleg-dev/skills/ad-tracking/references/gtag-api.md +389 -0
  12. package/plugins/sheleg-dev/skills/ad-tracking/references/meta-linkedin.md +103 -0
  13. package/plugins/sheleg-dev/skills/ad-tracking/references/performance-security.md +288 -0
  14. package/plugins/sheleg-dev/skills/crypto-payments/SKILL.md +384 -0
  15. package/plugins/sheleg-dev/skills/crypto-payments/references/heleket-provider.md +1357 -0
  16. package/plugins/sheleg-dev/skills/frontend-performance/SKILL.md +147 -0
  17. package/plugins/sheleg-dev/skills/frontend-performance/references/accessibility-perf.md +172 -0
  18. package/plugins/sheleg-dev/skills/frontend-performance/references/css-performance.md +180 -0
  19. package/plugins/sheleg-dev/skills/frontend-performance/references/nextjs.md +271 -0
  20. package/plugins/sheleg-dev/skills/google-auth/SKILL.md +275 -0
  21. package/plugins/sheleg-dev/skills/google-auth/references/adc-and-service-accounts.md +464 -0
  22. package/plugins/sheleg-dev/skills/google-auth/references/oauth2-web-server.md +615 -0
  23. package/plugins/sheleg-dev/skills/google-auth/references/sign-in-with-google.md +593 -0
  24. package/plugins/sheleg-dev/skills/google-auth/references/workload-identity.md +376 -0
  25. package/plugins/sheleg-dev/skills/google-signin/SKILL.md +121 -0
  26. package/plugins/sheleg-dev/skills/google-signin/references/full-guide.md +421 -0
  27. package/plugins/sheleg-dev/skills/stripe-billing/SKILL.md +458 -0
  28. package/plugins/sheleg-dev/skills/stripe-billing/references/price-integrity.md +201 -0
  29. package/plugins/sheleg-dev/skills/stripe-billing/references/stripe-agent-toolchain.md +173 -0
  30. package/plugins/sheleg-dev/skills/stripe-billing/references/subscription-lifecycle.md +294 -0
  31. package/plugins/sheleg-dev/skills/stripe-billing/references/testing-and-local-dev.md +214 -0
  32. package/plugins/sheleg-dev/skills/stripe-billing/references/webhook-events.md +211 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,172 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+ Versioning: [SemVer](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.4.0] — 2026-08-12
8
+
9
+ ### Changed
10
+
11
+ - **Five of the six skills now open with `Use when …` and carry paired Russian
12
+ triggers** — `ad-tracking`, `crypto-payments`, `frontend-performance`, `google-auth`,
13
+ `google-signin`. `stripe-billing` already did, which is how the gap stayed invisible:
14
+ the pack looked migrated because the one skill anybody checked was. The other five
15
+ were unreachable from a request written in Russian.
16
+
17
+ v0.3.0 brought three of these descriptions inside the 970 headroom by dropping
18
+ duplicate triggers; this release rebuilds all five to the house shape — capability,
19
+ coverage, English and Russian triggers, exclusion — and every one lands between 821
20
+ and 884 chars.
21
+
22
+ ## [0.3.1] — 2026-08-11
23
+
24
+ ### Changed
25
+
26
+ - **Thirteen references over 100 lines now open with a `## Contents` list**,
27
+ generated from each file's own `##` headings. A partial read is what an agent
28
+ does with a long reference, and without the list it gets an arbitrary slice.
29
+
30
+ ## [0.3.0] — 2026-08-11
31
+
32
+ ### Changed
33
+
34
+ - **`ad-tracking`'s body went from 891 lines / 9160 tokens to 429 / 4747** —
35
+ both caps are 500 lines and 5000 tokens, so it had been running at nearly
36
+ double each. Measured with `cl100k`, not estimated.
37
+
38
+ Nothing was deleted. Consent, event naming, e-commerce, CSP, Next.js and
39
+ verification were duplicating `consent-mode.md`, `event-tracking.md`,
40
+ `gtag-api.md` and `performance-security.md` — which cover the same ground in
41
+ more depth — so the body keeps a load trigger and the trap, and the depth
42
+ stays where it already was. The GA4 command table and the recommended-event
43
+ table were verbatim subsets of two references.
44
+
45
+ What had **no** reference to go to was moved into a new one:
46
+ `references/meta-linkedin.md` (parameter objects per standard event, the
47
+ firing wrapper, advanced matching, CAPI deduplication).
48
+
49
+ The traps stay in the body on purpose — an agent cannot know to open a file
50
+ about a trap it does not know exists. The consent ordering, the
51
+ `NEXT_PUBLIC_*` build-time inlining, purchase deduplication and the
52
+ double-counted SPA page view are all still inline.
53
+
54
+ - **Three descriptions brought inside the 5% headroom** the canon asks for
55
+ (≤970 of 1024): `google-signin` 1021 → 968, `crypto-payments` 993 → 966,
56
+ `ad-tracking` 988 → 959. Only duplicate trigger phrases were dropped —
57
+ "crypto invoice" beside "crypto checkout", "ad pixel" beside "pixel". A
58
+ description at 99% of the cap has nowhere to put the "NOT for …" clause a
59
+ near-miss neighbour will eventually force.
60
+
61
+ ## [0.2.0] — 2026-08-11
62
+
63
+ A sixth skill, and the one the pack was missing: cards. `crypto-payments`
64
+ covered the gateway that calls you back; nothing covered the gateway that holds
65
+ the money and the subscription state.
66
+
67
+ ### Added
68
+
69
+ - **`stripe-billing`** — the seam between Stripe and your own database, which is
70
+ where subscription integrations actually fail. Stripe's agent toolchain first
71
+ (CLI, `stripe agent setup`, `stripe sandbox create` for keys without an
72
+ account, the MCP server's implementation planner, `.md` docs), then the
73
+ invariants: a lazily-built client with a pinned API version and
74
+ `maxNetworkRetries` rather than a hand-rolled loop that buys two subscriptions
75
+ for one intent; product-to-price resolution with pinned ids and both modes'
76
+ ids in every allowlist; the get-or-create customer race as a conditional
77
+ update with orphan cleanup; metadata written to the session **and**
78
+ `subscription_data`, because renewal events never see the session;
79
+ claim-first webhook idempotency with a release on failure, and the response
80
+ codes that decide whether Stripe retries; the verify endpoint as a safety net,
81
+ with the ownership check that stops one user claiming another's purchase;
82
+ `billing_reason` as the difference between a renewal and a $0.40 proration
83
+ invoice; proration with `error_if_incomplete` and a compensating Stripe revert
84
+ when the local write fails; cumulative `amount_refunded` handled as a
85
+ compare-and-swap; a sequential reconciliation job that leaves non-Stripe rows
86
+ alone; and price drift, which fails no request and reaches only customers.
87
+
88
+ Five references: `stripe-agent-toolchain.md`, `webhook-events.md`,
89
+ `subscription-lifecycle.md`, `price-integrity.md`,
90
+ `testing-and-local-dev.md`.
91
+
92
+ Stripe-side decisions — Checkout vs PaymentIntents, Connect, Tax, Metronome
93
+ for new usage-based billing — are deferred by name to Stripe's own
94
+ `stripe-best-practices` skill, which wins any disagreement. The rules taken
95
+ from Stripe's documentation (no `payment_method_types` on subscription
96
+ Checkout Sessions, one Product per plan a customer can choose, restricted keys
97
+ over secret keys, a secrets vault over environment variables) were read from
98
+ `docs.stripe.com` on 2026-08-11 against Stripe CLI 1.45.2 and the official
99
+ plugin 0.5.1.
100
+
101
+ ### Changed
102
+
103
+ - CI installs and asserts six skills, not five, and requires a `stripe-billing`
104
+ reference to land with them.
105
+
106
+ ## [0.1.0] — 2026-08-06
107
+
108
+ First release. Five skills, ported out of a Cursor-only skills directory where
109
+ they had no version, no validator and no way to reach any other agent. Every
110
+ external claim with a shelf life was re-checked against its source on
111
+ 2026-08-06 before shipping; what changed is listed under *Corrected on the way
112
+ in*.
113
+
114
+ ### Added
115
+
116
+ - **`crypto-payments`** — accepting crypto without losing money to the three
117
+ things that make it unlike cards: a payer who sends the wrong amount, a
118
+ webhook that arrives more than once, and a rate that moves between quote and
119
+ transfer. Status mapping with an explicit terminal set, signature verification
120
+ with constant-time compare and the JSON-escaping trap, idempotency as a
121
+ compare-and-swap rather than read-then-write, proxy-aware IP allowlisting,
122
+ CSRF exemption scoped to one exact path, the conversion buffer, the
123
+ reconciliation fields that make "what did we receive" answerable, the credit
124
+ waterfall, refunds and AML holds, tunnelled local development with signed mock
125
+ callbacks, a ten-case test matrix and a security checklist.
126
+ `references/heleket-provider.md` carries one gateway's concrete wire format.
127
+ - **`ad-tracking`** — GA4, Google Ads, Meta Pixel and LinkedIn Insight under
128
+ Consent Mode v2, with unified consent updates, cross-platform event mapping,
129
+ e-commerce and deduplication, CSP per platform, and Next.js patterns. Four
130
+ deep references on the Google tag itself: consent mode, the gtag API, event
131
+ design, and performance/security.
132
+ - **`google-signin`** — the GIS ID-token flow as a security problem: the
133
+ three-way account-linking branch with the pre-hijacking guard, login-CSRF
134
+ defence covering **both** delivery flows, nonce and replay protection, GCP
135
+ setup, and a checklist where each item maps to a real attack.
136
+ - **`google-auth`** — the server side: OAuth 2.0 web-server flow, Application
137
+ Default Credentials, service accounts and JWT, Workload and Workforce Identity
138
+ Federation, impersonation and downscoping — Node and Python throughout.
139
+ - **`frontend-performance`** — Core Web Vitals with an audit workflow, font
140
+ loading, GPU-composited animation and the gradient-animation alternatives,
141
+ bundle and cache work, CSP, and the accessibility rules that actually move a
142
+ Lighthouse score. References for CSS, Next.js and accessibility.
143
+
144
+ ### Corrected on the way in
145
+
146
+ - **FedCM is mandatory, not upcoming.** The source described the migration as
147
+ having happened; it did not say the opt-out is gone. FedCM has been required
148
+ for One Tap and Sign-In button implementations since **August 2025**, so
149
+ `use_fedcm` and the traffic exemption no longer exist, and code branching on
150
+ the old `isNotDisplayed()` moment callbacks needs revisiting. Corrected in
151
+ both `google-auth` and `google-signin`.
152
+ - **Consent Mode v2 now expects a certified CMP.** Required since March 2024 for
153
+ EEA/UK traffic; by 2026 Google additionally expects a CMP from its
154
+ certification programme, so a correct hand-rolled banner is no longer
155
+ sufficient on its own. Noted in `references/consent-mode.md`.
156
+ - **`crypto-payments` is provider-neutral by design.** The source was written
157
+ around a single gateway. The reusable engineering — signature verification,
158
+ idempotency, the buffer, reconciliation — is provider-shaped, and pinning it
159
+ to one processor made the skill narrower and tied it to that processor's
160
+ standing. The gateway's own wire format moved to a reference, which states the
161
+ compliance position on record for it and says plainly that choosing a
162
+ processor is not a technical decision.
163
+
164
+ ### Infrastructure
165
+
166
+ - Structural validator (`test/validate.py`): one version across four files,
167
+ Agent Skills front-matter limits, and `SKILL.md` ↔ `references/` agreement in
168
+ **both** directions — no dangling link, no file nobody loads.
169
+ - Installer CLI and `install.sh`, both installing all five skills, both
170
+ exercised by running them rather than syntax-checking them.
171
+ - CI with negative self-tests: every guard is planted against and required to
172
+ fail before it is trusted.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ssheleg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,132 @@
1
+ # sheleg-dev
2
+
3
+ The integration layer a product reaches once it has users: **money in, tracking,
4
+ sign-in, and speed.**
5
+
6
+ Part of the [ssheleg skill family](https://github.com/ssheleg/sshlg-skills).
7
+
8
+ ---
9
+
10
+ ## The six skills
11
+
12
+ | Skill | Answers |
13
+ |---|---|
14
+ | **`stripe-billing`** | how does a Stripe payment become an entitlement in my database, exactly once |
15
+ | **`crypto-payments`** | how do I take crypto without losing money to under-payment, duplicate webhooks or rate drift |
16
+ | **`ad-tracking`** | how do GA4, Google Ads, Meta and LinkedIn fire correctly under Consent Mode v2 |
17
+ | **`google-signin`** | how do I let people sign in with Google without handing someone their account |
18
+ | **`google-auth`** | how does my *server* authenticate to Google — OAuth, ADC, service accounts, federation |
19
+ | **`frontend-performance`** | why is the Lighthouse score bad and which fix actually moves it |
20
+
21
+ Each carries its own references and loads them only when the work reaches them.
22
+
23
+ **`stripe-billing`** — Stripe's own agent toolchain first (CLI, `stripe agent
24
+ setup`, a sandbox without an account, the MCP implementation planner), then the
25
+ seam it cannot help with: a pinned API version and SDK retries instead of a loop
26
+ that buys two subscriptions for one intent; metadata written twice, because
27
+ renewal events never see the checkout session; claim-first webhook idempotency
28
+ with a release on failure; `billing_reason` as the difference between a renewal
29
+ and a $0.40 proration invoice; proration with a compensating revert when the
30
+ local write fails; `amount_refunded` as a cumulative total, not an increment; a
31
+ reconciliation job that leaves non-Stripe rows alone; and price drift, which
32
+ fails no request and reaches only customers. Which Stripe primitive to use is
33
+ deferred to Stripe's own `stripe-best-practices` skill.
34
+
35
+ **`crypto-payments`** — status mapping with an explicit terminal set;
36
+ signature verification in constant time, with the forward-slash escaping trap
37
+ that makes signatures valid for some payloads and not others; idempotency as a
38
+ compare-and-swap (`updateMany` with a non-final status guard) instead of the
39
+ read-then-write race; proxy-aware IP allowlisting that counts hops from the
40
+ right; CSRF exemption scoped to exactly one path; the conversion buffer; the
41
+ reconciliation fields that make "what did we actually receive" answerable six
42
+ months later; refunds and AML holds as states, not events.
43
+
44
+ **`ad-tracking`** — one unified consent update across four platforms, standard
45
+ event mapping, e-commerce with deduplication, per-platform CSP, Next.js
46
+ patterns. Four deep references on the Google tag: consent mode, the gtag API,
47
+ event schema design, and performance/security.
48
+
49
+ **`google-signin`** — the ID-token flow treated as a security problem: the
50
+ three-way account-linking branch with the **pre-hijacking guard**, login-CSRF
51
+ covering both delivery flows, nonce and replay protection, and a checklist where
52
+ every item maps to a named attack.
53
+
54
+ **`google-auth`** — OAuth 2.0 web-server flow, Application Default Credentials
55
+ and its search order, service-account JWT including domain-wide delegation,
56
+ Workload and Workforce Identity Federation, impersonation, downscoping. Node and
57
+ Python side by side throughout.
58
+
59
+ **`frontend-performance`** — Core Web Vitals with an audit workflow and a budget
60
+ template; font loading; GPU-composited animation and what to do instead of
61
+ animating `background-position`; code splitting, cache headers, CSP; and the
62
+ accessibility rules — contrast, heading order, alt text, target size — that move
63
+ a Lighthouse score.
64
+
65
+ ---
66
+
67
+ ## Install
68
+
69
+ **Claude Code plugin** (recommended):
70
+
71
+ ```bash
72
+ /plugin marketplace add ssheleg/sheleg-dev
73
+ /plugin install sheleg-dev@sheleg-dev
74
+ ```
75
+
76
+ **npm installer** — copies all six skills into `~/.claude/skills/`:
77
+
78
+ ```bash
79
+ npx @ssheleg/sheleg-dev
80
+ ```
81
+
82
+ **Any of 70+ agents:**
83
+
84
+ ```bash
85
+ npx skills add ssheleg/sheleg-dev
86
+ ```
87
+
88
+ **Whole family at once:**
89
+
90
+ ```bash
91
+ npx --yes sshlg-skills@latest update
92
+ ```
93
+
94
+ Restart your agent afterwards — skills load at session start.
95
+
96
+ ---
97
+
98
+ ## A note on `crypto-payments`
99
+
100
+ The skill is provider-neutral on purpose. The reusable engineering — signature
101
+ verification, idempotency, the buffer, reconciliation — is provider-shaped, and
102
+ the invariants hold across Coinbase Commerce, NOWPayments, BTCPay and others.
103
+ One gateway's concrete wire format lives in a reference, together with the
104
+ compliance position on record for it.
105
+
106
+ **Choosing a payment processor is a business and compliance decision, not a
107
+ technical one.** Processors differ in licensing, AML programme and sanctions
108
+ exposure, and that standing changes. This pack tells you how to integrate one
109
+ correctly. It does not tell you which one to trust.
110
+
111
+ ---
112
+
113
+ ## Verify
114
+
115
+ ```bash
116
+ python3 test/validate.py
117
+ ```
118
+
119
+ One version across `package.json`, `plugin.json`, `marketplace.json` and the top
120
+ `CHANGELOG` entry; front matter inside the Agent Skills limits (over-long front
121
+ matter does not error — hosts truncate it silently, which is worse); and
122
+ `SKILL.md` ↔ `references/` agreement in **both** directions, so neither a
123
+ dangling link nor a file nobody loads can ship.
124
+
125
+ CI plants a defect against every one of those guards and requires the validator
126
+ to fail. A green from a check nobody has watched fail is not evidence.
127
+
128
+ ---
129
+
130
+ ## License
131
+
132
+ MIT © ssheleg
package/SECURITY.md ADDED
@@ -0,0 +1,63 @@
1
+ # Security
2
+
3
+ ## What this skill actually does on your machine
4
+
5
+ `sheleg-dev` is documentation plus one small Python script. Installed, it is:
6
+
7
+ | Component | Runtime behavior |
8
+ |---|---|
9
+ | `SKILL.md` + `references/*.md` | Text. Read by the agent, executes nothing. |
10
+ | `scripts/page_audit.py` | Runs only when you or the agent invokes it. Python **standard library only** — no dependencies, no install step. |
11
+ | `commands/`, `cursor/rules/` | Text read by the host agent. |
12
+ | `bin/sheleg-dev.js` (npm installer) | Copies the skill directory and the slash command into `~/.claude/`. No network, no post-install script. |
13
+
14
+ There is no telemetry, no analytics, no phone-home, and nothing writes outside
15
+ the paths above.
16
+
17
+ ## Network behavior of `page_audit.py`
18
+
19
+ - Plain `GET` requests, **http and https only** — any other scheme (`file://`,
20
+ `ftp://`, `gopher://`, …) is refused before a request is made, and a redirect
21
+ that leaves http(s) is refused too.
22
+ - Only to URLs **you** pass via `--url` / `--url-list`. In `--file` mode it makes
23
+ no requests at all, which is how the test suite runs.
24
+ - No cookies, no credentials, no auth headers; a plain User-Agent that identifies
25
+ the tool.
26
+ - Bounded: `--timeout` (default 20s) and `--max-bytes` (default 5 MB). A declared
27
+ content type that is not HTML/XHTML/XML is refused rather than parsed.
28
+ - Read-only: results go to stdout. The script never writes a file. The only files
29
+ it ever **reads** are the two you name yourself (`--file`, `--url-list`).
30
+
31
+ ## What the skill will not tell an agent to do
32
+
33
+ The audit procedure is explicitly **defensive**. Manipulative tactics —
34
+ cloaking, fabricated consensus networks, review manipulation, click-signal
35
+ spoofing, takedown abuse — appear only in `references/threats-and-defense.md`,
36
+ written as *detect and withstand*, and the skill's non-negotiables forbid
37
+ recommending them.
38
+
39
+ The procedure is also read-only by default: it will not submit forms, request
40
+ indexing, disavow links or change a live property without explicit approval in
41
+ the session.
42
+
43
+ ## Reporting a problem
44
+
45
+ Open an issue at <https://github.com/ssheleg/sheleg-dev/issues>. If it is
46
+ sensitive, say so in the issue without the details and a private channel will be
47
+ arranged.
48
+
49
+ ## Verifying for yourself
50
+
51
+ ```bash
52
+ git clone https://github.com/ssheleg/sheleg-dev && cd sheleg-dev
53
+ python3 test/validate.py # structure, version sync, references, links, anchors
54
+ python3 test/test_page_audit.py # auditor behavior, offline fixtures + scheme guard
55
+ grep -rnE "urlopen|build_opener|opener\.open|socket|subprocess|os\.system|\beval\(|\bexec\(|\bopen\(" \
56
+ plugins/sheleg-dev/skills/sheleg-dev/scripts/page_audit.py
57
+ ```
58
+
59
+ The last command prints the auditor's entire I/O surface — six lines: the
60
+ `urllib.request` import, one comment, the opener that carries the scheme guard,
61
+ the one `opener.open(...)` call, and the two `open()` calls that read the file
62
+ paths you pass on the command line. No `subprocess`, no `os.system`, no `eval`,
63
+ no `exec`, no raw sockets. Everything else in `plugins/` is markdown.
@@ -0,0 +1,99 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * sheleg-dev installer CLI.
4
+ *
5
+ * Installs every sheleg-dev skill into ~/.claude/skills/<name>
6
+ * (same layout as install.sh). Idempotent: an existing install is skipped unless
7
+ * --force. Zero dependencies.
8
+ *
9
+ * For other agents (Cursor, Codex, 70+) use: npx skills add ssheleg/sheleg-dev
10
+ */
11
+ 'use strict';
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+ const os = require('os');
16
+
17
+ const ROOT = path.resolve(__dirname, '..');
18
+ const REPO = 'ssheleg/sheleg-dev';
19
+
20
+ function usage() {
21
+ console.log(`sheleg-dev installer
22
+
23
+ Usage:
24
+ npx @ssheleg/sheleg-dev [--force] install all sheleg-dev skills
25
+ into ~/.claude (skip existing unless --force)
26
+ npx @ssheleg/sheleg-dev --help
27
+
28
+ Other install paths:
29
+ Claude Code plugin: /plugin marketplace add ${REPO}
30
+ /plugin install sheleg-dev@sheleg-dev
31
+ Any agent (70+): npx skills add ${REPO}`);
32
+ }
33
+
34
+ function copyDir(src, dest) {
35
+ fs.mkdirSync(dest, { recursive: true });
36
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
37
+ const s = path.join(src, entry.name);
38
+ const d = path.join(dest, entry.name);
39
+ if (entry.isDirectory()) copyDir(s, d);
40
+ else fs.copyFileSync(s, d);
41
+ }
42
+ }
43
+
44
+ function installOne(label, src, dest, isDir, force) {
45
+ if (fs.existsSync(dest) && !force) {
46
+ console.log(`skip: ${label} already installed at ${dest} (rerun with --force to overwrite)`);
47
+ return;
48
+ }
49
+ fs.rmSync(dest, { recursive: true, force: true });
50
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
51
+ if (isDir) copyDir(src, dest);
52
+ else fs.copyFileSync(src, dest);
53
+ console.log(`Installed ${label} -> ${dest}`);
54
+ }
55
+
56
+ function main(argv) {
57
+ const args = argv.slice(2);
58
+ if (args.includes('--help') || args.includes('-h')) {
59
+ usage();
60
+ return 0;
61
+ }
62
+ const force = args.includes('--force');
63
+ const unknown = args.filter((a) => a !== '--force');
64
+ if (unknown.length) {
65
+ console.error(`unknown argument(s): ${unknown.join(' ')}`);
66
+ usage();
67
+ return 2;
68
+ }
69
+
70
+ const skillsRoot = path.join(ROOT, 'plugins/sheleg-dev/skills');
71
+ if (!fs.existsSync(skillsRoot)) {
72
+ console.error(`error: skill sources missing at ${skillsRoot} — corrupted package?`);
73
+ return 1;
74
+ }
75
+
76
+ const names = fs
77
+ .readdirSync(skillsRoot, { withFileTypes: true })
78
+ .filter((e) => e.isDirectory())
79
+ .map((e) => e.name)
80
+ .sort();
81
+ if (!names.length) {
82
+ console.error(`error: no skills found under ${skillsRoot} — corrupted package?`);
83
+ return 1;
84
+ }
85
+
86
+ const home = os.homedir();
87
+ for (const name of names) {
88
+ installOne(
89
+ `${name} skill`,
90
+ path.join(skillsRoot, name),
91
+ path.join(home, '.claude', 'skills', name),
92
+ true,
93
+ force
94
+ );
95
+ }
96
+ return 0;
97
+ }
98
+
99
+ process.exit(main(process.argv));
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@ssheleg/sheleg-dev",
3
+ "version": "0.4.0",
4
+ "description": "Six integration skills for the layer a product reaches once it has users: Stripe subscription billing, crypto payments, ad and conversion tracking under Consent Mode v2, Google sign-in and the wider Google auth surface, and Core Web Vitals. This package is the installer CLI.",
5
+ "bin": {
6
+ "sheleg-dev": "bin/sheleg-dev.js"
7
+ },
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "files": [
12
+ "bin",
13
+ "plugins",
14
+ "README.md",
15
+ "LICENSE",
16
+ "CHANGELOG.md",
17
+ "SECURITY.md"
18
+ ],
19
+ "repository": "github:ssheleg/sheleg-dev",
20
+ "homepage": "https://github.com/ssheleg/sheleg-dev",
21
+ "license": "MIT",
22
+ "author": {
23
+ "name": "ssheleg",
24
+ "url": "https://x.com/sshlg93"
25
+ },
26
+ "engines": {
27
+ "node": ">=16"
28
+ },
29
+ "keywords": [
30
+ "subscriptions",
31
+ "stripe-billing",
32
+ "stripe",
33
+ "crypto-payments",
34
+ "webhooks",
35
+ "google-analytics",
36
+ "consent-mode",
37
+ "meta-pixel",
38
+ "google-auth",
39
+ "oauth2",
40
+ "core-web-vitals",
41
+ "claude-code",
42
+ "cursor",
43
+ "skill"
44
+ ]
45
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "sheleg-dev",
3
+ "displayName": "Sheleg Dev",
4
+ "description": "The integration layer a product needs once it has users: Stripe subscription billing reconciled into your own database, crypto payments that survive over-payment and duplicate webhooks, ad and conversion tracking under Consent Mode v2, Google sign-in with the account-linking guards, the wider Google auth surface, and Core Web Vitals work that moves the score.",
5
+ "version": "0.4.0",
6
+ "author": {
7
+ "name": "ssheleg",
8
+ "url": "https://x.com/sshlg93"
9
+ },
10
+ "homepage": "https://github.com/ssheleg/sheleg-dev",
11
+ "repository": "https://github.com/ssheleg/sheleg-dev",
12
+ "license": "MIT",
13
+ "keywords": [
14
+ "stripe",
15
+ "subscriptions",
16
+ "stripe-billing",
17
+ "crypto-payments",
18
+ "webhooks",
19
+ "google-analytics",
20
+ "consent-mode",
21
+ "meta-pixel",
22
+ "google-auth",
23
+ "oauth2",
24
+ "core-web-vitals",
25
+ "claude-code",
26
+ "cursor"
27
+ ]
28
+ }