add-ai-feature
Skill1 starsChanged 24 days agoMITView on GitHub
Adds an LLM-powered feature (chat, generation, summarisation, extraction, classification, agent with tools, RAG over the product's data) with server-side keys, streaming, structured outputs, prompt-injection defences, cost limits and an eval set. Use when the product needs AI capabilities.
- Reads credentials
In this repository100 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- add-authSkill
- add-cmsSkill
- add-i18nSkill
- add-paymentsSkill
- add-realtimeSkill
- adoptSkill
- analytics-planSkill
- api-contractSkill
- architecture-decisionSkill
- architecture-reviewSkill
- brainstormSkill
- brand-identitySkill
- bug-reportSkill
- bug-triageSkill
- changelogSkill
- ci-setupSkill
- client-demoSkill
- competitor-auditSkill
- consistency-checkSkill
- content-calendarSkill
- content-strategySkill
- create-architectureSkill
- create-epicsSkill
- create-storiesSkill
- cro-reviewSkill
- data-modelSkill
- db-migrationSkill
- dependency-auditSkill
- deploy-setupSkill
- design-reviewSkill
- design-systemSkill
- design-tokensSkill
- dev-storySkill
- e2eSkill
- email-flowsSkill
- estimateSkill
- experimentSkill
- feature-specSkill
- funnel-reviewSkill
- gate-checkSkill
- helpSkill
- hotfixSkill
- incidentSkill
- install-depsSkill
- launch-checklistSkill
- load-testSkill
- market-researchSkill
- milestone-reviewSkill
- observability-setupSkill
- onboardSkill
- perf-auditSkill
- personasSkill
- postmortemSkill
- privacy-auditSkill
- project-stage-detectSkill
- propagate-design-changeSkill
- prototypeSkill
- refactorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
If installed, the claude-api skill (current model IDs, SDK usage, tool use, prompt caching).
- Distinctive: line 27
Ask: what the user gives, what they get, what "good" looks like (3–5 concrete examples), latency expectation (streaming?), and what must …
- Very specific: line 33
If stack.ai is null, ask for the provider.
- Distinctive: line 59
Ask: stories (recommended) or direct implementation.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 Feature
AI features must be useful, safe and affordable, and measured with evals. No paid API calls happen without the user's explicit go-ahead; tests use recorded or mocked responses.
Inputs
- The feature description and its spec/PRD section
project.yaml → stack.ai,stack.database,stack.search,privacy.regions- If installed, the
claude-apiskill (current model IDs, SDK usage, tool use, prompt caching); otherwise fetch the provider's official docs. Never guess model IDs.
Phases
Phase 1: Shape the feature
Ask: what the user gives, what they get, what "good" looks like (3–5 concrete examples), latency expectation (streaming?), and what must never happen. Decide the pattern: single call with structured output, chat, RAG, or tool-using agent.
Phase 2: Provider and model
If stack.ai is null, ask for the provider. Pick the model by task, latency and
cost; default to the provider's latest suitable models. Estimate cost per request
and per active user per month. ADR for a new vendor; config-set.sh stack.ai=<value>
after approval.
Phase 3: Data, safety and privacy
- RAG: what sources, chunking, embeddings, vector store (pgvector by default), permission filtering at retrieval time (users only retrieve what they may read), citations back to sources.
security-lead: prompt injection from retrieved/user content, tool misuse, data exfiltration via output links/markdown, over-broad tools. Tools with side effects require user confirmation.privacy-compliance-specialist: what personal data goes to the provider, retention, processor listing, disclosure to users.
Phase 4: Plan
ai-features-engineer with the backend specialist:
- server-only SDK client; key in env (
.env.exampleplaceholder) - versioned prompts in code; structured outputs (JSON schema / tool use) for anything parsed
- streaming endpoint with abort and timeout handling; UI with partial rendering and stop button
- per-user rate limits and quotas, token budgets, prompt caching where supported, usage logging
- eval set (
tests/evals/<feature>.jsonl, 10–30 labelled cases) and a script to run it on demand - tests with mocked model responses; no live calls in CI
Ask: stories (recommended) or direct implementation.
Never
Ship keys to the client; let model output execute code or side effects unreviewed; send data the privacy policy doesn't cover; run evals against paid APIs without the user's go.
Next step
/security-audit ai, then /analytics-plan to measure the feature's use.
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.

