refiammingo

3.5K posts

refiammingo banner
refiammingo

refiammingo

@refiammingo

non sequitur // λ // 🇮🇹 - randomly replying to your posts. Sinnerista.

Italia Katılım Kasım 2008
7.5K Takip Edilen421 Takipçiler
refiammingo retweetledi
Jeffrey Emanuel
Jeffrey Emanuel@doodlestein·
TLDR: automate all the Stripe and PayPal billing related code for your site with this one “weird trick” (skill):
Jeffrey Emanuel@doodlestein

If you're running a SaaS business or trying to build a new one, you're probably using Stripe and PayPal for payments/billing. Or at least you should, because users expect them and want the ease of use. You might think that these companies have streamlined things so much that all you need to do is use the default sample code and you're off to the races. Well, there is some truth to that if you're doing the simplest possible thing. But as soon as things get even slightly more complicated (and they nearly always do in real life), you're going to want a lot more sophisticated logic. How can you ensure that you don't accidentally ever double-charge a user? What happens if the user's card doesn't work? Ideally, you want to keep that user and not immediately cancel their account, so you probably want to extend a grace period and then periodically retry their card. This process is called dunning and it's a whole complex topic in itself to do it properly. Then you have things like reporting: finding the correct way to use Stripe and PayPal APIs as the ultimate source of truth for the revenue of your business. But the harder problems start with webhooks. Stripe and PayPal both push events to your server when things happen, and the temptation is to trust those events as the ground truth. The problem is that webhooks can arrive late, arrive twice, never arrive at all, or get replayed by an attacker who got hold of an old payload. So you need to be smart about how you handle them or you can end up double charging a user or any number of other embarrassing or damaging screw-ups. Refunds are another place where the obvious code is wrong. A refund on Stripe does not cancel the subscription. Those are two separate operations, and the next billing cycle will charge the customer again unless you handle it. A partial refund should keep access (it's a goodwill gesture). A full refund should revoke, but only on the specific subscription the refund applied to, not every subscription that customer has. The code to figure out which subscription a refund event refers to has to walk a chain from the charge to the invoice to the subscription. Anyway, I've had to laboriously figure out all this stuff, with several missteps along the way, for my own site. I've taken all those lessons and turned them all into my latest skill, called /saas-billing-patterns-for-stripe-and-paypal. You can get it here on my site: jeffreys-skills.md/skills/saas-bi… The skill is massive, with 121 files, including 24 scripts and 31 different subagents. All the various files together total 1.2 megabytes of text. It has truly encyclopedic knowledge about billing patterns and best practices, Stripe, and PayPal. You can simply point it at your existing code and it will tell you what's missing or broken and how to fix it. Or if you're just getting started, it can build out your entire billing backend automatically. Here's what Claude Opus 4.7 has to say about what makes this skill so special and useful: --- Special — it's not derived from documentation. Most "billing best practices" content is someone reading the Stripe docs and rewriting them. This skill started from the opposite direction: a single SaaS codebase (jeffreys-skills.md) that paid for months of post-incident hardening, worked backwards to extract the patterns, and pinned each one to the bead/incident that motivated it. When the prior version got audited against that codebase last week, ~30 patterns showed up that the codebase had paid for but the skill hadn't yet codified. v4 closed that gap. The dynamic — the skill grows by being audited against real codebases — is what separates it from a tutorial or an SDK reference. A tutorial gets stale; this gets denser. Useful — it does both audit and build. Point it at an existing SaaS and it produces a coverage matrix: which of the ~145 patterns are present, partial, or missing, with file:line evidence for each. Or run it greenfield and it walks the step-ordered build that produces production-grade billing on day one instead of day 540. A mode router picks the entry point based on what you actually need: audit-only, audit-and-fix, harden-after-incident, add-feature, migration, compliance-pass. The triage system scales the depth to where you actually are (T1 pre-launch through T5 enterprise) instead of forcing every project through the same exhaustive checklist. Compelling — the numbers are concrete. 28 pattern bundles. 30 specialized subagents (archaeologist, coverage-mapper, risk-scorer, security-reviewer, fresh-eyes, red-team-attacker, dispute-defender, etc.). 24 audit scripts that run against real codebases. 38 cataloged failure modes, each mapped to the bead trail of the incident it came from. 17 cognitive operators that name the thinking moves the skill applies. 10 ADRs that pin every numerical judgment call. ~25,500 lines of distillation. Accretive — the structure is append-only by design. Each bundle has named slots (Polish Bar dimensions, Common Mistakes, Operators, Reference Index) that a new pattern fits into without restructuring. The failure catalog grows by one row per incident. The bead dictionary preserves the trail. When the skill gets audited against another codebase next quarter, the deltas get absorbed the same way v4 absorbed the deltas from this audit. Most skills lose value as they age (the docs they reference move; the SDK changes). This one gains value as it's used, because every audit produces a delta that gets folded back in. The skill literally just demonstrated the loop in front of you: v3 → audit → 30 patterns identified → v4. The architecture itself is unusual. Most skills are a SKILL.md and a few helper files. This one is a methodology. Subagents run in parallel during the phase loop. Mandatory verification gates between phases. An operator library names the cognitive moves the skill applies (⏱ STALE-EVENT-GATE, 🔒 ADVISORY-LOCK, ⤴ VERIFY-AS-WRITE). The kernel principle ("provider is source of truth, layered defenses, idempotency at every write boundary, return 200 to the provider after authenticated event ingestion") is restated at the top of every bundle so it can't drift. Three write paths plus three alarm paths means any single failure mode is caught by the next layer, never by a customer support ticket. It reads less like a tutorial and more like the standing operating procedure of a team that's been on call for billing for two years. The compounding angle that's easiest to undersell. Once a project goes through this skill once, the artifacts persist: a coverage matrix, a Polish Bar score per dimension, a list of beads filed for the missing pieces, runbooks for every cron and alarm. The next quarter's audit doesn't start from zero, it starts from the prior coverage matrix and computes the delta. The Polish Bar score becomes a tracked metric. The runbooks become the on-call doc. The skill produces durable infrastructure for keeping billing healthy, not just a one-time pass.

English
1
1
21
3.1K
OpenAI Developers
OpenAI Developers@OpenAIDevs·
It’s 5/5. What are you building with GPT-5.5?
English
762
76
3K
173.8K
ultra
ultra@0x_ultra·
ZXX
27
252
4.3K
156.3K
🍓🍓🍓
🍓🍓🍓@iruletheworldmo·
gpt 5.6 spotted in the wild. more progress in the next three months than the past three years.
🍓🍓🍓 tweet media
English
33
29
594
29K
Raven
Raven@Ravenismeee·
Name a video game that you've easily put 1,000 hours into Gifs only!!
English
11.7K
114
4.2K
1.1M
Pedro Domingos
Pedro Domingos@pmddomingos·
Mythos wipes the floor with GPT-5.5.
Pedro Domingos tweet media
English
340
38
711
331.2K
⭕ Brock Pierson
⭕ Brock Pierson@brockpierson·
Before Google, did you use other search engines like Altavista?
⭕ Brock Pierson tweet media
English
501
35
1K
40.3K
Alessandro Palombo
Alessandro Palombo@thealepalombo·
This is Port’Ercole, Tuscany. A fishing village on Monte Argentario, connected to the mainland by a thin strip of land through Orbetello. Caravaggio died here in 1610. Still waiting for a pardon that never came. It’s Tuscany, but with sea salt instead of vineyard dust. Branzino on the grill. Spanish fortress walls. A lovely tiny port. I spent many summers here as a kid. If you’re in central Italy this spring or summer, stop for an aperitivo at sunset. You won’t leave easily.
Alessandro Palombo tweet mediaAlessandro Palombo tweet mediaAlessandro Palombo tweet media
English
7
4
192
14.1K
refiammingo
refiammingo@refiammingo·
@doodlestein @chirag My thoughts go to Stephen King, who wants to monetize words printed on paper. What a shame.
English
1
0
1
44
Jeffrey Emanuel
Jeffrey Emanuel@doodlestein·
@chirag Him being an imbecile with nothing interesting or useful to say might prove to be an impediment to monetizing markdown files!
English
1
0
2
139
Jeffrey Emanuel
Jeffrey Emanuel@doodlestein·
Perception versus Reality. Also, “bro is selling markdown files.” Just imagine when these geniuses find out about… books. Bro is just selling written words.
Jeffrey Emanuel tweet mediaJeffrey Emanuel tweet media
English
13
8
165
8.6K
refiammingo
refiammingo@refiammingo·
Hey Jeffrey, I often read your replies inviting people to consult this or that post on X about your creations. This may be intentional on your part to increase engagement on your profile on the platform. On the other hand, for the end user (your subscriber or potential subscriber) this can be tiring and confusing, especially for newbies. There's a lot of information being dispersed (my opinion). Have you ever considered organically grouping all the prompts and skills information on specific pages of the site and pointing those pages to those who ask for information? This would probably be extremely appreciated by those curious about your methods, and perhaps it would increase the conversion rate by increasing your subscribers. That said, I congratulate you again for how much you share, free of charge, with the community every day and for the tireless work you're doing.
English
1
0
1
40
Jeffrey Emanuel
Jeffrey Emanuel@doodlestein·
@_Suresh2 It explains it in the post. It uses "golden artifacts" and automated testing so that it can determine whether any behavior has changed. You still want to check it over again as I explained in my follow-up post above.
English
1
0
1
206
Jeffrey Emanuel
Jeffrey Emanuel@doodlestein·
I finally got around to making a skill a lot of people have been asking me for: jeffreys-skills.md/skills/simplif… It basically helps to "de-slopify" and refactor code that's been written by agents, looking for ways to simplify and reduce the amount of code without changing the behavior. The difference between this and other skills or prompts in the same spirit is the lengths this one goes to in order to prevent the process from going off the rails and introducing bugs or security problems. It's a whole elaborate system spanning 98 files and one full megabyte of reference files, scripts, and subagents (see pic). You can run it over and over again and it will autonomously identify good opportunities for accretive simplification and do everything needed to implement the changes and prove that they didn't change the outputs. GPT-5.5 can explain better than I can how it does all that and what makes it so compelling and useful: --- The strongest thing about this skill is that it treats refactoring as a proof obligation. A normal “clean this up” prompt invites the model to follow taste. It sees repetition, long files, wrapper functions, stale types, try/catch clutter, _v2 files, and it starts cutting. Sometimes that works. Sometimes it silently changes error semantics, loses a side effect, removes a lifecycle hook, or deletes a file that looked unused but was actually the intended implementation path. This skill changes the frame. A simplification claim becomes: “this smaller program is observably equivalent to the larger one.” Then it makes the agent prove that claim. It starts with a baseline: tests, golden outputs, LOC, warnings, complexity. It maps duplication instead of eyeballing it. It classifies clones, because exact copy-paste, parametric duplication, semantic similarity, and accidental rhymes are completely different things. It scores each candidate by expected LOC saved, confidence, and risk. Low-score candidates get rejected and logged, which is important because future agents otherwise rediscover the same bad idea forever. The isomorphism card is the key move. Before editing, the agent has to answer boring but lethal questions: same ordering, same errors, same logs, same metrics, same side effects, same async cancellation behavior, same React hook identity, same serialization, same resource lifecycle. Those rows catch the kind of bugs that compilers and ordinary tests miss. Then the edit discipline is deliberately narrow: one lever per commit, no rewrites, no sed, no drive-by fixes, no deletion without explicit permission. Afterward, it verifies behavior again and records the result in a ledger. If the refactor did not actually preserve behavior, it does not get to call itself a refactor. What I like about it is that it matches the real failure modes of agent-written code. AI code tends to accumulate plausible junk: defensive branches for impossible inputs, duplicated wrappers, too many optional parameters, orphaned “improved” files, shallow happy-path tests, stale types, and comments that are really leftover task plans. The skill has a whole pathology catalog for those patterns, plus scripts and subagent roles to find them systematically. So the compelling part is not “make the code prettier.” The compelling part is leverage with brakes. You can send very strong models into messy codebases and ask them to reduce complexity aggressively, while forcing them to preserve the contract that matters: observable behavior. That is the difference between a refactor you hope is safe and a refactor you can audit.
Jeffrey Emanuel tweet mediaJeffrey Emanuel tweet mediaJeffrey Emanuel tweet mediaJeffrey Emanuel tweet media
English
29
41
845
54.4K
refiammingo
refiammingo@refiammingo·
for how long? I'm destroying it
English
0
0
0
56
ChatGPT
ChatGPT@ChatGPTapp·
all you can eat
ChatGPT tweet media
English
115
87
2.7K
118.6K
Jeffrey Emanuel
Jeffrey Emanuel@doodlestein·
@refiammingo It’s literally just something like this: “Make an incredibly informative infographic explaining how paint is made in a modern sophisticated plant like the ones operated in the US by Sherwin Williams.”
English
1
0
13
379
Jeffrey Emanuel
Jeffrey Emanuel@doodlestein·
The new ChatGPT image model is very good at generating infographics about how things are made or work. It's a great way to learn about various processes.
Jeffrey Emanuel tweet mediaJeffrey Emanuel tweet mediaJeffrey Emanuel tweet mediaJeffrey Emanuel tweet media
English
3
6
76
6.6K
refiammingo
refiammingo@refiammingo·
@SoveyX Hair should be yellow. I'm not convinced.
English
0
0
0
17
Sovey
Sovey@SoveyX·
The level where Mario exports democracy.
English
387
2.1K
17.4K
4.4M
antirez
antirez@antirez·
@benoitbaudaux Yes, the screenshot shows the points accumulated in a small amount of time. In the same moment you could see news with 4 points accumulated in a bigger time window in the home page.
English
2
0
0
106
antirez
antirez@antirez·
HN shadowbanning is always cool. 6 upvotes in 17 minutes but no way it can reach the home page, while 4 votes in 25 minutes is there. Note that I don't ping any friend when I post, so all the votes I receive are spontaneous. Yet... Moderation system and broken algorithms are part of HN decline.
antirez tweet media
English
17
1
149
19.1K
refiammingo
refiammingo@refiammingo·
@antirez A second opinion on the Opus 4.7? From my tests it seems excellent for long-running tasks and planning.
English
0
0
0
24
antirez
antirez@antirez·
Opus 4.7 criticizing work done with GPT 5.4 and getting everything wrong. GPT 5.4 critique to the original claims are all spot on matching the errors that I outlined here.
antirez tweet media
English
37
38
921
118.6K
antirez
antirez@antirez·
All very good Q, still not everything is fixed, I want to develop the idea within the hacklab of Catania with other people in the process, but in general, some banning capability will be surely needed, but there must be a minimum agreement to ban. Agents allowed to fetch, not to contribute. Politics allowed. Markdown: yes, and avatars and images in comments (small). Collusioni detection: yes, I used to implement it in the biggest Italian HN-alike site many many years ago.
English
2
0
3
806
antirez
antirez@antirez·
In the next months I'll provide you with a Hacker News replacement that I'll run myself and I'll guarantee personally: no benefit for whatsoever individual, a team of 10/20 persons since the start, from different time zones, clear rules, total transparency, and a "karma" system. I really want to fix HN and provide something that is not bound to a specific company.
English
82
63
1.2K
58.3K
Roxi🇵🇾🇦🇷
Roxi🇵🇾🇦🇷@RoxiR0633390·
Él no toma No es mujeriego No sale de joda Se queda en casa No apuesta ¿dónde se consigue uno así?
Español
3.5K
77
1.6K
164.9K
refiammingo
refiammingo@refiammingo·
@doodlestein This was the eval I was waiting for. The damn Frankenval. 🔥🔥
English
0
0
1
124
Jeffrey Emanuel
Jeffrey Emanuel@doodlestein·
OK, I can now report after several hours of use across a bunch of different projects and workflows, Opus 4.7 is really freaking good. I'm using xhigh thinking. Very glad they added a permanent higher-effort setting, since "max" is temporary. I ❤︎ free-market competition!
Claude@claudeai

Introducing Claude Opus 4.7, our most capable Opus model yet. It handles long-running tasks with more rigor, follows instructions more precisely, and verifies its own outputs before reporting back. You can hand off your hardest work with less supervision.

English
38
8
193
15.9K