dif-sh/dif/dif-docs
Claude Code and agent skill by dif-sh/dif
- community
Checking that the SKILL.md file is still in the repository.
Reference for dif.sh — feature flags and A/B experiments stored as Markdown files in the repo and compiled by `dif build` into a typed TypeScript client. Use when adding feature flags, a percentage rollout, or an A/B test to a JavaScript or TypeScript app (Next.js, React, SvelteKit, plain TS), when the user wants flags as code instead of a dashboard, or when the user mentions dif, dif/config.yaml, dif build, dif validate, or @dif.sh/sdk.
Install
npx vskill@latest install dif-sh/dif/dif-docsSKILL.md
dif.sh reference
dif keeps each feature flag or A/B experiment as one .md file under dif/experiments/, checked into git with the code it gates. dif validate checks the files, dif build compiles them to dif/generated/client.ts, and @dif.sh/sdk (zero dependencies) assigns variants locally at runtime. No signup, no network call to evaluate a flag.
Add dif to an app
dif/generated/ is gitignored, so add "prebuild": "dif build" (and "predev": "dif build") to package.json, or CI and deploys ship without a client.
The flag file
A flag is an experiment you ramp toward 100%; an experiment holds a split. Same schema. The first variant is the fallback. Weights must sum to 100.
The call site
dif validate warns (W001) when a call site names an id that isn't an active experiment. At runtime, an unknown id or a variant with no matching branch renders the first branch and fires no exposure. For server rendering, use the pure assign(id, { userId, attributes }) export instead of dif(); @dif.sh/react and @dif.sh/svelte wrap both.
Docs (markdown)
- Overview, install, workspace layout: https://dif.sh/docs.md
- File format (frontmatter, audiences, exclusion groups): https://dif.sh/docs/format.md
- CLI (init, connect, new, validate, build, qa, conclude, scaffold-audiences): https://dif.sh/docs/cli.md
- SDK (
dif(),assign(), React and Svelte adapters,dif.track()): https://dif.sh/docs/sdk.md dif/config.yaml: https://dif.sh/docs/config.md- Events (cloud vs custom delivery): https://dif.sh/docs/events.md
- Validation codes (E001–E010, W001–W005): https://dif.sh/docs/troubleshooting.md
- dif cloud MCP server and read API (tools, REST endpoints, read tokens, verdicts): https://dif.sh/docs/mcp.md
- Full index: https://dif.sh/llms.txt
- Source: https://github.com/dif-sh/dif
Workflow skills
Install the workflow skills with npx skills add dif-sh/dif: dif-author-experiment (draft and validate a flag or experiment), dif-conclude-experiment (get the result from dif cloud, check the verdict, record the decision and archive), dif-triage-experiments (review every active experiment in the dif cloud overview, then ramp, turn off or conclude the ones that need action, with one PR each in autonomous mode), dif-generate-surfaces (propose dif/surfaces/ from the app's routes). dif init also writes them into .claude/skills/. The conclude and triage skills read dif cloud through its MCP server at https://cloud.dif.sh/mcp (set up with a read token) or a read token in DIF_TOKEN. Setup: https://dif.sh/docs/mcp.md
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/dif-docs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dif-sh/dif/dif-docs)