devscratchpad CLI
AI agent rulebooks, installed from your terminal.
Scaffold, audit and install rules for Cursor, Claude Code, Windsurf, Copilot, OpenAI and Gemini with one command. No install, no dependencies, nothing leaves your machine.
Build your command
Writes .cursor/rules/nextjs-15.mdc
What each command prints
Sample output and the files written to your repository.
Fetching rules for "nextjs-15" in format "cursor-rules"…
Installed
- target
- .cursor/rules/nextjs-15.mdc
- format
- cursor-rules
- network
- public preset only; nothing from your repo is sent
Customize it in AI Skill Studio: /ai-skill-studio/cursor-rules/nextjs-15
Why a CLI
Stays on your machine
Audits run in your local Node.js process with zero telemetry. Writes are confined to the current workspace and slugs are validated against path traversal.
Zero dependencies
Built only on Node.js standard modules (node:fs, node:path, node:https). Nothing to install; npx fetches a single small package.
One syntax, every assistant
The same add command writes Cursor, Claude Code, Windsurf, Copilot, OpenAI and Gemini rules to the paths each tool reads.
How it works
- 01
Pick assistant and stack
Choose a format and a preset in the builder above, or run list.
- 02
Run one command
Use npx, pnpm dlx or bunx. No global install.
- 03
Rules land in place
Files go to the standard paths, such as .cursor/rules/, ready for your assistant.
Command reference
| Command | What it does | Example | Writes |
|---|---|---|---|
| add <format>/<preset> | Install a rulebook | $npx devscratchpad add cursor-rules/nextjs-15 | .cursor/rules/nextjs-15.mdc |
| add <preset> -f <format> | Same, flag syntax | $npx devscratchpad add fastapi -f claude-skills | .claude/skills/fastapi/SKILL.md |
| add … --dry-run | Preview, change nothing | $npx devscratchpad add claude-skills/fastapi --dry-run | Nothing (prints the plan) |
| add … --force | Replace an existing file | $npx devscratchpad add cursor-rules/nextjs-15 --force | New file + <file>.bak |
| audit [dir] | Score existing rule files | $npx devscratchpad audit | Read-only report |
| audit --min-score <n> | Fail CI below a score | $npx devscratchpad audit --min-score 80 --json | Exit code 1 if any file < n |
| list | Show formats and presets | $npx devscratchpad list | Printed to terminal |
| init | Scaffold the 5-layer suite | $npx devscratchpad init | 7 files (rules, CLAUDE.md, AGENTS.md…) |
Questions
Do I need to install devscratchpad globally?
No. It is published as an npm executable, so npx devscratchpad <command> runs it without a global install. Prefer a global binary? Run npm install -g devscratchpad.
Will it overwrite files I already have?
No. Existing files are skipped. Pass --force to replace one (the previous version is kept as <file>.bak), or --dry-run to see what would be written first.
Can I run the audit in CI?
Yes. npx devscratchpad audit --min-score 80 exits with code 1 when any rule file scores below 80, and --json prints a machine-readable report.
Does the CLI upload my code or prompts?
No. It has zero telemetry. The only network request is fetching a public preset, and it falls back to bundled templates when you are offline.
Which assistants and formats are supported?
13 formats: Cursor .mdc, Claude Code SKILL.md and CLAUDE.md, AGENTS.md, Windsurf, GitHub Copilot, MCP config, OpenAI, Gemini, .cursorignore, .claudeignore, llms.txt and ARCHITECTURE.md.
How does audit score my rules?
It runs static checks on every rule file it finds: negative guardrails, a trust boundary against instructions hidden in file contents, confirmation gates for irreversible actions, rule length and density, trigger and glob specificity, and vague directives such as “write clean code”. Each file gets a 0–100 score with fixes.
How do I migrate a legacy .cursorrules file?
Paste it into the rules converter to split it into Cursor .mdc, Claude SKILL.md or Windsurf rules.
Prefer a visual editor?
Build and score the same rules in AI Skill Studio, then download them.