add-ai
Skill50 starsChanged 21 days agoApache-2.0View on GitHub
Add AI to an existing Next.js project: chat assistant, content processing, or generation. Estimates the cost from live prices and provisions a spending-capped key before writing any code. Model-independent through OpenRouter.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- flavien-ia/hypervibe-craftword for word, first seen Oct 25, 2026
- T4LEL/Claude-Arsenaltheir own version, first seen Jul 12, 2026
Other versions2 projects use a version of this.
Word for word · 1
- flavien-ia/hypervibe-craft★ 50100% same
Edited · 0
None found.
Wrote their own version · 1
- T4LEL/Claude-Arsenal★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository89 other files it gives its agents.
- accessibilitySkill
- add-2faSkill
- add-agent-dashboardSkill
- add-analyticsSkill
- add-authSkill
- add-automationSkill
- add-backup-dbSkill
- add-collabSkill
- add-cronSkill
- add-dark-modeSkill
- add-dbSkill
- add-domainSkill
- add-emailSkill
- add-github-authSkill
- add-google-authSkill
- add-i18nSkill
- _add-keyringSkill
- add-mapSkill
- add-notification-centerSkill
- add-push-notificationSkill
- add-pwaSkill
- add-roleSkill
- add-routineSkill
- add-storageSkill
- add-stripeSkill
- add-testSkill
- bootstrapSkill
- _check-depsSkill
- cleanSkill
- _collect-secretSkill
- _convert-to-turborepoSkill
- _create-agentSkill
- _create-cloudflare-workerSkill
- _create-contact-pageSkill
- _create-render-workerSkill
- _create-routineSkill
- _create-workflowSkill
- delete-projectSkill
- _detect-project-rootSkill
- _dns-brevoSkill
- _dns-cloudflareSkill
- _dns-gandiSkill
- _dns-godaddy-manualSkill
- _dns-hostingerSkill
- _dns-infomaniak-manualSkill
- _dns-ionos-manualSkill
- _dns-lwsSkill
- _dns-namecheapSkill
- _dns-ovhSkill
- _dns-porkbunSkill
- _dns-resendSkill
- _dns-squarespace-manualSkill
- eco-auditSkill
- _ensure-aiSkill
- _ensure-vaultSkill
- _generate-secretSkill
- geoSkill
- _get-secretSkill
- gscSkill
- _hash-passwordSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Use plain, non-technical business language.
- Distinctive: line 23
When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
- Distinctive: line 47
Before anything, check this is the right skill:
- Very specific: line 61
Use AskUserQuestion. Do not ask what you can infer from the project.
- Very specific: line 71
If the answer covers several, build the dominant one and say the others are one MODELES entry away.
- Very specific: line 120
Rate limit: if Q2 said users or public: reuse the project's existing limiter if there is one.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add AI - Intelligence inside the product
Adds AI to the user's application: a chat assistant, a processing step, a
generator. Everything routes through one file in the project
(src/server/ai.ts), and through OpenRouter, so that changing model is a
string to edit rather than a migration.
You own the feature: what it does, where it plugs in, what the user sees.
The brick underneath (the key, the budget, the shared file) is installed by
_ensure-ai, which every intelligence-needing skill of the plugin calls.
That is what guarantees the same three boundaries everywhere.
Communication
- Detect the user's language from the conversation (the user's own messages, anywhere in the session - not just this invocation: a bare slash command like
/bootstrapcarries no language signal by itself). If nothing in the conversation gives a signal, fall back to the OS locale (node -e "console.log(Intl.DateTimeFormat().resolvedOptions().locale)") before defaulting to English. ALWAYS reply in that language for every user-facing message: questions, progress, confirmations, summaries, errors - including any example text quoted in this skill, which is illustrative and must be translated, never sent verbatim. - Use plain, non-technical business language. Never expose internal script names (*.mjs) or jargon; describe actions in human terms.
- When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
- Show progress as a short natural-language checklist (in-progress and done states).
What this skill refuses to do
Three boundaries, and they matter more than the features. They are applied by
_ensure-ai, so they hold identically whichever skill installed the AI:
- No code before a validated budget. The user sees what it will cost, in their currency, for their volume, from the live price catalogue. They say yes to a number.
- No key without a cap. The key created for the project carries a spending limit held by OpenRouter itself. A runaway loop hits a wall on the provider's side, not on a counter we wrote.
- No free model on personal data. Free models exist and are genuinely useful, but some providers train on what passes through. Free is for prototyping; production data goes to paid models with training refused.
A user who deliberately wants to call OpenAI or Anthropic directly is never
blocked: _ensure-ai offers the same brick on their provider, records the
choice if they decline even that, and every later skill honours it silently.
Routing away
Before anything, check this is the right skill:
- The need is an autonomous process that decides on its own, uses tools, and
runs in the background ->
_create-agent, invoked with a brief. - The need is scheduled or event-driven processing ->
/add-automation, which routes to the right shape. - The need is a personal recurring mission for the operator (a weekly brief
for themselves) ->
/add-routine, when this tool offers it (otherwise say that this tool cannot schedule a mission).
Say which one and hand off. Do not build a second agent runtime here.
Step 1 - Discovery (4 questions, no more)
Use AskUserQuestion. Do not ask what you can infer from the project.
Q1 - What should the AI do? Free text, then classify into one recipe:
| Recipe | Signals | What gets built |
chat | "assistant", "answer questions", "support", "converse" | Streaming route + chat panel |
traitement | "classify", "extract", "sort", "analyse", "summarise" | traiterAvecIA() helper returning validated JSON |
generation | "write", "draft", "produce a text", "description" | Same helper, higher temperature, free-text output |
If the answer covers several, build the dominant one and say the others are one
MODELES entry away.
Q2 - Who uses it?
- Me only / my organisation -> no rate limit needed, generous cap.
- My logged-in users -> per-user rate limit, cap sized on the user count.
- Anyone, publicly -> warn explicitly: a public AI endpoint is a public wallet. Per-IP rate limit, tight cap, and say so plainly.
Q3 - Roughly how many uses per day? A number, even vague. It drives the estimate. If they have no idea, propose 50 and say the cap protects them anyway.
Q4 - Will personal data pass through? (customer messages, CVs, health, anything identifying.) If yes -> the free tier is off the table, and the GDPR entry is mandatory.
Step 2 - The brick (delegated)
Invoke _ensure-ai with the brief:
| Field | Value |
USAGE | the recipe name (chat, traitement, generation) |
PROFIL | same as the recipe (qr for a short question-answer) |
PAR_JOUR | Q3 |
DONNEES_PERSONNELLES | Q4 |
CIBLE | app |
It handles the account check, the cost estimate, the budget the user validates, the capped key, the shared file, the cost-log table, the GDPR entry and the CLAUDE.md convention. When the project already has its brick, it is silent and just binds the new usage.
It hands back MODE, FOURNISSEUR, MODELE and PLAFOND_USD. If MODE is
direct, the project deliberately calls a provider itself: build the recipe
below against the project's existing pattern instead of appelerIA, and do not
bring up OpenRouter again.
Step 3 - Build the recipe
chat->templates/ai/chat-route.tstosrc/app/api/chat/route.ts(fill__CONSIGNE_SYSTEME__from what the user described,__GARDE_ACCES__from Q2,__USER_ID__with the session user ornull), andtemplates/ai/chat-panel.tsxtosrc/components/chat-panel.tsx. Wire it into a real page, never leave it orphaned.traitement/generation->templates/ai/traitement.tstosrc/server/ai-traitement.ts,__SCHEMA_CHAMPS__filled with the fields the user actually needs, and call it from a real place in the project.
Rate limit if Q2 said users or public: reuse the project's existing limiter
if there is one; otherwise a simple per-user-and-hour count on ai_usage, which
is already indexed for it.
Step 4 - Wrap up
✅ AI installed.
- What it does: <recipe, in one sentence>
- Model:
<id>(tier <Éco/Qualité>)- Estimated cost:
<X>$ per month for<N>uses a day- Hard cap:
<Y>$, held by OpenRouter. Past it, calls stop and the app says so rather than failing silently.- Every call is logged with its real cost in the
ai_usagetable.To change model, edit
MODELESinsrc/server/ai.ts. To change the cap, go to openrouter.ai/settings/keys.
Then say the one thing they will hit first: the first call fails if the OpenRouter account has no credits, even for free models beyond 50 requests a day. Adding 10 $ of credits also raises the free-model limit to 1000 a day.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

